LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID Function in LV

I have a requirement where I need to control pressure in a test device in a sine pattern. Frequency is pretty low between 0.1Hz to about 5 Hz. 

 

Currently we are using a dedicated Closed Loop controller https://www.w-e-st.de/files/pdf/MDR-337-P-EN.pdf

 

But this solution is pricey while it performs good . 

 

I was just wondering why not replace this with a Software PID loop as anyway the machine control is based on LabVIEW code only. 

 

Would like to hear from those who have had success with the PID function blocks... I am right reading through the Sample VIs and as usual with PID its excellent , provided one has the proper tools / knowledge to tune the loop !! 

 

thanks

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 1 of 9
(1,299 Views)

Hi Moga,

 


@MogaRaghu wrote:

I have a requirement where I need to control pressure in a test device in a sine pattern. Frequency is pretty low between 0.1Hz to about 5 Hz. 

Would like to hear from those who have had success with the PID function blocks...


I "had success" (aka no problems) with using PID functions to control systems in your frequency range…

 


@MogaRaghu wrote:

provided one has the proper tools / knowledge to tune the loop !! 


You always should know your algorithms, may it be PID or something completely different…

Best regards,
GerdW


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

Depending on the response time of the control loop, you can have different places to run the PID control:

 

1. Running PID on a host PC and communicating with USB DAQ. The control rate is at 10-100 milliseconds level due to the USB communication.

2. Running PID on a host PC and communicating with PCI/PXI DAQ. NI cRIO has its own controller and behaves the same. The control rate is at the sub-milliseconds level.

3. Running PID and I/O on a circuit (or FPGA). The control rate is at the microsecond level.

 

I believe that the control dedicated controller you are using is hardware-based and has excellent response time similar to case 3. It is not uncommon to have an overkill setup.

-------------------------------------------------------
Control Lead | Intelline Inc
Message 3 of 9
(1,262 Views)

Yes typically the dedicated hardware PID controllers operate in 1 ms level - but in my case i do not need that speed. 

 

5 to 10ms loop time should suffice.   The main issue is tuning - is there any document that talks about the PID parameters that are typically used in the function and the effect of each on system response ( I mean beyond the general knowledge of how P,I and D affect the loop response ) 

 

Thanks 

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 4 of 9
(1,230 Views)

Hi Moga,

 


@MogaRaghu wrote:

The main issue is tuning - is there any document that talks about the PID parameters that are typically used in the function and the effect of each on system response ( I mean beyond the general knowledge of how P,I and D affect the loop response ) 


What else except "general PID knowledge" do you need? The PID functions follow the general rules for PID controls…

(All you need to consider is the time unit of the PID gain input for I&D gain.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 9
(1,191 Views)

LabVIEW has attempted to simplify the Tuning process - but the real world is more complex ! We have Pressure Control loops where the Advanced AutoTune  comes up with negative P gains !!  These are high speed loops that generally operate well in 1 to 5mS PID loops. ( Verified with dedicated hardware loop controllers ) .  

 

And here comes another complication - the general data acquisition happens at 20Hz for our control loops and hence this PID loop needs special treatment. 

 

I was keen to get some practical hints form anyone who has used the PID functions - of course there are tons of documents as these : https://www.omega.co.uk/temperature/Z/pdf/z115-117.pdf

Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 6 of 9
(1,118 Views)

Hi Moga,

 


@MogaRaghu wrote:

LabVIEW has attempted to simplify the Tuning process - but the real world is more complex ! We have Pressure Control loops where the Advanced AutoTune  comes up with negative P gains !!  These are high speed loops that generally operate well in 1 to 5mS PID loops. ( Verified with dedicated hardware loop controllers ) .  

 

And here comes another complication - the general data acquisition happens at 20Hz for our control loops and hence this PID loop needs special treatment. 


I never came up with good results from PID-AutoTuning. IMHO I mostly operated with step responses to determine PID gains from…

 

How will you operate PID loops faster then your DAQ loop when it provides new pv data only each 50ms?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(1,112 Views)

I've done a couple of PID controller, following the wiki article on Ziegler Nichols manual tuning. It's a good start.

Proportional–integral–derivative controller - Wikipedia

 

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 9
(1,106 Views)

Hi

You can read my research article to get idea about PID Control actions with Traditional Tuning (Z-N Method) as well as Fuzzy Tuning (Based on Derived O/p)

 https://www.sciencedirect.com/science/article/pii/S187661021732475X 

 

Keep me posted if you have query

0 Kudos
Message 9 of 9
(538 Views)