# Why bother tuning

#### Jams22

Is it any coincidence that when I turn on each of P, I and D to be a third of their respective bands, the systems is stable? If so, what is the point in worrying about tuning, just use the full functionality (PI and D) but just turn each of them on to a third of their extent. For example, P range = 10000 so turn it on to 3333, I 5000 1666, and D 100 so turn it on to 33. I did just this with a system I use. Or is this just a fluke and you must tune?

#### ControlsGuy25

There is tuning and there is tuning .tehy are not same job/way to do so

Did you try to make the DLN tuning of a Gas turbine ..it is bit sophisticated and complicated if you dont know about Gas turbine operation and Combustion software...

I dont know what system are you referring too ...so cannot add more notes ...

#### Jams22

Thanks. As a general starting point it seems to me that using 1/3 of the band of each parameter (PID) means you’re going to get a stable enough system for many applications that don't need to work for such high tolerances. I can see there's an argument that if you were tuning, for example, a wing on a drone you could speed the system up by dropping the reset value (Integral) and altering PI. To rephrase my question, are PID control systems designed so that if you give each of them a 1/3 of the say towards the output signal than it’s a pretty good ballpark response.

#### pnachtwey

Is it any coincidence that when I turn on each of P, I and D to be a third of their respective bands, the systems is stable?
You were lucky. It depends on the system. Try that with a mass on a spring system.

If so, what is the point in worrying about tuning, just use the full functionality (PI and D) but just turn each of them on to a third of their extent.
There is math involved, not guess work and luck. Systems can be accurately modeled. From the model one a CALCULATE the controller gains to get the desired response.

For example, P range = 10000 so turn it on to 3333, I 5000 1666, and D 100 so turn it on to 33. I did just this with a system I use. Or is this just a fluke and you must tune?
your numbers mean nothing without units. If you don't know the units then you really don't understand what you are doing. You can use trial and error until you get something acceptable. Would you board an air plane that was designed that way?
Everything can be calculated or estimated close enough. Then optimal solutions can be found. Now the real questions is what is optimal because there are usually tradeoffs.

#### Jams22

Get real pnachtwey
I wasn't lucky, it's how its designed. Unless you can tell me otherwise.
Come on... spring mass damper, this isn't a physics class with a mass dangling off a spring.
For those who haven't done a degree module in control engineering they might not be able to calculate.
There are no units, it's a ratio.

I wasn't for one moment suggesting a design engineer working with something critical should pick 3 arbitrary numbers. Obviously, you’d use something like Ziegler–Nichols. My point was that for those unfamiliar working in on PID, maybe they will mostly get away with turning each on to a third of a degree, unless (as I said) there is minimal tolerance for error like with flight. Example, with water tanks where plus or minus 10 litres doesn't matter, or temp plus or minus 5 degrees. I wondered if PID is deliberately designed as such.

#### pnachtwey

"Is it any coincidence that when I turn on each of P, I and D to be a third of their respective bands, the systems is stable?"
@Jams22. You were lucky. What kind of system? A tank level control doesn't require a PID. A PI controller is enough. I would NEVER suggest using Z-N. It should be removed from the knowledge base. System identification and pole placement are a good start.

"My point was that for those unfamiliar working in on PID, maybe they will mostly get away with turning each on to a third of a degree,"
I can think of a few systems where that simply won't work because you have NO idea where the closed loop poles and zeros will end up.

"For example, P range = 10000 so turn it on to 3333, I 5000 1666, and D 100 so turn it on to 33."
Why do the gains have a range? The numbers are meaningless without units. Why does the I gain have a smaller range than the P gain?

Gains can be calculated from models very accurately. The models can be estimated fairly accurately within a few percent. Stability is not enough except in a few cases. Most of the time precision is required especially in motion control.

You should look at my YouTube channel. I show how the formulas for gains are derived and calculated form models. I show how to do the system identification, how to do the simulation and make Bode and Pole Zero plots.. Some of my examples are on real equipment. Notice that my controller parameters have units and there are no ranges. There is no guess work. The controller parameters are CALUCLATED to place the closed loop poles where I want them.

#### Jams22

I would NEVER suggest using Z-N. It should be removed from the knowledge base. System identification and pole placement are a good start.
I know, my point is that you can.

I can think of a few systems where that simply won't work because you have NO idea where the closed loop poles and zeros will end up.
One will do. Name one system that can have a tolerable steady state error of say 15% where putting on PID won‘t work.

Why do the gains have a range? The numbers are meaningless without units. Why does the I gain have a smaller range than the P gain?
ok let’s make it easy P 10, I 10 and D 10.

Gains can be calculated from models very accurately. The models can be estimated fairly accurately within a few percent. Stability is not enough except in a few cases. Most of the time precision is required especially in motion control.

