Advanced Control : Ziegler - Nichols is awful.

Join Date
Apr 2002
Location
No income tax, no capital gains tax. Freedom!
Posts
8,374
Z-N was developed back in 1942. It may have been the only option back then but now there are so many better options. The whole idea of increasing the gain to the point of being marginally stable is insane. Another issue is that the results are awful. The response will oscillate and even though the oscillations are supposed to decrease by 1/4 every cycle, there are still too many application where the overshoot that high is unacceptable. Also the settling time is unacceptable. Z-N does not work for many systems.

What Z-N fails to take into account is that there are integrating and non-integrating systems. Temperature and velocity control are non-integrating systems. Tank level control and position control are integrating systems. Systems will also have different types and number of poles. Poles can be real or complex ( imaginary ). Systems with complex poles are more difficult to tune than systems with only real poles. The very difficult systems are those where the open loop system is unstable. Z-N doesn't take any of this into consideration.


Finally, there is no mathematical proof or justification for the Z-N method.

The control guru website shows how to use the IMC ( internal model control ) method. This method works extremely well for non-integrating systems. There is also a mathematical proof or derivation for the controller formulas.
The IMC method is basically using zeros to cancel out all but one pole so the response is like a low pass filter.

Run Beaufort has mention lambda tuning. I think he said he bought a pamphlet on lama tuning years ago for $35. I would have provided Ron the information for free. Lambda tuning is basically a method of placing closed loop poles. This method will work for any system. I call this method pole placement. You can search for 'lambda tuning" or 'pole placement' to get more info. The only real hurdle to using this method is determining the open loop model. For simple applications the step jump method will work and be close enough. I use a method called system identification where I can determine the coefficients for a system of differential equations that is the model. This model will accurately estimate the PV or feedback value given a control signal. I have used this method to find the coefficients for very non-linear systems with many coefficients.

If you starting studying control theory you will come across evaluation methods such as IAE ( integrated absolute error ), ITAE ( integrated time absolute error )
and others. These are methods of find the optimal closed loop pole position. These methods are similar but provide slightly different versions of optimal response.

Then there is linear quadratic control that will also compute controller gains that will place the closed loop poles AND zeros for optimal response. There are some tricks to using LQC that aren't in the books because professors simply copy other peoples work without really understanding.

I know there is going to be a push back because some of this is too complicated. I admit that some of this stuff goes far beyond normal engineering classes but then you must ask yourself. How much is the sloppy control costing?

Today there are much better methods than Z-N
 
It may be an old wives tale but I heard that Z-N was originally created for controlling the movement of the turrets of anti aircraft guns, in which case the typical over under over under oscillating pattern decaying out may have been a good thing
 
It may be an old wives tale but I heard that Z-N was originally created for controlling the movement of the turrets of anti aircraft guns, in which case the typical over under over under oscillating pattern decaying out may have been a good thing
This doesn't make sense at all. Z-N is awful for integrating systems such as position control. The overshoot and oscillation would required too much settling time let alone being able to track aircraft. Could you image making an anti aircraft gun go critically stable? I could tune a system better using trial and error.
 
I hear you, Peter.

I'm trying to evolve beyond Z-N tuning, but calculating models with DiffEq may be a long way off for me.

I'm really interesting in stepping into the Lambda method, as I've read a few short articles about it and it seems to be a quick way to get acceptable control without the hazards and clumsiness of Z-N. But my problem is I never understand the articles' units for gains and how they compare to typical AB PIDs that I am forced to use. I don't ever have enough time on already-rushed startups to try to figure out the unit conversion (if any is necessary)?

Anybody have any pointers or that or examples of using Lambda with AB PIDs? (Dependent or independent)
 
Last edited:
I could google this, but I would rather hear it from you Peter. And it may very well be elementary questions.

What is a “pole”?
How do you discern between real and imaginary poles?
 
