LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID control question - displacement

Solved!
Go to solution

I have a hydraulic power unit (HPU) that is normally used to operate differential hydraulic cylinders in order to apply load to a fixture. The HPU has an onboard PID controlling differential pressure between two hydraulic outputs going to either end of the cylinder. A voltage (+/-10V) is used to set the differential pressure causing the cylinder to retract or extend thereby applying load.

 

There is an existing LabVIEW PID controller running this system that converts a load setpoint into the voltage read by the HPU. I need to modify this to control to position instead such that the cylinder extends or retracts to a specific displacement as measured by a string pot. I am having a hard time figuring out how to translate a displacement setpoint into the differential pressure voltage output for the HPU. Can anyone help point me in the right direction?

 

Thanks in advance!

 

0 Kudos
Message 1 of 9
(2,789 Views)

Hi r00,

 

I am having a hard time figuring out how to translate a displacement setpoint into the differential pressure voltage output for the HPU. Can anyone help point me in the right direction?

So you have a positive/negative displacement and you want to generate a positive/negative differential pressure setpoint from this? Isn't this just a linear scaling issue?

When you have a large displacement you need a large differential pressure (with inverted sign) to get to the desired position. When the displacement is small the differential pressure should be small too. When the position setpoint is reached the pressure should be zero…

 

I would start with a simple P control, setting I and D to zero. Once that works in the right direction I would add I and D gain to improve the control loop response.

Best regards,
GerdW


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

Hi GerdW,

 

Thanks for replying. 

 

The confusion is due to the differential pressure control not having a direct relationship with displacement as it does with load. By this I mean that changing the HPU control voltage causes applied load to change as differential pressure changes and once the setpoint is reached, the control voltage is held constant. Displacement control would require increasing/decreasing voltage until the setpoint is reached and then ramping it back to the voltage that results in no displacement. 

0 Kudos
Message 3 of 9
(2,713 Views)

Hi r00,

 

Displacement control would require increasing/decreasing voltage until the setpoint is reached and then ramping it back to the voltage that results in no displacement.

Yes. A PID control should be able to act like this…

Best regards,
GerdW


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

Understood. What I need help with is figuring out how to make the PID output return to the voltage for constant displacement when the target displacement is reached.

0 Kudos
Message 5 of 9
(2,683 Views)

Hi r00,

 

the D gain will help with this, it will work "against" the change of the error (current displacement vs. target displacement).

 

It really sounds like an interesting problem! 😄

Maybe you also need to use cascaded PID controls, the upper one controlling displacement, the lower one load/pressure - similar to electric motors where speed/torque/position controls are also cascaded.

(When testing be aware of hazards to users and material when the PID acts to heavy…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 9
(2,680 Views)
Solution
Accepted by topic author Testr00

The current system is operating as a cascaded PID with the LabVIEW one on outside controlling load and the HPU onboard PID controlling pressure.

 

I ended up modifying the LabVIEW PID to use rate of displacement change as the PID setpoint and then stacked logic that tapers down the rate of change as the error approaches 0. Works pretty well and gets me with 0.010 in reliably.

 

Thanks for your input GerdW

0 Kudos
Message 7 of 9
(2,655 Views)

Hi Testr00

 

I wondered how you managed to do this rate of displacement change? I am currently using the derivative of LVDT data as a process variable and struggle to get a good response from the PID which is used to adjust the voltage to DC motors which I wish to rotate a speed that matches a velocity set point, even after automatic tuning. I also have smoothened the LVDT data, but I guess maybe the noise from the derivation could be causing an issue. 

 

Anyway if you have any tips on how you implemented this let me know. 

 

Thanks a lot. 

0 Kudos
Message 8 of 9
(1,129 Views)

Hi Tam,

 


@Tam_95 wrote:

Anyway if you have any tips on how you implemented this let me know. 


The question is: how did you implement this?

 

Mind to share your VI?

Mind to share some example input data?

Best regards,
GerdW


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