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. 
July 27th, 2004, 03:42 AM  #1 
Member

PID, which one is in your PLC?
Two spread sheets with different forms of PID
The first PID uses only the error for all three terms of the PID. Control engineers would say that all the gains are in the forward path. This is the same PID and system used last week. The second PID is what many call a IPD. IPD uses the error only for the I term and it uses only the PV for the P and D terms. In this case only the I gain is in the forward path. The P and D terms are in the feedback path because they only depend on the PV or feedback. Hence the name IPD. The point of the exercise is to compare the two PIDs and to realize that NO MATTER HOW MUCH YOU TURN UP THE GAINS YOU CAN NOT REDUCE THE ERROR TO ZERO. The PID is much better at following the sine wave and the IPD is much better at responding to the step changes. This means that you should have the right PID for the right application. If the application uses a target generator with smooth changes to the SP, the PID with all the gains dependent on the error should be used. However, for most temperature systems where the SP is changed in steps, the IPD form should be used. This spread sheet is not a tuning exercise. The tuning exercises are over for now. You may have noticed that you can get the ITAE or ISE much lower than what is prudent by increasing the gains. In some cases the gains were so hot that they could go unstable if anything in the system changes. The PID has one major flaw because it doesn't provide any output unless there is, or has been, an error. It doesn't make any difference how much to crank up the gains. There is a way to reduce error to almost 0. This technique is called feed forward. I will release a feed forward spread sheet in a day or two. H 
July 27th, 2004, 11:44 AM  #2 
Lifetime Supporting Member

PID, IND or ISA?
In a GE Fanuc Series 9030,70 or VersaMax the programmer must choose which one they need or want as these PLCs have both types of function blocks. PID_IND or PID_ISA

July 27th, 2004, 12:37 PM  #3 
Member

Peter
When I opened up the .zip file it had your Type 0, one complex pole pair spreadsheet from last week (T0C1 PID A.zip). Is that the right one? Keith 
July 27th, 2004, 01:01 PM  #4 
Member

there are more options that just two
So far all my PIDs have been what RussB calls the PID_IND. That is because each gain is independent from the others. The so called ISA equation has only ONE gain that is applied to all three terms of the PID. The integrator and differentiator gains are expressed as time constants but they too are mulitplied by the overall gain.
IND OR ISA HAS NOTHING TO DO WITH WHETHER THE DIFFERENTIATOR IS MULTIPLIED BY THE ERROR OR THE PV. I bring this up because few know the difference and yet one can see that the difference can be large IF you have studied the spread sheets. So RussB does the GE PLC apply the differentiator gain to the error or just the PV? What about the Proportional gain? Is the proportional gain mulitplied by the error or the PV? If you look at the equations I use in the PID and IPD you will see this Code:
PID: Control(n) = Control(n1) + Ki*T*e(n) + Kp*(e(n)e(n1)) + (Kd/T)*(e(n)2*e(n1)+e(n2)) IPD: Control(n) = Control(n1) + Ki*T*e(n)  Kp*(PV(n)PV(n1))  (Kd/T)*(PV(n)2*PV(n1)+PV(n2)) How can this be? Remember that e(n) = SP(n)  PV(n) Now lets just look at the differentiator. In the PID form the differentiator is (Kd/T)*(e(n)2*e(n1)+e(n2)) Now substitue SP(n)PV(n) for e(n) (Kd/T)*((SP(n)PV(n))2*(SP(n1)PV(n1))+(SP(n2)PV(n2))) Now the IPD algorithm works best when SP(n) = SP(n1) = SP(n2). In otherwords the SP is not ramped from one set point to another. If all the set points are the same then the above equation simplifies to (Kd/T)*((PV(n))2*(PV(n1))+(PV(n2))) The SP terms cancel out. If I factor out a minus 1 then this term becomes (Kd/T)*(PV(n)2*PV(n1)+PV(n2)) This now looks like the differentiator term in the IPD. The IPD is optimized for systems where the SP does not change except by steps. The PID is best for motion control where the SP is ramped smoothly from one setting to another. The PID reacts violently to step changes. 
July 27th, 2004, 04:26 PM  #5  
Member

