Re: Temperature Control -- PID -- Heater

From: David Powell (davidpowell_at_nospam.sympatico.ca)
Date: 04/01/04


Date: Thu, 1 Apr 2004 00:42:38 +0100

Hi,

I would avoid using the D term altogether, and just use PI. you only need D
where the error can change quickly ( say a fast servo system. ). As you will
have lots of thermal mass ( metal ect.. ) it's not going to change quickly.

As regards sample intervil, 4 Hz should do fine.

How exactly are you going to control the heater? Triac? Power switch???
Relay?? ( I would assume a Triac with zero cross detection )

A PI loop is simple

    error = desired_temp - actual_temp

    output = Kp * error + Ki * sum;

    sum += error; // intergrator

the gains Kp and Ki are set by you.

I would also filter the temperture data you get from your sensor with a nice
filter in s/w, your temp isn't going to change quickly so you should be able
to clean it up nicely...

Let me know if this helps....

Dave

"Mike V." <valemike@yahoo.com> wrote in message
news:8188616d.0403281006.3e5720d1@posting.google.com...
> I'm a contractor at a company that needs to implement a control board
> for the food industry, and i need to write microcontroller PID
> software. here's a brief description:
> 1. it's a fryer with a few gallons of oil, and the setpoint
> temperature is configurable, but for most practical purposes, 355 deg.
> F is the setpoint i'll be maintaining.
> 2. the customer wants to be able to input their own coefficients for
> setpoint temp., P, I, and D variables.
>
> Okay, so i've read a bunch of ESP magazine issues, and think i've
> gathered enough source code to implement the PID. I only wonder about
> the following:
> 1. How often should i sample the temperature? I'm thinking once per
> second is good enough.
> 2. I don't think the hardware guy hooked the heater up to a PWM pin on
> the microcontroller. Perhaps it would be good to do so. What, then, is
> the ideal PWM period (ms? seconds?)?
> 3. Is it really wise to allow the customer to choose their own
> coefficients? I don't think it is a good idea since one set of
> coefficients won't be good through all temperatures. For example, one
> set of programmed coefficients might minimize overshoot and
> oscillations near the setpoint temperature, but then it may not heat
> up the oil fast enough. Or they can choose coefficients that heats up
> the oil quickly, but then they'll get overshoot and oscillations
> around the setpoint.



Relevant Pages

  • Re: Temperature Control -- PID -- Heater
    ... > I'm a contractor at a company that needs to implement a control board ... > temperature is configurable, but for most practical purposes, 355 deg. ... > F is the setpoint i'll be maintaining. ... the customer wants to be able to input their own coefficients for ...
    (comp.arch.embedded)
  • Re: Temperature Control -- PID -- Heater
    ... If sample rate is very high in comparison to the ... > temperature is configurable, but for most practical purposes, 355 deg. ... > F is the setpoint i'll be maintaining. ... the customer wants to be able to input their own coefficients for ...
    (comp.arch.embedded)
  • Re: Temperature Control -- PID -- Heater
    ... and i need to write microcontroller PID ... >temperature is configurable, but for most practical purposes, 355 deg. ... >F is the setpoint i'll be maintaining. ... the customer wants to be able to input their own coefficients for ...
    (comp.arch.embedded)
  • Temperature Control -- PID -- Heater
    ... and i need to write microcontroller PID ... temperature is configurable, but for most practical purposes, 355 deg. ... F is the setpoint i'll be maintaining. ... the customer wants to be able to input their own coefficients for ...
    (comp.arch.embedded)
  • Re: Lizard engines and rat engines
    ... An upper setpoint, such that if body temperature rises beyond it, ... Mammals are high maintenance animals in this sense. ... > heat effectively. ...
    (sci.bio.evolution)