So you’re saying for motion control P = 3.3, I = 3.3 and D = 3.3 WOULD definitely be INsufficient for motion control. That’s interesting.

I will check it out.

#### pnachtwey

So you’re saying for motion control P = 3.3, I = 3.3 and D = 3.3 WOULD definitely be INsufficient for motion control. That’s interesting.
Yes! You don't even have units! Is I a gains or a time constant? In motion control we use gains instead of time constants most of the time. It depends on the system and whether you are trying to control position or velocity. The derivative is too high relative to the P and I gains for most systems. How do I know that? Look at my YouTube videos. I show how the gains are derived.
The derivative gain isn't always required and sometimes a second derivative gain is. It depends on the system. To think that one set of gains or equations fits all is simply wrong.
Look up Ackermann's method for placing closed loop poles digitally.

I am very picky about units because if the units ever fail to make sense then I know I made a mistake somewhere.

#### Jams22

Maybe it’s almost a non-question I asked.
As ControlsGuy25 says, “there’s tuning and there’s tuning!” And as you say, “You can use trial and error until you get something acceptable.” … This was really the bit I was focussing on in terms of real-world situations where not everyone is a controls expert.

Actually, you’ve managed to answer it, if you set 1/3 for each PID “The derivative is too high relative to the P and I gain for most systems”. So, Thank you.

Just for clarity I'll rephrase:

When selecting PID units for any system where the feedback controller has already been programmed/hard wired to the PID feedback loop input. Is it any coincidence that when I turn on each of P, I and D to be a third of their respective bands, the systems are acceptable (NOT IDEAL)? If so, for many inacurate systems, what is the point in worrying about tuning, just use the full functionality (PI and D) but just turn each of them on to a third of their extent.

Two scenarios for error tolerant systems (both for gains and not time constant).

Hypothetical Velocity Scenario:

Joe Bloggs is a mechanical engineer who is sent to a factory by his bosses. The client urgently needs (today) to turn on a production line as part of their process, but the control engineer Bob isn’t available until tomorrow to programme the PID system properly. Joe is asked to see what he can do. They want 0.75 meters per second velocity for the belt. Bob hardwired the feedback loop velocity sensor years ago and this acts as the feedback loop controlled to the PID system.

So, Joe selects a set point of 0.75M/S on the PID interface and sets each PID to 33% each. The motor receives an output voltage for the PID controlled, and the motor rotates through a gearbox. Due to the speed sensor feedback loop the voltage output varies from the PID and the eventually Joe gets around the 0.75m/s set point (+- 0.05). He uses PI and D because the gearbox rotation was varying unnecessarily on PD… Does Bob come back to work next week and say, “well done” or “you’ve destroyed everything you fool”? The point is that although it's not best practice or Ideal, it would work.

Hypothetical Position Scenario

Controlled liquid chemical feed to a product tank.

The ultrasonic liquid level sensor acts as the feedback loop and has already been programmed in to the PID controller. Jane Doe is a production engineer and doesn’t know about control. Again, this engineer is asked to maintain a reasonable set point (50%) until the trained person can select proper PID values. Again, she selects 33% gains for each PID. The output from the PID system sends an electrical signal to the liquid solenoid valve that controls the rate of flow to the product tank. The tank fills to around 50% and is generally maintained around that point. The feedback signal looks to keep the system, at around 50%. Isn’t this another scenario where it would be acceptable for a limited period of time?

All the academic theory of transfer functions, poles and zeros aside, is the reality that Joe and Jane could do this, and it would be fine till tomorrow (or next week) until Bob comes? And my suspicion is Bob wouldn’t even bother reprogramming it…He already dealt with the transfer functions etc when he programmed the feedback controller.

Theory has its place, and I’m not saying it’s wrong, but what’s I’m suggesting is maybe it’s overzealous in some real-world instances.

#### pnachtwey

Again, you are lucky and you haven't answered the questions. What is a 1/3 of a range? What range? How do you know a derivative gain is even necessary? In your example of moving .75 m/s a derivative gain is not necessary. The system can be modeled as an open loop gain or a time constant or bandwidth. So what is the range in your example? A controller may output +/- 10 volts which is +/-100 percent. However, the effect that 33% control output has on the system depends a lot on the power source that amplifies the control output. After all, the controller is only shuffling electrons.

You would be dangerous in a steel mill moving 50 ton rolls of steel.

liquid level control doesn't require a PID either. If exact control isn't necessary a proportional band will do. An integrator gain can make the control almost exact. No derivative gain is necessary.

You are spreading misinformation. You don't know when a derivative gain is necessary.

Theory has its place, and I’m not saying it’s wrong, but what’s I’m suggesting is maybe it’s overzealous in some real-world instances.
Control theory really isn't theory anymore. Everything can be calculated or estimated close enough. There is no excuse for making a minimal effort to tune the system closed enough instead of being lucky. Just do a search on the internet for something other than Z-N.

