Atienza Lab3
Atienza Lab3
Atienza Lab3
De La Salle Lipa
College of Information Technology and Engineering
Electronics Engineering Department
Experiment #3:
Submitted by:
Atienza, Marvin James A.
Submitted to:
Engr. Sarah Jane Delgado
May 3, 2019
1
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
5. To know the different functions on how to know the properties and description
of different LTI models using MATLAB® Software
II. DISCUSSION
INTRODUCTION
SYSTEM MODELING
2
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
Transfer Function
(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.
3
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
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
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 MANUAL
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=
x1x2
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 MANUAL
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.
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:
Zeros = -1, -2
Gain = 2
6
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
G(s)=k =2
(s+z1)(s+z2)…(s+zm) (s+1)(s+2)
(s+p1)(s+p2)…(s+pn) s(s+2)(s+3)(s+4)
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
7
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
8
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
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).
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).
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).
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 MANUAL
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)
10
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
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.
IV. PROCEDURES
11
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
8. Determine the solution to the differential equation given assuming zero initial
conditions, and plot the response for 0 ≤ t ≤10 seconds.
12
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
13
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
14
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
15
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
16
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
VI. QUESTIONS
Two of the most powerful ways to represent systems are the transfer
function form and the state space form. Transfer function is a way of
presentation in the frequency domain while a state-space representation is a
mathematical model of a physical system as a set of input, output and state
variables related by first-order differential equations or difference equations. It
is required to convert model into another model depending on the classes of
variables of the system.
3. Compare the results in No. 2 and No. 4. What can you say about it?
There results are quite similar and the eigenvalues of the matrix A
is identical to the roots of denominator polynomial.
4. What is meant by zeros and poles?
Zeros and Poles are the frequencies for which the value of the denominator and
numerator of transfer function becomes zero respectively. The values of the poles
and the zeros of a system determine whether the system is stable, and how well
the system performs. Control systems, in the simplest sense, can be designed
simply by assigning specific values to the zeros and poles of the system.
17
DE LA SALLE LIPA
COLLEGE OF INFORMATION TECHNOLOGY AND ENGINEERING
ELECTRONICS ENGINEERING DEPARTMENT
FEEDCON – FEEDBACK AND CONTROL SYSTEMS
LABORATORY EXPERIMENT MANUAL
Eigenvalue is the value which when multiplied by identity matrix and subtracted
from the actual matrix A would give 0. It is a square matrix represents a
transformation on some vector space.
VII. CONCLUSION
In this experiment, I was able to familiarize with the different system modeling
methods and I was able to extract data from an existing system model.
Classification of models can be useful for selecting the right type of model for the
planned purpose and scope. In complex software system a data extraction is
one way to understand it. Also, in pole – zero map it shows the location of the
poles and zeros of the transfer function in the complex plane. Lastly, LTI models
allows users to run and program equation then perform it in different equations.
All of the parts of the equation are properties of transferring function.
18