Iterative Technique for PID Controller Tuning

JCH wrote:


Ok but how do you implement the feed forward? Do you take the open loop transfer function and invert it? Do you suggest implementing the feed forward as a digital filter or as a gains that are multiplied by each derivative of the target. What happens when the target makes a step change. What about the extra integrator in the actuator's open loop transfer function?
(P)I-correction adjusts the

Yes, I said above I would use feed forwards with a target generator that generates the velocity, acceleration and jerks as a function of time or some master reference. However, feed forwards do little good with a step change in the target. That is why I chose a step change. It isn't supposed to be easy.

Again, How do feed forwards help when the target makes a step change?
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Some details: Example http://home.arcor.de/janch/janch/_news/20070412-nachtwey /
--
Regards/Gre Jan C. Hoffmann http://home.arcor.de/janch/janch/menue.htm
eMail aktuell: snipped-for-privacy@nospam.arcornews.de
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Newsbeitrag

This still looks like open loop control to me. Open loop control is not good enough because the there will always be some errors in the model. Jan, you really need to do digital simulations to see how you control method works. I don't see the digital simulations on your website. Scilab is free www.scilab.org.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20T1C1%20PD2D.pdf
I would very much appreciate if you had a try on
Gc(s)=Ga(s) G(s)= Gc(s)*Ga(s) = 1 T(s) = Kc/(1 + Kc) = 1/(1 + 1/Kc)
I have chosen Kc = 10^100 and have no computer problem.
The performance is as aspected: http://home.arcor.de/janch/janch/_news/20070413-nachtwey /
I have simulated before PID feedback systems. Even tuning automatically.
Example: http://home.arcor.de/janch/janch/_control/z010.htm
I stopped working on that because the main problem was how can I get the proper process tranfer functions.
Last year I have written a program that finds the differential equations (DEs) up to order 5 just by using measured points from a 'real step process input'. It's a least square method for DEs.
My idea: Take a DE, compensate it as-is and further tuning is hardly necessary.

I have scilab. For me I it's easier using programs I have written myself.
--
Regards/Gre Jan C. Hoffmann http://home.arcor.de/janch/janch/menue.htm
eMail aktuell: snipped-for-privacy@nospam.arcornews.de
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Peter, surely you realize that all of the things mentioned are just models of reality. No particular model will capture all of the reality. What we hope for is to model well enough capture the things relevant to final operation of a closed loop system. It's true that iteratively tweaking the PID coefficients does a poor job of interpreting the effects of changes (due to modifications or age) and requires good healthy margining away from "optimum"; but it's closest to reality. BTW: I would like to mention a technique which seems to be dead; Nichols charts.
http://www.20sim.com/webhelp4/Toolboxes/frequency_domain/Nichols.gif
This takes the Bode plot and solves the closed loop equation, and gives the margins and with guessed breakpoints the effects of changes, tuning, or age.
Ray
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
RRogers wrote:

Thank you, Ray -- you just made the point that I had been trying to make myself. This is why I use many different methods, depending on the problem at hand -- because the different realities one may encounter each has it's own best model to use when dealing with it.
So there is no one best way.
-- snip --

Usually when I tune using Bode plots I'll have a script that generates a Bode plot and a Nichols chart for each set of data & tuning parameters. I'll generally inscribe a 6dB margin circle on the Nichols chart, for ease of use. The Bode plot gives me an idea of the properties vs. frequency, while the Nichols chart gives me margin-at-a-glance.
--

Tim Wescott
Wescott Design Services
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Tim Wescott wrote:

Some defy modeling altogether. Like a thermoelectric cooler on a laser diode when you have to regulate wavelength. Information about internal time constants? Zilch. Asked whether there is any additional info beyond the data sheet. "Nope."
Peter: I went through two large mugs of coffee doing that one but this client uses a delicious Columbian roast ;-)
--
Regards, Joerg

http://www.analogconsultants.com
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Joerg wrote:

The step-response and ARMA method would garner you enough information to make a Laplace or z-domain model of the plant, to which you could apply a number of different design techniques. The frequency response method would give you a plant measurement that would go right into a spreadsheet with a Bode plot, a Nyquist plot, and a model of the controller.
Either one would have reduced you caffeine intake.
--

