Advanced Control: Rant!

When in school years back, they made us calculate it by hand prior to setting up or tuning a loop. Everyone had to do the math first. That was a while ago though. I found my notebook with my notes not too long ago.
 
Peter I just want to say thanks for all your contributions to this forum, the videos on youtube and the deltamotion.com/~peter folder with all the PDFs of the mathcad worksheets. Complete examples of practical applications of control theory are hard to come by and they are tremendously helpful.
 
BTW, the controller gains place closed loop poles and zeros. I know that means nothing unless you have had the math to be fluent in Laplace transforms and differential equations.

Maybe someone could come up with a method that would show how adjusting a controller gain will move the poles and zeros. Something like Root locus.

Root locus is not relevant.
 
Nooooooooooo!!!!!!!!!!!!!!

Maybe someone could come up with a method that would show how adjusting a controller gain will move the poles and zeros. Something like Root locus.
See my "Root Locus is Useless" video. This is precisely one of the things I was talking about. Ask the instructor what have they used the root locus for?
https://www.youtube.com/watch?v=uYhz3TuTkfM
I made this video in response to an instructor that made 7 or 8 videos on the root locus and still didn't show how to control his sample plant.
After seeing my video search YouTube for other root locus videos. They are all more or less the same. Do any of they show how they use root locus to control a plant with a PI or PID? No. This is a useless waste of time and brain energy.

The problem with the root locus is that it shows how all the poles will moves as 1 gain, usually the proportional gain, is changed. This is exactly why it is useless. PID controllers have 3 gains! Yes, someone can plot the poles as a function of any of the 3 gains are changed. That is a little more complicated than a root locus.

If you want to tweak gains but keep the closed loop poles on the negative real axis in the s-plane, so that there is no overshoot due to complex poles,
you need to tweak ALL 3 gains at the same time. If you tweak on one gain at a time the closed loop poles will move off that negative real axis. That is the problem with tuning the way most people do it today. They adjust one gain at a time.

My contention is that people look at tuning ALL WRONG and BACKWARDS. People tweak a gain and look at the result. What they should be doing is picking the result. From there it is usually easy to picked where the closed loop poles should be. Then one can calculate the gains. This is how good auto tuners work.

Some of you have used our product. We have an auto tuner that works well. After doing the system identification part of the auto tune there is the gain calculator. The user is given only ONE thing to adjust. It is a slider. The slider moves all the poles along the negative real axis. It is does this it calculates all the gains to keep the closed loop poles on the negative real axis.

The only part about root locus that I find helpful is determining the breakaway point. The break away point has significance that the instructors don't mention. Again look at the root locus videos. Do you notice that after the poles leave the break away point that some move closer to the imaginary axis and others move away? In their examples it is impossible to move ALL the poles away from the imaginary axis at the same time. This limits the response. The poles that are closer to the imaginary axis determine the response or decay time of the system. I know how to get around this limitation so I can move all the closed loop poles left of the break away point to get faster response. The instructors say nothing about this. Don't you think that reducing settling time is important?

I calculate the break away point differently and symbolically. For instance a hydraulic actuator controlled by just a PID has a break away point of -zeta*omega/2. Where zeta is the damping factor and omega is the natural frequency. What does this mean to someone tuning a hydraulic actuator and not using one of our controllers? It means that the best response possible is not determined by your ability to tune the system. The best response is determined by mechanical and hydraulic design since they determine the natural frequency and damping factor. Too often I have see the control guy get grief because the response is not fast enough when the problem is really with the hydraulic and mechanical design. I would have never known what was really responsible for the break away point if I didn't solve for it symbolically. It would have been just a number like it is in the root locus videos. This is what I mean by teaching without really understanding.
 
See my "Root Locus is Useless" video. This is precisely one of the things I was talking about. Ask the instructor what have they used the root locus for?

I can see your frustration, but here's why I disagree with your conclusion. In the example video, you didn't show that root locus was useless. It was useful, it showed that proportional control was useless for trying to control a tank level with zero set point error. This is not the typical use of root locus, but it certainly is useful in proving that adjusting a single gain will not allow you to meet a design criteria.

