Simulink was made for simulating dynamic systems and it is particularly useful whenever you need to simulate models described by differential equations.
![dc motor matlab simulink dc motor matlab simulink](https://slideplayer.com/8898502/26/images/slide_1.jpg)
Simulink, quote, “is a graphical programming environment for modeling, simulating and analyzing multidomain dynamic systems”. Why is this happeing? This is happening because by inserting a regulator and negative feedback the poles of the system (and therefore its dynamic behaviour) have been changed. You can immediately notice that the motor took less time to get up to the required speed compared to the previous case. By requiring the motor to reach a speed of 1 rad/s, this is the transient that follows: Now we can set as an input a certain speed and see how the motor behaves in the transient.
#Dc motor matlab simulink series
In the second part of the code, I decided to put a PI regulator in series with the system and then use negative feedback to control the speed of the motor. I mean, we can vary the voltage and then get a certain speed as output but in most cases we need a certain speed regardless of the voltage (provided it is within the nominal voltage). This is a nice result but we can’t really control the motor. You can take a look at the transient of the angular speed variable in the graph below
![dc motor matlab simulink dc motor matlab simulink](https://ch.mathworks.com/help/examples/control/win64/xxdcdemofigures_01.png)
In this case it turns out that by applying a unit voltage step, the motor is absorbing 0.2 A and turning at a speed of 45.8 rad/s. Note that I’m assuming the torque of the mechanical load is constant in this case.Īs you can see in the comments in the code, the final state of the system can be calculated just by setting every derivative to zero and then solving for the state variables. Using Matlab we can simulate the system response to a unit voltage step. Mechanically speaking, the motor can be modelled by considering the following equation: The back EMF can be expressed as a function of the speed of the motor $e = k\phi\omega$. Usually R is very small and can be difficult to measure with a multimeter.
#Dc motor matlab simulink plus
Where $R$ is the equivalent resistance of the brushes plus the windings, $L$ is the inductance as seen from the external terminals of the motor and $e$ is the back EMF.
![dc motor matlab simulink dc motor matlab simulink](https://la.mathworks.com/matlabcentral/mlc-downloads/downloads/submissions/33074/versions/1/screenshot.jpg)
Electrically speaking, a permanent magnet DC motor can be modelled as follows:Īpplying LKT we obtain the following differential equation