Jump to content

What's your favorite book/tutorial on PID tuning?


Recommended Posts

Even after thre semesters of controls study in my BSEE program and multiple projects with manually tuned PID systems, I still feel like it's something of a black art. I've met oldschool engineers at my clients' offices with a preternatural talent for tuning PIDs, but when I asked them what their approach was, they couldn't really describe it. Just "intuition".

 

What's your favorite book, tutorial, or other resource on tuning PIDs by hand? I've read all the Wikipedia articles and free online tutorials presented by college undrgrads or companies with a product to sell. I'm looking for the real deal here, the authentic guide to tuning mastery!

Edited by Stobber
  • Like 1
Link to post
Share on other sites

I don't have an answer, I'm in much the same situation. I've gotten pretty good at tuning but I'd be hard-pressed to explain it or put down any solid methodology.

Just chiming in, you're not the only one.

Link to post
Share on other sites
Even after thre semesters of controls study in my BSEE program and multiple projects with manually tuned PID systems, I still feel like it's something of a black art. I've met oldschool engineers at my clients' offices with a preternatural talent for tuning PIDs, but when I asked them what their approach was, they couldn't really describe it. Just "intuition".

What's your favorite book, tutorial, or other resource on tuning PIDs by hand? I've read all the Wikipedia articles and free online tutorials presented by college undrgrads or companies with a product to sell. I'm looking for the real deal here, the authentic guide to tuning mastery!

 

It is a black art because it depends on the load and the symmetry of (in the case of temperature controllers) the heat/cool cycles (try an oven with nitrogen injection cooling!). It is always a trade-off since some systems cannot tolerate any overshoot and therefore require different parameters to those that can even though they behave the same in relation to transients.

You can formally calculate PID parameters but they are, at best, a "first best guess" in real world applications and unless you are dealing with an ideal load, will need to be tweaked with things like prop-band and dead-band.

This is all you need to know about calculating PID.

http://www.dcnz.com/resources/tutorials/pid.pdf

The rest is knowledge of the system and experience with similar systems which give you the Control Engineers equivalent of "Code Smell". It is similar in many ways to debugging which is why it is difficult to explain by the experienced engineer.

Edited by ShaunR
  • Like 2
Link to post
Share on other sites

In general I agree with ShaunR's comments. However, I wouldn't say that the "all you need to know" link is comprehensive. It looks like a good resource for tuning heaters and similar systems, but that's not the only application of PID. Servo controllers in motion control systems often use PID as well, but are tuned differently because they have a different response. For example, in a heating or cooling situation, you almost always need some constant output in order to maintain the desired temperature, otherwise the process starts to drift towards ambient. However, in motion control, once you reach your target, you shut off the output (or reduce the power dramatically to a holding current). If you have a slight offset from the target position, you may not want to correct it with integral control, because integral control can cause a sudden jump after the system appears to have stopped (the output will increase slowly until it's sufficient to cause motion, and then probably overshoot the target location). Servos are often tuned with proportional and derivative control alone.

 

I don't think PID tuning is as much intuition as it is getting a feel for the effect of different gains, although maybe that feels like intuition after a while. Try setting up some simple simulated processes in LabVIEW and then tuning them. Studying the math behind it can help, too. For simple systems like heaters, where the response is generally slow, the feedback isn't noisy, and it's difficult to drive the system to instability, a basic understanding of PID equations is enough. If you're working in systems that can go unstable (and potentially cause damage), you may want to study the math in more detail, looking at stability criteria, frequency response and Bode plots. Unfortunately I can't offer a good resource on those topics, it's one of those things that I would love to understand in more depth but haven't had the right combination of need and opportunity to learn it.

Link to post
Share on other sites

ned, I've studied the math formally. While useful for understanding, it's largely worthless without a model of the plant, and what I'm looking for is advice on how to tune without models. ShaunR's link is good at putting all the parameters into this context once you're familiar with the math and the lingo. Yes, it focuses on temperature control...it'd be nice to find something analagous for servomotor control.

Link to post
Share on other sites
...it's largely worthless without a model of the plant...

 

This is my beef with PID control theory reference material as well. I find it's pretty trivial to do PID if I have a well characterized plant and can get "close enough" with a model calculation, leaving the PID to take up the slack. The "intuition" part comes in when I'm working with systems where the plant is not well understood.

Link to post
Share on other sites
For example, in a heating or cooling situation, you almost always need some constant output in order to maintain the desired temperature, otherwise the process starts to drift towards ambient. However, in motion control, once you reach your target, you shut off the output (or reduce the power dramatically to a holding current).

 

I don't think it is as different as you might think.

With temp controllers you reduce power approaching setpoint since you only need to put enough energy in to compensate for heat loss (synonymous with your holding current and, generally, it is a current unless they are gas heaters). You need far less energy to maintain a temperature than you need to get there (overcome thermal inertia). Similarly with motors. You need more energy to drive to position (overcome mechanical inertia) than hold it for exactly the same reasons.

That's the thing about PID tuning. It doesn't matter what the system is (3 fat ladies on a see-saw). It's an empirical method to map a systems final output solely in terms of its input to arrive at an approximate model of the system - regardless of what the units may be (deg/C, deg/rad, or lemons).

  • Like 1
Link to post
Share on other sites
ned, I've studied the math formally. While useful for understanding, it's largely worthless without a model of the plant, and what I'm looking for is advice on how to tune without models. ShaunR's link is good at putting all the parameters into this context once you're familiar with the math and the lingo. Yes, it focuses on temperature control...it'd be nice to find something analagous for servomotor control.

 