https://www.youtube.com/watch?v=uYhz3TuTkfM
I made this video in response to an instructor that made 7 or 8 videos on the root locus and still didn't show how to control his sample plant.
After seeing my video search YouTube for other root locus videos. They are all more or less the same. Do any of they show how they use root locus to control a plant with a PI or PID? No. This is a useless waste of time and brain energy.

Yes, there are a lot of seemingly very intelligent people posting **** on the internet. They are trying to help but aren't very good teachers. But that doesn't make what they are teaching bad.

Have you watched any of Brian Douglas's videos? He has a video where he uses root locus to adjust roots on a PI controller, where he uses root locus principles to adjust the Integral gain. Since he is not a professor, but worked for several years doing control design for airplanes, you might like him. I think his videos are some of the best I've seen. They have good organization and cover topics well, but are fairly concise.

If you want to tweak gains but keep the closed loop poles on the negative real axis in the s-plane, so that there is no overshoot due to complex poles,
you need to tweak ALL 3 gains at the same time. If you tweak on one gain at a time the closed loop poles will move off that negative real axis. That is the problem with tuning the way most people do it today. They adjust one gain at a time.

Most loops that many of us deal with, spending the time modeling the system and determining plant gains, etc. is not practical when the trial and error method of moving one gain at a time gives satisfactory results in short order. Tweaking one gain at a time leads to appropriate values. Root locus principles demonstrate how adjusting one gain effects the root locus and helps one understand why adjusting a gain can make things better, worse, or better then worse. Just because we don't plot out root locus to solve every problem doesn't make it useless.
 
I can see your frustration, but here's why I disagree with your conclusion. In the example video, you didn't show that root locus was useless. It was useful, it showed that proportional control was useless for trying to control a tank level with zero set point error. This is not the typical use of root locus, but it certainly is useful in proving that adjusting a single gain will not allow you to meet a design criteria.
Root locus works for only one gain.


Yes, there are a lot of seemingly very intelligent people posting **** on the internet. They are trying to help but aren't very good teachers. But that doesn't make what they are teaching bad.
They aren't teaching what is important. They teach what they were taught. Look at all the root locus videos. They are all about the same.

Have you watched any of Brian Douglas's videos? He has a video where he uses root locus to adjust roots on a PI controller, where he uses root locus principles to adjust the Integral gain. Since he is not a professor, but worked for several years doing control design for airplanes, you might like him. I think his videos are some of the best I've seen. They have good organization and cover topics well, but are fairly concise.
Yes, he is more mathematical. The best video he has does is about Laplace transforms. The control videos are light weight.


Most loops that many of us deal with, spending the time modeling the system and determining plant gains, etc. is not practical when the trial and error method of moving one gain at a time gives satisfactory results in short order.
That is the same point other made on LinkedIn but when you are paying a lot of money to got to college you should learn more than tweaking gains.

Tweaking one gain at a time leads to appropriate values. Root locus principles demonstrate how adjusting one gain effects the root locus and helps one understand why adjusting a gain can make things better, worse, or better then worse. Just because we don't plot out root locus to solve every problem doesn't make it useless.
In my root locus is useless video I show that the root locus is not needed. The root locus doesn't provide gains. You can only see how the poles move around as one gain is changed.
 
......... I made the system non-linear. The tank walls are not vertical and the flow through the orifices is not linear with the tank level. I show all the math on how I update the controller gains on-the-fly.

If that is an option you have, then yes, go for it... make it a PPID controller (first word Programmable).

But not all PID loops have that luxury - especially if they are not "in-house". Some are just standalone controllers, e.g. panel-mounted Eurotherms, (not on comms) that can't have their parameters tweaked "on-the-fly". It all depends on how much money was allocated, and the skills of the system designer.

Without the ability to continuously tune the PID parameters, some compromise is always going to be necessary, and it mostly reflects in loop response time, "one size does not fit all".

There must be millions of PID controllers working today. some working well, some adequately, and some a bag of ****, that have never even been near the theoreticals, just been made to work by an unskilled commissioning engineer
 
