LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID lead-lag.vi

The formula of claculting the lead-lag compensator confused me!
It is written that the output = Gain * input * ((S*(lead time +1)) / (S*(lag time + 1)))
and when investaget the file I found that
(input - previous input (the shift register)) * gain * lead time --- 1
Time in min from clock * input * gain ----- 2
Time in min from clock + Lag time ---- 3
Lag time * (previous value (the shift register) or input in case it is the first call of the file) --- 4

then the output = 1 +2 + 4 / 3

I assumed that it is the first call of the file
so eq 4 = Lag time * input and when I put  it all togther I got this eq

output = (input * gain * (lead time + time in min from clock + (lag time / gain))) / (time in min from clock + lag time)

Thanks
0 Kudos
Message 1 of 3
(2,915 Views)

Can any one committing on positional algorithm or give me its equation.

0 Kudos
Message 2 of 3
(2,879 Views)

I found a solution but I am not sure if it correct or not.
if I put  all equations together then the output = 1 +2 + 4 / 3
output = (gain * (input Difference * lead time) + (input * time) + ((lag time * previous value (the shift register))/gain)) / lag time + time

if we analyse the equation we will find that
input * time  is the signal and its time
gain * (input Difference * lead time) this is the lead position
((lag time * previous value (the shift register))/gain)) this is the lag position
and the divisor
lag time + time in case there is lag and in case there is lead will be "time" only because lag time = 0

Message Edited by mksa on 04-01-2007 11:55 PM

0 Kudos
Message 3 of 3
(2,842 Views)