I have a question regarding a process control and I am searching for a suitable strategy.
I have a hydarlic system which I want to control. Sensor inputs are pressure and flow rate. Controlled part is a valve. To control the valve I can apply either positive or negative voltage to the motor of the valve. (positivce opens, negative closes) The circuit to perfom this is already in place. I have to pull one pin high to open and another one high to close it (H-Bridge circuit).
The needs about 15 seconds to reach full open position (from fully closed). At high pressure rates, the open/close timing needed is in the range of tenths of milliseconds to reach.
The “setpoint” of the system is the flowrate. I set the rate to a certain value and the valve should act accordingly (either open or close) to reach the setpoint within a certain range/hysterisis (+/- x).
I’m now searchingfor different suitable strategies to solve this problem.
Bang-Bang controller --> Due to the time lag in the system (flow rate is not responding instantly I always over/undershoot)
PID controller --> I thought of a PID controller and correct tuning for the system. My problem here is that I do really know how to approach this. A PID controller gives an “analog” ouput which I could translate somehow to a very large PWM signal. But the system needs to set two different pins. If the actual flowrate is below the setpoint the valve has to open --> open_PIN HIGH) if the rate is above the close_Pin has to set HIGH.
The problem with the two Pins is solved already, as I translate OPEN (1) or CLOSE (0) to controll the H-Bridge already.
I would need some kind of a PID controller that would give me a ouput like
OPEN for x sec
CLOSE for x sec
if in a certain range do nothing
The time lag in the system and the large opening and closing times worry me.
Does anyone have a suitable strategy and perhaps some samples or links where to dive deeper?