Project - Speed Control of a Direct Current (DC) motor
Mathemetical model
Kirchoffs law
Vs=RaIa+La(dIa/dt)+Vb [Ra = Armmeture Resistance; Ia = Armmeture Current; La=Armmeture inductence; Vb=Back Emf]
Angular Velocity & Torque
Vb=Km(d`theta`/dt) [Km=Back Emf;Kt=torque constant]
T=KtI
Matlab code
J=0.01;% Moment of inertia of the rotor
B=0.1;% motor viscous friction constant
Km=0.01;%Back Emf constant
Kt=0.01;% Motor torque constant
Ra=1;%Armmeture resistance
La=0.5;%Armmeture inductance
A=[-B/J Kt/J;-Km/La -Ra/La];%State space model
B1=[0;1/La];
wn=6.28;
zeta=1.00001; %Critically damped system
%zeta=0.5; %underdamed damped system
%zeta=1.1; %overdamed damped system
%pole place design
p1=-zeta*wn+wn*sqrt(zeta^2-1);
p2=-zeta*wn-wn*sqrt(zeta^2-1);
p=[p1;p2];
K=place(A,B1,p);
Kp=K(1);
Kd=K(2);

Simulink Model:

Plotting command:
figure(3);
subplot(321);plot(out.time.Data,out.Vs.Data);hold;grid;title('Supply Voltage');xlabel('Time');ylabel('Supply Voltage');
subplot(322);plot(out.time.Data,out.Ia.Data);hold;grid;title('Armeture Current');xlabel('Time');ylabel('Armeture Current');
subplot(323);plot(out.time.Data,out.Tr.Data);hold;grid;title('Torque');xlabel('Time');ylabel('Torque');
subplot(324);plot(out.time.Data,out.speed.Data);hold;grid;title('rotational Speed');xlabel('Time');ylabel('Rotational Speed');
subplot(325);plot(out.time.Data,out.Vb.Data);hold;grid;title('Back Emf');xlabel('Time');ylabel('Back Emf');
subplot(326);plot(out.time.Data,out.Vs.Data);hold;grid;title('Theta');xlabel('Time');ylabel('Theta');

Controll system design test:
Teat1:Zeta value is 0.5.(Under-Damped System)

Result:Setting time is over 2sec and Over shoot is more than 5%
Test2:Zeta value is 1.1.(Over-damped system)

Result:Setting time is over 2sec and Over shoot is more than 5%
Test3:Zeta value is 1.0.(Critically-Damped system)

Result:Setting time is under 2sec and Over shoot is less than 5%
Stability analysis

Logic and answer:
Here Fig3 is a stable system.
zeta value is 1. means it is critically damep system. Because Setting time is under 2sec and Over shoot is less than 5%.
Here Fig1 is a unstable system.
zeta value is 0.5. means it is undamep system. Because Setting time is over 2sec and Over shoot is more than 5%. Because of Setting time is under 2sec and Over shoot is less than 5%. it is unstable.
Here Fig2 is a unstable system. but it is better that fig1 but fig 3 is ideal not fig2.
zeta value is 1.1. means it is overdamep system. Because of Setting time is under 2sec and Over shoot is less than 5%. it is unstable.