You are on page 1of 6

Modern control system engineering

Experiment 3 Setting Up Control Problem

Haaritharan a/l madhavan I10006633 Eee 2108 Mr.jeyagopi

Introduction:
An understanding of connection among different linear time invariant system is essential to the design of single input and single output control system. Starting from version 4 of the Control System Toolbox (distributed with Matlab version 5), the Mathworks have introduced a new data object for the creation and manipulation of system transfer functions. This object is called the Linear Time Invariant (LTI) System Object. It is used to gather the components of a transfer function (or state-space model) into a single variable which can then easily be combined with other LTI system objects. There are two forms of transfer function representation in Matlab. The most obvious is the polynomial form where is entered as two row vectors with the polynomial coefficients entered in the order of ascending powers of s. in addition we learning how to convert transfer function to state space and vice versa and solving the transfer function of the block diagram using various build command.

OBJECTIVES.
We conduct this experiment to learn the Matlab command in solving transfer function problem, convert transfer function to state space and vice-versa and solving the transfer function of the block diagram using various build command.

Exercise 3
Question 1
A) n = [5]; d = [1 4 5]; [A,B,C,D] = tf2ss(n,d) [n1,d1] = ss2tf(A,B,C,D); tf(n1,d1) Transfer function: -8.882e-016 s + 5 ----------------s^2 + 4 s + 5 % num = numerator %den = denominator %convert transfer function to state space %convert state space to transfer function . % transfer function. % final answer.

B) n = [8]; d = [1 5 6 4]; [A,B,C,D] = tf2ss(n,d) [n1,d1] = ss2tf(A,B,C,D); tf(n1,d1) Transfer function: 8.882e-016 s^2 + 8.882e-015 s + 8 --------------------------------s^3 + 5 s^2 + 6 s + 4 % num = numerator %den = denominator %convert transfer function to state space %convert state space to transfer function % transfer function. % final answer.

C) n = [1 1]; d = [1 4 8 9]; [A,B,C,D] = tf2ss(n,d) [n1,d1] = ss2tf(A,B,C,D); tf(n1,d1) Transfer function: 4.441e-016 s^2 + s + 1 ---------------------s^3 + 4 s^2 + 8 s + 9 %convert transfer function to state space %convert state space to transfer function. % transfer function. % final answer. % num = numerator

Question 2 n1 = 10; d1 = 1; n2 = 1; d2 = [1 0]; n3 = 1; d3 = [1 3]; n4 = [1 4]; d4 = [1 10]; n5 = 4 ; d5 = 1; n6 = 10; d6 = 1; n7 = conv(n1,n2); d7 = conv(d1,d2); % num = numerator %den = denominator % num = numerator %den = denominator % num = numerator %den = denominator % num = numerator %den = denominator % num = numerator %den = denominator % num = numerator %den = denominator % num = numerator %den = denominator

[n8,d8] = feedback(n7,d7,n5,d5,+1); [n9,d9] = parallel(n4,d4,n3,d3); n10 = conv(n8,n9); d10 = conv(d8,d9); [n11,d11] = feedback(n10,d10,n6,d6); tf (n11,d11) Transfer function: 10 s^2 + 80 s + 220 --------------------------s^3 + 73 s^2 + 310 s + 1000

% command to solve the non-unity feedback. % transfer functions of the parallel connection. % num = numerator %den = denominator % command to solve the non-unity feedback. % transfer function % Final answer.

B) n1 = 10; d1 = 1; n2 = 1; d2 = [1 0]; n3 = 1; d3 = [1 3]; n4 = [1 4]; d4 = [1 10]; n5 = 4 ; d5 = 1; n6 = 10; d6 = 1; [n7,d7] = feedback (n1,d1,n5,d5,+1) ; % num = numerator %den = denominator % num = numerator %den = denominator % num = numerator %den = denominator % num = numerator %den = denominator % num = numerator %den = denominator % num = numerator %den = denominator % command to solve the non-unity feedback.

[n8,d8] = parallel (n2,d2,n7,d7); tf(n8,d8) Transfer function: -10 s + 39 ---------39 s

% transfer functions of the parallel connection. % transfer function % Final answer.

Discussion :
From this experiment we can discuss about the linaer time invariant system is essential to the design input and single ouput control system. From using the matlab software we can easily create the transfer function, convert transfer function to state space and vice versa and solve the transfer function of the block diagram using various build in command very easily. For our busy world we must have such software to decrease time usage for us .

CONCLUSIONS
We conclude that the MATLAB software do help us in solving transfer function. Where MatLab can save a lot of our times. By doing it manual, mistakes could happen, while if we using Matlab, it is impossible that mistakes can happen.

You might also like