You are on page 1of 17

DE LA SALLE LIPA

COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING


ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

EXPERIMENT #3

CONTINUOUS-TIME SYSTEM REPRESENTATION AND MODELING

Submitted By:
Jeanne Krizza L. Cruz
T4A

Submitted To:
Engr. Sarah Jane Delgado, ECE

March 8, 2017

1
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

I. OBJECTIVES

1. To be familiar with the different system modeling methods and represent it


using the MATLAB Software.

2. To know and generate different system transformation using the MATLAB


Software.

3. To be able to extract data from an existing system model using MATLAB


Software.

4. To be familiar with the pole-zero map and generate it using MATLAB


Software.

5. To know the different functions on how to know the properties and description
of different LTI models using MATLAB Software

II. DISCUSSION

INTRODUCTION

A continuous-time can be represented in many ways. However, the physics


behind these systems would result to an integro-differential equation, which is
then transformed in state-space form or transfer function (assuming zero initial
conditions and linearity). With this, MATLAB functions are developed that will
help you perform continuous-time system representation and modeling
operations.

SYSTEM MODELING

As mentioned in the previous sections, a continuous-time system can be


modeled in different ways. From the integro-differential equation developed by
using the laws of physics, the equation would transform into either state-space or
transfer function. The state-space model is commonly used in multiple-input-

2
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

multiple-output (MIMO) systems, while the transfer function is commonly used to


represent a linear, time-invariant (LTI) single-input-single-output (SISO) system.

Transfer Function

For continuous-time systems, the transfer function is mathematically defined as


the ratio of the Laplace transform of the output to the Laplace transform of the
input. Qualitatively, the transfer function is a rational expression that describes
the characteristics of the system being modeled. Generally, the transfer function
is obtain by first getting the Laplace transform of the integro-differential equation
obtained from physical laws, then getting the ratio of the output Laplace
polynomial to the input Laplace polynomial. Please take note that in getting the
Laplace transform of the integro-differential equation, all initial conditions must be
set to zero.

The general form of a transfer function denoted by G(s) is

(3-1)

Where, N(s) and D(s) are the numerator and denominator polynomials,
respectively. The scalars a0, a1,..., am, b0, b1,..., bn are coefficients of the
polynomials. In most applications, m is usually greater n to make the function
rational.

In MATLAB the function sys=tf(num,den) is used to generate a system that is


described by its transfer function, where num and den are the numerators and
denominator vectors, respectively. As an example, the system with the transfer
function

s 2 +3s-1
Gs= 3
( )
s +s-2

3
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

is generated by the script shown in Listing 3-1.

Listing 3-1
>> numg = [1 3 -1]
numg =
1 3 -1
>> deng = [1 0 1 -2]
deng =
1 0 1 -2
>> sysg = tf(numg,deng)
Transfer function:
s^2 + 3 s - 1
-------------
s^3 + s 2
As seen in Listing 3-1, the first steps were to generate the numerator and
denominator polynomials numg and deng, respectively. The final step is to
generate a system sysg that uses numg and deng to as the numerator and
denominator vectors for the function tf(num,den).

State-Space Representation

In state-space representation, the integro-differential equation is transformed in


to simultaneous first-order differential equations. These simultaneous first-order
differential equations can then be represented as matrix equations in the form of

x = Ax + Bu

y = Cx + Du (3-2)

where there matrices A, B, C, and D are matrices that describe the system. The
vectors x and u are the state and input vectors, respectively. The vector y is
called the output vector. The first equation is called the state equation and the
second equation is called the output equation.

4
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

To generate a system described by its state-space model, the MATLAB function


sys=ss(A,B,C,D) is used, where A, B, C, and D are the matrices that describes
the system. Listing 3-2 shows an example of a script that generates a state-
space model of the system described by the equations

Listing 3-2
>> A = [1 2;2 0]
A=
1 2
2 0
>> B = [0 1]'
B=
0
1
>> C = [1 0]
C=
1 0
>> D = 1
D=
1
>> sysg=ss(A,B,C,D)
a=
x1 x2
x1 1 2
x2 2 0

5
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

b=
u1
x1 0
x2 1
c=
x1 x2
y1 1 0
d=
u1
y1 1
Continuous-time model.

As seen in Listing 3-2, the first steps were to generate the matrices A, B, C, and
D using the techniques discussed in Chapter 1. The last step is to used the
function sys=ss(A,B,C,D) to generate the state-space model of the system
described by the state and output equations.

