Shop OBEX P1 Docs P2 Docs Learn Events
PID heater help - Page 2 — Parallax Forums

PID heater help

2»

Comments

  • TCTC Posts: 1,019
    edited 2014-04-19 06:48
    Hi TC;

    PID for dummies.
    proportional-integral-derivative
    Lets think about the old fashioned round Honywell thermostat.
    P=proportional
    The power delivered to the house, the rate heat is added from the furnace, is proportional to the the difference between the set point on my T87 and the room temperature.
    A P controller must have an error to output power. The gain factor defines how much error there will be.
    So, when its cold outside the room temperature will be colder than the set point.
    A P controller should be fast acting to track quick changes in the heat load.
    However, with high gain factors the system may go into oscillation and overshoot.

    I=integral
    On that cold night when I feel a bit chilly I may slowly adjust the set point on my T87 to compensate for the set point error.
    This is integration. A slow fudging of the dial until there is minimal error.
    In this example I am the I for the T87.
    I should be slow acting.

    D=derivative
    Ok, my house has settled down and I am comfortable but somebody opens the door and a bunch of heat escapes.
    Since the thermostat will sense this immediately the P controller would try to turn the furnace on immediately and strongly which can cause the P and I controllers to go unstable.
    However, the whole house has a lot of thermal mass and really doesn't need to change much.
    The D derivative controller watches the changes in the room temperature. D reduces the power output caused by the D controller.
    Essentially D is a limiting factor, the higher the D gain the less power that can be delivered.
    The faster the sensed temperature changes the less power delivered by the furnace.
    Don't go to high as D can not control the temperature.

    Unfortunately the T87 has no I nor D function but electronic thermostats do.

    Generalizations:
    System with high thermal mass can use hi P, low I, and low D.
    Systems with low thermal mass can use low P, hi I, and hi D.
    Systems with long time constants can use low P, low I, and hi D.

    Tuning:
    1. Start with pure P and increase the gain until it oscillates then back off the gain. There will be error, were just looking for stability.
    2. Add some I until the error is acceptable.
    3. Cause a transient heat load. Add some D to limit overshoots. You may need to reduce P.
    This should at least get the controller going.

    I keep meticulous notes when tuning PIDs as it can be very confusing with 3 interacting unknowns.

    Duane J

    That is some great info, thanks.

    I made a program that would run the oven from room temp to 150C, and log the temp. It was fully automatic. It would increase the values for each cycle. then after it was done (about 2 weeks) I would take the data, transfer it to Excel and plot a graph. I was able to find the best values to use, and to be able to see what the oven was doing.

    But now I have to do it all over again because I am changing a few things, YAY:blank:
Sign In or Register to comment.