LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mathematical background PID LEAD-LAG VI

Hi, 

Could anyone help me to understand the mathematical background of PID Lead-Lag VI? 

The equation mention in the VI

Moni98ce_0-1631892244752.png

 There is a Phase lag between my encoder signal and measured force. My measured force is lagging 8 to 12ms of the encoder signal. Can I use it to lead the measured force from my system so that it synchronizes with the encoder signal? 

Thank you.

0 Kudos
Message 1 of 8
(1,807 Views)

Hi Moni,

 


@Moni98ce wrote:

There is a Phase lag between my encoder signal and measured force. My measured force is lagging 8 to 12ms of the encoder signal. Can I use it to lead the measured force from my system so that it synchronizes with the encoder signal?


I don't think so: after all it's a PID controller implementation…

 

Why don't you correct the lagging delay by either

  • manipulating the timestamp of the encoder waveform
  • shifting the encoder or force sample array to correct the lag
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(1,798 Views)

Hi GerdW,

Thank you for your response. I am collecting the encoder signal to the Host PC and the Force in NI cDAQ-9137. 

I do not know how to manipulate the timestamp of the encoder waveform or shifting the encoder or force sample array to correct the lag? Could you please give me a reference or example that will help me? The block diagram of my system is here.

 

Moni98ce_0-1631895234062.png

I observed if I use the Lead-Lag Compensator and perform the free vibration then it is working, I mean the damping I am getting from the free vibration is as same as my input damping for the numerical substructure. If I do not use it then I am getting extra positive damping.

Thank you.

0 Kudos
Message 3 of 8
(1,790 Views)

It is not working actually. I did some mistakes.

0 Kudos
Message 4 of 8
(1,761 Views)

Hi,

In the PID lead-lag VI Equation (4) is used as a transfer function and Equation (5) is used to calculate the output based on equation (4). Is there anyone please explain it? As per my understanding equation (4) will be like equation (3) for lead-lag compensation. However, they used equation (4) which  I did not understand. How does equation (5) come from Equation (4)?  Thanks in advance.

Moni98ce_1-1632165196328.png

Moni98ce_2-1632165396811.pngMoni98ce_3-1632165425155.png

 

 

0 Kudos
Message 5 of 8
(1,717 Views)

Is there anyone who can explain it? It will be a great help for me. 

0 Kudos
Message 6 of 8
(1,652 Views)

In general, without any control system knowledge, we can only verify if the equations are implemented appropriately in LabVIEW.

 

Beyond that why the control system equation is derived to such a state and how can only be explained by experts.

 

It looks like you did not develop all these and provided to you by your professor as part of some academic course, I would rather recommend you reaching out to your professor for an explanation on why it is such a case.

 

Please let us know if you need to know something in LabVIEW, any control-system related questions, this may not be the right forum.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 7 of 8
(1,649 Views)

Hi Santo,

Thank you so much for your nice suggestion. Actually, the Lead-Lag VI provided in the LabVIEW does not make sense to me. Maybe I am wrong because I am not a control engineering student. As per my understanding, the equation will be like equation (7) if I just transfer the s domain to the z domain. 

Moni98ce_0-1632241593363.png

Before using the VI I want to make sure everything is correct for the VI. Thank you again.

0 Kudos
Message 8 of 8
(1,646 Views)