Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

PID Controlled Servo Valve

Hello,

 

I am trying to create a PID control for a hydraulic servo valve. I want to use the force reading from a load cell as my process variable for the PID and output a current value to send to the servo valve. The current card we are using is an NI 9265. Eventually, I would like to implement a waveform driven set point, but for now I'm trying to get it to work with a static value. When I run the program, the value oscillates around the setpoint and never levels out. I've tried to use an autotuning PID as well, but the results were the same even after multiple iterations. Please take a look at my code and see if there are any issues that you can identify or help you can provide. Thank you.

0 Kudos
Message 1 of 2
(2,527 Views)

Try proportional only (integral and derivative set to zero), and it should reach a steady value - but maybe not matcing the setpoint.

If it still oscillates with a very small proportional only gain, then you have applied the control wrongly.

You have to make sure the direction of the control signal is correct - if you apply a positive signal (in open loop) and the Force increases then you need the error = SP - PV, if they move in the opposite directions then you need error = PV - SP.

Check these basics first.

 

BTW - I haven't looked at your VI as only got time to do quick reply

Consultant Control Engineer
www-isc-ltd.com
0 Kudos
Message 2 of 2
(2,519 Views)