PID - A challenge, is a PID good enough?

Join Date
Apr 2002
Location
No income tax, no capital gains tax. Freedom!
Posts
8,351
This week a PID using the absolute or position form is used to tune a type 0 four pole system. Remember that a type 0 system is one where the PV or actual returns to the initial state when the output is turned off like a velocity or temperature system. A type 1 system is one that integrates the output like the velocity is integrated to become position in a position system. In this case when the output goes to 0 it just coasts to a stop and stays where it is.

Last week Vern showed how an absolute PID can be implemented, but integrator and output limiting were not used. This absolute PID has the proper limiting. This system should be a bit more challenging to tune than the other systems presented so far because there are more poles. ( lags, time constants ). The ITAE, integrated time absolute error, can be reduced to about 320 with some aggressive tuning. However, I would not really tune a system where the output is swinging all over. Even with just open loop or feed forward control the ITAE can be reduced to below 400. The ITAE can even be reduced below 200 with out overshooting with some tricks, but not with this PID. A system like this would very hard to tune with graphing and an ITAE evaluation.

Why is the ITAE being used instead of the ISE? See previous PID threads.

What should be noticed is that the absolute form of PID will always overshoot the target or set point. This is because the integrator is accumulated separately. Once the integrator winds up, it can’t be unwound without overshooting the set point where the error goes negative and unwinds the integrator. Don’t expect to achieve perfection or anything close to it. That is the point of the exercise. Some PIDs are better than others. Sometimes no PID is good enough. I will explain more as questions arise.

A challenge, tune a type 0 four pole system.
 
Bob O, I checked your solution

Would you really tune a system like that? I wouldn't. You can see the output is oscillating wildly and the actual is doing only a little better. I think the graph is more important for judging how well the system is tuned than either the ISE or ITAE. I would try again and give a little more priority to the graph. I said this was going to be a challenge.

What really boils my blood is that mechanical engineers design systems like this and they expect the control guy to make it work perfectly. I won't say it can't be done, but

In this case Bob O you must think of me as an incompetent mechanical engineer that present you the system from .... . It's not that bad but it is a challenge.

Just so you know it is possible.

t0p4..jpg
 
Peter,

I agree that my numbers produced a Ugly gragh and it isn't any reflection on the tools you have provided. I am guilty of doing %(&^ job.
Thanks,
Bob O.

Peter,
Getting closer 3, 3.25 and .45 ITAE 260

???? kp = 2, ki = 2.2 and kd = .45 and ITAE 298 but to me this gragh looks better The actual overshooting right after the step input and the graph has less output swing but the error is greater. I will continue working.....
 
Last edited:
kp 1.61
ki 1.9
kd .35

itae 310.7

Graph doesn't look very good. Very poor mechanical system, output starts oscilating wildly with any amount of gain.

So no PID is not always enough. Where's my F command ;)
 
Bob O, that is better but look at allscott's

Bob O, I still would go for stability over the lowest ITAE. The first autotunig program I wrote would try to minimize the ISE. Rememeber that ISE is used when smooth motion profiles are used.
If found that minimizing the ISE did not always result in the best tuning results. This is the problem I have with the genetic tuning. Unless the evalution routine is VERY intelligent, much better than the industry accepted ISE and ITAE, the genetic algorithm will not find the best tuning solution. Perhaps the evaluation routine should be the ITAE PLUS the absolute change in output * time. The would penalize systems the oscillate. I have introduce the ISE and ITAE because they industry accepted evaluation routines but you can see they are not perfect.

allscott, I like your results. There is little overshoot and the control output isn't ringing all over.

Where's my F command

allscott is referring to a feed forward adjust command on our product.
During our training classes we teach the students to tune a well behaved system. We use electronic simulators to simulate systems just as they did back in the mid 1900s before computers.
When they succeed we give them a 'prize'. We tweak the pots to make the system VERY difficult to tune. We let the students struggle with it for a few minutes. It is impossible to tune the tweaked system using PID gains alone. After a few minutes we remind the students that FEED FORWARDS ARE THE KEY. If I remember right, allscott did very well on tuning the system from hell, but I know he feels handicapped here because I haven't introduced feedforwards, yet.

Yes, allscott has an advantage; he has been through this before.
Can you imagine 14-16 hours of being crammed with info. I often hear "my head hurts" by 3:00pm on the second day.

Below is a picture of feed forward or open loop control of this t0p4 system. If one knows that the gain is 1 volt per 1 engineering unit then to get to 3 engineering units requires 3 volts. This is so simple and works so well with so little effort on type 0 systems.
Consider the 392 the monkey score as there is no PID involved.

Note, I plug the values for the PID that are given in the posts just to check the results.

