LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lead-Lag.vi - I don't understand the calculation

Solved!
Go to solution

Hi,

 

I am trying to use the Lead-Lag.vi block from the tool kit but I don't understand how it works. When you open its from panel it looks like this:

 

lead lag block.png 

 

The calculation shown is not what I expected, im pretty sure that this is not how lead lag should work. Should there not be two poles and zeros? I guess the attenuation term is included in the gain?

 

If anyone knows and can let me know that would be great.

 

Thanks

Adam 

0 Kudos
Message 1 of 8
(4,228 Views)
no one?
0 Kudos
Message 2 of 8
(4,189 Views)

Hello Adamkse,

 

I believe that PID Lead-Lag VI is really a Lead/Lag VI. As stated in the context help, it implements a PID controller with a lead/lag function. This corresponds to the expression

 

Output = Gain * ((s*Tlead +1)/(s*Tlag+1))*Input

 

with only 1 pole and 1 zero

Andy Chang
National Instruments
LabVIEW Control Design and Simulation
Message 3 of 8
(4,173 Views)

Hi,

 

Thanks for the reply.

 

I still don't really understand. Is it for lead or lag, not both? If so I don't get how the time constants are called lead and lag and if not then I don't understand how lead-lag can be done with one pole and zero.

 

Sorry if this is obvious.

 

Adam 

0 Kudos
Message 4 of 8
(4,164 Views)
Solution
Accepted by topic author adamkse

The VI is either Lead OR Lag depending on the pole/zero location. You can think of the lead and lag time in term of frequency response.

Tlead = a*T

Tlag = T

 

so P = 1/T

    Z = 1/aT

Andy Chang
National Instruments
LabVIEW Control Design and Simulation
Message 5 of 8
(4,129 Views)

Thank you, I seen now.

 

Adam 

0 Kudos
Message 6 of 8
(4,123 Views)

Hi there,

 

I believe there is a bug in Lead-Lag VI because it sends out the exact input at time t=0 and,leadlag1.jpg also whenever the block is re-initialized. Can somebody double-check this please?

 

Thanks.

0 Kudos
Message 7 of 8
(2,945 Views)

Hi Bij2012, 

 

Could you please post this as a new question? This will help us keep track of questions and potential bugs a bit easier as well as boost the visibility of your post so other community members can help answer it as well as NI staff. 

 

This particular post is 5 years old so I doubt anybody is going to see it. 

 


Best wishes, 


Charlotte

0 Kudos
Message 8 of 8
(2,914 Views)