Proportional valve driver control with PID

lanman

Member
Join Date
Nov 2003
Location
Brantford
Posts
35
Hi.

First let me say I've been reading this board almost daily since last July when I first started PLC programming, and have found it to be a great resource. Thanks to everyone involved.

Now, onto my question. I'm currently trying to control a hydraulic tube end forming machine using PID on an AB slc 5/04.
The machine has 4 cylinders, and 8 valves (2 per cyl, 1 advance and 1 retract). The valves are controlled via 4 Dennison Dual Proportional Valve Drivers connected to 2 analog output cards on the plc. Each cylinder has an encoder to provide the positioning feedback. I've never used PID control before and figured this machine would be a great place to implement it on.
My problem is that the cylinders are controlled by supplying -10 to +10 volts to the valve drivers. A positive voltage drives output A, which in turn is connected to the advance valve. A negative voltage drives output B, which opens the retract valve. The amount of voltage controls the speed that the cylinder moves. The voltage is controlled by supplying a value of -32767 to +32767 to the analog card in the plc.
I spent all day today implementing PID control on one valve. I managed to get it to work! As the cylinder approached the set point, it would slow down then creep into it's final position. This is where I got stuck. If I now reduced the setpoint (ie to retract the cylinder), the PID instruction gives a zero output. What I need it to do is output a negative value in order to open the retract valve.

So, what I need is this...an output on the PID control that is from 0 to 32767 if the current value is below the set value, and an output of 0 to -32767 if the current value is above the set value. Obviously scaling needs to be performed, since the max output of the PID function is 16383.

FYI, we called several AB tech support reps today and 2 didnt have an answer, and the other said it couldn't be done because of a "bug" in the PID function.

Any help would be appreciated.
 
PID control over cylinders?

If I now reduced the setpoint (ie to retract the cylinder), the PID instruction gives a zero output.
I am not sure you actually want or need PID control for this application. PID works well for keeping a system at a setpoint when the process or outside forces try to pull it away from that setpoint. Case in point, if you have a level of liquid you need to control in a vessel, the PID function will compensate for process upsets that want to increase or decrease that level. Now, in your situation, you are trying to use the PID function to control positioning of the cylinders and allow you to move them to new positions under said control. Is there some process condition that tries to move the cylinders while that are at a particular position?

If there is no good reason to have PID control over a setpoint position but just to move the cylinders, then I think you would be better off doing that with discrete programming. Meaning, do the move control by a set of instructions that achieves the desired result.

What I need it to do is output a negative value in order to open the retract valve.
If you are dead set on doing this with the PID instruction, you will have to set your proportional term or gain very high so as to give you error for any deviation you induce. Also, make sure you have any deadband settings at 0. I feel though, if you get this loop reacting to your change in setpoint, you may also have a very unstable system that will tend to hunt once at or near setpoint.

But in review, to generate the + and - values you need, to drive your valves, the error produced by the change in setpoint will do that if you have the gain set high enough. Turn off any I or D settings, you will not need integral or derivative in this case I don't think.

Keep us posted on your progress!
Also see Norm's post below, good suggestions and welcome to the forum and glad you are enjoying it.
 
Last edited:
You may find that the PID controller in the SLC is not fast enough to perform the positioning.

What most people would do in this situation is use a signal from the PLC to tell a servo controller where to position the cylinder.

If you need a fast response with no overshoot, this is most likely the path you will have to take. If you look at the AB specialty cards for the SLC they make ones specifically for servo positioning (mostly geared toward electric motors but may be workable).

Rexroth makes a card called the DMX that is specifically designed to position a cylinder based on an analog or SSI input. Also Delta Computer systems makes a servo hydrauilc controller that is more than capable for what you describe.
 
Hi,

I think you only need to add a variable X to your scaling!

Value' = X * value

For direct drive, X = 1 or -1 depends on the advance/retract.

Value' range is 0..16383
Value range is 0..32767

You would probably need a linear factor of 2/-2 for X. You
might want to consider some free run or softlanding as X value
would indicate how fast the values are (X would be a variable).

Regards

/Linh
 
Randy and Norm have a lot more experience with this subject than I do ... if I were you, I'd carefully consider what they have to say ... but just to give you an answer your question, here's something that might help ... I haven't read it myself so it might turn out to be a wild goose chase, but the title looks interesting ...

knowledgebase entry for Bipolar PID
 
Thanks all!

I'm not surprised to hear that using pid in this application is not really appropriate. I was already wondering about that. However, this project is simply a learning experience at the moment. The machine is actually already working and ready for shipment to the customer using descrete programming like Randy described. Since we have it for a few more days and will be doing more of them in the future, we wanted to experiment with using PID since it was something none of us at the shop had any experience with.
This bi-polar pid seems to be just the answer I was looking for. I can't wait to get to work tomorrow to try it out. Will keep you posted.

Graeme
 
Update. I tried the bi-polar pid method described in the AB article. It worked perfectly! The cylinders move to their setpoints within 3/1000" without overshooting.

Thanks again for the help.

Graeme
 

Similar Topics

I'm looking for a somewhat specialized driver card for a proportional valve. The card needs to be able to output a current to a single solenoid...
Replies
7
Views
3,390
Anyone ever PWMd the coils of a bang-bang valve? I tried it recently so that I could reduce machine setup-time by eliminating the manual flow...
Replies
41
Views
5,059
Anyone have experience w/ this module/application. I have been tasked w/ using this module to control the flow of chemicals w/ a iQ Tesla...
Replies
4
Views
1,422
Hello. I have a proportional valve with two solenoids which is going to be controlled. The datasheet for the valve (attached) specifies a PWM...
Replies
3
Views
1,661
Has anyone on hear ever heard of controlling a proportional hydraulic valve directly from a PLC with a PWM output and SSR, instead of using an...
Replies
19
Views
5,308
Back
Top Bottom