Challenge

Project - Speed Control of a Direct Current (DC) motor

1. Generating the DC motor model in simulink:

% Assuming the Parameters to model a DC motor

J = 0.01; % Moment of inertia of the rotor in kg-m^2
b = 0.1; % Motor viscous constatnt in N-m-s
Kb = 0.01; % Back EMF constant in v/rad/s
Kt = 0.01; % Motor torque constant in N-m/amp
Ra = 1.0; % Resistance of the armature circuit in ohms
La = 0.5; % Inductance of the armature circuit in henries
2. Now generating and connecting the PID control to control the DC motor:
% Assuming the matrices to obtain the required values
A=[-b/J Kt/J; -Kb/J -Ra/La]; % Matrix 'A'
B = [0;1/La]; % Matrix 'B'
fn = 1; % Ntural frequency
wn = 2*pi*fn
zeta = 0.5;
p1 = -zeta*wn+wn*sqrt(zeta^2-1) % Pole 1
p2 = -zeta*wn-wn*sqrt(zeta^2-1) % Pole 2
P = [p1;p2]
K = place(A,B,P)
Kp = K(1) % Proportional gain
Kd = K(2) % Derivative gain
Ki = 10; % Integral gain
% Got the required values

wn =

6.2832


p1 =

-3.1416 + 5.4414i


p2 =

-3.1416 - 5.4414i


P =

-3.1416 + 5.4414i
-3.1416 - 5.4414i


K =

37.8233 -2.8584


Kp =

37.8233


Kd =

-2.8584

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.