If that is an option you have, then yes, go for it... make it a PPID controller (first word Programmable).
We have done it years ago.
We teach how to change gains on-the-fly.
Some on this forum have been through our advanced training course.
This is one of our test labs. It was designed to be difficult to tune.
I call this our system from hell. Others call it the hammer.
The gains need to change from high to low as the hammer goes from almost horizontal to over center. The purpose of this demo is teach students how to adjust gains on the fly for non-linear systems. The trick is to make it simple so it can be done without math.
The students get a chance to tune the system.

The hammer is tuned at 4 different angles along the travel using our auto tuning. The gains are recorded and put into a a cam table, curve or spline.
You can see in the videos the gains change in a non-linear way as a function of angle. It isn't precise but it is smooth and much better than normal gain scheduling where the gains change abruptly. Every millisecond the controller uses the angle to index into 7 splines to get the 7 controller gains and update them. The gains are the Integrator, proportional, derivative, second derivative, velocity feed forward, acceleration feed forward and jerk feed forward. There is also an 8th spline that translate angle to linear position for the hydraulic cylinder. Without these techniques the hammer would only have one gain so it would only be stable at one angle.

There are applications like raising pipes in the oil field, metal pouring ladles, other swing arm applications like veneer lathes where this technique is applied. If you listen to the video one of the students wished he had seen this a few weeks earlier.
The video is long. You have to get close to the end to see the system tuned well.
http://deltamotion.com/peter/Videos/Delta Computer Systems Advanced Training.mp4
 
I had to do something similar on a flow control valve for wort run-off in a brewery process. The valve was a butterfly valve, that was supposed to be linearised to some extent, the butterfly vane was described to me as "like the second slice of an orange cut into four".

I could not get this loop tuned to any degree of control across its range, so ended up with about 5 sets of terms which I poked into the PID depending on the PV. I had to build in hysteresis, so that it wouldn't shuttle between the settings when close to the changeover points.

I eventually got it under good (nowhere near perfect) control, but it took me about 3 days, the wort run-off only occurred every three hours, and lasted about an hour each time.

The day after I got it "tuned", the valve manufacturer's rep. was on site, I did a bit of polite complaining about how difficult it was to tune, and he said he'd take a look at it.

As soon as he looked at it he said "It's piped in backwards, the flow is going the wrong way !".

It was removed and replaced within the hour, and I had to tune it all again. Needless to say I was able to do so with just one set of PID gain parameters !!! o_O
 
OK, enough of the rant

What would you guys like to see besides....
Root locus
Z-N or C-C
No me too videos that are like the others.
I will do videos showing how others should solve the problem.

I plan to add videos on
Feed forwards.
The two causes of over shoot.
FOPDT and SOPDT temperature control.
Simulation, which is best? Laplace transforms, State Space or Differential equations. Spoiler, real engineers use differential equations when the simulation is difficult.
Time constants may not be constant.
Alpha Beta Gamma filters. The lazy man's Kalman filter. You get 95% of the performance with 5% of the effort.
Using ramp times vs acceleration rates.
 
Last edited:
What would you guys like to see besides.....

Lambda tuning
Multiple loops that interact with one another
Video your conversation with the process engineer when you ask for one extra sensor, and he says "but you can calculate that from the other sensors". This is a tough one for control system engineers.
Non linear processes, such as moving average + dead time
How to 'know' how much a process gain might change under different conditions, and how you can measure the robustness of your tuning to satisfy yourself that your tuning is acceptable.
 
Lambda tuning
Lambda tuning is another name for pole placement. If you look at my videos you can see I use the Greek lambda to indicated the location of the closed loop poles.
Here is a simple first order example
http://deltamotion.com/peter/Mathcad/Mathcad - t0p1 pi NG.pdf
Here is a video tuning roughly the same system. I have other videos showing how to use pole placement on more complicated systems.
https://www.youtube.com/watch?v=lTRhuU_oQes

It bothers me that this is not obvious in my videos.
The other question is how do you do lambda tuning or pole placement if you don't have a transfer function for the plant? You can't. Please see the videos on system identification.

