PID Tuning and Process Modeling

kdcui

Lifetime Supporting Member
Join Date
Dec 2007
Location
USA
Posts
386
PID algorithms and control theory interests me and in my spare time I like to continually read up on articles or revisit textbook material.

As I have read and understand things, the proper way to tune a loop is to collect data about a process' response and obtain tuning parameters based upon data (ie: building a FOPDT model).

However, in pretty much every experience I've had with tuning loops in the industry, I've never actually seen an engineer do this. Usually they have a good idea (based on experience or previous data) of where they want their parameters to be and kind of "play" with the loop to get it to respond within their set tuning criteria. I've seen guidelines out there which give standard ranges of PID parameters based on what kind of process you are trying to control.

So this leads me to some questions on how things should be done realistically; hopefully this isn't just my inexperience in the real world regurgitating things from academia...

Should a process model be derived every time you tune? If not, when is it appropriate, or are there ever instances where it is counter-productive to do so?

Is there ever a point of diminishing returns based on the effort put into trying to tune a loop like this?

Thanks for any input!
 
However, in pretty much every experience I've had with tuning loops in the industry, I've never actually seen an engineer do this.
Either you have never seen a real control engineer or the system was so simple that it could be tuned manually. A real control engineer would know it it is more work to manually tune or use the math.

So this leads me to some questions on how things should be done realistically; hopefully this isn't just my inexperience in the real world regurgitating things from academia...
As you pointed out the real problem is getting the data and fitting it to a model. Should the model be a FOPDT or SOPDT or neither. Position control models have an extra integrator that integrate velocity to position. I all cases you must hope the system is relatively linear.

I have never seen a system with a transfer function provided. As far as I am concerned all systems I have seen are kludged and not designed. This means the control engineer must find a transfer function that is close enough empirically.


Should a process model be derived every time you tune?
Yes, systems change.

If not, when is it appropriate, or are there ever instances where it is counter-productive to do so?
If it takes a long time to do. I doesn' t take much time to auto tune a motion system. I may take hours to bump a power plant or some other process.

Is there ever a point of diminishing returns based on the effort put into trying to tune a loop like this?
Yes, there is a point of diminishing returns in almost all things. We often see people spend way too much time trying to achieve perfection when it will never be achieved. If the system meets your tolerances then it is good enough.

Do an advanced search on this forum for 'Advanced Control'. Search more my name or Pandiani. Pandiani doesn't post as often so searching for his name may be yield few posts to wade through.

If you have specific questions I can answer them.
 
Thanks for the reply Peter.

I work mainly in the pharmaceutical industry. Many of the automation engineers I have worked with have been in the controls for a long time (they are degreed ChemEs, EEs, MEs for the most part). Obviously there is more to being an automation and controls engineer than being able to tune loops, but I would like to think they are / have been doing a reasonable job.

Most of the systems I have worked on are relatively simple, mostly flow controllers or pressure controllers with little or no disturbance.

One of the more complicated things I worked on was two PID loops working in tangent (flow control and back-pressure control to maintain a trans-membrane pressure on a filter membrane), but that was a somewhat unique process that required a lot of manual input.

Other processes I've looked at were cascaded PID loops that controlled jacket temp, but rather than control a flow valve the output % was processed by some algorithm to calculate a pulse time for a valve (a pulse width modulation scheme). Additionally there were constraints in the code that would pop the loop into manual and set an output to prevent the jacket temp from getting too high, or from cooling too fast/low.

In the former case, I'm am unsure if modeling the processes was warranted, as they were relatively simple, but perhaps they should have been? The latter two seem to be a bit complicated due to the manual / custom coded nature of the process.

When tuning loops, how advisable is it to have some tuning software? Or can the more simple analyses be done "manually"?

Thanks again.
 
Last edited:
I have written my own modeling software in Mathcad, C and Scilab. It doesn't take that much code once you understand what you are doing. I believe the Scilab code has been posted on this website for doing SOPDT and FOPDT.

Modeling the system is good because it increases your understanding of how the system really works and provides documentation for the next guy that comes along. Also, as time goes on one can add to the model to make it take into account more things. Models get better with time.
 
Hello kdcui,

I had more or less same questions when I just finished college. There were a few very good threads named "Advanced control" in which various topics were discussed like PID tuning, pole placement and system modeling. A special attention was payed on FOPDT and SOPDT modeling since large number of technological processes can be reasonably good aproximated with either first order or second order dynamics.

Good dynamics approximation leads to good PID tuning. Some of the threads were inspired by examples posted on controlguru.com.
I cannot say for myself that I always made models in orded to tune control loops but in some cases I had and it worked very good. The goal is not to find exact model of the process (since it is impossible), but to find good approximation with system of lower order and then apply some tunning methods like IMC.

Regards,

Pandiani
 
Thanks Pandiani,

I'll give those threads a look. I've known about ControlGuru for a while and have been meaning to read the articles there in detail. In fact one of the contributors to the site (Riggs) was one of the authors of my college process control textbook. Between the two sources I find the information very valuable.
 
Originally posted by Peter Nachtwey:

