LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to have different gains for P and I for a PI controller in LabVIEW?

Solved!
Go to solution

I found the block diagram that governs the inner working of the PID.vi in LabVIEW from here.

 

demo.pngSo, output=KcTi&int e(t)dt + Kc e(t).

 

To my knowledge PID, in discrete domain, is governed by the equation: 

demo.png

, where demo.png.

 

 

The problem is I am not sure how to use just Kc to tune the PID controller in LabVIEW (without Ki). And I don't know what Ti is.

0 Kudos
Message 1 of 5
(2,335 Views)

Hi Lord,

 

in the linked AppNote you find an explanation how to determine Kc and Ti by using the Ziegler-Nichols rules...

Best regards,
GerdW


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

Hi, thanks. I was looking more for the significance of Ti. Like if my PID is continuous sampling and but I know that due to the limit of the system I hook up to LabVIEW a new process variable only gets to the PID once every 9 sec. Then, should I put 9 for Ti?

 

Then, there is the question of why the block diagram is dividing the sum of error by the sampling period Ti. At first, I thought that is taking the average. But upon closer examination, if I run the PID from time 0 to t_0, the average should be the integral from 0 to t_0 divided by t_0 not Ti.

0 Kudos
Message 3 of 5
(2,218 Views)
Solution
Accepted by topic author MyLord

@MyLord wrote:

1. Hi, thanks. I was looking more for the significance of Ti. Like if my PID is continuous sampling and but I know that due to the limit of the system I hook up to LabVIEW a new process variable only gets to the PID once every 9 sec. Then, should I put 9 for Ti?

 

2. Then, there is the question of why the block diagram is dividing the sum of error by the sampling period Ti. At first, I thought that is taking the average. But upon closer examination, if I run the PID from time 0 to t_0, the average should be the integral from 0 to t_0 divided by t_0 not Ti.


1. Usually you want the Ti to be several samples, let's say 10. In that case Ti is 90 secs, but if you read the help it's measured in minutes, so 1.5 (90/60). 

2. You're right about the average, but the PID does not look at the full integral, but the PID-window, which is Ti. Older samples are ignored.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 5
(2,210 Views)

I actually found the formula:

 

demo.pngIn PID.vi's help page, under "implementing the PID algorithm with the PID VIs", 

0 Kudos
Message 5 of 5
(2,180 Views)