Zero-Pole-Gain (ZPK) Model

Sometimes it is necessary to create a model given the zeros, poles, and the gain
of the LTI system. The function sys=zpk(z,p,k), is used to create such models,
where z is a vector of zeros, p is a vector of poles, and k is the dc gain of the
system. As an example, consider an LTI system with the following specs:

Poles = 0, -2, -3, -4

Zeros = -1, -2

Gain = 2

This may have the form

6
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

( s+ z1 ) ( s+ z2 ) ( s+ zm ) (s+1)(s+2)
G ( s ) =k =2
( s+ p1 ) ( s+ p2 ) ( s+ pn ) s(s+2)(s+3)(s+4)

In MATLAB, we can write

Listing 3-3
>> z = [-1 2]
z=
-1 -2
>> p = [0 2 3 4]
p=
0 -2 -3 -4
>> k = 2
k=
2
>> sys=zpk(z,p,k)
Zero/pole/gain:
2 (s+1) (s+2)
-------------------
s (s+2) (s+3) (s+4)
>>

SYSTEM TRANSFORMATION

MATLAB has many useful functions to transform one mathematical model of an


LTI system to another model. Such LTI transformations are useful for solving
control engineering problems, and are listed below.

Converting Transfer Function to State-Space

7
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

An LTI system represented by a transfer function can be transformed into a state


space model by using the function [A,B,C,D] = tf2ss(num,den), where num and
den are the numerator and denominator polynomials of the transfer function to be
converted.

Converting State-Space to Transfer Function

An LTI system represented by a state space representation can be transformed


into a transfer function model by using the function [num,den]=ss2tf(A,B,C,D).

Converting Transfer Function to Zero-Pole-Gain Model

An LTI system represented by a transfer function can be transformed into a zero-


pole-gain model using the function [z,p,k]=tf2zp(num,den).

Converting Zero-Pole-Gain Model to Transfer Function

An LTI system represented by a zero-pole-gain model can be transformed into a


transfer function model by using the function [num,den]=zp2tf(z,p,k)

Converting Zero-Pole-Gain Model to State-Space

An LTI system represented by a zero-pole-gain model can be transformed into a


state space model using the function [A,B,C,D]=zp2ss(z,p,k).

Converting State-Space to Zero-Pole-Gain Model

An LTI system represented by a state space model can be transformed into a


zero-pole-gain model using the function [z,p,k]=ss2zp(A,B,C,D).

EXTRACTION OF DATA FROM AN EXISTING MODEL

It is sometimes difficult to determine the data of a certain system manually, which


makes MATLAB an efficient tool for data extraction.

Extraction of Transfer Function Data

8
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

A system sys can have transfer function data such as the numerator polynomial
and the denominator polynomial. Given a system sys, the transfer function
numerator and denominator vectors can be obtained using the function
[num,den]=tfdata(sys).

Extraction of State-Space Data

A system sys can have state space data such as the system matrix A, input
matrix B, output matrix C, and the feedforward matrix D. Given a system sys, the
state space data can be obtained using the function [A,B,C,D]=ssdata(sys).

Extraction of Zero-Pole-Gain Data

A system sys can have zero-pole-gain data such as zeros, poles, and system
gain. Given a system sys, the zero-pole-gain data can be obtained using the
function [z,p,k]=zpkdata(sys).

THE POLE-ZERO MAP

In the analysis and design of feedback control systems, it is important to


determine the location of the zeros and poles of the system. One way of
determining the zeros and poles of the system is by using the function zpkdata
as described earlier. If you are interested in the determining only the zeros of the
system, the zero function can be used. One the other hand, if you are interested
in determining only the poles of the system, the pole function can be used.
Listing 3-4 shows an example of zero and pole determination using the zero and
pole functions.

Listing 3-4
>> % Use the system generated earlier.
>> pvector = pole(sysg)
pvector =

9
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

2.56155281280883
-1.56155281280883
>> zvector = zero(sysg)
zvector =
2
-1

The visual representation of the poles and zeros of the system in the s-plane is
generated by using the function pzmap as follows:

Listing 3-5
>> pzmap(sysg)

The visual representation of the pole-zero map is shown in Figure 3-1.

Figure 3-1. Pole-zero map of sysg

10
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

LTI MODELS

The command ltimodels is used as a help file on the description of different LTI
models used in MATLAB. It gives general information on the various types of
LTI models supported in the Control System Toolbox.

There is another command, ltiprops, that is able to give details on the generic
properties of LTI models.

