Re: Temperature Control -- PID -- Heater

From: Paul Carpenter (paul$_at_pcserv.demon.co.uk)
Date: 04/06/04


Date: Tue, 6 Apr 2004 08:28:07 +0000 (UTC)

On 5 Apr, in article
     <8188616d.0404051559.70ea518@posting.google.com>
     valemike@yahoo.com "Mike V." wrote:

>You were asking where is my setpoint stored. Actually, all I store are
>two temperatures (in the form of A/D readings) in the 'linear' region
>of the thermocouple voltages, which is used for calibration upon a
>reset. Upon power-up, i recover these two readings from eeprom,
>calculate m and b from "y=mx+b", then go on to calculate the
>corresponding setpoint A/D reading. Setpoint is a constant 405degF.
>Saving the iterm in eeprom would shorten the eeprom's life. I guess i
>can live with a zeroe'ed out iterm after a quick power failure.

Alternative thought some form of delayed power off for quick power
failures (diode and very large capacitor), if input power fail detected
write integral history and a flag (preferably a counter value) to EEPROM.
If after 'n' counter changes flag still set, clear it. 'n' being sufficiently
larger than the discharge time of the capacitor. If a power fail turns off
the unit check EEPROM flag at startup, see if temp is CLOSE enough to
setpoint to use integral history and reload it and carry on, else live with
it being zeroed.

This needs extra components, code and some thought.

Whatever you do will be a level of complication, but only you can determine
what level of complication suits the product and its requirements.

>no-one@dont-mail-me.com (Robert Scott) wrote in message
> news:<40717f5e.19723101@news.provide.net>...
>> On 5 Apr 2004 06:46:29 -0700, valemike@yahoo.com (Mike V.) wrote:
>>
>> >Assuming i only have a PI control:
>> >
>> >Okay, so if I power on, start with an integral with no history, and
>> >thus zero, my temperature will ramp up to the desired setpoint as the
>> >integral starts accumulating error, and the Pterm narrows down, then
>> >it looks like the Iterm will be the dominant term in the PI control
>> >that is maintaining the temperature at setpoint.
>> >
>> >So if I then suffer a power outage momentarily, thus erasing the
>> >history in the integral in RAM, but my temperature still stayed
>> >hovering around the setpoint. Then when I power up, do I expect to see
>> >a brief dip again in temperature (since the pterm's error will be near
>> >zero, and the iterm's error integral would still be small). Looks like
>> >I have to wait for a significant accumulation of errors until the
>> >Iterm lets me rise back up to setpoint, right?
>>
>> In general, yes. What you point out is a serious consideration in the
>> implementation of the closed loop. On power-up/reset, is there any
>> way to benefit from the lucky happenstance of finding the controlled
>> temperature already near the setpoint? Unfortunately not. If you
>> don't have any non-volatile memory, then there is no place to remember
>> what control output (i.e. duty cycle) was being used to maintain the
>> temperature before the power failure. You might minimize the startup
>> time by finding a typical Iterm for normal operation are hard-wiring
>> that Iterm initialization as part of your power-up/reset code. Or you
>> might do a little better by developing a ROM-based look-up table that
>> gives a close approximation to the correct Iterm based on the current
>> setpoint. By the way, after a power-failure, where will your
>> controller get its setpoint? Does it come from mechanical switches
>> that can be read again? Or is there a tiny bit of non-volatile memory
>> where the setpoint is stored? If so, then maybe you could put the
>> Iterm in there too. In any case, you can certainly do better than
>> starting all over at zero after a power failure.
>>
>>
>> -Robert Scott
>> Ypsilanti, Michigan
>> (Reply through this forum, not by direct e-mail to me, as automatic reply
> address is fake.)
>

-- 
Paul Carpenter		| paul@pcserv.demon.co.uk
<http://www.pcserv.demon.co.uk/>        Main Site
<http://www.gnuh8.org.uk/>              GNU H8 & mailing list info.
<http://www.badweb.org.uk/>             For those web sites you hate.


Relevant Pages

  • Re: Encrypting Harddisk?
    ... > motherboards eeprom. ... Any service interruption in the webcam coverage, motion, power interruption, ... If you want to get wacko about it, use the really *old* aluminum disk packs ... the disk, finely spraying the case with finely powdered, fresh, ...
    (comp.os.linux.security)
  • Re: Encrypting Harddisk?
    ... > motherboards eeprom. ... Any service interruption in the webcam coverage, motion, power interruption, ... If you want to get wacko about it, use the really *old* aluminum disk packs ... the disk, finely spraying the case with finely powdered, fresh, ...
    (comp.os.linux.security)
  • Re: EEPROM guarantees after power loss during a write
    ... wild - but what about the EEPROM internal state machine? ... comparing with known checksum). ...   mark copy 1 invalid ... On power up both copy valid flags would be checked, ...
    (comp.arch.embedded)
  • Re: Algorithms directly working on Gray code variables
    ... >> perfectly secure memory which in worst case (for example, ... >> during EEPROM write cycle) loses only one count, ... >> redundant counters in gray code. ... > not with power loss errors. ...
    (comp.arch.embedded)
  • Re: Temperature Control -- PID -- Heater
    ... >it looks like the Iterm will be the dominant term in the PI control ... >that is maintaining the temperature at setpoint. ... >So if I then suffer a power outage momentarily, ...
    (comp.arch.embedded)

Loading