Code covered by the BSD License  

Highlights from
Feedback Control of Dynamic Systems, 4th Ed., G. F. Franklin, J. D. Powell, A. Emami-Naeini

image thumbnail

Feedback Control of Dynamic Systems, 4th Ed., G. F. Franklin, J. D. Powell, A. Emami-Naeini

by

 

25 Apr 2003 (Updated )

.m and .mdl files for Feedback Control of Dynamic Systems

fig7_50.m
%  Figure 7.50      Feedback Control of Dynamic Systems, 4e
%                        Franklin, Powell, Emami
%
% script for fig. 7.50
%  
clf;
dp=[1 1 0];
np=[1];
nc=conv([1 1.001],[8.32 0.8]);
dc=conv([1 4.08],[1 0.0196]);
num=conv(np,nc);
den=conv(dp,dc);
w=logspace(-2,2);
sys=tf(num,den);
[mag, ph]=bode(sys,w);
mag1=[mag(:,:); ones(size(mag(:,:)))];
ph1=[ph(:,:);-180*ones(size(ph(:,:)))];
subplot(211) , loglog(w,mag1), grid;
xlabel('\omega (rad/sec)');
ylabel('Magnitude');
title('Fig.7.50 Bode plot for lag compensation design')
subplot(212), semilogx(w,ph(:,:)), grid
xlabel('\omega (rad/sec)');;
ylabel('Phase (deg)');

Contact us