Thomas, that is pretty good. There is a little ringing but not too bad.

t0p4ff.png
 
Last edited:
Pretty good so far.

Norm, that is pretty good. It similar to allscott's and mine when I used the absolute PID. My ITAE was about 319 and was tuned more for stablity than lowering the ITAE. Actually, you guys have done pretty well with the PID and system provided.

Has anyone tried increasing time constant A to .3?
What happens if the system gain is reduced to .5?
What happens if the system gain is increased to 2?

I have more sheets to post, but I am running out of space. I have to get my company inhouse FTP site running. Our host has said I am using too much space. Oh, well.

Strange, no comments about the two pictures I posted.

Andrew, that is great. How long did it take to find that? You have done much better that I expected. That is getting close to my picture above. I thought this would be MUCH more difficult than it is proving to be, but then I have only heard from a handful of people.
You will make some mechanical engineer look good.
 
Last edited:
Peter,

Phil has a files section right here on PLCS.net. It is at
http://www.plcs.net/downloads/
Maybe that can help.

Well, I was about to complain about your first picture as not over or under shooting as you said was going to happen in your initial post but then found a solution that looked similar. Haven't checked to see what the actual over/under is but looks pretty small based on the graph.

I didn't even look at the ITAE when doing this one. As we've seen, a low ITAE can still have a wildly varying control and would probably not be desireable.

I was intreagued by the different time constants for the different poles. Will the pole time constants generally increase or was this just an arbitrary selection? From your suggestion to try changing constant A, maybe not...

The only question I had re: open loop was how the ramps up and down appear different. The actual position changes faster when starting a change than when settling into a value. I suppose this is a function of the plane model you are using. I'll have to play more to figure out.

Note, I came up with the same picture you did by just setting the control on the calculstions page equal to the target.

I'll try to play some more tonight...

nOrM
 
Last edited:
I really don't know what I'm doing but I think this worked well.
T 0.1
G 1.0
A 0.9
B 0.01
C 0.2
D 0.25
P 1
I 1
D 0



Do you offer personalized PID classes to anyone/often/locations?
 
A creative approach. If this were only physically possible.

Beryl said:
I really don't know what I'm doing but I think this worked well.
T 0.1
G 1.0
A 0.9
B 0.01
C 0.2
D 0.25
P 1
I 1
D 0

Beryl, you modified the system to work well with the PID. You are supposed to change the PID gains only. After you have tuned the system and get a smooth response with a ITAE of about 320 or better THEN you can make the time constants longer to be more challenging.

Is anyone else been confused like this?

In reallity the system is something presented to you. It will have a system gain. The system gain has units something like degrees/volt or velocity/volt. In this spreadsheet I just called it engineering units/volt. The system will also have time constants or poles that are related to how well the system responds to a control signal. Once the system is designed you can't usually change the system gains and response of the system unless it is redesigned. The PLC programmer has to tune the system with the system gain and response as it is unless he can convince the mechanical guys to make it better.

You cheated and redesigned the system! I thought this was funny.
It reminds of Star Trek, Captain Kirk and the Kobiyashi Maru or what ever that test was.

Beryl said:
Do you offer personalized PID classes to anyone/often/locations? [/B]

Yes, but they are geared towards tuning our product only. They aren't as general as what I am trying to present here. We have trained only on motion systems so far. We have about one training class a month that can be about anywhere. Last month I did training in Vancouver, BC where I went to a customers site. The week after I went to Calgary and did general training in a hotel. Right now we are training in Nashville, TN. Just follow along. Search for the PID recent PID threads. Read the posts. Try all the spread sheets and try the gains the spread sheets the other have provided. Try the experiments I suggest. This will take all summer so you will have plenty of time to experiment and ask questions. I think you will find that you will learn a lot here.

I got my FTP site activated. (y) I will try it out tonight.
 
system

When you reduce the system gain from 1 to .5 What does that
mean? If it were a hydrolic system would this mean the pump
was to small? And when you go to .3 on the time the system
seems to slow. Is this any where in the ball park??
Thanks
 

Similar Topics

I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
5
Views
212
Hi all, I'm having trouble solving a problem I've been working on for several months, and thought you might like a stab at it. The machine runs...
Replies
22
Views
836
How can I connect PID Output to a valve. In ladder logic program is there any logic do I want to add between valve and PID? PV=SP What will be the...
Replies
7
Views
383
I'm setting up a PID for a 50hp RO pump in a water treatment plant. When I go to manual mode on hmi I set the swm bit, I also ons the pid output%...
Replies
5
Views
523
I am setting up control for Hypochlorite dosing. The easy part is the dosing calculation for flow pacing but I would also like to setup trimming...
Replies
8
Views
889
Back
Top Bottom