Controlling Two Dig Outputs with a PID

Fitz

Member
Join Date
Aug 2005
Location
In front of my laptop
Posts
92
I searched on this type of thing, but only came up with heating controls which use one digital output.

My application has an analog flow input, and the "control variable" is a motor operated valve which is controlled by two relays; one to open the valve further, and one to close it further. I need to hold the flow rate to a setpoint of course. The trick is to convert the PID output value to digital signals to adjust the flow rate.

I have some ideas about how to get there, but I would appreciate some input or examples of similar control.

Thanks,
Fitz
 
Fitz,

I have seen motor operated valves that will accept a 4-20ma signal to control the position. Perhaps the manufacturer of your valve can provide this as a retro-fit? I think this would be the best solution.

If you can get a position feedback on the valve (I have seen these too), then you could just energize the open or closed outputs until the feedback matches the PID output. Basically, your PLC is acting like a positioner.

Without some idea of where the valve position is, I think you are going to have trouble. You could try dead reckoning from a known position (like full closed limit switch). I'm concerned that it would tend to drift over time with many back and forth movements. If you want to try it to see if it is reliable in your case, I would do this:

Determine the time to go from full closed to full open (for this example, I'll use the convenient value of 100 secs). Whenever you fire the open output, add 1 to a "valve position" integer every second. Whenever you fire the close ouput, subtract 1 from the "valve position" every second. If you hit the full open limit set the "valve position" to 100. If you hit the full closed limit, set the "valve position" to 0. Fire the open and close outputs as needed to get the "valve position" to match the PID output.

Good luck,

Mike Ellis
 
you could put a potentiometer on the cam that actuates the valve to determine position, but then you would be firing the relays constantly (over/undershot) until position could be satisfied. Your best bet would be what was mentioned above; an analog positioning valve.
 
In the Allen Bradley Instruction Set Manual there is a time proportioning example. Other brands have similar examples. Some call it "Heat/Cool" output.

If you go to the potentiometer feedback described above you can avoid the hunting problem by using a deadband in the control logic. That is actually what the positioners themeselves do.
 
Thanks for the replies. I do not have the option of altering the valve. My customer uses a board level controller to do the control on their standard system. This is a custom system specified by the end user to use PLC/HMI to replace the standard controls.

I will have deadband input from the HMI. I'll check the Allen Bradley Instruction Set Manual for that example. Thanks!
 
Tom Jenkins said:
In the Allen Bradley Instruction Set Manual there is a time proportioning example.

Tom, could you give me a specific manual name or pub. number? I looked in my SLC and 5000 instruction manuals, and did not find it. Thanks.
 
Another thing to watch for in time proportioning control with motorized valves is what sort of duty cycle (how fast to go from one direction then the other) and minimum on time (shortest time required to start the valve moving).

I have done really tight control with PID time proporting control where the vendor stated initially that the motor had a "100% duty cycle" then they complained when the valve drivers died after 6 months operation because we constantly were hitting the solid state relays to open and close very quickly to get very precise control. After getting a definition what exactly "100% duty cycle" really meant (minimum 30 ms on time to the AC motor), it has been runnning with only about a 5% degradation in performance.
 
Given the system, you will want to do time-proportioned control as mentioned. You'll want a split-range PID output where:
* at 50% neither relay fires
* above 50% the 'open' relay only fires
* below 50% the 'close' relay only fires
* the further you are from 50%, the longer the relay fires
* at steady-state operation (flow steady and at target setpoint), the pid output will be near 50%

The nature of this (unusual) flow process gives you a built-in integrator, so you'll want to use mostly proportional action with very little reset action.

Good luck
 
If I read this thread right, the loop is not a heat/cool dual final control element loop, but is a conventional loop with a single final control element, a motor actuator on a valve.

AAmittedly, I take a different with motor actuators. I use a Honeywell UDC 2500 PID single loop controller with what Honeywell calls 3 position step control (TPSC or 3PSC), and feed it its setpoint via Modbus from the PLC.

The controller has 2 relay outputs (or solid state outputs, if you specify such). The controller takes care of driving the outputs, which, when the process is in a steady state, will not activate and the actuator will hold its position.

The controller needs to know (through configuration) what the stop-to-stop timing of the motor is (like 15 seconds or 30 seconds, whatever). It also requires a one time "calibration" on powerup to prove the timing, because it is open feedback (no slidewire) and the algorithm uses timing of the outputs to determine the motor's position.

For slow processes, like heating, I've had it work really well (even though the motors were on air or fuel flow valves, the process itself was fairly slow).

I think jamesau's apporach is correct for heat/cool applications, where there are two distinct outputs, one for each final control element - heat valve and a separate cool valve.

But I don't think his approach will work with a single control element, a motor actuator, even though it takes 2 relays to control a single final control element.

For example, if the needed PID output is, say 70% output to maintain the process, and that's where the motor is positioned, "time proportioning above 50%" would be trying to drive the motor away from that 70% position, even if though the motor position is correct and the PID 'error' (PV-SP) is zero.

Dan
 
I have the system working as of yesterday. I tossed the PID, and did my own logic. I guess you would call it time proportioning or pulse width modulated. I compare the flow to setpoint, see if it is over or under, and by how much. Then I take the difference and multiply by a "flow valve calibrate time" (adjustable at the touch screen) and then divide by 1000. This number becomes the "on time" for the valve motor in msec. Then the "flow valve calibrate time" minus the on time becomes the "off time" for the valve. This way, it can react with more on time for a larger deviation from setpoint, and shorten the on times as it gets closer to setpoint. There is also another timer to set how often the flow is sampled. Very short on times were necessary to provide the tight control needed. I set up minimum on times of 100 msec because we're working with relays on the outputs. The customer is very pleased with the operation. So was I! Who needs PID? If I had an analog output, I'm sure it would have been a good choice.

Thanks for all the helpful input. It gets the ideas moving in my head.
 

Similar Topics

Afternoon all, I'm working on setting up a large excel recipe table for porting updates through the Linx Gateway RTD/DDE function into my recipe...
Replies
2
Views
87
Compactlogix controller, program has 28 conveyors that use TON's to start the conveyors. The TT sounds a warning horn during start and the DN...
Replies
10
Views
468
I'm a Manufacturing Engineer with limited PLC experience and I am doing some research for our Controls Department. Does anyone have experience...
Replies
4
Views
171
Good Evening , I should know more about Solid State Relays . I have a system with 8) 120 vac Vibrators . These Solid State Relays have...
Replies
24
Views
2,019
Hi All, I am facing one issue with the SEW MDX61B drive. Issue- I want to run a conveyor with this drive in two directions but it runs in...
Replies
0
Views
326
Back
Top Bottom