Project - Speed Control of a Direct Current (DC) motor
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 viscuos friction
Km = 0.01; % Back emf
Kt = 0.01; % Motor torque constant
Ra = 1; % Armature resistance
La = 0.5; % Armature inductance
The gains and parameter values are derived in the MATLAB script and then run and it will be available in the simulink model.
The scrpit for plotting and parameters are shown below:-

Plotting inital 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.
Desigining DC Motor with Discrete PID controller :-

Block parameters if discrete PID controller:-
Initally 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 = 100):-

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

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