Multiple loops that interact with one another
My tank level control has an inner and outer loop example.
https://www.youtube.com/watch?v=d_twlM8VDuM
I have a pdf of speed and position control of a DC motor
I start out with speed control then I add position control.
Some of my calculations get geeky. I was trying to debunk some people on LinkedIn that said the inner loop has to be 10 to 15 times faster than the outer loop.
http://deltamotion.com/peter/Mathcad/Mathcad - DC Motor Velocity.pdf
I got the example from
http://ctms.engin.umich.edu/CTMS/index.php?example=MotorSpeed&section=SystemModeling
Do you have another example?

Video your conversation with the process engineer when you ask for one extra sensor, and he says "but you can calculate that from the other sensors". This is a tough one for control system engineers.
That would be entertaining for you guys. I get involved with lots of motion control not process control. I have had many heated arguments with idiots that kludge together systems without regards to how it will be controlled. I try to be nice and keep my cool. I know I have posted my opinion about mechanical and hydraulic engineers many time here. There are those that kludge together systems. There are those that evolve systems starting with someone else's work. There are few that design systems. None have provided me with a transfer function yet and I have been doing control for a long time.

Observers are used to estimate states or feedback when feed back devices are not available. There are limits though. Our controller can do a very good job of estimating the acceleration. We do that without an acceleration sensor. However, it is unreasonable to expect a PLC programmer to do this for one system. It would cost too much and it can't be done in the PLC. It is cheaper to buy the sensor.

Non linear processes,
The tank level control video and the hammer from hell are non-linear.

such as moving average + dead time
I don't using moving average for control. To crude. I have used moving averages and standard deviations for quality control purposes. That project was done over 25 years ago. I don't have any data that and I don't have the presses. The project was at Coors in Golden, CO. We made a die press monitor that did quality control on the making of beer and pop can ends ( tops ).

If have examples of how to compensate for dead time. Here. I just haven't made the video.

In this pdf I derive the Internal Mode Control equations for a second order plus dead time , SOPDT, temperature system. The data came from Ron Beaufort's hotrod training units long ago.
I show how to derive the controller parameters that compensate for dead time IF the dead time isn't too large.
http://deltamotion.com/peter/Mathcad/SOPDT/Mathcad - SOPDT_HOTROD.pdf

Here I simulated lots of dead time so that it would be uncontrollable using a simple PID.
I used a Smith Predictor.
http://deltamotion.com/peter/Mathcad/SOPDT/Mathcad - SOPDT SP.pdf

How to 'know' how much a process gain might change under different conditions, and how you can measure the robustness of your tuning to satisfy yourself that your tuning is acceptable.

The tank level control shows this. I show how the gains change as the tank levels go up and down. If the tank doesn't have vertical sides the gains will change. If the outflow is through an orifice then the outflow will be proportional to the square root of the pressure/level. I also show that time "constants" may not be really constant. Again, the tank level control was done to help a student on LinkedIn.

On LinkedIn so many engineers suggested estimating the tank time constant by filling the tank and measuring the time for the tank to empty 63% for one time constant. That is so wrong due to the reasons I pointed out above. The 63% rule works well if there is just ONE pole or time constant to measure and the system is otherwise linear. This is what you are taught in class.
However, reality is that the time constants may change. If your want to know the instantaneous value of a time "constant" then you must use this rule. The instantaneous time "constant" is something/rate_of_change_something. You don't hear instructors say that. You don't see that in the text books. This is what my rant is about. In the case of the tank level control video the time constants are updated every scan. The time constants are calculated by the level divided by the rate of change in level.

If I were teaching a class I would use the Tank Level Control example. I can make so many good points. BTW, you don't pass unless you can write the differential equations for the two tanks. That is my starting point.
 
Thanks for your detailed reply Peter. A few things clicked for me here, particularly about lambda tuning, and how this is really just pole placement.

Multiple loops interacting- I didn't mean cascade loops, I meant.. Best example is two separate steam valves for separate parts of the process off of one steam header. If one opens, the steam through the other valve will reduce, causing it to open until the steam generator picks up its pace. This can cause the loops to oscillate, particularly if you tuned the loops one at a time for as quick as a response as you can get, and for long dead times. How do you avoid and/or fix these interactions between loops?

