Documente Academic
Documente Profesional
Documente Cultură
ECE131L-A11
Module 2 Report
Homework
1. Generate the following systems:
a. sys1 = a systems with transfer function of
Commands used:
>>num1 = [ 2 0 -6];
>>den1 = [1 5 -3];
>> sys1=tf(num1,den1)
Matlab Output:
Transfer function:
2 s^2 6
-------------
s^2 +5 s -3
b. sys2 = a systems with a gain of 5, poles at s=2 and s=-5 and zeroes at s=-2
and s=3
Commands used:
>> k=5;
>> p=[2 -5];
>> z=[-2 3];
>> sys2=zpk(z,p,k)
Matlab Output:
Zero/pole/gain:
5 (s+2) (s-3)
--------------
(s-2) (s+5)
2. Generate the system given by the transfer function :
Commands used:
>> a=[3 -3 1];
>> sys=tf(a,b)
Matlab Output:
Transfer function:
3 s^2 - 3 s + 1
---------------
s^2 - 2 s 2
Matlab Output:
a= 3 -3 1
b= 1 -2 -2
b. retrieve the gain, poles and zeroes position of the system given above
Commands used:
>> [z,p,k]=zpkdata(sys,'v')
Matlab Output:
k=3
p=2.73205
- 2.73205
z=0.5 +0.28868i
0.5 -0.288868i
Commands used:
>>a1=[2 0 3];
>>b1=[1 2 3 4];
>>a2=[1];
>>b2=[1 0 2];
>>a3=[1 0 0];
>>b3=[2 0 1];
>>sys1=tf(a1,b1);
>>sys2=tf(a2,b2);
>>sys3=tf(a3,b3);
>>sysA=series(sys1,sys2);
>>sysB=parallel(sys3,sysA)
Matlab Output:
s^7 + 2 s^6 + 5 s^5 +12 s^4 + 6 s^3 + 16 s^2+3
----------------------------------------------------------
2 s^7 + 4 s^6 + 11 s^5 + 18 s^4 +17 s^3 +24 s^2 +6 s +8
b.
Commands used:
>>a1=[3 0 0];
>>b1=[2 0 4];
>>a2=[1];
>>b2=[1 0 4];
>>a3=[1 0 0];
>>b3=[2 5 1];
>>a4=[1];
>>b4=[3 4];
>>sys1=tf(a1,b1);
>>sys2=tf(a2,b2);
>>sys3=tf(a3,b3);
>>sys4=tf(a4,b4);
>>sysA=feedback(sys1,sys2);
>>sysB=series(sys3,sysA);
>>sysC=feedback(sys4,sysB)
Matlab Output:
9 s^7 + 12 s^6 + 36 s^5 + 48 s^4
------------------------------------------------------------------
12 s^7 - 17 s^6 + 56 s^5 - 109 s^4 - 159 s^3 - 52 s^2 - 272 s + 64
Analysis
From the performed activity, Matlab has shown how easy it is to be able to
generate systems. It is valuable since it can be used in the representation of different
forms of systems such as the transfer function and zero-pole gain, and others. Using
Matlab the students were able to execute the activity in the most accurate manner since
it consumes a very small amount of time in terms of transforming systems and solving for
the interconnection of these systems when laid out in a block diagram The retrieval of the
values of the systems was also made easy through the use of retrieval commands such
as the tfdata, zpkdata, ssdata and the frdata commands. Solving for the interconnection
system also became easy for the students because of the commands series, parallel and
feedback which pertains to the relationship of the system in the block diagram.
Characterizing those different kinds of system was made possible because of Matlab.