Engee documentation
Notebook

Solenoid modelling with basic blocks and physical modelling blocks

This example shows a solenoid with a return spring. The solenoid is modelled as an inductance whose value L depends on the piston position x. The inverse EMF for a time-varying inductance is defined as:

$$v=L{di\over dt}+i{dL\over dt}\quad\quad\quad(1)$$

Since L depends on x:

$$v=L{di\over dt}+i{dL\over dx}{dx\over dt}\quad\quad(2)$$

${dL\over dx}$ can be obtained using data from the manufacturer and using the ratio:

$$force = 0.5*i^2{dL\over dx}\quad(3)$$

Then ${dL\over dx}$ can be integrated to get L as a function of x.

In the model, equation (2) is recalculated to solve for i and then implemented using physical blocks. The controlled current source then limits the magnitude of the current by equating it to i.

Schematic of the model:

solenoid_1734682534158.png

Simulation results:

Values of solenoid current over time, A:

newplot_46.png

Values of the force generated by the solenoid over time, N:

newplot_45.png