??? 11/03/10 12:46 Read: times |
#179465 - Sorry but.... Responding to: ???'s previous message |
I am sorry but I cannot really help you with finding the coefficient values for your system. Those you have to find by working with your setup.
First off it is very important to understand what each of the P, I, and D values do to the error term accumulation. These values also have to be used to scale the temperature difference readings into the PWM setting units so that the range is correct. If you follow Tim's article you should be able to zero in on a pretty good solution. You mention that your PWM has a 2 seconds period. Are you sure that this is a suitable control period? This implies that you are running the PID algorithm also with a 2 second sample period. You should evaluate how much the temperature of your thermal load can be changed when the heater control is set on at 100% for two seconds. This will help guide you to what sample rate you can use. If the temperature can change a lot in 2 seconds then you may very well want to look at a faster PWM and sample rate. Note that there is nothing to keep you from using a faster PWM rate than your sample rate. On the other hand I would like to suggest that a sample rate that is faster than your PWM rate does not sound so useful. When using an MCU to do PID you also have to consider how you implement the PID control equation. In the first approach it is common to simply use floating point math to compute the error terms. This works fine as long as your processor has the bandwidth to compute the equation once each sample period and still has enough left over to run the rest of the things that the MCU is expected to do. Sometimes it is necessary to find the range of your system coefficients and then use integer math for the calculations where the scale values have a power of two relationship to the net error term values. I have done such in an MCU controlled switching voltage regulator that had to run its sample rate at about 3 KHz to result in a reasonable loop response rate. At about 333uS there just was not enough time to run a bunch if float calculations each sample period!! Michael Karas |
Topic | Author | Date |
PID temperature controller | 01/01/70 00:00 | |
LPC2136 | 01/01/70 00:00 | |
Did you google it? | 01/01/70 00:00 | |
RE: It has been discussed. | 01/01/70 00:00 | |
This might help you for a start... | 01/01/70 00:00 | |
how do i get p d and i | 01/01/70 00:00 | |
getting values | 01/01/70 00:00 | |
Have you actually done any research at all? | 01/01/70 00:00 | |
PID Without a PhD | 01/01/70 00:00 | |
thanks and some doubts | 01/01/70 00:00 | |
Sorry but.... | 01/01/70 00:00 | |
OK | 01/01/70 00:00 | |
lets start over again | 01/01/70 00:00 | |
First things first. | 01/01/70 00:00 | |
my email id | 01/01/70 00:00 | |
4 Months | 01/01/70 00:00 | |
Yes, Pretty true..it was in 1997 | 01/01/70 00:00 | |
How to post legible source code | 01/01/70 00:00 |