0% found this document useful (0 votes)
92 views8 pages

EE-361 Feedback Control Systems Basic MATLAB Commands Experiment # 1

This document provides instructions and exercises for an introductory MATLAB lab on basic control system concepts including: 1) Creating transfer functions using different methods and plotting step responses. 2) Constructing pole-zero plots and finding poles and zeros using different commands. 3) Converting Laplace transforms to time functions using partial fraction expansions. 4) Reducing block diagrams to single transfer functions using series, parallel and feedback operations. 5) Finding impulse responses and relating pole locations to response characteristics.

Uploaded by

Shiza Shakeel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views8 pages

EE-361 Feedback Control Systems Basic MATLAB Commands Experiment # 1

This document provides instructions and exercises for an introductory MATLAB lab on basic control system concepts including: 1) Creating transfer functions using different methods and plotting step responses. 2) Constructing pole-zero plots and finding poles and zeros using different commands. 3) Converting Laplace transforms to time functions using partial fraction expansions. 4) Reducing block diagrams to single transfer functions using series, parallel and feedback operations. 5) Finding impulse responses and relating pole locations to response characteristics.

Uploaded by

Shiza Shakeel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

EE-361 Feedback Control Systems

Basic MATLAB Commands


Experiment # 1

Date: / / 2020 Section:

Lab Report 1 Requirements


Please answer all the exercises from this handout.

Instructions
Follow the instructions stated below:
1. Please save all your graphs by taking screen shots in a word file with the
exercise numbers mentioned.

2. After the lab, you (all members of a group) have to upload the above
mentioned word file into the drop box on LMS with the name of that
file as LabX-Y-N.pdf (X is the experiment number, Y is the day e.g.
Tuesday(Morning), Tuesday(Evening), Thursday and N is the name of
the student).

1
1 Introduction
This lab session is meant to introduce students to the basic functionality avail-
able in MATLAB for Feedback Control Systems. Through these commands,
students can revise their previous knowledge and also gain an understanding of
the conceptual framework behind control systems.

1.1 Transfer Function


There are roughly five ways to create a continuous transfer function in MAT-
LAB:

I. Specify the transfer function directly as a rational expression in ’s’.


II. Use the ’tf’ function to create real- or complex-valued transfer function
models.
(a) Specify the numerator and denominator coefficients as row vectors
ordered in descending powers of ’s’ (SISO case).
(b) Use the ’conv’ and/or ’poly’ commands to provide the numerator
and denominator coefficients.
III. Use the ’zpk’ function to create a zero-pole-gain model.

IV. Convert another dynamic system model to a transfer function model using
the ’tf’ command.
V. Use state space representation to input the A, B, C, and D arrays.

We will be using the first three methods to construct transfer functions.

Exercise 1: Create the following single-input single-output (SISO) transfer


functions and plot their step responses:

1.
s2 + 5s + 6
G(s) = (use II a) (1)
s2 + 9s + 12

2.
2s
G(s) = (use II a) (2)
s2 + 8s + 15

3.
2(s + 2)(s + 5)2
G(s) = (use II b) (3)
(s + 1)(s2 + 4)2

2
4.
2(s2 + s + 1)
G(s) = (use II a & b) (4)
s(s + 1)2

5.
3s2 + 9s + 12
G(s) = (use I) (5)
(s + 2)(s2 + 5s + 11)

6.
exp(−s)
G(s) = (use I) (6)
s2

7.
5
G(s) = (use III) (7)
(s + 2)(s2 − 16s)

8.
s
G(s) = 6 (use III) (8)
(s + 5 + 2i)(s + 5 − 2i)(s + 3)

Exercise 2: For bonus points, construct the following transfer function:

G(s) = tan−1 (1/s)

Exercise 3: For bonus points, create the following one-input two-output


transfer function:  s+6 
 s2 + 4s + 4 
G(s) =  
1
 

s2
Exercise 4: For bonus points, create the following two-input two-output
(MIMO) transfer function:

6 s+3
 
 s+5 s+5 
G(s) = 
 

 s 1 
s+5 s+5

