Professional Documents
Culture Documents
Objective:
To determine the concept of LTI Representation using Scilab programming
To determine the concept of Transfer Function Modeling using Scilab programming
INTRODUCTION:
I. LTI Representations
Linear Time Invariant (LTI) systems are a particular class of systems characterized by the following
features:
(1) Linearity
which means that there is a linear relation between the input and the output of the system.
For example, if we scale and sum all the input (linear combination) then the output are scaled
and summed in the same manner. More formally, denoting with xk(t) a generic input and with
yk(t) a generic output we have:
LTI systems can be classified into the following two major groups:
(1) SISO Single Input Single Output
(2) MIMO Multiple Input Multiple Output
Figure 1: A typical representation of a system with its input and output ports and its internal state
1
II. Transfer Function Modeling
The control systems can be represented with a set of mathematical equations known as mathematical
model. These models are useful for analysis and design of control systems. Analysis of control system
means finding the output when we know the input and mathematical model. Design of control system
means finding the mathematical model when we know the input and the output.
Transfer function model is an s-domain mathematical model of control systems. The Transfer function of a
Linear Time Invariant (LTI) system is defined as the ratio of Laplace transform of output and Laplace
transform of input by assuming all the initial conditions are zero.
If x(t) and y(t) are the input and output of an LTI system, then the corresponding Laplace transforms
are X(s) and Y(s).
Therefore, the transfer function of LTI system is equal to the ratio of Y(s) and X(s). That is;
--> clf;
--> clear all;
--> // unit impulse
--> L=5;
--> n=-L:L;
--> x=[zeros(1,L),ones(1,1),zeros(1,L)];
--> da=gca();
--> da.y_location = "middle";
--> plot2d3(n,x);
--> title("unit impulse");
2
--> clear all;
--> close;
--> // I n p u t CT S i g n a l
--> t=-2:1:2;
--> x=[1,1,0,1,0];
--> subplot(2,3,1) ;
--> plot(t,x) ;
--> xgrid(4,1,7);
--> xlabel("Time") ;
--> ylabel("Amplitude") ;
--> title("Input CT Signal x(t)");
4. Observe the property of the generated signal. Then encode the following syntax and compare the
generated signal with respect to ProcedureA.3.
5. Change the scale factor by and display the figure by encoding the next set of syntax.
--> a=0.5; // S c a l i n g f a c t o r
--> subplot(2,3,3) ;
--> plot(t,a*x);
--> xgrid(4,1,7);
--> xlabel("Time") ;
--> ylabel("Amplitude") ;
--> title("z(t)=0.5x(t)");
6. Compare the generated figure to the signal generated in ProcedureA.4. Record your observations.
--> subplot(2,3,4);
--> plot(t+2,x);
--> xgrid(4,1,7);
--> xlabel("Time");
--> ylabel("Amplitude");
--> title("z(t)=x(t+2)");
8. Compare the generated figure to the signal generated in ProcedureA.4 and ProcedureA.5. What
part of the signal is modified this time? Record your observations.
3
9. Encode the next set of syntax.
--> subplot(2,3,5);
--> plot(t-2,x);
--> xgrid(4,1,7);
--> xlabel("Time");
--> ylabel("Amplitude");
10. Again, compare the generated figure to the previously generated signals. Record your
observations.
11. Encode the following syntax and compare the result to the signal generated by ProcedureA.1.
--> subplot(2,3,6);
--> plot(-t,x);
--> xgrid(4,1,7);
--> xlabel("Time");
--> ylabel("Amplitude");
--> title("z(t)=x(−t)");
4
where kt represents torque constant, Jm is the rotational inertia and Bm is the viscous friction. We want to
describe a model in transfer function form so that a block diagram can be drawn. To develop the
electrical side of DC motor, consider the model shown in Figure 4.
Using Laplace domain, the joint dynamics in Figure 3 can be described by:
By deriving and simplifying the equation of Steady-State model, this is reduced to:
5
Figure 6: Reduced block diagram of the robot joint dynamics
Thus, the transfer function for a robot joint driven by DC motor is in the form:
Now if we assume that J=10 and B=0.1, then the resulting transfer function becomes:
Using Scilab:
1. Encode the following Scilab program. Check appropriately the punctuation marks used in the
syntax to avoid errors.
-->clf
--> clear
--> num=1;
--> den=poly([0 0.1 10],'s','c');
--> P=syslin('c',num,den)
--> t=[0:0.001:50];
--> plot2d(t,csim('step',t,P))
--> xgrid(5,1,7)
--> xtitle('Time Domain Analysis','Time(sec)','C(t)')
2. Observe the transfer function generated from the program. Record your observations.
6
5. Encode the next set of Scilab program:
--> num=poly([1.59],'s','coeff');
--> clf
--> den=poly([1 7],'s','coeff');
--> g1=syslin('c',num/den) //define tf
--> t=0:0.05:50;
--> gs1=csim('step',t,g1);
--> plot2d(t,gs1); // plotting step response