Main Content

# Solenoid Valve (IL)

Solenoid valve in an isothermal liquid system

Since R2023a

Libraries:
Simscape / Fluids / Isothermal Liquid / Valves & Orifices / Directional Control Valves

## Description

The Solenoid Valve (IL) block models flow through a solenoid valve in an isothermal liquid network. The valve consists of a two-way directional control valve with a solenoid actuator. The physical signal at port S controls the solenoid. When the signal at port S is above 0.5, the solenoid turns on and the valve opens. When the signal at port S falls below 0.5, the solenoid turns off, closing the valve.

A solenoid valves consists of a valve body with a spring-loaded plunger that is operated by an electric solenoid. When the solenoid is on, the magnetic force lifts the spool, allowing fluid to flow. When the solenoid is off, the spring pushes the plunger back in place, stopping flow. The block does not model the mechanics of the solenoid explicitly, but characterizes the opening and closing of the valve using the opening and closing switching times.

### Mass Flow Rate

The mass flow rate through the valve is

`$\stackrel{˙}{m}={C}_{d}A\sqrt{\frac{2\overline{\rho }}{\left(1-\frac{A}{{A}_{port}}\right)}}\frac{\Delta p}{{\left(\Delta {p}^{2}+\Delta {p}_{crit}^{2}\right)}^{1/4}},$`

where:

• A is the cross-sectional area of the valve.

• Aport is the value of the Cross-sectional area at ports A and B parameter.

• Cd is the value of the Discharge coefficient parameter.

• $\overline{\rho }$ is the average fluid density in the valve.

• Δp is the change in pressure across the valve.

• Δpcrit is the critical pressure,

`$\Delta {p}_{crit}=\frac{\pi }{8A\overline{\rho }}{\left(\frac{\mu {\mathrm{Re}}_{crit}}{{C}_{d}}\right)}^{2},$`

where Recrit is the value of the Critical Reynolds number parameter and μ is the fluid viscosity.

### Opening Dynamics

The block assumes that the solenoid behaves as a resistor-inductor series circuit, represented as

`$V=iR+L\frac{\partial i}{\partial t},$`

where:

• V is the voltage across solenoid inductor.

• R is the resistance of the solenoid inductor.

• L is the inductance of the solenoid.

• i is the current through the solenoid inductor.

The solenoid generates a force proportional to the current squared, ${\text{F}}_{mag}=-\frac{1}{2}K{i}^{2},$ where K is a proportionality constant. The expression for the cross-sectional area of the valve, A(t), depends on the value of the parameter.

Valve Controlled with Physical Signal

When you set to ```Physical signal```, the block calculates the opening area based on the signal at port S. When the valve is opening,

`$\begin{array}{l}A\left(t\right)=\frac{{A}_{max}-{A}_{leak}}{7}\left({e}^{-2\frac{t-{t}_{0}}{{\tau }_{open}}}-8{e}^{\frac{t-{t}_{0}}{{\tau }_{open}}}\right)+{A}_{max}\\ {t}_{0}={t}_{start}+\mathrm{log}\left(4-\sqrt{16-7\frac{{A}_{max}-{A}_{0}}{{A}_{max}-{A}_{leak}}}\right){\tau }_{open}.\end{array}$`

When the valve is closing,

`$\begin{array}{l}\text{A(t)=}\left({A}_{max}-{A}_{leak}\right){e}^{-\frac{t-{t}_{0}}{{\tau }_{close}}}+{A}_{leak}\\ {t}_{0}={t}_{start}+\mathrm{log}\left(\frac{{A}_{0}-{A}_{leak}}{{A}_{max}-{A}_{leak}}\right){\tau }_{close},\end{array}$`

where:

• Amax is the value of the Maximum opening area parameter.

• Aleak is the value of the Leakage area parameter.

• tstart is the time that the solenoid turns on or off.

• A0 is the valve area at the time the solenoid turns on or off.

• ${\tau }_{open}=\frac{-{t}_{switc{h}_{open}}}{\mathrm{log}\left(4-\sqrt{15.3}\right)},$ where tswitchopen is the value of the Opening switching time parameter.

• ${\tau }_{close}=\frac{{t}_{switc{h}_{close}}}{\mathrm{log}\left(0.1\right)},$ where tswitchclose is the value of the Closing switching time parameter.

Valve Controlled with Electrical Ports

When you set to `Electrical ports`, the block calculates the opening area based on the electrical network connected to the solenoid valve at ports + and -.

The opening area is

`$\text{A=}\frac{x}{l}\left({A}_{max}-{A}_{leak}\right)+{A}_{leak},$`

where x is the plunger position and l is the value of the Plunger distance of travel parameter.

The block models the plunger motion with the force balance expression

`${m}_{core}\stackrel{¨}{x}={F}_{magnetic}-{F}_{spring}+{F}_{hardstop},$`

