LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID query

Solved!
Go to solution

hello,

 

I am new to PID programming and I had a dumb question. I am trying to control a valve such that I can control the pressure downstream of the valve. My input and setpoint variable are the pressure transducer measurement. However my PID should output a 0-5VDC signal to the valve which will in turn control the pressure downstream. Can this be done using PID controls toolkit. If yes then perhaps some nudge in the right direction would be awesome. I do not understand the output part which goes from -100 to 100. what is the physical significance of that? can that be directly applied to the valve actuator with simple math functions? 

 

Thanks,

 

Vickey 

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

Hi vickey,

 

the PID functions allow to set the output range. [-100, 100] is the standard range, change it to [0, 5] to set the range according to your valve working range…

 

To explain the standard range: you might have a temperature control system allowing to heat (up to 100%) or to cool (down to -100%) your system. When you can only "heat up" things you will limit the range to [0, 100], when your actuator uses percentage as input…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,525 Views)
Solution
Accepted by vickey4036

Hi Vickey,

 

I am not an expert in PID control and the attached VI is just a simplified example of the actual code, but it worked very good for us.

 

We were controlling a proportional valve and the set point was in % of the full scale range of the valve. In your case the 'output range' cluster can use something like 0 to 5 (volt). Maybe even something different, for example 1 to 5, so that you prevent the valve from fully closing the line, but this really depends on the application.

 

The PID gains values are the tricky part. In your case the values maybe totally different. I think out Ti was 0.01 instead of the 0.001 you see in the screenshot. I am not sure, but anyway you have to figure out what will work in your case.

 

Nick

 

 

valve_pid_control

0 Kudos
Message 3 of 5
(2,520 Views)

Some of the examples show an output of -100 to +100 (or 0-100) with the output being a percentage of the full-scale output. When connected to an actual device, you then scale as appropriate for the real output.

 

However you can also set it up so the output is 0-5V directly, you'll just need a different proportional gain. The proportional gain is effectively a scaling constant here, and you can choose it such that the output is a percentage (which requires additional scaling) or so that the output is a raw voltage.

0 Kudos
Message 4 of 5
(2,517 Views)

Thanks everyone, I think I understand the process much better now. I might have more questions once I start configuring the actuator for the valve but for now this should get me going. 

 

Thanks again,

 

Vickey

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