Linear Control Systems Lab: E X Per I M E NT NO: 3

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Linear Control Systems Lab

EXPERIMENT NO: 3

Name and Roll No:

Batch:

Date of Experiment:

Obtained Marks (Rubric Based): P1: P2: P3:

Total Marks: P1: 5 P2: 5 P3: 5 = 15

Remarks:

Instructor’s Signature
Experiment No 3:

Mathematical Modeling of Translational Mechanical System and Pole-Zero of Transfer Functions

Objective:

In this lab we will find transfer function of the translational mechanical system. We will also find poles
and zeroes of transfer function and plot them using LabVIEW and Matlab.

Overview:

A transfer function (also known as the system function or network function and, when plotted as a
graph, transfer curve) is a mathematical representation, in terms of spatial or temporal frequency, of the
relation between the input and output of a linear time-invariant system with zero initial conditions and
zero-point equilibrium.
MATLAB and LAB VIEW provide functions for the implementation of transfer function.

Procedure:

To find the transfer function, we will take a free body diagram of mass spring system.

Mass-Spring System Model:

Consider the Mass-Spring system as shown in the figure.


Where Fs(x) is the spring force, x(t) is the displacement and Fa(t) is the applied force and Ff (v) is viscous
damper force:

Place on the mass all forces felt by the mass. We assume the mass is traveling toward the right. Thus,
only the applied force points to the right; all other forces impede the motion and act to oppose it. Hence,
the spring, viscous damper, and the force due to acceleration point to the left. We now write the
differential equation of motion using Newton’s law to sum to zero all of the forces shown on the mass.

1
Free body diagram:

Where,
M= mass
Fv= B = damping coefficient
K= spring constant
F(t)= applied force

2
Taking the Laplace transform, assuming zero initial conditions,

Solving for the transfer function yields

Block diagram:

Where,
F(s)=input
X(s) = output

LAB VIEW:
For this method, simply follow the following path in “block diagram” of lab view:
 Control system and simulation
 Control design
 Model construction
 Construct transfer function
 Right click and label
 Select SISO(symbolic)
 Create controls i.e, num(symbolic) and denum(symbolic) and variable
 Draw transfer function
 Create indicator

3
Figure:

Simulating Spring-Mass-Damper Systems


A spring-mass-damper mechanical system is shown in Fig. below.

The motion of the mass, denoted by y(t), is described by the differential equation

The dynamic response of the spring-mass-damper mechanical system is

where θ = cos-1 ζ, ωn2 = k/M and 2ζ ωn = b/M. The initial displacement is y(0).
The transient system response is underdamped when ζ < 1, overdamped when ζ > 1, and critically
damped when ζ = 1.

4
Example: Spring-Mass-Damper Simulation
We can use LabVIEW to visualize the unforced time response of the mass displacement following an
initial displacement of y(0). Consider the underdamped case, where:

MATLAB:

Also find the transfer function using Matlab

Submit these tasks along with LAB reports, also attach figures to view VIs and results.

Example of Creating Transfer Function Models


You can create transfer function (TF) models by specifying numerator and denominator
coefficients. For example,

>>num = [1 0]; 5
>>den = [1 2 1];
>>sys = tf(num,den)
Transfer function:

A useful trick is to create the Laplace variable, s. That way, you can specify polynomials using s as the
polynomial variable.

>>s=tf('s');
>>sys= s/(s^2 + 2*s + 1)

Transfer function:

This is identical to the previous transfer function.


Example of Creating Zero-Pole-Gain Models
To create zero-pole-gain (ZPK) models, you must specify each of the three components in vector
format. For example,

>>sys = zpk([0],[-1 -1],[1])

Zero/pole/gain:

produces the same transfer function built in the TF example, but the representation is now ZPK.

This example shows a more complicated ZPK model.


>>sys=zpk([1 0], [-1 -3 -.28],[.776])

Zero/pole/gain:

Plotting poles and zeros of a system:

pzmap
Compute pole-zero map of LTI models
6
pzmap(sys)
pzmap(sys1,sys2,...,sysN)
[p,z] = pzmap(sys)

Description:
pzmap(sys) plots the pole-zero map of the
continuous- or discrete-time LTI model sys. For
SISO systems, pzmap plots the transfer function
poles and zeros. The poles are plotted as x's and the
zeros are plotted as o's.

pzmap(sys1,sys2,...,sysN) plots the pole-zero map of


several LTI models on a single figure. The LTI
models can have different numbers of inputs and
outputs. When invoked with left-hand arguments,
[p,z] = pzmap(sys) returns the system poles and zero
in the column vectors p and z. No plot is drawn on
the screen. You can use the functions sgrid or zgrid
to plot lines of constant damping ratio and natural
frequency in the s- or z- plane.
Example:
Plot the poles and zeros of the continuous-time system.

>>H = tf([2 5 1],[1 2 3]);


>>pzmap(H)

Simulation of Linear systems to different


inputs

Impulse, step and lsim


You can simulate the LTI systems to inputs like
impulse, step and other standard inputs and see the
plot of the response in the figure window. MATLAB
command ‘impulse’ calculates the unit impulse
response of the system, ‘step’ calculates the unit step
response of the system and ‘lsim’ simulates the (time)
response of continuous or discrete linear systems to
arbitrary inputs. When invoked without left-hand

7
arguments, all three commands plot the response on
the screen. For example:
To obtain an impulse response
>> H = tf([2 5 1],[1 2 3]); >>impulse(H)

To obtain a step response type


>>step(H)

Time-interval specification:
>> t = 0:0.01:10;
>> impulse(H,t)
>> step(H,t)

Pole-Zeroes using LabVIEW:


Computing the poles and zeros associated with a transfer function is accomplished by operating on the
system model object with the CD Pole-Zero Map function, as illustrated in Fig. below.

8
Example:
Consider the transfer functions

Utilizing LabVIEW, we can compute the poles and zeros of G(s), the characteristic equation of H(s),
and divide G(s) by H(s). We can also obtain a plot of the pole-zero map of G(s)/H (s) in the complex
plane. The pole-zero map of the transfer function G(s)/H (s) and the associated LabVIEW commands are
shown in Fig below.
The pole-zero map shows clearly the five zero locations, but it appears that there are only two poles.
This cannot be the case, since we know that the number of poles must be greater than or equal to the
number of zeros. Using the CD Pole-Zero Map function, we ascertain that there are in fact four poles at
s = -1. Hence, multiple poles or multiple zeros at the same location cannot be discerned on the pole-zero
map.

9
Post Lab Task:

You have to explore “for loop and while loop structure” in LabVIEW and do by yourself a program using
for loop and while loop structure in LabVIEW and attach with lab report.

Comments:

10
11

You might also like