Project - Speed Control of a Direct Current (DC) motor
Summary :-
The project is based on the speed control of DC motor by using PID controller.
Initially the simulink model of DC motor is build and then it is converted to subsytem model named as DC motor.
The DC motor subsytem is then connected to PID controller to maintain the desired speed as it is.
We adjust the gain values KP,Ki,Kd accordingly to get the control design objectives of our requirement.
Simulink model of DC Motor :-

The parameters are :-
J = 0.01; % moment of inertia
B = 0.1; % Motor viscous friction
Km = 0.01; % Back emf
Kt = 0.01; % Motor torque constant
Ra = 1; % Armature Resistance
La =; % Armature inductance
The gains and parameter values are derived in the matlab script and then run and the they will be available in the simulink model. The script for plotting and parameters are shown below :-

Plotting initial behaviour of DC Motor in various scenario without any controller :-
The graphs between time vs speed,supply voltage, torque, armature current and back emf are shown above.
Designing DC Motor with Discrete PID Controller :-

Block parameters if Discrete PID Controller :-
Initially Kp=1,Ki=1,Kd=0; after tuning we set Kp,Ki,Kd as 31.58,82.37,2.35 respectively to obtain design objectives of settling time, overshoot and steady state error within the limits.

After tuning the K values of PID controller, the desired speed is set in the step input and then run to get the plot between actual speed and desired speed.
Maintaining stability of a dynamic system :-
Plotting the graph :-
1) To maintain a desired speed for the motor (case1: Desired speed = 80) :-

2) To maintain a desired speed for the motor (case 2: Desired speed = 230):-

In the above we have set two desired speed cases i,e case 1= 80;case 2=230, and we can see that in both the cases the motor gives best response i,e best actual speed that is equal to desired speed.
From the above plots we can see that the desired speed and actual speed are equal(tracking) with minimum oscillations or the best speed was achieved by the simulink model that we have build.
Hence to design a simulink model for the Speed control of DC Motor using PID controller and to maintain desired speed and stability of DC Motor was done successfully.