Precision PID controller

Discussion in 'Furnaces and their construction' started by Perseus123, Feb 16, 2021.

  1. Perseus123

    Perseus123 Lead

    It seems to work on my kiln, but stays 10-20c above target temp and it keeps shifting quickly.
    Not sure if this is considered noise from the pt100. Any way to stabilize it?

    I have another temp probe and it’s reading more stable. Doesn’t shift radically up down
     
    Last edited: Feb 18, 2021
  2. KDM

    KDM Copper

    As indicated, most PIDs are digital: in order to detect when it's time to switch on the heater, the temperature must be allowed to drop slightly below a lower set point. Conversely, in order to ascertain when to switch off your heater, the temperature must be allowed to rise slightly above your upper setpoint. The difference between these two setpoints is your deadband and is what causes the hysteresis effect.
    I'm completely unfamiliar with the off-the-shelf PID controllers, but does your machine have a feature for frequency or "rate"? If the output is on an SSD, I would imagine you could the frequency such that the SSD switches on and off more often.
     
  3. I have seen electrical noise in unshielded PT100 versus identical shielded cable PT100 sensors, but this was measuring in 0.1 degree increments. It sounds like your PT100 probe may be faulty which is not unknown from age, moisture ingress etc. and trying another would be a good idea.
     
  4. ddmckee54

    ddmckee54 Copper

    A PID is inherently an analog device. It takes an analog input which is the feedback from what ever you're trying to control with the PID. This feedback, along with the Setpoint, Proportional, Integral, and Derivative values, are applied to an equation to determine the error, also an analog value. The error value changes as the feedback value approaches the setpoint value.

    If you have an analog output on the PID the error value is used to control this from full off to full on. If you have a digital output on the PID the analog error value has been be converted to a digital value, to turn the relay ON or OFF. This is usually done by using the error value to modify the ON-time in the ON-time/OFF-time duty cycle.

    You can set the P,I and D values manually or in most cases with the newer PID's you just use the Auto-tune feature to have it set them for you. Tuning a loop manually is some what of a black-art, you're either GOOD at it, or it beats you up almost every time. Back when I was doing this all the time, I was still in the latter category - a lot! But once the loop's been "tuned" you can still manually tweak the values if the PID is not responding quite the way you want it to.

    If you're lucky the PID user's manual will tell what each parameter does. If it's a typical Chinglish manual, just try surfing the web. Lots of times somebody else has had the same problem and documented how to fix it.

    If you REALLY want to get a headache, or maybe want to go down the rabbit hole and wrap your head around the math a little more, try Googling "Tuning a PID". It will either fascinate you, or put you to sleep.

    Don
     
  5. KDM

    KDM Copper

    100% correct. I was reluctant to dispute with my learned friend above on account of me being the new guy. The increased frequency makes an otherwise digital output device appear "slightly more analog"!

    I'm sooooo glad you used the expression "black art". It is difficult to get the concept across that a particular set of tunings can only ever be very good at getting you from one given state to one other given state as rapidly as possible with a defined amount of overshoot. Which is why I have my doubts about leaving "autotune" on all the time. Surely, one should use autotune to get to the demanded state, then switch it off, thereby storing those P, I and D gains? If the device is allowed to continually tuem it will ultimately tune itself to a state where it is deviating very little from the setpoint? It will therefore be utterly useless at achieving the setpoint from zero, for example.

    "Chinglish." You just made it onto my Christmas card list.

    It was my start point 10 years ago.

    PS - have you ever had a lucid description of "D"? It seems to be the undefined characteristic, which can be derived by many different means. Any wonder why most everyone I know sets kD=0 and leaves it there?
     
  6. garyhlucas

    garyhlucas Silver

    D is rate of rate change. It causes a larger change in the correction the farther you are from setpoint. Without it you can have sluggish response from starting from zero or in this case a cold temperature.
     
  7. ddmckee54

    ddmckee54 Copper

    P,I and D are part of the PID equation which is used to calculate the output of the controller based on the error between the loop setpoint and the feedback from the loop. There are a couple of different equations that do the same thing and they use different names, Google "PID equation" if you want to go down THAT particular rabbit hole.

    I'm para-phrasing this stuff from an Allen-Bradley SLC 500 reference manual written in '96, so I not just blowin' smoke up your you know what. I've always heard of them as:
    Proportional - This is the proportional gain value, this is how big of a kick in the pants that you give the equation every time it's calculated. (Manual's rule of thumb, set this to 1/2 the value needed to cause the output to oscillate when the I and D values are set to zero.)

    Integral - This is the integral gain value, how long it takes the loop to repeat. I think it's basically how often the PID equation is calculated (Manual's rule of thumb, set this to the value of the natural oscillation measured above.)

    Derivative - This is the rate of change per loop repeat.(Manual's rule of thumb, set this 1/8 of the Integral value.)

    Most loops can be tuned to a point where they are "Good enuff for gubmint work" just using the P & I values. It's when you want to control over-shoot, under-shoot, and ringing that the D value comes into play.

    Regarding leaving the Autotune on, WHY? Unless you bought a really good PID controller that learns every time is run and remembers what it learned, and I would hazard a guess the MOST of the inexpensive Chinese PID's do not fit that category, you would only use the Autotune when you first set up the loop. Unless you radically change the hardware, things are going to respond pretty much the same every time, tune it once and fagiddaboutit. Leaving the Autotune on all the time just wastes the PID's time and yours.

    This is a simplified version of what the Autotune feature should be doing:
    (Any controls engineers out there, please forgive me for my sins, this was dredged up from some pretty murky memories.)
    1) Get the loop to a steady-state - for a furnace this would have everything stabilized at the setpoint temperature.
    2) Upset the loop - the setpoint would be changed significantly.
    3) Let the loop get to steady state again.
    4) The Autotune will measure how long it took to get the loop to steady state again and how the loop responded while it got to steady state. This response, and the time, will be used to calculate the values of P, I & D. By how the loop responded I'm talking about whether there was over-shoot in the loop, under-shoot in the loop, did it ring while it was getting to steady state?

    In some cases the over-shoot or under-shoot of the loop is critical. But with a furnace melting metal, as long as it doesn't melt the furnace and it gets to setpoint quickly, it's more in the "Mehh… Who cares?" category.

    Don
     
    bill likes this.

Share This Page