You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old July 11th, 2004, 12:40 PM   #1
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,562
PID - A challenge, is a PID good enough?

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.
  Reply With Quote
Old July 11th, 2004, 01:37 PM   #2
Bob O
Member
United States

Bob O is offline
 
Join Date: May 2003
Location:
Posts: 1,489
kp = 9
ki = 3.2
kd = 3.2
ITAE = 348.2

Thanks,
Bob O.
  Reply With Quote
Old July 11th, 2004, 03:14 PM   #3
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,562
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.
Attached Images
File Type: jpg t0p4..jpg (58.6 KB, 538 views)
  Reply With Quote
Old July 11th, 2004, 04:10 PM   #4
Bob O
Member
United States

Bob O is offline
 
Join Date: May 2003
Location:
Posts: 1,489
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 by Bob O; July 11th, 2004 at 05:03 PM.
  Reply With Quote
Old July 11th, 2004, 05:40 PM   #5
allscott
Member
Canada

allscott is offline
 
allscott's Avatar
 
Join Date: Jul 2004
Posts: 1,330
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
  Reply With Quote
Old July 11th, 2004, 07:11 PM   #6
Thomas Sullens
Member
United States

Thomas Sullens is offline
 
Join Date: Feb 2004
Location: Idabel, Ok
Posts: 390
itae

Kp=3.2
Ki=2.9
Kd=.6
itae=244.1014
I must have done something wrong.

Thank you
  Reply With Quote
Old July 11th, 2004, 07:31 PM   #7
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,562
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.

Quote:
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.
Attached Images
File Type: png t0p4ff.png (73.0 KB, 502 views)
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon

Last edited by Peter Nachtwey; July 11th, 2004 at 07:35 PM.
  Reply With Quote
Old July 12th, 2004, 11:57 AM   #8
ndzied1
Lifetime Supporting Member
United States

ndzied1 is offline
 
ndzied1's Avatar
 
Join Date: Aug 2002
Location: Chicago, Illinois
Posts: 2,318
Peter,

My best shot is

P=1.55
I=1.8
D=0.32
__________________
nOrM
======================
nOrM=Norman Dziedzic Jr.
"I decry the current tendency to seek patents on algorithms. There are better ways to earn a living than to prevent other people from making use of one's contributions to computer science." Donald Knuth
  Reply With Quote
Old July 12th, 2004, 02:51 PM   #9
Andrew Evenson
Member
Canada

Andrew Evenson is offline
 
Andrew Evenson's Avatar
 
Join Date: Apr 2002
Location: Burlington, Ontario
Posts: 181
Peter,

Here's My best attempt for now..

Kp 1.2
Ki 1.8
Kd 0.21
  Reply With Quote
Old July 12th, 2004, 03:25 PM   #10
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,562
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 by Peter Nachtwey; July 12th, 2004 at 03:43 PM.
  Reply With Quote
Old July 12th, 2004, 03:49 PM   #11
ndzied1
Lifetime Supporting Member
United States

ndzied1 is offline
 
ndzied1's Avatar
 
Join Date: Aug 2002
Location: Chicago, Illinois
Posts: 2,318
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
__________________
nOrM
======================
nOrM=Norman Dziedzic Jr.
"I decry the current tendency to seek patents on algorithms. There are better ways to earn a living than to prevent other people from making use of one's contributions to computer science." Donald Knuth

Last edited by ndzied1; July 12th, 2004 at 04:38 PM.
  Reply With Quote
Old July 12th, 2004, 03:58 PM   #12
Beryl
Member
United States

Beryl is offline
 
Beryl's Avatar
 
Join Date: Sep 2003
Location: Boise, ID
Posts: 118
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?
  Reply With Quote
Old July 12th, 2004, 06:49 PM   #13
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,562
A creative approach. If this were only physically possible.

Quote:
Originally posted by Beryl
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.

Quote:
Originally posted by Beryl
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. I will try it out tonight.
  Reply With Quote
Old July 12th, 2004, 09:09 PM   #14
Thomas Sullens
Member
United States

Thomas Sullens is offline
 
Join Date: Feb 2004
Location: Idabel, Ok
Posts: 390
tuning

When you start to tune is there any particular place
to start?
Thanks
  Reply With Quote
Old July 12th, 2004, 09:47 PM   #15
Thomas Sullens
Member
United States

Thomas Sullens is offline
 
Join Date: Feb 2004
Location: Idabel, Ok
Posts: 390
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
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
AB PLC5 PIDs Derek McFarland LIVE PLC Questions And Answers 23 March 2nd, 2005 01:18 AM
PID, which one is in your PLC? Peter Nachtwey LIVE PLC Questions And Answers 8 July 28th, 2004 11:33 PM
Use a PID? MarBa LIVE PLC Questions And Answers 4 May 8th, 2003 08:31 PM
how often should I trigger the PID? Ron Beaufort LIVE PLC Questions And Answers 11 February 22nd, 2003 10:57 AM
Cascading Sparky LIVE PLC Questions And Answers 24 February 17th, 2003 11:33 AM


All times are GMT -5. The time now is 04:17 PM.


.