Modeling the system is good because it increases your understanding of how the system really works and provides documentation for the next guy that comes along. Also, as time goes on one can add to the model to make it take into account more things. Models get better with time.

This is the biggest thing I take away from modelling. If you don't understand what you are trying to control how can you effectively control it? The big side benefit to this is that, once you have the model, calculating gains and testing their response is pretty easy. But as Peter said, your model will be refined as you go.

For example, a first order linear model with a left half-plane pole (many temperature control applications) is unconditionally stable. No matter how high you increase the gain the model won't oscillate. But, as you know, it is pretty easy in the real world to cause what appears to be a first order system to oscillate. Why? That is where modelling can help. As you start to analyze your system you may find transport delay (deadtime) which then makes it a FOPDT system. Update your model with this information. You will find that your actuator has a first order (or higher) response and that adds a pole (or two). You will find that your sensor has a first order (or higher) response to it and that adds another pole (or two). All this information can be added to your model to make it more representative of your real system.

Now, having said that, I don't do as much modelling as I should. My systems are relatively easy for me to tune. However, the place where modelling may really help is on the front side of projects. I really can't tell my boss with any degree of confidence that we can make any given system stable unless we have done the exact system before. While having a model and making react in a stable manner is not a guarantee that the real thing will be stable, if I can't get the model to be stable I surely won't get the real thing to be stable.

Keith
 
I believe packages such as Matrikon TaiJi PID or a package from Expertune essentially do the same thing right? Find the model and determine adequate tuning parameters for the model. I use TaiJi PID, and am amazed at how fast it is.
 
I really can't tell my boss with any degree of confidence that we can make any given system stable unless we have done the exact system before. While having a model and making react in a stable manner is not a guarantee that the real thing will be stable, if I can't get the model to be stable I surely won't get the real thing to be stable.
A model doesn't EVER tell you that a system will work. It will tell you a system will not. There are always un-modeled features in the real system that make performance worse that the model.

Still I have been able to save my customers a lot of money by telling them their system will not work as designed before it is built.

Some systems are very difficult to identify. A simple Laplace transform will not be good enough. The model may be non-linear. In these cases the model will need to use a system of non-linear differential equations. Identifying the coefficients to these system is difficult in that the system must be excited in just the right way and it takes a lot of math to find the best values for these coefficients so the difference between the model and the actual plant is minimized. One can't put that much effort into a motion control system but if I worked in a power plant I would.

BTW, even a hydraulic system can have 8 or 9 differential equations in its model but if it is designed right the system should simplify down to a gain, natural frequency and a damping factor.
 
"Should a process model be derived every time you tune? "
Peter may say yes, but in my experience 95% of loops are indeed tuned manually, with less than optimum results of course but often that is good enough.
 
"Should a process model be derived every time you tune? "
Peter may say yes, but in my experience 95% of loops are indeed tuned manually, with less than optimum results of course but often that is good enough.

I agree with this one. The real question should be: "is it worth it"? Of course it is better to do modeling but if "good enough" response can be achieved then that is the end especially if you don't have time. In my experience (which is not that big) process modeling is a must when you need to optimize control loop performance to save money in the long run. For such simple application "good enough" is really good enough.
 
If you have the time and the data is availabe it is good to model, but you can tune a PID without modelling too. If you model, you have to do it right, as some times we set assumptions and neglect certain real practical issues in modelling.
 
"Should a process model be derived every time you tune? "
Peter may say yes, but in my experience 95% of loops are indeed tuned manually, with less than optimum results of course but often that is good enough.
In the process industry that may be true but we supply an auto tune feature with our motion controllers. Auto tuning can save hours of time when there is a need to tune 60+ axes during commissioning. Even if the auto tuning isn't perfect it gets close enough so only a little tweaking should be necessary.

The question we get asked so often is "where do I start?" So what do you do when starting out? After the system has been tuned once the gains shouldn't change that much.

The perspective from a commissioning point of view is much different from an on going maintenance point of view.
 
Yes, motion control is a completely different domain to the process control that I normally deal with. It ia governed by physics rather than chemistry and as such much easier to model.
It looks like from what kdcui says that the original question related to process.
 
Indeed, my question was made with process oriented systems (dissolved oxygen content, filtration, heating a tank) in mind and not motion, however I would still think modeling a system would be beneficial
 

Similar Topics

I'm not really experienced with PID so I need some help. I have a 300l insulated pasteurizer with heat exchanger on the inner side wall and the...
Replies
6
Views
2,698
Hi all, I'm interested in setting up a small process in my office to test some PID tuning software. I want to make sure I've got it all down-pat...
Replies
5
Views
2,576
Hello, I am attempting to tune a PID loop on a process. The process involves a valve with electronic actuator that has quite a high deadband...
Replies
10
Views
2,068
so i have 4 25gpm wells feeding a 1000gal tank (T-1), with an additional 15gpm from a decant tank for 3hrs every 12hrs. P1 and P2 both controlled...
Replies
154
Views
35,517
Hi everyone, yet another PID problem. I'm hoping I understand enough of the process I'm controlling that my request for help is reasonable. If a...
Replies
113
Views
27,595
Back
Top Bottom