Challenge

Project - Position control of mass spring damper system

i.) Mathematical modelling from the first principle

Kirchhoff’s voltage law

Vf = Rf*If + If *d(if)/dt

Vs=Ra*Ia + La*d(Ia)/dt + Vb

The algebraic sum of all voltage around any closed loop in a circuit is equal to zero.

The relation between the Back EMF, angular velocity & Torque are related by

Vb =Km*d(theta)/dt. Vb= Back EMF; Km = Back EMF constant;

d(theta)/dt = angular velocity

T = Kt*Ia. T = torque; Kt = Torque constant

  • The open loop transfer function for the motor with the speed(w) & Supply Voltage (Vs) can be derived as

w(s)/Vs(s) = Kt / [(J *La *s^2) + (J*Ra+b*La) *s+ (b*Ra+Kt*Km)]

A proportional integral & derivative (PID) controller design is to obtain the desired angular speed using the appropriate Supply voltage.

Vs = Supply Voltage b = motor viscous constant.

Ra = Armature Resistance Ia = Armature Current; La = Armature Inductance

Vs -Vb = Ra*Ia + La*d(Ia)/dt ---------(1)

J*d^2(theta)/dt + b*d(theta)/dt = Kt*Ia -------(2)

Modelling an Electrical Engineering system using MATLAB code:

%This file contains the design parameters to model a DC Motor.

J = 0.01; %Moment of Inertia of the rotor in Kg-m^-2.

b = 0.1; %Motor Viscous friction Constant in N-m-s.

Km = 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.

%Creating Continuous transfer function

s = tf('s');

P_motor = Kt/((J*s+b) *(La*s+Ra) +(Km)^2);

% Creating of state space Model

A = [-b/J Kt/J;-Km/La -Ra/La];

B = [0;1/La];

C = [1 0];

D =0;

Motor_ss = ss(A,B,C,D);

% Pole placement design and calculating of PID gains.

f = 1;

wn = 2*pi*f;

zeta = 0.5;

p1 = -zeta*wn+wn*sqrt(zeta^2-1);

p2 = -zeta*wn-wn*sqrt(zeta^2-1);

P = [p1;p2];

K = place (A, B,P);

Kp = K (1); %Proportional Gain

Kd = K (2); %Derivative Gain

Ki = 20; %Integral Gain

Simulink Based Modelling:

Using Transfer function:

Using Equations:

The system considered for zeta =0.5

For Standard values means using zeta we get Kp, Kd values respectively 38.3133, -2.8584 and Ki considered as 20

For the above values the results as follows:

To make best performance we get by minimizing the overshoot and less settling time .

For example, by tunning the gains for one set of values Kp=20; Kd = -0.92; Ki =3

We get i)settling time< 2sec; ii)over shoot<5%; iii) steady state error <1%

We can minimize more and we can increase the overshoot, settling time and steady state error by tunning Kp, Ki, Kd values. the response as follows:

(1) use Kp to increase the speed of response, (2) use Kd to reduce the oscillation, and (3) use Ki to increase the speed with which the steady-state error is driven to zero.

For example:

Case-1:

For Kp = 10; Ki = 50; Kd =2;

For Kp =50 ;Ki =50; Kd =2;

For Kp =50; Ki =50; Kd =10;

For Kp =20; Ki =50; kd=-2;

For Kp =100; Ki=1; Kd=1;

For Kp =100; Ki=300; Kd=1;

Conclusion:

We have discussed about DC motor working Principle and Mathematical modelling and created MATLAB Script to Modelling of electrical engineering System. Using MATLAB, we have calculated PID gain values for Under damping system. Using these values also developed Simulink model with PID gains. Verified the Simulink model for different PID (proportional, Integral& Derivative) Gain values. By observing the results, we can say proportional gain is increase the speed of response, Derivative gain reduce the oscillations and increase the stability of the system & Integral gain reduce the steady-state error of system.

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.