|
|
View previous topic :: View next topic |
Author |
Message |
valemike Guest
|
PID question. Sampling frequency? |
Posted: Tue Sep 14, 2004 9:18 am |
|
|
I'm using pin RB0 as a zero cross detector from the AC line.
My period for the heater is 8 cycles (thus 8 x 16.6ms = 133ms).
The duty cycle is 0 thru 8, giving me a fraction of n/8.
If doing PID regulation, how often do I have to sample the temperature? Everytime the 8 cycles has elapsed? Or more often, less often? |
|
|
Ttelmah Guest
|
Re: PID question. Sampling frequency? |
Posted: Tue Sep 14, 2004 9:45 am |
|
|
valemike wrote: | I'm using pin RB0 as a zero cross detector from the AC line.
My period for the heater is 8 cycles (thus 8 x 16.6ms = 133ms).
The duty cycle is 0 thru 8, giving me a fraction of n/8.
If doing PID regulation, how often do I have to sample the temperature? Everytime the 8 cycles has elapsed? Or more often, less often? |
It depends on other things. How quickly the sensor responds to changes in the temperature, how fast the heater responds etc.. If the system has a 'slow' response time, you can sample at a much lower frequency. If however the response if fast, then the 'control loop' also needs to be fast.
The loop time, needs to be significantly faster than the system response time, or oscillation is likely.
Best Wishes |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Tue Sep 14, 2004 9:55 am |
|
|
In your case once per eight cycles would be ideal, preferably near the end of cycle eight when the heater is almost allways off. For a heater it doesn't matter much but if it was an electrically noisy load like a motor it is especially good to sample when the load is off.
If you were to sample every 7 or 9 cycles you could get a "beat note" between the PWM cycles and the sampling cycles that can cause problems. Keep the sampling a constant multiple (or sub-multiple) of the PWM cycle. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|