@seth350. In layman's terms a pole is something at absorbs or delays energy. A low pass filter you see on this forum is a single pole filter. Yes, it smooths the data but it also delays the data. Since a low pass filter has only one pole it is "real" which means the output will decay to a steady state at a rate determined by its time constant. A low pass filter will not overshoot the input. Complex poles come in pairs they are expressed as imaginary numbers. The real part of the complex pole determines how fast the output will decay. In the case of Z-N the complex poles determine how fast the response will settle at the final set point. The imaginary part determine the frequency of the oscillation.
"Real" poles don't have the imaginary part that cause oscillations and overshoot.
I can get more technical if desired.

@rupej, fortunately most motion controllers have auto tuning that will do the math inside the controller or setup software. For process control you can buy the control guru's Control station or Expertune. The www.controlguru.com site has information about how to tune a temperature system ( non-integrating ) by using a step change in the set point and noting the dead time and rise time and how much the process variable changes. The IMC method used on the www.controlguru.com site is much better than Z-N.

I have an example hotrod.zip posted in the download sections here. I posted it in 2005, I think, when Ron Beaufort was using his Hotrod trainers for temperature control. It works on SLC and ML1500. It is old.

Tank level control systems should be easy. Everyone makes them harder than necessary. Most of the time a simple proportional only control will do a good job of keeping the level within a narrow band.
 
Thank you Peter.
So, in order to determine the number of poles in a system, you would need to observe the system at steady state or at rest? At steady state, it seems that some of the poles may not be present anymore or are absorbing or delaying a very minuscule amount of energy.

For example, a tank of liquid that is heated by a steam coil.

The tank itself could be a pole, because it will absorb heat.
The liquid could be a pole because it too will absorb heat, as well as delay the heating of the tank wall.
The steam coil could be a pole, again it will absorb heat from the steam before heating the liquid.

I would even count the length of pipe between the controlling valve and the steam coil.

The steam itself could not be counted as it is the energy.

The time constant would be the total amount of time it takes for the steam to heat the coil, the liquid, and finally the tank wall until a noticeable increase of temperature has occurred.

Is that thinking correct?
 
Peter thanks for the wealth of information you share on this site. Can you (or anyone else here) recommend any books for someone wanting to dig into control theory for the first time?

I am self taught in the field of controls. I am comfortable doing electrical design and programming PLCs, but I recently landed myself in a job where I am going to need to program some more advanced control systems than I have experienced in the past. Controlling things like electric & gas heater temperatures, water levels etc.

The solution my company has come up with for these types of PLC programming problems in the past is to use a pre-programmed PID function that someone else wrote with an autotune feature. And running the autotune feature every time the system starts up. I need to start understanding exactly what is going on here and how these systems work.

For those interested the thread related to the hotrod.zip program Peter mentioned is here: http://www.plctalk.net/qanda/showthread.php?t=4619

Really interesting reading.
 
@set350, You should have an idea of whether the system is integrating or non-integrating, how many poles there are, and whether they are complex ( cause oscillations ) or not.
For instance, I deal with servo hydraulic control all the time. A cylinder and load has two poles. One pole is the oil that stores energy like a spring. Oil does compress a little. The other pole is due to the mass or load of the piston and load. A mass between two springs will oscillated if disturbed. Yes you must disturb the load with a step. Since servo hydraulic position control is a integrating system, that is velocity is integrated to position, there is another pole for that. So there are three poles.

A tank is a pole because it integrates fluid or net fluid more specifically. If you are just controlling the temperature of the tank then the mass of fluid that must be heated is a pole. This would be a trickier system because the mass of fluid that must be heated will change depending on the level. There was a discussion about this a few years ago about controlling the water in a tank using hot and cold water.

A steam pipe would be tricky too since it not only loses heat but delays the heat or creates a dead time. This can be modeled by an infinite number of very small poles kind of like a series of RC circuits.

