You are on page 1of 3

Control Engineering Dr.

Rafid Abbas

Block Diagram in MATLAB

H1 = tf(2,[1 3 0])
H1 =

2
---------
s^2 + 3 s

Continuous-time transfer function.

H2 = zpk([],-5,5)
H2 =

5
-----
(s+5)

Continuous-time zero/pole/gain model

Series Connection

Use the * operator or the series function to connect LTI models in series, for example:
H = H2 * H1
H =

10
-------------
s (s+5) (s+3)

Or

H = series(H1,H2);

Parallel Connection

Rafids.abbas@oukufa.edu.iq Page 1 of 3
Control Engineering Dr. Rafid Abbas

Use the + operator or the parallel function to connect LTI models in parallel, for example:
H = H1 + H2
H =

5 (s+0.7566) (s+2.643)
----------------------
s (s+3) (s+5)
Or
H = parallel(H1,H2);

Feedback Connections
The standard feedback configuration is shown below:

To build a model of the closed-loop transfer from u to y, type


H = feedback(H1,H2)
H =

2 (s+5)
--------------------------------
(s+5.663) (s^2 + 2.337s + 1.766)

Note that feedback assumes negative feedback by default. To apply positive feedback, use
the following syntax:
H = feedback(H1,H2,+1);

Building Models from Block Diagrams


You can use combinations of the functions and operations introduced so far to construct
models of simple block diagrams. For example, consider the following block diagram:

With the following data for the blocks F, C, G, S:

Rafids.abbas@oukufa.edu.iq Page 2 of 3
Control Engineering Dr. Rafid Abbas

F = 3/(s+2);
G = 1/(s^2+5*s+1);
C = 2*(s^2+s+6)/(s^2+4*s+4);
S = 1/(s+1);
You can compute the closed-loop transfer T from r to y as
T = F * feedback(G*C,S);
K = tf(T)
step(T), grid

Rafids.abbas@oukufa.edu.iq Page 3 of 3

You might also like