Project - Speed Control of a Direct Current (DC) motor
iam solving the question in pid control
% This file contains the dsign parameters to model a DC motor
J = 0.01; % moment of inetria of the rotor in kg-m^2
b = 0.1; % Motor viscos friction constant in N-m^2
Km = 0.01; % back emf conatant in v/rad/s.
Kt = 0.01; % Motor torque constant
Ra = 1.0; % resistance of the aramture circuit in ohms
La = 0.5; %Inductance of the armaturee circuit in henry
% Design of PID controller
A = [-b/J Kt/J; -Km/La -Ra/La];
B = [0; 1/La];
% Placement of poles
fn = 1;
wn = 2*pi*fn;
zeta = 0.5;
p1 = -zeta*wn+wn*sqrt(zeta^2-1);
p2 = -zeta*wn-wn*sqrt(zeta^2-1);
P= [p1;p2];