{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

25b_BodeCHE361W12 - Page 1 of 2 BodeCHE361.m A simple...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Page 1 of 2 % BodeCHE361.m % A simple program to make a Bode plot for first-order process % using MATLAB bode function and using "short-cut" method % for first-order with time delay process. % Dr. K.L. Levien, Oregon State University % Chemical Engineering CHE 361 % Use 501 frequencies from 10^-3 to 10^2 rad/min omega = logspace(-3,2,501); % logspace selects values equally spaced by log10 values % Specify a numerator polynomial and a denominator polynomial for G(s) num = [5]; % numerator polynomial in s den = [10 1]; % denominator polynomial in s [AR,PA,omega] = bode(num,den,omega); % uses MATLAB function bode for no time delay % AR = amplitude ratio % PA = phase angle figure % opens a new MATLAB figure window subplot(2,1,1) % 2,1 = 2 rows x 1 column (top and btm plot), 1 = top loglog(omega,AR) % log10 axis on x and y axis([0.001 10 0.1 10]) % fix axis min/max for x axis and y axis title(['Freq. Resp. G(s), num = [' num2str(num) '] , den = [' num2str(den) ']']) ylabel('Amplitude Ratio'), fnicefig % subplot(2,1,2) % 2,1 = 2 rows x 1 column (top and btm plot), 2 = btm semilogx(omega,PA) % log10 axis only on x axis axis([0.001 10 -180 0])
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}