Tim Wescott
Wescott Design Services
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Tim Wescott wrote:

That would have taken more than two mugs of coffee since I didn't have a PC in that lab ;-)
Problem was that it was different between cooling mode and heating mode. Even the non-linearities were.
--
Regards, Joerg

http://www.analogconsultants.com
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

No kidding, but what is the purpose of this statement? It contains no useful information that we all don't already know. Why don't you make sure you tell the guys at Control Station, Expertune and Bestune that. Tell Caterpillar, Boeing, NASA and all my competitors that make motion controller too. I am sure they are completely in the dark and need your warning.
Haven't you ever used feed forwards on a motion controller? Everyone should know that motion controllers use feed forwards so that most of the control effort is derived from the feed forward ( model ) instead of the PID. Have you ever thought that each of the feed forward gains is just the inverse coefficients of the model? For instance a simple first order system like above but with out the velocity to position integrator is Gain*alpha/(s+alpha). Now invert that you you have two terms : s/(Gain*alpha) and 1/Gain. The s is ignored and that term becomes the acceleration feed forward 1/(Gain*alpha) and the 1/Gain is the velocity feed forward. Since I am in motion control I can't get away from feed forwards and models. I can't imagine anyone seriously trying to.
Now tell me that my feed forwards aren't perfect. I know that too. That is why the PID is there. It takes care of the last 2% or hopefully of the control effort caused by changes in load and non- linearites. Even if the model is off by 10%, it is better to predict the control output rather than respond to the error. Can't you see that?
It is time things change. Haven't you guys seen the number of post go down? Why would any body come here for information if they are going to be told they can't model a system or they are told to get a big pot of coffee. One of the lines I saw over and over again in the late 1990s and early 2000s is that PIDs gains must be tuned and not calculated. I went elsewhere to find my solutions because there was no intelligent life here at that time. I would hope that there is enough intelligent life here now where we can talk about a variety of techniques and not discourage people from trying. So what do you have to offer?
Back on topic. I was interested in the calculated iterative gains for those cases where the model was not very good. Apparently no one here know any more about it than I do. OK, guys enough scolding for now. Go get your pot of coffee.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I have no problem with using feedforwards (I had better not since I have done it!). I am extra careful because mistakes seem to cause more drastic side-effects. Perhaps my point was lost in my language. There are a variety of techniques that are applicable at various levels of abstraction from reality. The more abstract/mathematical the technique the more flexible and reusable it is. The more concrete, i.e. Nichols charts, the more it fits particular cases. The thing about Engineering and Control is that we confronted with reality and try to use abstract principles to "fix" it. Reality is free with it's problems, we should be free with our answers. Of course the above is pablum, and I actually can not help you with iterative control beyond the references already mentioned.
Ray
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
"All models are wrong....some are useful." - My friend Ben Weinstein taught me this many years ago. A "useful" model for control design is one that makes the resulting control "good enough".
Good enough for what? Well...that depends. You will typically have several criteria: 1. The resulting controller is stable, even if the model is wrong, by a factor of X. This should be a criteria for ALL controllers. Remember: "All models are wrong." 2. The resulting controller improves control response time/Max deviation/IAE by X. Usually compared to the previous controller. 3. For feedforward...the resulting feedforward compensation effectively reduces the impact of the disturbance by X%. (the effect may be measured by Integral of absolute error (IAE) or max deviation from SP)
-George
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
proclaimed to the world:

I have been following the PID threads and had a lot of things to contribute, but knew that I would be sucked into defending my statements and cracking open books trying to follow math and models taking up time I did not have or want to spend doing so.
While I appreciate Peters desire to nail PID down with models, I don't appreciate the way he responded to my simple innocent post at the start of this thread. I wanted to succinctly explain some things. Your post goes a long way towards that. Thanks. I've had no need for models of PID controls and little need for the math in what I do. It's not that these things are not important, they just do not play a big part in commissioning a PID loop historically. Note, I did not say "no part".
The other thread on level control I found amusing. There were some very simple answers that should have been given. Instead there was more math and models that had little to nothing to do with the application. It's this aspect of engineering that turns a the building of a local municipal project from the $100k job it should be to a $1M "project". Peters taunt to me about how intuitive or Iterative tuning fails to further the science and offers him no help assumes he is entitled to this and it is the only worthwhile way. This is not true.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
"Paul M" <PaulMatWiredogdotcom> schrieb im Newsbeitrag

