PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

Fourier and Laplace 339


R.4.67 Parseval’s theorem, used to evaluate the energy of a periodic function or signal, can
be extended to include the nonperiodic function f(t), given by

f t dt()^22 F w dw( )

1


2


















∫∫

The proof of Parseval’s theorem is beyond the scope of this book, but its relation-
ship is verifi ed by numerical examples in the following sections.
R.4.68 Let H(w) = Y(w)/ X(w), then the MATLAB function [Real_H, Imag_H, w] = nyquist
(Y, X) returns the real and imaginary part of the transfer function, where Y(w) and
X(w) are its system output and input in vector form that represent the coeffi cients
of the polynomials arranged in descending powers of jw. The range of w, as well as,
the number of points used are chosen automatically by MATLAB.
If no output argument is specifi ed then MATLAB returns the Nyquist* polar plot
consisting of the plot of [Real_ H] versus [Imag_ H], referred as the nyquist plot.
The frequency w defi nes its output range, is an optional variable, and may be
included in the function indicated by

[Real_H, Imag_H] = nyquist(Y, X, w)

The nyquist command can be used with the system transfer function (Y and X) or
by specifying the systems zeros, poles, and gain k. The range w may be supplied by
the user in the form of a frequency vector (in radian/second), or it may be specifi ed
by its upper and lower limit by wmax and wmin indicated as follows:

[Real_H, Imag_H] = nyquist(Y, X, (wmax wmin))

Recall from Chapter 7 of the book entitled Practical MATLAB® Basics for Engineers
that the log–log plot of mag[H(w)] versus w, and semilog phase[H(w)] versus w, is
another popular way to represent H(w) by engineers, referred as the Bode† plots.
R.4.69 For example, let

Hs
s
sss

()








5


(^32345)
where s = jw. Create the script fi le nyquist_bode that returns the following (Figures 4.6
and 4.7):
a. The nyquist plot (over the range w = −1 : 0.4 : 10, and without w)
b. Bode plots (over the range w = 0.1 : 0.1 : 5, and without w)
c. Nyquist default points
d. Bode default points
*^ Harry Nyquist (1889–1976), Swedish electrical engineer employed by the Bell Telephone Laboratories, made
important contributions concerning system stability. He is also credited with formulating the sampling condi-
tions by which a continuous band-limited signal can be converted into a discrete sequence. The sampling rate
used in the analog-digital conversion is referred as the Nyquist rate or Nyquist frequency.
† Hendrik Wade Bode (1905–1984), an engineer employed by Bell Telephone Laboratories, and later in his life a
faculty member at Harvard University is credited with being the fi rst in using logarithmic scales to represent
the system gain H(jw) in db versus frequency.

Free download pdf