III. SOFTWARE NEEDED

ITEM NO. DESCRIPTION QUANTITY


Matlab 2010 1

IV. PROCEDURES

A system is described by the differential equation

d3 ( ) d 2 ( ) d ( )
2 y t - 2 y t +3 y t +2y ( t ) =x(t)
dt 3 dt dt

1 Determine the transfer function model of this system and generate it in


MATLAB.

2 Determine the roots of the denominator polynomial.

3 Generate the state-space model of the system using any model


transformation technique.

4 Determine the eigenvalues of the state matrix A.

5 Determine the poles and zeros of the system.

6 Plot the pole-zero map of the system.

7 Generate the zero-pole-gain model of the system using any model


transformation technique.

11
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

8 Determine the solution to the differential equation given assuming zero initial
conditions, and plot the response for 0 t 10 seconds.

9 Convert the continuous-time system to discrete-time using the function c2d.


Set the sampling time to 0.1 secs.

V. MATLAB COMMANDS AND RESULTS

1. Transfer Function of the system

2. Roots of the Denominator

3. State Space Model of the system using Transfer Function to State-


Space System Transformation

12
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

4. Eigenvalue of the A Matrix

5. Poles and Zeros of the system

13
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

6. Plot of Pole Zeros System

7. Zero-Pole-Gain Model using State-Space to Zero-Pole Transformation

14
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

8. Solution to the Differential Equation


9. Conversion of Continuous time to Discrete Time

VI. QUESTIONS

1 What is the significance of studying the different system modeling methods?


System modeling is the process of developing abstract models of a
system, with each model presenting a different view or perspective of that
system. Models help the analyst to understand the functionality of the
system; they are used to communicate with customers.

2 Why is it necessary to convert the transfer function model into state space
model?
Conversion of transfer function model into state space model is
necessary, for the state space model is widely used for simulating system

15
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

in different field of electronics that is, the state-spacer is widely used in


several MIMO systems.

3 Compare the results in No. 2 and No. 4. What can you say about it?
The results in No.2 and No.4 are exactly the same for the
eigenvalues are also known as characteristic roots meaning, both program
of the finding roots and finding eigenvalues will result to the same output.

4 What is meant by zeros and poles?


The roots of numerator of a transfer function are called Zeros, while
the roots of the denominator of a transfer function are called Poles. In a
transfer function, poles explain that the output has reached to infinity.

5 What is an eigenvalue of a matrix?

In Matlab, the eigenvalues of a matrix can be find by using the


function >>eig(), this function returns eigenvalues in a column vector.

VII. CONCLUSION

The following are the conclusions gathered after performing the laboratory
experiment that were based on the objectives given.

1. There are different kinds of system modelling methods used in the laboratory
experiment. One is the state-space model which is commonly used in MIMO
systems, then, Transfer Function model which is commonly used to represent
linear, time-invariant SISO system. And to represent it in Matlab, the function to
be used are sys=tf(num,den) for Transfer Function and sys=ss(A,B,C,D) for
State-Space Model. The other types of system modelling are the continuos time
model and the zero-pole-gain Model.

2 MATLAB has many useful functions to transform one mathematical model of an


LTI system to another model. Such LTI transformations are useful for solving

16
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT

control engineering problems. That is, for converting state space to transfer
function, [num,den]=ss2tf(A,B,C,D) is used, for vice versa, that is [A,B,C,D] =
tf2ss(num,den). For converting transfer function to ZPK model, the function used
is [z,p,k]=tf2zp(num,den), and for vice versa, [num,den]=zp2tf(z,p,k). And lastly
the conversion of state space to ZPK model, the function [z,p,k]=ss2zp(A,B,C,D)
is used, and for vice versa, that is, [A,B,C,D]=zp2ss(z,p,k).

3 Matlab has an effiecient tool for extraction of data it can be either in transfer
function model, state space model, ZPK model. For the transfer function, the
function used to extract data is [num,den]=tfdata(sys), while in state space, the
function is [A,B,C,D]=ssdata(sys). And lastly, for ZPK model, the function used to
extract data is [z,p,k]=zpkdata(sys).

4 In the analysis and design of feedback control systems, it is important to


determine the location of the zeros and poles of the system. One way of
determining the zeros and poles of the system is by using the function
[z,p,k]=zpkdata(sys). The visual representation of the poles and zeros of the
system in the s-plane is generated by using the function pzmap(sysg).

17

You might also like