LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pid pressure control implementation

Hello guys,

 

I am trying to implement a PID pressure control for a system but don't know exactly where and how to start. I have a pump and I want it to pump pressure to say 30bar at a ramp rate of 2bar/min to a tank, the pump is controlled via a 0-10V analogue module. I also have a pressure transducer (4-20mA also connceted to an analogue module) on my tank that reads the pressure in the tank, and I can potentially use the signal as feedback.

 

I can directly run the pump from labview to any pressure by applying say 2V to the analogue module, which then controls the pump (but unfortunately this disregards the ramp rate), but I want to design a system such that when I put in the setpoint pressure (30bar) and specific ramp rate (2bar/min), the control system would behave as it should. How do I go about this? Does anyone have any ideas as I haven't done much on PID?

0 Kudos
Message 1 of 7
(6,349 Views)

What are you controlling when you send a voltage to the pump? Does the voltage correspond to the desired pressure, or something else (such as pump speed)? Is it more important to you to control the rate of pressure change, or the pressure? Either one could be the process variable.

 

A simple approach would be to control the pressure at steady state (either through PID or through direct control of the pump, if the analog output corresponds to a pressure), then add in a setpoint ramp. If you instead want to control the rate of pressure change, it's a bit more complicated, and if you want to do both - control the rate until you're at approximately the right pressure, then fine tune the exact pressure - then it's again more complex.

 

0 Kudos
Message 2 of 7
(6,284 Views)

Hi 

 

The voltage controls the pump speed. I have controlled the pressure through direct control of the pump by just putting in a fixed voltage, say 8V and allow the pump to pressure the tank up to a certain value.

 

Yes, I want to do both i.e. control the rate of pressure change until I am at approximately the right pressure setpoint. is there some sort of starting point to doing this? Maybe I could start step by step, by controlling the pressure in one instance and controlling the rate of pressure change in another instance and then do both together? Any ideas please?

0 Kudos
Message 3 of 7
(6,255 Views)

Hi dexter,

 

setup a PID loop to control the pump speed (aka voltage signal) according to pressure input value. Fine tune this loop with appropriate PID parameters. The PID toolkit also allows gain scheduling, if needed.

 

Then setup a 2nd small loop which controls your pressure setpoint. Here you can apply pressure ramps as needed…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(6,236 Views)

In order to get control of both the rate of pressure change, and the absolute pressure, I would use a cascaded PID approach. You have an "inner" PID where the setpoint is the desired rate of pressure change, and the process variable is the measured rate of pressure change (the difference in pressure from one iteration to the next). The output from that PID is the voltage to send to the pump.

 

Feeding that PID, you have a second PID block, where the process variable is the current pressure, and the setpoint is the desired pressure. The output is the rate of change, which feeds the inner PID. You limit the range of that output to the maximum desired rate of pressure change. As the pressure approaches the setpoint, the rate of changes decreases and approaches 0.

 

Of course implementing this all at once is complicated, especially if you don't have much experience with PID. Start with the simplest case - a single PID loop with the desired pressure as the setpoint, the measured pressure as the process variable, and the pump voltage as the output. If that works, add in a setpoint ramp and see if it works well enough to get you the rate of pressure change you want - if so, that's simpler than cascaded PID.

 

Do you have the PID toolkit? If so, setting up a simple PID loop is easy. It sounds like you already have the other key parts - you know how to write a voltage to the pump, and to read the pressure. Hooking up the inputs and outputs to the PID block is simple. You'll then need to tune the PID, and there are many explanations of how to do this both elsewhere on this forum and on the internet. I can't recommend a particular tuning method without seeing how your system responds, but most likely an open-loop method such as Cohen-Coon will be appropriate here.

0 Kudos
Message 5 of 7
(6,195 Views)

Thanks 

 

0 Kudos
Message 6 of 7
(6,165 Views)

Hi dexter,

 

LabVIEW comes with a function to generate a ramp signal…

 

Create a ramp and change the PID setpoint with this ramp signal over time!

Best regards,
GerdW


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