Analog Input to Digital Ouput

E

Thread Starter

Eric

Have a slight dilemma. Our customer decided to get cheap on us and went with a digital open/close valve actuator instead of an analog approach. Problem I have is that I need to have a PID control of the valve to maintain flow. This means that I need to adjust the valve accordingly to match setpoint. Does anyone have a routine that can do this? This is for a Quantum controller. The valve will take digital open and close commands which are momentary. I have a magmeter reading the flow which in turn is controlled by the valve.

Thanks in advance.
 
J

Joao Paulo Massignan

A valve on/off has only 2 discrete states, open or closed, so you can't use PID control because the control signal generated by PID is analog (0-100%).

You can try the on-off control to regulate the flow, but I think that won't work because it can danificate the valve. Other problem in on-off control is the limit cycle.

I think te only solution is to use an analog valve if I understand well your problem...
 
Which software are you using with Quantum PLC ?
Concept or Unity? I believe you should be able to use the PID program block that triggered digital output.
 
I have dealt with this by generating a "virtual valve position" within the controller based on how long the open and closed signals have been activated. I scale the time it takes the valve to go from full-closed to full-open into a 0-100% signal. While not perfect, it does provide some feedback regarding valve position when none exists.

Ron Davis
 
If you have pneumatic solenoid actuated control valve as on/off valve then whatever you do in the PLC doesn't matter. You canot control a flow parameter by opening or closing the valve.

Configuring a PID control also doesn't give any help. PID output can be configured as either continuous control or digital pulse. Your valve cannot accept continuous output ( 4-20 mA) from controller. For digital pulse you need an electrical actuator with position feedback.
 
S

Stefan Lynge Christensen

Hello
You need a so call "three point controller" (closing, opening, stopped). This is a well known solution for motor valve control, and I am pretty sure that you can find relevant articles on the net.

Good luck
 
R
Eric,
From your description of the valve I assume it is an electric motorised valve (not a solenoid). This type is quite easy to modulate by sending short pulses to move the valve more open, more closed using simple relay logic.

For example every 20 seconds
If the flow < SP pulse more open
If the flow > SP pulse more closed
If the flow ~= SP do nothing
That will work fine for a flow that is fairly steady

You can also use PID to give a proportional change in valve position

Every 20 seconds
If controller output < 50% send an open pulse in proportion to the error
If controller output > 50% send an close pulse in proportion to the error

In both cases configure some sort of deadband so that if the error is quite small (+/-2%) the valve pulses are dissabled.

You need to figure out how long it takes for the valve to travel from fully open to fully closed and make the length of time accordingly, Pulses that vary in length from 1% travel at minimum error to 20% travel at maximum error would be a starting point

If you send me some more details I could send a sketch [email protected]

Good Luck
Roy
 
B

Bruce Thompson

I appreciate your dilemma. Many years ago, we had selected digital valves (16-element, pneumatic actuated) to regulate air pressure on several tests. Two of them are still in use.

The valves chosen had many problems over the years, as the material would tend to gall, thus preventing certain elements from opening, or worse, preventing them from closing. In addition, the control scheme had to allow for even wear on all of the elements, so it needed to rotate the use of them.

I am not aware of momentary digital signals controlling valve elements. Does each element have a separate open command AND a close command? If so, that would be a little odd. You'll need to look into that further and verify it.

On the aspect of controlling multiple elements from the analog output of a PID. I would think that a simple analog-to-digital conversion should be sufficient. To ensure that relatively even wear on the elements is produced, you may want to run the digital signal through a bit-shift, that periodically rotates the location of the LSB. (This is predicated on all elements being of equal size.)
 
Thanks for the responses, guys. You have helped a lot. The scenario is that I'm using a Quantum controller programmed with Proworx 32. The customer is currently using this software so I have no choice but to use it. Anyway, I plan on using a two point control scenario. I have a PV which is of course my flow rate. The SP would be the target flow or pressure. I'm then bumping the valve for x seconds and then delaying for y seconds before moving the valve again until the PV is within the the SP deadband. The valve is electrically actuated. I am going to have to play with the x and y seconds until I can get stability. I have also created three sets of x/y (x=on, y=off) timing circuits depending on how much proportional error there is, and then segmenting that into the three different time ratios. I liked the idea of a virtual valve positioner using time but have to pass knowing that valves over time begin losing or gaining on their full stroke time. The customer has the option of using either pressure or flow, so in the logic there is a selection for which mode to be in. Based on the modem the proper x/y timing circuits will be selected. Pressure is of course a bit trickier to control than flow only because it responds quicker when a valve is bumped. I was also thinking of having the logic do a snapshot of the PV/SP error and dynamically changing the x/y timing ratios to give it a smoother approach to SP. By the same token I'm trying to keep this as simple as possible. Thanks again, guys.
 
Eric,

Sounds like you are on the right track. Try making the X value a variable based on magnitude of error x factor P(gain). Your Y is similar to I(integral). Flow is the easiest to control since the change with valve position is almost instant. One thing to look out for, some of the cheaper valve actuators have a lot of slop (hysteresis) which may cause it to constantly hunt about.

If you ever need to batch mix two fluids a more accurate method is to intergrate each flow.

Good Luck,
Roy
 
Top