3
1.2 Pole-zero Plot
The command ’pzmap’ creates a pole-zero plot of a continuous- or discrete-time
transfer function. In the plot, the poles are marked as x’s while o’s pinpoint
the zeros. The functions ’sgrid’ and ’zgrid’ can be used to plot lines of constant
damping ratio and natural frequency in the ’s’ and ’z’ plane respectively (you
will understand their importance later on in the course).

Exercise 5: Construct the pole-zero plots for equations 1 through 8 pro-


vided earlier.

The poles and zeros can also be found using the ’tf2zp’ function that con-
verts the given transfer function into its pole-zero form. Alternatively, the ’roots’
command can be used as well.

Exercise 6: Find the poles and zeros of equations 1 and 4 using the ’roots’
command. Compare the results with those in Exercise 5.

Exercise 7: Find the poles and zeros of equations 3 and 8 using the ’tf2zp’
command. Compare the results with those in Exercise 5.

1.3 Laplace- to Time-domain Conversion


Please review Laplace transforms for this section. We can find the partial frac-
tion expression of a given transfer function using the ’residue’ function. After
that, it is fairly simple to find the corresponding time function.

Exercise 8: Find the time function corresponding to each of the following


Laplace transforms using partial-fraction expansions in MATLAB:
(a)
3s − 1
F (s) =
s2 − 3s + 2
(b)
3s2 + 3s − 1
F (s) =
s2 − 3s + 2
(c)
7s3 + 2s2 + 3s − 1
F (s) =
s2 − 3s + 2
(d)
2s2 + 3s − 1
F (s) =
s3 − 5s2 + 8s − 4
(e)
2s2 + 3s − 1
F (s) =
s3 − 3s2 + 4s − 2

4
(f)
1
F (s) =
s2 + 4
(g)
s2 − 1
F (s) =
(s2 + 1)2

(h)
3s2 + 9s + 12
F (s) =
(s + 2)(s2 + 5s + 11)

Exercise 9: For bonus points, figure out the relationship between the
direct term k and the orders of the numerator and denominator polynomials.

1.4 Block Diagram Reduction


If the individual transfer functions are available for components in a control sys-
tem, it is possible to use MATLAB commands to compute the transfer functions
of interconnected systems. The three commands ’series’, ’parallel’, and ’feed-
back’ compute the transfer functions of two component block transfer functions
in series, parallel, and feedback configurations, respectively.

Exercise 10: Use the above commands to reduce each of the block dia-
grams given below into a single transfer function:

Figure 1: 10 (a)

5
Figure 2: 10 (b)

Figure 3: 10 (c)

6
1.5 Impulse Response and Pole Locations
The purpose of this section is to illustrate the relationship between the poles
and the character of the response. Let us look at a few basic transfer functions.

Exercise 11: Find the impulse response of the following transfer functions
while also noting down their time functions and poles:
(a)
1
H(s) =
s
(b)
1
H(s) =
s−5
(c)
1
H(s) =
s − 20
(d)
1
H(s) =
s+5
(e)
1
H(s) =
s + 20
(f)
1
H(s) =
s2 + 25
(g)
1
H(s) =
s2 + 400
(h)
1
H(s) =
s2 + 10s + 50
(i)
1
H(s) =
s2 − 10s + 50
Exercise 12: Draw all the poles from Exercise 11 in a single s-plane, and
identify any trends obtained from the responses. Can you conclude something
about how poles affect the stability of the system from this analysis? Also, what
do you think is meant by ’fast’ and ’slow’ poles?

7
Exercise 13: Find the impulse and step responses of the following transfer
function:
5s2 − 2s + 23
H(s) = 2
s + 6s + 5
In general, the shapes of the components of the natural response are determined
by the locations of the poles of the transfer function. Based on this example,
would you agree?

1.6 Response to User-defined Inputs


Various types of inputs can be provided to a system with a known transfer
function. We have so far looked at step and impulse responses. The following
exercise illustrates how to simulate responses for any other input.

Exercise 14: Run the given code in MATLAB and explain what it does.

numT = [0 1 2];
denT = [1 1 0];
sysT = tf(numT,denT);
t=0:0.01:5;
u=[zeros(1,200) 10*ones(1,10) zeros(1,100) -10*ones(1,10) zeros(1,181)];
y = lsim(sysT,u,t);
plot(t,u);
plot(t,y);

You might also like