where:

• mcore is the mass of the moving parts in the solenoid valve.

• Fspring is the force exerted by the spring to close the valve when the solenoid is off.

• Fhardstop is the hard-stop force that prevents the plunger from moving beyond the fully open and fully closed positions. The block calculates the hard-stop by using mode charts. For more information, see Mode Chart Modeling.

• Fmagnetic is the force generated by the solenoid,

`${\text{F}}_{magnetic}=-\frac{1}{2}K{i}^{2}.$`

The block uses the solution to the force balance expression to calculate mcore, Fspring, and K at the values of the Rated voltage, Nominal current, Opening switching time, and Closing switching time parameters. The block then uses these values for mcore, Fspring, and K to solve for the plunger position at all other times.

### Switching Time

The block characterizes the solenoid valve by using the valve opening and closing switching times specified by the Opening switching time, and Closing switching time parameters, respectively. The Opening switching time parameter is the time from the solenoid being turned on to the flow rate rising to 90% of the way between its maximum and minimum values.

The Closing switching time parameter is the time from the solenoid being turned off to the flow rate falling to 10% of the way between its maximum and minimum values.

### Assumptions and Limitations

• The maximum solenoid force is the same as the force generated by the spring.

• The damping inside the solenoid and the pressure flow forces are negligible.

• The spool is balanced.

• The solenoid travel distance is short enough that the block assumes the inductance is linear.

## Ports

### Input

expand all

Physical signal that controls the valve. When the signal at port S is above 0.5, the solenoid turns on and the valve opens. When the signal at port S falls below 0.5 the solenoid turns off, and the valve closes.

#### Dependencies

To enable this port, set Solenoid control to `Physical signal`.

### Conserving

expand all

Liquid entry or exit port.

Liquid entry or exit port.

Electrical conserving port associated with the positive terminal of the valve control.

#### Dependencies

To enable this port, set Solenoid control to `Electrical ports`.

Electrical conserving port associated with the negative terminal of the valve control.

#### Dependencies

To enable this port, set Solenoid control to `Electrical ports`.

## Parameters

expand all

Select the method the block uses to control the valve. If you select `Physical signal`, the block uses the physical signal S to control the valve. If you select `Electrical network`, the block enables the electrical + and - ports and models the electrical responses.

Whether the initial position of the valve is open or closed.

Time from the solenoid turning on to the flow rate reaching 90% of the way between its maximum and minimum values.

If is set to `Electrical ports`, calculate this parameter at the value of the Rated voltage parameter using a step input.

Time from the solenoid turning off to the flow rate falling to 10% of the way between its maximum and minimum values.

If is set to `Electrical ports`, calculate this parameter at the value of the Rated voltage parameter using a step input.

Cross-sectional area of the valve in the fully open position.

Sum of all the gaps when the valve is in the fully closed position. The block saturates any valve area smaller than this value to the specified leakage area. The leakage area contributes to numerical stability by maintaining continuity in the flow.

Cross-sectional area at the entry and exit ports A and B. The block uses this area in the pressure-flow rate equation that determines the mass flow rate through the valve.

Correction factor that accounts for discharge losses in theoretical flows.

Upper Reynolds number limit for laminar flow through the valve.

Whether the block accounts for pressure increase when fluid flows from a region of smaller cross-sectional area to a region of larger cross-sectional area.

Rated voltage of the solenoid. Calculate the values of the Opening switching time and Closing switching time parameters at this voltage by using a step input.

#### Dependencies

To enable this parameter, set Solenoid control to `Electrical ports`.

Steady-state current of the solenoid at the value of the Rated voltage parameter.

#### Dependencies

To enable this parameter, set Solenoid control to `Electrical ports`.

Linear inductance of the solenoid. The block approximates the inductance as linear.

#### Dependencies

To enable this parameter, set Solenoid control to `Electrical ports`.

Distance the plunger travels between the fully closed and fully open valve positions.

#### Dependencies

To enable this parameter, set Solenoid control to `Electrical ports`.

Initial current in the solenoid.

#### Dependencies

To enable this parameter, set Solenoid control to `Electrical ports`.

## References

[1] Zhang, Xiang, Yonghua Lu, Yang Li, Chi Zhang, and Rui Wang. “Numerical Calculation and Experimental Study on Response Characteristics of Pneumatic Solenoid Valves.” Measurement and Control 52, no. 9–10 (November 2019): 1382–93. https://doi.org/10.1177/0020294019866853.

[2] Zhang, Jianyu, Peng Liu, Liyun Fan, and Yajie Deng. “Analysis on Dynamic Response Characteristics of High-Speed Solenoid Valve for Electronic Control Fuel Injection System.” Mathematical Problems in Engineering 2020 (January 22, 2020): 1–9. https://doi.org/10.1155/2020/2803545.

## Version History

Introduced in R2023a

expand all