MATLAB and Simulink Files

by

 

MATLAB and Simulink files for textbook Nise/Controls 6e.

ch10p5.m
% Nise, N.S. 
% Control Systems Engineering, 6th ed. 
% John Wiley & Sons, Hoboken, NJ, 07030
%
% Control Systems Engineering Toolbox Version 6.0 
% Copyright  2011 by John Wiley & Sons, Inc.
%
% (ch10p5) Example 10.11: We can use MATLAB to find the closed-loop 
% frequency response. Let us look at Example 10.11 in the text.


'(ch10p5) Example 10.11'            % Display label.
clf                                 % Clear graph on screen.
numg=50;                            % Define numerator of G(s).
deng=poly([0 -3 -6]);               % Define denominator of G(s).
'G(s)'                              % Display label.
G=tf(numg,deng)                     % Create and display G(s).
'T(s)'                              % Display label.
T=feedback(G,1)                     % Find and display closed-loop 
                                    % transfer function.
bode(T)                             % Make a Bode plot.
grid on                             % Turn on the grid for the plots.
title('Closed-Loop Frequency Response')
                                    % Add a title to the Bode plot.
pause
nyquist(T)                          % Make a Nyquist diagram.
title('Closed-Loop Frequency Response')
                                    % Add a title to the Nyquist diagram.

Contact us