You are on page 1of 10

EEE 325 Control Systems

LAB # 04

Names Talmeez Shahzad

Abdul Mobeen

Registration Numbers FA19-BEE-019

FA19-BEE-028

Class BEE-5D

Instructor’s Name Sir Rizwan Azam

Lab Assessment

Post Lab Total


Pre-Lab In-Lab Data
Data Analysis Writing Style
Presentation
System and to Calculate Its Various Responses
Objectives
To demonstrate the key components of a translational mechanical system, model the system and finally to obtain
various responses using computation and observe it on Rectilinear plant.

Equipment/Tools required:
Rectilinear Plant with controller interfaced with PC

Introduction:
The modelling elements of a translational mechanical system include mass, spring and damper. Mass is an element
which resists the motion due to inertia. According to Newton’s law,

IN LAB TASKS:

Express the system shown in Figure 5.5 using modelling symbols. Your schematics should look like as shown in
Figure 5.6.

1. Calculate the transfer functions x1(s)/f(s), x2(s)/f(s) and x3(s)/f(s).


2. Calculate impulse, step, ramp, parabolic and sinusoidal responses by taking relevant values of f(s).
CODE:

clear all
close all
s = tf('s');
m1=1;
k1=1;
m2=1;
k2=1;

b=1;
sys1 = (m2.*s^2+b.*s+k1+k2)/((m2.*s^2+b.*s+k1+k2)-k2^2)
sys2 = (k2)/(m2*s^2+b.*s+k1+k2-k2^2)

t=0:0.001:10; %time defination


figure(1) %step response
subplot(2,1,1)
step(sys1)
subplot(2,1,2)
step(sys2)
figure(2) %impulse response
subplot(2,1,1)
impulse(sys1)
subplot(2,1,2)
impulse(sys2)
u1=t;

figure(3) %ramp response


subplot(2,1,1)
lsim(sys1,u1,t)
subplot(2,1,2)
lsim(sys2,u1,t)
u2=(t.^2)/2; %parabola response
figure(4)
subplot(2,1,1)
lsim(sys1,u2,t)
subplot(2,1,2)
lsim(sys2,u2,t)
u3=sin(t); %sinusoid response
figure(5)
subplot(2,1,1)
lsim(sys1,u3,t)
subplot(2,1,2)
lsim(sys2,u3,t)
Graph :

Figure: Step response of the given mechanical system

Figure: impulse response of the given mechanical system


Figure: ramp response of the given mechanical system

Figure: parabolic response of the given mechanical system


Figure: sinusoidal response of the given mechanical system

Discussion:

In this task we have done the different responses of a mechanical systems and obtain the desired
results ,models were implemented via MATLAB coding and different inputs including step, impulse, ramp and
sinusoid were applied and the behavior was observed through graphs. . Transfer function of different masses
attached with dampers and springs are found.
POST LAB:

Consider k1 = 200, k2 = 400, k3 = 400, k4 = 0 and C1 = C2 = 0, c3=0.5. Find following Transfer Functions

TASK 1:
clc
close all
clear all
k1=2; k2=3;k3=4;
m1=500; m2=90; m3=100; c=5;
a=m1*m2*m3;
b=m1*m2*c;
c=(m1*m2*k2)+(m1*k3)+(m2*m3*k1)+(m1*m3*k1)+(m1*m3*k2)+(m1*m3*k1^2);
d=(m2*c*k1)+(k1*m1*c)+(m1*c*k2)+(m1*c*k1^2);
e=(m2*k1*k2)+(k1*k3*m2)+(m1*k1*k2)+(m1*k1*k3)+(m3*k1^2)+(m1*k2^2)+(m1*k2*k3)+(m1*k2*k1^2)+(m1*k3*k1^
2)+(k1^3*m3);
f=(c*k1*k2)+(c*k1^3);
g=(k1^2*k3)+(k1*k2^2)+(k1*k2*k3)+(k1^3*k2)+(k1^3*k3);
h=k1*k2;
sys= tf([h],[a b c d e f g]);
t= 0:0.001:0.1;
figure(1)
step(sys)
figure(2)
impulse(sys)
u1=t;
figure(3)
lsim(sys,u1,t)
u2=(t.^2)/2;
figure(4)
lsim(sys,u2,t)
u3=sin(t)
figure(5)
lsim(sys,u3,t)
Graphs:

Figure: Step response of the given mechanical system

Figure: impulse response of the given mechanical system


Figure: Ramp response of the given mechanical system

Figure: Parabolic response of the given mechanical system

Figure: sinusoidal response of the given mechanical system


Discussion:

In this task we have done the transfer function of a mechanical systems and obtain the desired results
,models were implemented via MATLAB coding and different inputs including step, impulse, ramp and sinusoid
were applied and the behavior was observed through graphs. Transfer function of different masses attached with
dampers and springs are found.

CRITICAL ANALYSIS:

The objectives of this lab were to learn about translational mechanical system, model the system and finally to
obtain various responses using computation and observe it on rectilinear plant. The modelling elements of a
translational mechanical system include mass, spring and damper. Mass is an element which resists the motion
due to inertia. In this phenomenon of mass damper systems physically by using Rectilinear Plant with controller
interfaced with PC. Transfer function of different masses attached with dampers and springs are found. This
process of finding transfer functions is called modelling. The experimental rectilinear control system is comprised
of the three subsystems the first of these is the electromechanical plant which consists of the spring/mass
mechanism, its actuator and sensors.

You might also like