There are two issues you have brought up. Time constants and dead times. It takes 5 time constants for the process variable to get within 1% of the steady state value. The problem with text books and teachers is that they talk about time constants as if they are really constant. They can be but in the example of the temperature control of a fluid in a tank, the time constant is shorter when the level is low and longer when the level is high. Most people don't think about this.

My think has evolved to the regard the time constant as changing. The instantaneous time constant is something divided by the rate of change of something. Think about it.

@ecampos, have you seen my "Peter Ponders PID" videos on YouTube? In my not so humble opinion, I think text books and teachers teach control wrong. They talk about a lot of stuff that doesn't matter.
See my "root locus is useless" video.
I am basically making fun of a professors videos explains how to calculate the root locus but after about 45 minutes of videos he still doesn't have calculated controller gains. The instructor does explain where the open loop transfer function he uses comes from.

Look at the www.controlguru.com heat exchanger example. The first thing he does is show how to calculate the gain, time constant and dead time. This is called system identification. This MUST come first. All the **** you learn in the book is useless if you don't have the open loop transfer function. This gets back to why Z-N is so popular. Z-N attempts to calculate controller gains WITHOUT knowing the open loop transfer function but then it is also why the results are so bad.

Look at my "basic system identification" video on YouTube and then the advanced system identification video. Once you understand where the transfer functions come from you can proceed to pole placement. I have many examples of pole placement from simple to more complex. Yes, controller gains can be calculated.

As for good books. I have bought only two. One was digitally oriented. It was by "Philips & Nagle"
https://www.alibris.com/search/book...ampaign=NMPi&utm_medium=cpc&utm_source=Google
This was the better of the two. The other was more analog oriented.
Chapter 4 and 9, and 10 are the good parts.

Most of what I have learned comes from the book above and the use of Mathcad to expand on the examples to meet my real world requirements. There were a lot of things that the Philips and Nagle book didn't address that I had to figure out on my own.

This gets to my last point. Most of these books are just copies of other people's work that have gone before. The good stuff required for real world applications is not in the books. You have to figure it out.

