MASSACHUSETTS INSTITUTE OF TECHNOLOGY
Department of Electrical Engineering and Computer Science
6.003,Signals and Systems—Fall 2003
Computer Lab 3
Issued,November 6,2003 Due,December 5,2003
Problems to be handed in,In this lab,you will complete the Basic and Intermediate
Problems for the Stabilization of Unstable Systems considered in Section 11.2 on pages 194–
197 of Buck,Daniel,and Singer (BDS),For all of the exercises,please include your Matlab
code with your name in it to your report,As stated in the General Information Sheet,we do
not expect a formal lab report,but it is still important that you present your results clearly
and in an organized manner,Included below are items to be turned in,along with more
speci?c instructions,
Basic Problems
(a) Note that the unstable system characterized by the di?erential equation (11.5) is rep-
resenting the input-output behavior of the system H(s) in Figure 11.2,
(b) Follow the question in BDS,
(c) For the rest of the lab,create a system object using tf command as follows,
b = [bm ··· b1 b0];
a = [an ··· a1 a0];
sys = tf(b,a);
where a and b are arrays of coe?cients of the polynomials in the system function H(s),
bms
m
+ ··· + b1s + b0
H(s) =,
ans
n
+ ··· + a1s + a0
Using this notation,rlocus(sys) plots the locus of Eq,(11.6) for K? 0,Note that
rlocus(?sys) will plot the roots for K? 0,In order to determine the value of K
which leads to a given set of pole locations,either you supply the array of gains K as
a vector to rlocus,i.e.,r = rlocus(sys,K) or output arguments to be applied,i.e.,
[r,k]=rlocus(sys) where the values of k are chosen automatically by Matlab,
Submit two plots,one for the case of K? 0 and the other for K? 0 on the same page
using subplot,
(d) Submit two plots,one for the case of K? 0 and the other for K? 0 on the same page
using subplot,
(e) Follow the question in BDS,
Intermediate Problems
(f) Follow the question in BDS and submit two plots,one for the case of K? 0 and the
other for K? 0 on the same page using subplot,
(g-h) Follow the questions in BDS,
(i-k) Follow the questions in BDS and submit both step responses,one from Part (i) and
the other from Part (k) on the same plot,You may want to use hold command and
di?erent line types,See help plot.
(l-m) Follow the questions in BDS,
(n) Follow the question in BDS and overlay the two step responses,one for Part (n) and
the other for Part (i) in one plot,
(o) Follow the question in BDS and overlay the two step responses,one for Part (o) and
the other for Part (k) in one plot,
(p) Follow the question in BDS,
Useful MATLAB Functions,
help,All of the functions listed below have help pages within MATLAB that can be viewed
by typing help <function> from the MATLAB command prompt,
subplot,SUBPLOT Create axes in tiled positions,H = SUBPLOT(m,n,p),or SUBPLOT(mnp),
breaks the Figure window into an m-by-n matrix of small axes,selects the p-th axes
for for the current plot,and returns the axis handle,The axes are counted along the
top row of the Figure window,then the second row,etc,See more detailed information
and examples by typing subplot,
ltiview,LTIVIEW Opens the LTI Viewer GUI,The LTI Viewer is an interactive graphical
user interface (GUI) for analyzing the time and frequency responses of linear systems
and comparing such systems,You may want to use this interface to check your answers
or codes,
Department of Electrical Engineering and Computer Science
6.003,Signals and Systems—Fall 2003
Computer Lab 3
Issued,November 6,2003 Due,December 5,2003
Problems to be handed in,In this lab,you will complete the Basic and Intermediate
Problems for the Stabilization of Unstable Systems considered in Section 11.2 on pages 194–
197 of Buck,Daniel,and Singer (BDS),For all of the exercises,please include your Matlab
code with your name in it to your report,As stated in the General Information Sheet,we do
not expect a formal lab report,but it is still important that you present your results clearly
and in an organized manner,Included below are items to be turned in,along with more
speci?c instructions,
Basic Problems
(a) Note that the unstable system characterized by the di?erential equation (11.5) is rep-
resenting the input-output behavior of the system H(s) in Figure 11.2,
(b) Follow the question in BDS,
(c) For the rest of the lab,create a system object using tf command as follows,
b = [bm ··· b1 b0];
a = [an ··· a1 a0];
sys = tf(b,a);
where a and b are arrays of coe?cients of the polynomials in the system function H(s),
bms
m
+ ··· + b1s + b0
H(s) =,
ans
n
+ ··· + a1s + a0
Using this notation,rlocus(sys) plots the locus of Eq,(11.6) for K? 0,Note that
rlocus(?sys) will plot the roots for K? 0,In order to determine the value of K
which leads to a given set of pole locations,either you supply the array of gains K as
a vector to rlocus,i.e.,r = rlocus(sys,K) or output arguments to be applied,i.e.,
[r,k]=rlocus(sys) where the values of k are chosen automatically by Matlab,
Submit two plots,one for the case of K? 0 and the other for K? 0 on the same page
using subplot,
(d) Submit two plots,one for the case of K? 0 and the other for K? 0 on the same page
using subplot,
(e) Follow the question in BDS,
Intermediate Problems
(f) Follow the question in BDS and submit two plots,one for the case of K? 0 and the
other for K? 0 on the same page using subplot,
(g-h) Follow the questions in BDS,
(i-k) Follow the questions in BDS and submit both step responses,one from Part (i) and
the other from Part (k) on the same plot,You may want to use hold command and
di?erent line types,See help plot.
(l-m) Follow the questions in BDS,
(n) Follow the question in BDS and overlay the two step responses,one for Part (n) and
the other for Part (i) in one plot,
(o) Follow the question in BDS and overlay the two step responses,one for Part (o) and
the other for Part (k) in one plot,
(p) Follow the question in BDS,
Useful MATLAB Functions,
help,All of the functions listed below have help pages within MATLAB that can be viewed
by typing help <function> from the MATLAB command prompt,
subplot,SUBPLOT Create axes in tiled positions,H = SUBPLOT(m,n,p),or SUBPLOT(mnp),
breaks the Figure window into an m-by-n matrix of small axes,selects the p-th axes
for for the current plot,and returns the axis handle,The axes are counted along the
top row of the Figure window,then the second row,etc,See more detailed information
and examples by typing subplot,
ltiview,LTIVIEW Opens the LTI Viewer GUI,The LTI Viewer is an interactive graphical
user interface (GUI) for analyzing the time and frequency responses of linear systems
and comparing such systems,You may want to use this interface to check your answers
or codes,