Other
Use examples from a wide range of application areas to learn about modeling and simulation with System Modeler and the Modelica language.
Speed Control of a DC Motor
Speed control mechanisms have a wide range of applications, ranging from supervising the motion of elevators to steering an autonomous vehicle. This example shows a workflow of how you could create a speed controller for a DC motor.
To run this example, you'll need
The latest versions of System Modeler and Mathematica.
Please make a selection:
Get afree trial Continue
with download
Create a Model
Create a model of the DC motor graphically or programmatically.
![](assets.en/img/output1.png)
Built-in example of a DC motor in System Modeler is loaded in the Wolfram Language.
Linearize the Model
Linearize the model around the equilibrium.
![](assets.en/img/output2.png)
A linearized state-space representation of the DC motor is obtained.
Create a Controller
Create a controller using the control system functionality.
![](assets.en/img/output3.png)
A PID controller is created that is good at rejecting disturbances, as well as following changes in the reference.
Connect the Controller
Create a controlled system by automatically connecting the controller to the model in a closed loop.
![](assets.en/img/output4.png)
The PID controller is automatically connected with the DC motor.
Test the Controlled System
Test the controlled system for a reference input and a set of disturbances.
![](assets.en/img/output5.png)
The DC motor attains the reference speed and maintains it despite the disturbances.
Wolfram System Modeler
Try
Buy
System Modeler is available in English
and Japanese
on Windows, macOS & Linux »
Questions? Comments? Contact a Wolfram expert »