Z-Transform

Frequency Response Of A Given Z-Transform


Logic:

In general, any z-transform equation can be written in the following form:

x(z)= b(z)/a(z) = (b0+b1z-1+.....+bnz-n) /(a0+a1z-1+.......+amz-m)

The signal processing toolbox contains many useful functions for computing and displaying the frequency response of discrete time systems. The most widely used function is the "freqz" function.

The "freqz" function uses FFT based approach to compute the frequency response. The function has the variety of formats. A useful format is [h,f]=freqz(b,a,npt,fs) where the variables 'b' and 'a' are the vectors of the numerator and denominator polynomials. 'fs' is the sampling frequency and 'npt' is the number of frequency points between 0 and fs/2. In the MATLAB toolbox, the Nyquist frequency (i.e, fs/2) is the unit of normalized frequency.

Using the "freqz" command without output arguments plots the magnitude and phase response automatically.


Algorithm

  1. Input the numerator coefficient (or vectors)
  2. Input the denominator coefficient
  3. Input the sampling frequency
  4. Find the frequency response using "freqz" command

Program

b=input ('Enter the numerator coefficients ');

a=input (' Enter the denominator coefficients');

fs=input ('Enter the sampling frequency ');

npt=fs ./2 ; % number of frequency points

freqz(b, a, npt, fs); % find frequency response

No comments:

Post a Comment

Your Comments... (comments are moderated)