Anda di halaman 1dari 10

_________________________________________________________________________

EXPERIMENT : 03
NO

TITLE REPRESENTATION OF TRANSFER


: FUNCTIONS IN MATLAB AND
THEIR PRIMARY ANALYSIS

DATE OF
: ______________
EXPERIMENT

GROUP NO : ______________
BATCH : ______________

_______________________
_______________________
_______________________
GROUP
: _______________________
MEMBERS
_______________________
_______________________

________________________________________________________________________

Experiment # 03 CONTROL SYSTEMS Page 1 of 10


_________________________________________________________________________

CONTENTS

PURPOSE ...........................................................................................................................3
INTRODUCTION .............................................................................................................3
TASK ................................................................................................................................10

________________________________________________________________________

Experiment # 03 CONTROL SYSTEMS Page 2 of 10


_________________________________________________________________________

PURPOSE
The purpose of this tutorial is to teach students how to represent transfer functions in MATLAB, convert
them into state-space representation and do some primary analysis.

INTRODUCTION
Mass Spring Damper System
Consider a simple mass spring system as shown:

(0) = (0) = 0
= 10 , = 2 1 , = 5 1

The equation of motion for this system is:


+ + = ()
After putting the values, the equation becomes:
10 + 2 + 5 = ()
After taking the Laplace transform and putting the the initial conditions, the transfer function of this
system becomes:
() 1
= 2
() 10 + 2 + 5

________________________________________________________________________

Experiment # 03 CONTROL SYSTEMS Page 3 of 10


_________________________________________________________________________

Writing the Transfer Function


There are various ways to write a transfer function in MATLAB. Two commonly used ways are defined
here.
1st Method
In this method, the numerator and denominator of the transfer function are separately defined in
MATLAB and then using tf command, they are stored in the form of a transfer function.

2nd Method
In this method, s is defined as a transfer function variable and then a function in terms of s is written
which is automatically interpreted as a transfer function by MATLAB.

________________________________________________________________________

Experiment # 03 CONTROL SYSTEMS Page 4 of 10


_________________________________________________________________________

Converting to State Space Form


After writing the transfer function in MATLAB, it is very easy to convert it into state space form.
However again, there are two ways to do it.
1st Method
If the numerator and denominator are defined separately, then this method is advisable. The input
arguments are the numerator and denominator and the output arguments are the 4 state space matrices
(A,B,C,D). However these variables (A,B,C,D) are not stored in state space form in MATLAB
workspace. To make a state space system using these matrices, the command in the second method is to
be used, with A,B,C,D matrices as input arguments.

2nd Method
If the transfer function has already been written in MATLAB, then using this method it can be converted
into state space form. The input argument is the transfer function and the output is a state space system.

________________________________________________________________________

Experiment # 03 CONTROL SYSTEMS Page 5 of 10


_________________________________________________________________________

Analysis
Primary analysis of a transfer function consists of locating its poles and observing whether they are in
the Left half plane or not. A more detailed behavior of the system can be obtained by obtaining the
response of the system to different types of input.

damp
To find the poles of the system, damp command is used, which gives the location, natural frequency,
time constant, and damping of the poles. For the transfer function under consideration systf, poles
found using the damp are given as:

Note that this command can be used for state space system as well. Sice we know that the eigen
values of the A matrix in state space form are the poles of the system, so using the damp command
on only the A matrix will also give the location, natural frequency, time constant, and damping of
the poles.

eig
This command can also be used to find the poles of a dynamic system. However it only gives the
location of the poles. Similar to the damp command, this command can also be used for the state
space system or only the A matrix to find the poles. Since we defined systf as a transfer function
earlier, so for a defined transfer function, the command would be:

roots
roots can be used to find the roots of any equation. Since poles are also the roots of the denominator
of a transfer function. Since we defined den as the denominator of the transfer function earlier in
this tutorial, so for den, the command would be:

________________________________________________________________________

Experiment # 03 CONTROL SYSTEMS Page 6 of 10


_________________________________________________________________________

pzmap
If we want to visually/graphically see the poles and zeros of the system, then the command pzmap is
used. For the already defined transfer function systf, the command would be:

Zeros are generally denoted by o in this figure. However in the current case, there are no zeros. Poles
are generally denoted by x. We can see two poles at 0.1 0.7.

________________________________________________________________________

Experiment # 03 CONTROL SYSTEMS Page 7 of 10


_________________________________________________________________________

Time Response
The dynamic behavior of the system can be observed using time responses of the system to different
inputs. In this tutorial, we will discuss two types of input. The unit Step input and the unit Impulse
Input.
In the unit Step input, a constant value of input is given to the system from the start till the end. This
value is 1 Newton in the current case. For the already defined transfer function, this command would
be:

Once the plot appears, you can find out the peak value, settling time, rise time and steady state value
of the response. To see any of the above, right click on the white region in the figure. Go to the
characteristics section and from there, any of the above specifications can be turned on. It will then
be seen on the main plot.

________________________________________________________________________

Experiment # 03 CONTROL SYSTEMS Page 8 of 10


_________________________________________________________________________

In unit Impulse input, an input of value 1 is given for a very short period of time. In the current case
if we apply a force of 1 Newton for a very short period of time, then it would be considered as a unit
impulse input. For the already defined transfer function, this command would be:

For impulse response, only peak response and settling time can be obtained. These are obtained in
the same way as in the case of step command.

________________________________________________________________________

Experiment # 03 CONTROL SYSTEMS Page 9 of 10


_________________________________________________________________________

TASK
Q1 Consider the following mass-spring damper

a. Model the system.


b. Derive the Transfer Function for this system and write in MATLAB.
c. Calculate its Poles and Zeros and show them on complex plane.
d. Calculate the damping, natural frequency of the poles.

Q2 Consider the following mass-spring damper


1 = 2 = (100 + 1) Kg Initial Conditions: 1 (0) = 2 (0) = 1 (0) = 2 (0) = 0
1 = 7.5 Nm1
2 = 35 Nm1

= (100 + 0.6 ) Nsm1

where is the mean/average of the last two digits of the registration numbers of all the group members.
a. Model the system.
b. Derive the Transfer functions for this system.
c. Represent the system in State-Space form.
d. Obtain & Comment on the Step and Impulse responses for the derived transfer
functions.
e. Show and Label the Poles and Zeros of the system on PZ map.
f. Calculate the damping, natural frequency and damped natural frequency using
MATLAB command
________________________________________________________________________

Experiment # 03 CONTROL SYSTEMS Page 10 of 10

Anda mungkin juga menyukai