LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID Calculate Gains Algorthime

Hi there
I am writing a detailed manual for PID tuning and summation of NI PID toolset but I could not understand some of the PID tuning algorithm
I tried to understand algorithm of tuning the PID toolset but I faced few thing I could not understand why this code is there or what this code mean.
for example:

In the file PID(DBL).vi

there is a constant 1/60 why this value has been chosen?


this code in PID Gains Calculate.vi
why the Noise level % multiplied by 2 and Relay Amplitude multiplied by 2 as well


Why there is a Kr and what it stand for? Can you give me a reference for this formula

Why the ultimate period Tu = to the mean period Ti <= 0 and Tu= 2*pi / mean period

/* Tp = time constant */
Tp=(1+Kr)*Kc*sqrt(Ti**2*Wo**2+(1-Ti*Td*Wo*Wo)**2)/Ti/Wo/Wo;
Is this formula the same is this one?



/* L =deatime */
temp=1-Ti*Td*Wo*Wo;
temp3=atan(Ti*Wo/temp);
temp3=(temp>=0) ? temp3: pi+temp3;
L=sqrt(temp3*(pi/2+temp3-atan(Tp*Wo)))/Wo;

specially this line
temp3=(temp>=0) ? temp3: pi+temp3;

Finally,

I could not find the code that increase the Kc till the system becomes oscillatory.


Thank you
0 Kudos
Message 1 of 6
(3,721 Views)
I don't have the PID toolkit, so I cannot comment on specifics.
 
The web has plenty of PID tutorial and explanations, see e.g. http://en.wikipedia.org/wiki/PID_controller and links at the bottom of it.


@mksa wrote:

Tp=(1+Kr)*Kc*sqrt(Ti**2*Wo**2+(1-Ti*Td*Wo*Wo)**2)/Ti/Wo/Wo;
Is this formula the same is this one?


No, these two equations are not the same. To make the bottom formula equal to the upper formula, you would need to add parenthesis at the end.
 
.../(Ti*Wo²) instead of .../Ti*Wo²
 
Right?
0 Kudos
Message 2 of 6
(3,712 Views)
mksa,
 
The 1/60 in the PID.vi is because the parameters Ti and Td have to be provided in Minutes. So, the time is converted from seconds to fraction of minutes.
 
barp
Barp - Control, Simulation, RTT and HIL - National Instruments
Message 3 of 6
(3,701 Views)
Hi,
  looking at the L=deateime formula, you've said
 
specially this line
temp3=(temp>=0) ? temp3: pi+temp3;
 
If temp works out > 0, then temp3 (calculated from a atan) is effectively in the positive plane (thinking in a circle centred on 0,0). If not, then adding pi to it moves it into the negative side.
 
Could you perhaps re-word you remaining queries to be a bit more specific after you've had a look at the links from the page altenbach pointed you to?
 
Think the remaining ones from your thread are :

this code in PID Gains Calculate.vi
why the Noise level % multiplied by 2 and Relay Amplitude multiplied by 2 as well

Why there is a Kr and what it stand for? Can you give me a reference for this formula

Why the ultimate period Tu = to the mean period Ti <= 0 and Tu= 2*pi / mean period

I could not find the code that increase the Kc till the system becomes oscillatory.

Thanks

Sacha Emery
National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 4 of 6
(3,672 Views)

Hi,

The formula that you are refering to is available in this paper :

Rongfu Luo, Joe Qin, Dapang Chen. "A New Approach to Closed Loop Autotuning for PID Controllers"; Proceedings of the American Control Conference; Philadelphia, Pennsylvania; June 1998.

From this paper I was able to obtain the following information:

Kr is the equivalent gain or describing function for the relay element that makes the proportional-only control system oscilate.

Kc is not increased. The oscilation depends on the Relay Amplitude provided by the user. If the value provided doesn't make the process go to limit cycle, you should repeat the procedure until it oscilates.

The parameters "Noise Level" and "Relay Amplitude" are expected to be from mean value or offset to maximum. The "multiplied by 2" just normalize the parameters to peak-to-peak.

I could not understand your question on Tu and Ti.

Barp - Control and Simulation Group - National Instruments

/ it takes almost no time to rate an answer

Barp - Control, Simulation, RTT and HIL - National Instruments
Message 5 of 6
(3,667 Views)

Thanks for every one
but I still could not match the equations on the File with the equations on the article

Rongfu Luo, Joe Qin, Dapang Chen. "A New Approach to Closed Loop Autotuning for PID Controllers"; Proceedings of the American Control Conference; Philadelphia, Pennsylvania; June 1998.


For example equation 9 for Tp in the article not the same as the one in PID Calculate Gains.vi

also I do not which equation in the article for deadtime (τ , τ` or τ``) match the equation in the file and how the equation simplified to become in the form in the file PID Calculate Gains.vi?

0 Kudos
Message 6 of 6
(3,598 Views)