Project - Speed Control of a Direct Current (DC) motor
the speed control should be in this project.
the parameters for the DC motor is given in the matlab script file.
i've used the PID controller block , that is why the matrices and the poles are commented out.

the model is given as below

the transfer function are given and the ia and torque values are calculated .
the output signal w (speed) is given back to the sum block for subtracting it from the w_ref (desired speed) .
the error is given to the PID controller and refined signal is then given to the plant.
the PID controller values as shown below.

the w_ref , the desired speed is set to 2000 rad/sec .

the results are given below

we can observe that for the w_ref = 2000 , the output w is going to 2000.
the torque is also at the peak at 1 sec as we know.
hence the speed control is achieved.