There is a lot of material about transfer functions and Laplace transforms and precise mathematical models of the system. That's not what I meant. I meant the PID calculation itself - which is amazingly simple given how many places it can be used. I like to think about PID in terms of real units (maybe you do this already too). The Proportional gain is the ratio between a change in input and the corresponding change in output. The integral and derivative times likewise have real meanings - they're not just numbers. You likely know this already, but I'm always surprised at the number of people who have trouble explaining PID because they don't think about the physical meaning of the gains. I found that PID tuning suddenly made more sense to me when I started thinking about it the gains corresponding directly to units in the process, and it doesn't require a detailed mathematical model.

Link to post
Share on other sites
I like to think about PID in terms of real units (maybe you do this already too). The Proportional gain is the ratio between a change in input and the corresponding change in output. The integral and derivative times likewise have real meanings - they're not just numbers. You likely know this already, but I'm always surprised at the number of people who have trouble explaining PID because they don't think about the physical meaning of the gains. I found that PID tuning suddenly made more sense to me when I started thinking about it the gains corresponding directly to units in the process, and it doesn't require a detailed mathematical model.

I like to go a step further and try and represent things graphically.  For temperature control I plot the "Proportional Band”, the range of temperatures where the heater output would be between zero and 100%, on the same graph as the process variable.  Tuning is still by intuition, but with more visual information to go on.  You can see the effects of the PID parameters in the twists of the proportional band.

Link to post
Share on other sites
I like to go a step further and try and represent things graphically. For temperature control I plot the "Proportional Band”, the range of temperatures where the heater output would be between zero and 100%, on the same graph as the process variable. Tuning is still by intuition, but with more visual information to go on. You can see the effects of the PID parameters in the twists of the proportional band.

I'm also a very visual person (hence my preference for LabVIEW). Combine what you are saying with Taguchi analysis and it takes a lot of the intuition out of it.

https://controls.engin.umich.edu/wiki/index.php/Design_of_experiments_via_taguchi_methods:_orthogonal_arrays

 

Damn. What is it with links?

Edited by ShaunR
Link to post
Share on other sites

It doesn't help trying to tune when the implementation does not match the learned theory. Take, for example, tuning drives. The few times that I've been involved with the tuning, the proportional and derivative have been unit-less values and the integral in milliseconds (specifically, the rate at which the PID was calculated).

 

As an aside, I just got out of a sales pitch during which the hardware expert described the controls drawing of their PID controller as "something the Austrians came up with while drinking one night".

  • Like 1
Link to post
Share on other sites

Oscillate it (P).  Critically damp it (PD).  Trim the offset (PID).  I am a stickler for anti-windup as well.  I have found that to work great to get things very hot, very cold, very magnetic, and very stable. 

 

To me the problem is not that the underlying physical system is crazy, because surprisingly many are approximated very well by relatively simple transfer functions.  The problems I encounter usually involve conditioning the feedback signal so I am not chasing the noise while not adding an excessive time delay into the feedback system (that is a real bandwidth killer).

 

If something will blow up and blowing up costs $$$ then you had better model the heck out of it.  Otherwise I would study the math on the back of an envelope to estimate a range for each parameter and then tune away.

 

I liken these things to the Wright brother's plane, hard to fly, but much harder to explain how to fly it. 

Link to post
Share on other sites

This guy really knows his stuff...

 

www(dot)controlguru(dot)com

 

I have found that understanding the open loop response of a system is a good first step.  Try to use this knowledge to develop a FeedForward model of the system and then the PID portion will be able to deal with the smaller (and hopefully linear) error left over.

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By Georgesun
      I think you can try this example. Changing K does not change his rise time. And by decreasing the value of K, he becomes more unstable.
      I Hope someone can answer my doubts.
    • By Autodefenestrator
      I'm currently doing some driver creation in advance of getting actual hardware hooked up.
      One of the things I have to do is use a TEC temperature controller.  This will be used on multiple stations with identical functionality, but we sort of "scrounged" for instruments, so we couldn't get the same model of TEC controller everywhere.  We have 3 different ones (Newport 3700, Keithley 2510, ILX LDT-5980 if it matters).
      What I'm trying to figure out is if the PID constants that can be set on these devices are universal or not.  They'll all be using the same sensor (10K thermistor) and the same TEC (with adapters for the different plugs), and theoretically they'll all be using voltage set points to drive the TECs.
      Basically, I would like to tune the PID for one setup, and then just be able to copy those values over to setups using the other two TEC controller models.  But right now I can't tell if those PID constants are equivalent across all of the devices or not.
    • By Morbo
      Hello,
       
      why does aurotune not work in the attached vi? Plus if I change the setpoint, shouldnt the PID output change as well? I.e., if say the pump needs to pump more, has to spin faster? or at least, have to ramp up once to fill to a new level and then oscillate again, since the amplitude is the same.
       
      Its a squarewave on the input, the help says, when the process is oscillating, outotune should come up with something. The squarewave kind of oscillates just around 2 levels?
       
      Thanks,
       
      MorboPID 01 autotune.vi
    • By Alessandro Pezzano
      Hello,
      I found an example of an On-Off controller on Labview that I am attaching. I wanted to see how it would work the same VI replacing the thermostat a PID block and using the simplified model of a room in the form of the transfer function (R / (RCS +1)) but I'm not sure the right way to proceed. the integrator is to stay?  I have to connect directly with the pid of the entrance to the furnace? I have to modify the VI?  I hope in your kind suggestion 
       
      thanks
      Alessandro
      On-Off Controller modificato.vi
      On-Off Controller.vi
    • By Bruno Costa
      This window is one of many groups windows. These windows has a fixed size resume area tha can be extended, when floating mode, tho show details of the control group.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.