Top | Prev | Next

MATLAB Closing a Feedback Loop



MATLAB has many built-in functions to help analyze controls systems: ...so it's not suprising you can ALSO create a feedback system automatically: Obviously, relying too much on MATLAB might get you into trouble once a quiz comes along...

But here's an example MATLAB session using this command.
'Hsys', the system in the RETURN path of the feedback loop, can be any system -- including just a constant (gain value) like '1':
Note the included '0' in the denominator polynomial to get the intended orders for the s's...

» Gsys=tf([1e-5 1e3 1e9],[2e-2 1e3 5e4 0])

Transfer function:
1e-005 s^2 + 1000 s + 1e009
-----------------------------
0.02 s^3 + 1000 s^2 + 50000 s

» Hsys=1

Hsys =

1

» Tsys=feedback(Gsys,Hsys)

Transfer function:
1e-005 s^2 + 1000 s + 1e009
-------------------------------------
0.02 s^3 + 1000 s^2 + 51000 s + 1e009

» subplot(121); bode(Gsys)
» subplot(122); bode(Tsys)


Open-loop system Gsys (left) ..... Closed-loop system Tsys (right)

gonzo@mit.edu 2.010 Tutorial #3, 29-Sep-00