![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/173122/image.png)
How to connect solenoid to a system in Simulink
6 views (last 30 days)
Show older comments
Gabriel Oliviero
on 29 Feb 2016
Edited: Sebastian Castro
on 1 Mar 2016
Hello, I'm trying to simulate a solenoid action into my mass, spring, damper model, but I can't connect the solenoid block to the model at simulink. How could I do it?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/156297/image.png)
this is my system, and I would like to change the sine wave for the solenoid mechanical action.
0 Comments
Accepted Answer
Sebastian Castro
on 1 Mar 2016
The Solenoid block is a Simscape based block, so you need interface blocks to connect to Simulink blocks...
... but before we go down that path, Simscape has blocks you can use to model mass-spring-damper systems. This would, by far, be the easiest approach. Look at the following screenshot:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/173122/image.png)
- Sebastian
2 Comments
Sebastian Castro
on 1 Mar 2016
Edited: Sebastian Castro
on 1 Mar 2016
It doesn't have to be -- all the parameters in the "Magnetic Force" tab are used to calculate the underlying equations.
The Solenoid block solves for α and β by taking the two specified force and stroke measurements and substituting them into the preceding equation. It solves the resulting equations for α and β. (these are coefficients for the inductance of the solenoid)
Rated voltage Vdc The voltage at which the solenoid is rated to operate. This voltage value is used to measure the Forces [F1 F2] and Stroke [X1 X2] values. The default value is 50 V.
Rated current Idc The current that flows when the solenoid is supplied with the Rated voltage Vdc voltage. The default value is 0.05 A.
Putting this all together, (I think) it means that the solenoid is at rest at a position X1 with a holding force of F1. An input voltage Vdc will pump a current of Idc through the solenoid, causing it to provide a mechanical force of F1-F2 and move from a position X1 to X2.
- Sebastian
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!