Anda di halaman 1dari 7

Frisnedi, Nadine T.

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];

>> b=[1 -2 -2]

>> sys=tf(a,b)

Matlab Output:

Transfer function:
3 s^2 - 3 s + 1
---------------
s^2 - 2 s 2

a. retrieve the numerator and denominator of the transfer function


Commands used:
>> [a,b]=tfdata(sys,'v')

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

c. retrieve the state space parameters of the system given above


Commands used:
>> [a,b,c,d]=ssdata(sys)
Matlab Output:
a= 21
20
b= 2
0
c= 0.5000
d= 2.5000

3. Get the overall transfer function of the systems below


a.

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

The performed laboratory activity deals with generating a system, its


transformation, its retrieval and interconnection with other systems. Different command
were used in order to accomplish this lab activity such as the transfer function, zero-pole-
gain, the frequency response data and the state-space which are all used to generate a
system. From the performed activity, we can see that by just initializing the values of the
polynomials in the numerator and the denominator, we can easily generate a system from
the given transfer function. We can also create a system using the initialized values of the
zero, pole and gain. It is also easy to create a system based on the given matrices using
the ss(A,B,C,D) function that we used in the activity. In the frdata command, we must
convert the data such as the frequency if it is in Hertz since Matlab settings are fixed on
radians/s for the frequency. Retrieving data was also possible if we have the system first
before the initialized values based on the output we got in the second part of the activity.
The overall transfer function was also obtained which needs careful analyzation
especially of the position and the direction of the systems and made possible using the
series, parallel, and the feedback commands. Creating a Matlab M-File made it possible
for us to use only one function that has multiple functions in it. I noticed that using this
script is very helpful when we are trying to do many commands all at once.
Conclusion

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.

Anda mungkin juga menyukai