Another very good source is a YouTube channel called apmonitor.
https://www.youtube.com/results?search_query=apmonitor
My only complaint with this channel is that it is more interested in using the tools and not the underlying theory.
apmonitor uses Matlab and python for the examples. It is worth learning python just to run the code that apmonitor makes available. I have learned python since the beginning of the year. It is a good learning tool. There are different packages that can be loaded. One package I like is sympy that allows symbolic processing like I can do with my Mathcad ( don't buy ) or Mathematica ( very expensive ).
 
Yes I have looked at a couple of your videos. Not very thoroughly because at the time they were over my head and I didn't really need to know this material. I will definitely check them out again along with the other sites you linked. Thanks.
 
Thank you again Peter.
“The instantaneous time constant is something divided by the rate of change of something. Think about it.”

In other words, the time constant will change based on how great or little a change is occurring. Or, how great or little energy is used.
In the heated tank example, for absolute control, a means of measuring the available steam energy that is being introduced would be needed. This would need to be installed as close to the tank as possible to cancel out pipe length. A level sensor should also be used to determine the mass of fluid in the tank.

Theoretically, you could cipher how much steam it would take to heat a given mass of the liquid. Then if you could model your control based on that, you should be “close”. Still, the control would be suited only for the parameters it was modeled upon.
Most anyone can point at an energy source or load, or figure out how much steam it takes to heat 1 gallon of water @ 15lbs of steam.
What I struggle with is applying those in a mathematical model and applying that model.

You mentioned hydraulics...
I have wanted to try your delta controllers on our aluminum extrusion press to control force and speed. It’s currently controlled by a PLC5 with 4 cascading PIDs, then finally goes out to an OilGear EPC controller that is then connected to the servo valve to operate the pump swash plate.
 
@Seth350,

"In other words, the time constant will change based on how great or little a change is occurring. Or, how great or little energy is used."
Not quite, my wording is above clear.
You temperature control of fluid in the tank is a little hard to explain because we don't talk in terms of total temperature capacity. Lets simply use tank level control because it is easy.

If there is an orifice in the bottom of a tank where fluid drains out you can make a few assumptions about how it drains out.
1. You can assume it is linear. In other words the fluid drains out at a constant rate. This is wrong because when the tank is full there will be more pressure to push the water out the orifice at the bottom.
2. You can assume there is a fixed time constant. This assumes the fluid flows out the bottom of the tank proportional level. The "something" is the level, "the rate of change of something" is the rate of change in the level. This is getting close but not quite right.
This assumes that the fluid exits the tank proportional to the level or pressure when in fact the fluid exits a function of the square root of the pressure or level. The other assumption is that the tank has a constant area as level changes. What if the tank is a cylinder resting on its side? Then the surface area changes as a function of level. The tank level will tend to change faster due to the fact that there will be less surface area when the level is low in the horizontal tank. However the flow will decrease because of less pressure. Now it isn't so simple.
3. The correct ways is to figure out how the rate of level changes as a function of level
due to the square root of the pressure due to level and to account for the fact the water level changes faster as the surface area of the fluid becomes smaller.
I made a video about that too. I would challenge someone to use Z-N on controlling the level of a second tank of a two tank system like in the video.

However, if you read my posts I usually recommend as simple proportional band approach because it will work most of the time and precise control is not necessary. The people here are not designers and just need to get their system to work within specifications.

Usually extrusion presses are very slow. A PLC can handle the job. The problem with PLCs is that all the code must be written from scratch whereas a motion controller has a lot of the work already done. I would stick with the current system until you can justify the change, like a PLC dying.
We have controlled many extrusion presses. Some are extruding titanium for aircraft parts.
Usually these presses are so big that they act more like simpler integrating first order systems. The key to fine velocity control is the resolution of the feed back.

Four control loops? Why so many. I understand one for position and another for force. More control loops aren't required unless there are more feedbacks that are used to control something.
 
Thank you again Peter for clarifying.
I see how it would be difficult with controlling the tank temperature.
A light bulb is sizzling in my head now.

Pump horsepower setpoint (we don’t use it), max breakthrough pressure setpoint, max extrusion pressure, velocity set point.
The pump horsepower is calculated in the PLC. Pressures come from sensors and velocity and position come from a linear transducer.

If any one control loop exceeds its setpoint, it will retard the pump output.

We plan on replacing the PLC5 within the next year or so and no doubt that a PLC can handle an extrusion press velocity control with force.
Still, the EPC controllers are finicky and not robust at all. I still wonder why they are even needed. It is it’s own closed loop controller in itself. It is tasked with moving the swash plate to a position using LVDT feedback and an analog pump command from the PLC.

I was figuring your controllers could take control of everything. We just send a velocity setpoint and force limit to the controller and it handles it. Without the need of separate control loops inside and outside the plc
 
This is getting off topic.
The HPU power limit can be handy. I have seen the paint started to melt on pumps that were running beyond their rated power. Perhaps your system never reaches the maximum pressure x flow. It is easy enough to limit as a outer loop.

I think a RMC75E could do everything. The swash plate control is the inner loop. The velocity and pressure limit is a built function that sets the position of the swash plate. The power limiting would need to be done in a user program since it doesn't use any inputs that aren't already available.
 
Peter, thanks for sharing your insights on advanced control. Like others, the stuff I was taught 25 years ago started off with a known transfer function. Not only have I forgotten most of what I learned in of those classes (due to lack of use), my struggle now is how to build proper models for the actual systems we have in my plant. I'm hoping the links you provided will be able to help me reach that goal.

Seth350, I did some work in aluminum extrusion controls during previous gigs. Please check your inbox for a PM.
 

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,801
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,636
sampling data. I will probably use this in a magazine article.
Replies
18
Views
8,344
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,505
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,381
Back
Top Bottom