Project - Speed Control of a Direct Current (DC) motor
Note: When tried the design parameters from the training class video, I got an unstable responce so I selected my own design parameters as follows,
% Design parameters for modeling of DC Motor
J=0.01; % Moment of inertia of the rotor in Kg-m^2
Km=0.01; % Back EMF constatnt in V/rad/sec
Kt=0.75; % Motor torque constant in N-m/Amps
Ra=5.2; % Resistance of the armature in Ohms
La=1.1; % Inductance of the armature in Henries
Bm=0.02; % Motor damping constant in N-m-s
% For the the designing of PID Controller
A=[-Bm/J Kt/J;-Km/La -Ra/La];
B=[0;1/La];
fn=1;
Wn=2*pi*fn;
zeta=0.8;
p1=-zeta*Wn+Wn*sqrt(zeta^2-1)
p2=-zeta*Wn-Wn*sqrt(zeta^2-1)
P=[p1,p2];
K=place(A,B,P)
Ki=0.65;
Kp=K(1);
Kd=K(2);
s=tf('s');
%For the plots
close all;
subplot(321);plot(out.time,out.RefSpeed);grid;title('Ref Speed');
subplot(322);plot(out.time,out.Vs);grid;title('Supply Voltage(V)');
subplot(323);plot(out.time,out.Vb);grid;title('Back EMF(V)');
subplot(324);plot(out.time,out.Ia);grid;title('Armature Current(A)');
subplot(325);plot(out.time,out.Tm);grid;title('Motor Torque(N-m)');
subplot(326);plot(out.time,out.w);grid;title('Motor Speed(rad/sec)');
% Screen Shot of the designed model attached below;

% When designparameter script file run, following calculations found,
>> Design_Parameter
p1 =
-5.0265 + 3.7699i
p2 =
-5.0265 - 3.7699i
K =
0.3328 3.6584