PID to control solenoid valves on simulink?

23 views (last 30 days)
I am using an arduino mega 2560 to control valves. I effectively want to be able to have a PID that controls the flow of air through my valves. For the sake of simplicity lets say the valves can either be on (input flows to output) or off (output flows to exhaust). I want more air to be allowed through to output when the curve of the PID is raising and air to be allowed through from output to exhaust when its decreasing. I am not sure whether I need to look at the transfer function, all I do know is that I need help to get my head around it.
Also to clarify I tried to use a PWM but the valves don't have any other setting then on or off, so sending anything less then the 5V to the MOSFET just turns the valve LED on but doesn't actually turn the valve on. I have 4 valves and 4 pressure sensors, I am using the pressure sensors to find the error of the system.

Answers (1)

Ryan Takatsuka
Ryan Takatsuka on 23 Jul 2018
Typically, solenoid valves only operate as binary valves (either on or off with no in between). From what you are describing it seems like you want to proportionally control air flow using the solenoid valves, which will most likely result in rapid on/off switches to the solenoid valves.
It sounds like your PWM is at way too high of a frequency, where the voltage in the solenoid can not get high enough to actuate the valve. The goal would be to slow this down to a speed that allows the valve to open and close, but is fast enough to act like an "average" flowrate through the valve.
It might help to use the analogy of PWM control on a motor. In this case, the PWM motor voltage is analogous to the pressure (or the valve state), and the PWM motor coil current is analogous to the flowrate through the valve. Because fluidic systems are much slower than electrical systems, you won't be able to use conventional PWM frequencies.
As for the PID control, 3/2 valves can be dealt with as a single input to the system. An easy way to do this is to have a single input, single output transfer function, where a positive output controls flow from supply->common, and a negative output controls flow from common->exhaust.
  1 Comment
Marwan Adel
Marwan Adel on 14 May 2020
please ,can you help me with simulating a simple (solenoid-actuator valve) system on simulink !????

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!