Quote:
Quote:


July 28th, 2004, 03:17 AM  #6  
Member

Good. GE users have a choice.
Quote:
Rytko, is there a bit for configuring the proportional gain to act on the error or the PV too. Rytko, what does setting the bit that switches the P or D gain from acting on the error, to acting on the PV, do to the transfer function? What does it do to the Bode plot? Consider this an extra credit question. 

July 28th, 2004, 11:04 PM  #7 
Member

No one answered
Ok, I have a link that shows the difference in response between PID, PID and IPD controlling the last weeks system.
I you are afraid of math then skip to the plots at the bottom. Bode Plots for PID, PID and IPD controlling the last weeks system . Ideally the magnitude should be at 0 db and the phase at 0 too. This means the PV is exactly tracking the SP. You can see a higher frequencies the magnitude drops off and the phase goes negative. This shows how the system response is attenuated at higher frequencies and the PV will lag the SP. See the spread sheet T0C1 IPD. The spread sheets move the SP at 2 hz. Looking at the Bode plots one can see how the PID and PID do pretty well because their output is still at about 0 db and not attenuated whereas the IPD is attenuated about 5 or 6 db so at two hz the PV would follow the SP at only about half the amplitude of the SP. Rytko, the gains in the forward loop at zeros. The zeros add phase lead that compensate for the poles phase lag. This is why the PID keeps the gain flatter than those PIDs that have fewer zeros. It is the zeros that make the system jump in response to noise or step changes in the SP. 
July 28th, 2004, 11:19 PM  #8 
Member

Only loosely related...
I thought a zero was, by definition, a value of 's' that caused the transfer function to go to zero and a pole was a value of 's' that cause the transfer function to go to infinity. Why is it that the addition of a zero, which should cause attenuation at that location in the frequency spectrum, will produce a phase lead?
Keith 
July 29th, 2004, 01:33 AM  #9  
Member

Very related. Good question
Quote:
Quote:
Code:
(s+a)  (s+b) The zero will not go to 0 unless s is equal to a. Assume a is a positive number like 3. The s+b part is the lag part with a pole at b. The pole will not go to 0 unless s is equal to b. Assume b is a positive number like 4. Fortunatly jw ( w is omega, the frequency in radians ) is substituted for s and omega goes from 0 to infinity. Notice the j for imaginary numbers. Frequencies are represented by imaginary numbers. When omega = 0 and the system is at stead state the transfer function will be just be a/b or 3/4. As omega approaches infinity the gain will approach 1. Infinity + 3 = infinity. Infinity + 4 = infinity. Infinity/infinity = 1. Because the poles are negative the transfer function is well behaved at all frequencies. Fortunately there is not a frequency at b or the equation would blow up. When omega = 2 the transfer function is: Code:
j2+3  j2+4 Now examine the numerator 3+j2. The magnitude of this number is sqrt(2^2+3^2) = 3.6. The phase angle is atan(2/3)=33.6 degrees. Try different values of omega. As the frequency increases the magnitude and phase angle ( lead ) will increase. Numerator has a greater magnitude and phase when omega is eqaul to 2 than it does when omega is 0. Basically you do the same for the denominator. When you divide the numerator by the denominator, you divide the magnitude of the numerator by the magnitude of the denominator and subtract the phase angle of the denominator from the phase angle of the numerator. There isn't any value of jw that will cause either the numerator or denominator to go to 0. 

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 control using Siemens S7 3152 PLC  tomcoll  LIVE PLC Questions And Answers  6  November 13th, 2013 08:15 AM 
MPI comunication  Manuel Raposo  LIVE PLC Questions And Answers  22  July 16th, 2007 08:24 AM 
PID control Qseris PLC from Mitsubishi  stooperbike  LIVE PLC Questions And Answers  2  November 1st, 2004 10:22 AM 
PLC Recommendation For PID Control?  qee  LIVE PLC Questions And Answers  5  April 9th, 2004 11:59 AM 
how often should I trigger the PID?  Ron Beaufort  LIVE PLC Questions And Answers  11  February 22nd, 2003 12:57 PM 