![]() |
||
|
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
| ||
New Here? Please read this important info!!!
|
|
#1 |
|
Member
|
PID - The most difficult system so far.
The goal this week is to tune a very difficult system using both feedwords and a PID.
System requiring PID AND Feed Forward tuning This system is too difficult to tune by just cranking up the gains. The feed forwards must be used too. Even with the feed forward the system still has some pretty big error. If you look through the spread sheet you will see the error often get to .125 inches which is too high for many purposes. The system is like a motor system with a flexible coupling. The motor adds the time constant and the integrating the velocity to position. The flexible coupling adds the complex poles. If you remember, complex poles ring or oscillate. A springy coupler is detrimental to performance yet I see too many applications that use them just because it makes like easier for the mechanical 'engineers'. A hydraulic system can be modeled like this with caution. The real pole is from the valve response and the complex pair of poles comes from the cylinder. A hydraulic cylinder is really a mass on a spring. The problem with hydraulics is that nothing is linear. A well designed hydraulic system will not be too non-linear. If you can tune this system then you can tune just about any reasonable system. This is the last of the tuning exercises. Hopefully you have modified or experimented with the spread sheets or look at the formulas that are used in them. BTW, the ISE to beat is 268.79. If you have difficulty in tuning this system then reduce the frequency of the target at cell E5. |
|
|
|
#2 |
|
Member
|
I sent the file with my answers. oops.
I ruined the fun.Now what? I am p!ssed at myself. It took a lot of effort to make this spread sheet so that it was on-the-edge, but still working. I still encourage you to experiment. Rytko, the transfer function for this system is Code:
G*alpha*omega^2
T(s)=----------------------------------------
s*(s*alpha)*(s^2+2*zeta*omega*s+omega^2)
G is the gain in inches per second per volt alpha is 1/time constant. This is the real pole. zeta is the damping factor. omega is the natural frequency in radians per second. rps=2*PI*Hz This is not a simple system. Omega and zeta define the complex poles. These represent a mass on the spring. Notice: As s goes to zero the transfer function approaches a gain of G. It is much easier to tune at lower frequencies. It takes much more control signal to tune at higher frequencies. This is not only because of the higher speed but also because of the required acceleration and jerk While writing this I just got a pm telling me I screwed up. oops. I guess I was in too much hurry to enjoy the sun. |
|
|
|
#3 |
|
Member
|
This will not restore the joy of overcoming and solving this problem for eager ones that downloaded the spread sheet already.
|
|
|
|
#4 |
|
Member
|
It's not very often that I will admit defeat. I could not tune the spreadsheet well enough to even post results. Nothing "logical" I did seemed to help, the best I could do was around 2000. I will try again when I have time.
|
|
|
|
#5 | |
|
Member
|
I said it is tough.
Quote:
Hint, get the feed forwards right. There is no way this system can be tuned with the PID gains alone. This system is hard to tune because the natural frequency is only 10 HZ or 62.83 radians per second. The natural frequency of the system should be much higher than the frequency that you wish to move the actuator which in this case is 5 HZ. Notice that there is no way you can tune the system at 6 HZ as the control output saturates at +/- 10 volts. There is also a real pole, but it is not the worst that you have seen. However, the combination of all the poles make tuning more difficult and the individual poles. To make life easier one would want to increase alpha which decreases the real poles time constant ( alpha = 1/time constant ). This would be like getting a faster responding valve or increasing the ration of torque to interia on a motor. Increasing the natural frequency ( omega ) also helps. The can be done by making the diameter of the hydraulic cylinder larger. On a motor would would make the shaft the load is on less flexible ( larger diameter or shorter ). I am surprised that no one has asked me about the jerk feed forward. It doesn't surprise me that people would have trouble tuning this system. |
|
|
|
|
#6 |
|
Member
|
PID
Kp 7.500 Ki 10.000 Kd 0.000 Kv 0.120 Ka 0.005 Kj 0.000 ITAE 242.007 That was tough, I'm not sure I understand why these values work. I couldn't get the jerk value to do anything good for me. It was definately a help starting at lower freq. I don't think this system would respond well to any fluctuations. Interesting, thanks Peter |
|
|
|
#7 |
|
Member
|
Kj , jerk feed forward, should be formated as having 6 decimal places. Kj is smaller than .001. There is nothing keeping you from entering smaller numbers, but it isn't obvious to do so. Sometimes you must think outside the box.
Allscott. That is pretty good. Try again using the feed forwards. BTW, Kv is alway 1/G. In this case it should be .2. It works for me. Last edited by Peter Nachtwey; August 10th, 2004 at 03:18 AM. |
|
|
|
#8 |
|
Member
![]() Join Date: Sep 2003
Location: US
Posts: 398
|
Peter:
Kp 11.500 Ki 69.300 Kd 0.300 Kv 0.130 Ka 0.0055 Kj 0.000047 ISE 112.026 That was a challenge . . . Marc |
|
|
|
#9 |
|
Member
![]() Join Date: Apr 2003
Posts: 134
|
Peter,
kp = 8.0 ki = 100 kd = 0.11 kv = 0.126 ka = 0.0055 kj = 0.000025 ise = 46.632 It was very hard. Also, the graph at the start time doesn't look very good. First half of period actual doesn't track target. Paul. |
|
|
|
#10 |
|
Member
|
paulB, that is very good.
I plugged in your numbers and the control and motion still look very smooth. The reason why the actual can't track the target during the first few milliseconds is that the velocity instantaneously starts at over 31 inches per second. I didn't properly ramping the target so that the position, velocity, accelerations and jerk all start at 0. This is why the target generator is SO important. The first my target generator is unacceptable for a real motion application.
|
|
|
|
#11 |
|
Member
|
I plugged in PaulB's numbers and am getting ISE of 502.845 (that is at target frequency of 5 Hz). Is something wrong with my Excel file?
My best attempt (before I got tired) is ISE = 108.289 with the following parameters: Kp 38 Ki 350 Kd 0.32 Kv 0.6 Ka 0.006 Kj 0.00004
__________________
Don't trust, don't fear, don't beg... |
|
|
|
#12 | |
|
Member
|
Ladder logic, something is wrong.
Quote:
Ladder logic, your numbers do not provide the ISE of 108.289. Are you sure you are tuning the spread sheet as it is on the website? |
|
|
|
|
#13 |
|
Member
|
Peter, my bad.
I've changed target generator amplitude from 1 to 2 - just so the graph reads better. Only now I realized it affected all the numbers dramatically. My apologies to you and PaulB. Anyway, the experience of trying to tune the system - even not with the numbers you intended - is invaluable. Thanks a lot.
__________________
Don't trust, don't fear, don't beg... |
|
|
|
#14 |
|
Member
|
There is more to this than geting the lowest ISE
Ladder Logic, if you increased the amplitude to 2 then you should have noticed that the control output saturates at both +10 and -10 volts. It is not good to have a PID saturate. Many PIDs will suffer from integrator wind up with resulting overshoot. This PID doesn't because use a incremental or velocity form of PID.
WARNING MATH AHEAD!!! When executing a sinusoidal motion profile the maximum speeds and accelerations are calucated like Max speed = 2 * pi * frequency * amplitude Max acceleration = (2 * pi * frequency )^2 * amplitude. Max jerk = (2 * pi * frequency )^3 * amplitude When you doubled the amplitude, the maximum speed and jerk were doubled. The resulting maximum speed is (2*3.14*5 )^2 * 2 = 62.83 inches per second. The maximum speed of the system is only 50 inches per second. WHY? Does anybody know? Other than saturating the control output, you are right, changing the amplitude should have no effect on the tuning. |
|
|
|
#15 |
|
Member
![]() Join Date: May 2003
Location:
Posts: 1,256
|
Peter,
Kp 7.000 Ki 44.000 Kd 0.040 Kv 0.100 Ka 0.005 Kj 0.000000 ISE 112.519 I tried to add jerk but it really messsed up the graph. Thanks, Bob A quick guess to your above question ...Resonance. |
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Topics
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PID - A simple position control simulator | Peter Nachtwey | LIVE PLC Questions And Answers | 34 | April 20th, 2007 04:41 PM |
| PID - A challenge, is a PID good enough? | Peter Nachtwey | LIVE PLC Questions And Answers | 19 | July 18th, 2004 10:10 PM |
| PID - Simple Velocity Control | Peter Nachtwey | LIVE PLC Questions And Answers | 15 | July 9th, 2004 04:39 PM |
| PID tuning in FlexLogix System | rlong69 | LIVE PLC Questions And Answers | 4 | June 6th, 2004 01:15 AM |
| how often should I trigger the PID? | Ron Beaufort | LIVE PLC Questions And Answers | 11 | February 22nd, 2003 10:57 AM |