0% found this document useful (0 votes)
61 views

Block Diagram in MATLAB: Control Engineering Dr. Rafid Abbas

The document discusses using MATLAB to model block diagrams and connections between linear time-invariant (LTI) systems. It shows how to represent transfer functions and zero-pole-gain models in MATLAB. It also demonstrates how to model series, parallel, feedback and closed-loop connections between LTI models using operators and functions. Finally, it provides an example of building a model from a block diagram using these components.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views

Block Diagram in MATLAB: Control Engineering Dr. Rafid Abbas

The document discusses using MATLAB to model block diagrams and connections between linear time-invariant (LTI) systems. It shows how to represent transfer functions and zero-pole-gain models in MATLAB. It also demonstrates how to model series, parallel, feedback and closed-loop connections between LTI models using operators and functions. Finally, it provides an example of building a model from a block diagram using these components.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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

[email protected] 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:

[email protected] 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

[email protected] Page 3 of 3

You might also like