Non linear - I see you have covered this already, with the answer of take the non linear system and linearise it.

Moving average + dead time: I was not proposing this as a control method but describing the process. Ie. the process TF is, if I am correct, K_p (e^-s - e^-4s)/s. My first instinct was model it as fopdt, and use a tuning rule, but the d term does not like that kick at the end.

The tank gain changes are "easy"* in that you have enough information to calculate them precisely. What about things like "how will this behave in winter?" or "when another machine is added to the steam header." Or "it is windy." I guess what I am really after is tuning for disturbance rejection by identifying expected limits of disturbances, and choosing both a controller and tuning that are robust enough to handle the expected range of disturbances. Some of those will be unmeasurable changes to plant time constants, plant dead times, plant gains, or just random changes to your PV. A lot of tuning demonstrations only look at the process in terms of controller output to process PV transfer function as designed or as measured.

And lastly, I will think more on the instantaneous time constant theory, and its implications.

Thanks again for your dedication to the betterment of control engineers.
 
I would be interested in hearing your thoughts on sample time recommendations. There have been some disagreements recently about this. I have observed that ultra-short sample times (1-10ms) can be necessary with loops that need very quick response (critical pressure control, for example). However, the downside is that it basically renders the D gain useless since each sample will have an incredibly small, noisy change.

At what point does the loss of the D gain's usefulness outweigh the benefits of the quick response? Where is the sweet spot? 100 samples per "process time"?
 
I would be interested in hearing your thoughts on sample time recommendations.
Usually the faster the better. The goal of a digital implementation is to provide the flexibility of the digital implementation with the infinite update rate or continuous update rate of an analog circuit.

There have been some disagreements recently about this. I have observed that ultra-short sample times (1-10ms) can be necessary with loops that need very quick response (critical pressure control, for example).
For pressure control using hydraulics the update rate should be 1ms or faster. We have done many applications like this. One of the big problems we face is pressure sensors and load cell amplifiers that are too slow. Think in terms of 8KHz for good control.

However, the downside is that it basically renders the D gain useless since each sample will have an incredibly small, noisy change.
Most of the problem isn't noise but quantizing error. The finer the feedback resolution the better the estimation of the rate of change. If that fails then I use observers to estimate what feedback devices can not. One of the big problems with PLCs is that the sample times are not deterministic. No computer can be because interrupts are turned off at times. We realize that and use FPGAs to record feed back data synchronously.

At what point does the loss of the D gain's usefulness outweigh the benefits of the quick response? Where is the sweet spot? 100 samples per "process time"?
If you are asking this question you are not working with good equipment or products designed by engineers that really know what they are doing. The derivative gain is required in some system to place a closed loop pole. Without the D gain all is lost. In some cases a second derivative gain is required.

There was a thread many years ago about why the derivative gain was required. I used the example of a mass on a spring. Pandiani tried to use a simple PI controller but the results were not very good. I used a PID controller and could get a perfect response. Then I tried using an optimizing algorithm to find the best PI gains.
http://deltamotion.com/peter/Mathcad/Mathcad - T0C1 MassOnASpring-PID.pdf
You can see Pandiani's best attempts fall far short of mine with the derivative gain.

I said above we often use the second derivative gain which is the derivative of the derivative gain. That can be very "noisy" ( really quantizing error ). In some cases we generate the third derivative. How is this possible? It all comes down to system identification and modeling.
 

Similar Topics

This video shows the things I think about on page 1. I use Laplace transforms a lot. Laplace transforms allow one to express differential...
Replies
2
Views
1,793
Instead of this info getting lost in another thread I will start a new thread. For those that don't know you can search for Advanced Control on...
Replies
8
Views
2,619
sampling data. I will probably use this in a magazine article.
Replies
18
Views
8,286
This topic deserved to be a separate thread with and Advanced Control header. The first video was made from videos a couple of years back. You...
Replies
3
Views
1,491
Hello dear experts! I use WinCC Advanced Runtime V15 as a HMI for the process. I grab values from AB Micro 850 PLC via Modbus TCP. On the HMI...
Replies
2
Views
2,359
Back
Top Bottom