Just think about it:
1. Peter's process transfer function can not be controlled by just PID function under the given conditions. I wouldn't try it.
2. Computer technologies make it possible to improve controlling and reduce costs. What is badly needed is a good knowledge of the process transfer function.
3. I was in charge for tuning power stations. At that time it was an art not engineering. Few things that could be calculated helped me very much.
--
Regards/Gre Jan C. Hoffmann http://home.arcor.de/janch/janch/menue.htm
eMail aktuell: snipped-for-privacy@nospam.arcornews.de
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Paul M wrote:

But that would have been good.

You and Pieter stepped in front of Tim's and Joreg's pot of coffee comment, with your gain tweaking comment. If I were looking at this from OP's point of view I would expect more than tweak gains and drink coffee. Some one should have, I did, point the OP in the right direction but by this time the OP probably figured there was no intelligent life here and went away just like I did many year ago. The comments about tweaking gains and wait waiting by drinking coffee got me going. Actually, it was Tim giving the Control Station guys a bad time that got me going. This thread came to soon after that one. I have seen so much useless and wrong info this news group that a link to the www.controlguru.com site is a beacon of light and definitely more useful than the tweaking and coffee. You just happened to step in pile of stuff that had been growing for years.

Just because you don't have the need to know about better PID tuning techniques does meant that the next guys doesn't need to know more. Everyone's system and needs is different and it is wrong to assume they just need to know about tweaking and coffee.

A simple answer was given. I admitted and that I should have made sure my program was the same as what was posted for the others to look at. This caused some confusion. Still Pieter's gain was way too high. Comment about using little integrator gain without knowing about the system was wrong. I saw no reason to blame the integrator for any level control problems mentioned by John.
BTW, I wish Pieter luck with his auto tuning project on the level control. It isn't needed for such a simple problem but at least he will have a model to test against. Then his program gain be applied to more difficult problems like this type 1 under damped second order system. One can see that the effort put into auto tuning will have huge paybacks when tuning just a few systems.

That is true. What do you want me to say. We weren't provided with numbers for his application. We could have easily modified the program to fit his application if we had the values. Since we didn't have the model for John's application what are we do to? We can supply formulas and a simple simulator where he could eventually find the right numbers to use.

BS. Fred Thomasson has a reference or book that must have formulas worked out for level control. I can work them out myself and it didn't take but a couple minutes to modify what I already had. Fred had that rule about ALV that was handy. I had my model that would give me exactly what the maximum error would be. These problems are trivial. Add dead time, non-linear flow control valves, tanks shaped like a cone, horizontal cylinder or sphere and things get to be interesting.

I don't see sections on tweaking and drinking coffee in my control books . I will stand by that statement and yes it is a taunt or a challenge. however you want to look at it. It isn't aimed directly at you alone. Perhaps I am complicit because I have not objected much over the years when I have known better for a long time. The goal is to make people crack open books and follow the math and models so the next time someone asks a question they get an answer better than tweaking and coffee. At least they should be pointed in the right direction. Then the people asking question will see there is a hint of intelligent life here.
There are plenty of gain tweakers out there that think every system is the same and will tune the same way. Whatever tweaker thinks he has learned tuning one system may not work on the next. My "test" was trying to prove my point about taking a more systematic approach. There are too many different types of plants. It makes me cringe when I see tweakers giving advice on tuning other peoples systems without knowing anything about the other people's systems.
The challenge is still there. Try manually tuning this type 1 under damped second order system without looking at my solution. Give it a shot. I know you can do it eventually. I think the time would be better spent cracking open the books and following the math and the models.
I couldn't figure out what JCH was trying to prove on that thread either. Sorry JCH. I think you need to show your work step by step and add more comments.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
[...]

Sorry, I was just trying to improve the results so far. Let's have a pause.
--
Regards/Gre Jan C. Hoffmann http://home.arcor.de/janch/janch/menue.htm
eMail aktuell: snipped-for-privacy@nospam.arcornews.de
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.