#### Jams22

It was a simple question that you've failed to grasp, not an attempt at spreading misinformation. If you don't understand what I'm getting at, it's your problem. I really have tried my best to be as clear as possible. Goodbye.

#### pnachtwey

Jams22 was lucky. He can't prove otherwise. He can't provide units or what the range should be.

#### Jams22

@pnachtwey Deflecting on poor word choice and technicalities has actually giving the question more credit.

I was asking (slightly facetiously) and out of curiosity... a possible answer being: "obviously you can't select a third each, then why would all the tuning methods have been invented!?". However, I thought maybe some of the advanced tuning functionality is already in the software of the controllers so you can simply select 1/3 each. Particularly in terms of settings like manual/auto. As I said is, it any coincidence that when I did this it worked.

You can set parameters for current, voltage, time constants Prop BD or Gain etc in the software. But that's irrelevant, the question was, all things being equal for your PID tuning and settings.

@pnachtwey "He can't prove otherwise". because each PID mathematical function interacts into a single waveform, so why not benefit from the function of each of them in some instances.

@pnachtwey"He can't provide units or what the range should be” the unit depends on what you are measuring and what you have set the software up for, an example, current I. As the theory goes, they don’t give a unit, you relate it back to whatever you're doing.

Please see here PID control – PID-tuner.com for example if you wanted to convert from to gain to band this is the formula gain=100/pb.
Again, this is irrelevant to the question.

#### pnachtwey

That website is so basic and misleading because it is so basic. Too many try to teach control by saying this gain doe this and that gain does that without really understanding what the controller gains do. The "teachers" teach what they have been taught even at a college level. In reality gains place the closed loop poles. The goal should be to place the closed loop poles close to the negative real axis in the s-plane and away from the origin to maximize the decay of the error but minimize overshoot.

There are two examples given above. One is speed control and the other is temperature control. The open loop gain for the speed system should have units of (speed/output) . I usually use (mm/s)/%output.

The open loop gain for a temperature system should have units of degrees/output. So if a plant has an openloop gain of 2 degrees/%output then I know if I want the set point to be 200 degrees C and the ambient temperature is 25 degrees C I need to output about to about 87.5% and the temperature will go to about 200 degrees.

There is no guess work.

Assuming that each system has the same gains and number of open loop poles is an invitation to a disaster. It it even worse when the open loop poles are complex so the system tends to oscillate.

I also object to people thinking that they tune a PID. That false. They "tune" a system. As I said before, the goal is to place the closed loop poles where you want them. Not all systems require a PID. Some gain get by with just a proportional band. Velocity systems usually require just a PI controller UNLESS is is a pneumatic or hydraulic system.

As to why we take the time to be so "over zealous". Precision results in quality. Speed results in production. Guessing results in neither unless you are extremely lucky and avoided equipment damage or worse.

I don't see whey the OP doubled down on his ridiculous claim so many time.
You really should try to understand my YouTube channel. Peter Ponders PID.
Most people bail after 3 minutes because they don't understand the math. However, I don't waste your time on worthless topics. Except I do make fun of root locus and fuzzy logic. If you watch enough of these videos you will realize that I can derive almost everything. I show the derivation of formulas for the controller gains.

#### Jams22

That website is so basic and misleading because it is so basic. Too many try to teach control by saying this gain doe this and that gain does that without really understanding what the controller gains do. The "teachers" teach what they have been taught even at a college level. In reality gains place the closed loop poles. The goal should be to place the closed loop poles close to the negative real axis in the s-plane and away from the origin to maximize the decay of the error but minimize overshoot.

There are two examples given above. One is speed control and the other is temperature control. The open loop gain for the speed system should have units of (speed/output) . I usually use (mm/s)/%output.

The open loop gain for a temperature system should have units of degrees/output. So if a plant has an openloop gain of 2 degrees/%output then I know if I want the set point to be 200 degrees C and the ambient temperature is 25 degrees C I need to output about to about 87.5% and the temperature will go to about 200 degrees.

There is no guess work.

Assuming that each system has the same gains and number of open loop poles is an invitation to a disaster. It it even worse when the open loop poles are complex so the system tends to oscillate.

I also object to people thinking that they tune a PID. That false. They "tune" a system. As I said before, the goal is to place the closed loop poles where you want them. Not all systems require a PID. Some gain get by with just a proportional band. Velocity systems usually require just a PI controller UNLESS is is a pneumatic or hydraulic system.

As to why we take the time to be so "over zealous". Precision results in quality. Speed results in production. Guessing results in neither unless you are extremely lucky and avoided equipment damage or worse.

I don't see whey the OP doubled down on his ridiculous claim so many time.
You really should try to understand my YouTube channel. Peter Ponders PID.