1 Write a MATLAB or Octave program that given a sequence fk

1. Write a MATLAB or Octave program that, given a sequence, f[k], of samples in the time domain, calculates a filtered output y[k], given by the formula y[k]=-a_2y[k-1]-a_1y[k-2]-a_0y[k-3]+b_3f[k]+b_2f[k-1]+b_1f[k-2]+b_0f[k-3]. The values y are outputs, k is an index into a sequence, (so if \"now\"=k, one sample in the past is k-1), there are coefficient vectors a and b, which can be input parameters to the function. Make up a sequence f. Plot the input f and that output, y.

2. What do we know about the coefficient vectors a, b, if we know the filter is a finite impulse response filter?

Instructions

1. Write a MATLAB or Octave program that, given a sequence, f[k], of samples in the time domain, calculates a filtered output y[k], given by the formula y[k]=-a_2y[k-1]-a_1y[k-2]-a_0y[k-3]+b_3f[k]+b_2f[k-1]+b_1f[k-2]+b_0f[k-3]. The values y are outputs, k is an index into a sequence, (so if \"now\"=k, one sample in the past is k-1), there are coefficient vectors a and b, which can be input parameters to the function. Make up a sequence f. Plot the input f and that output, y.

2. What do we know about the coefficient vectors a, b, if we know the filter is a finite impulse response filter?

Solution

The discrete Fourier transform, or DFT, is the primary tool of digital signal processing. The foundation of the product is the fast Fourier transform (FFT), a method for computing the DFT with reduced execution time. Many of the toolbox functions (including z-domain frequency response, spectrum and cepstrum analysis, and some filter design and implementation functions) incorporate the FFT.

The MATLAB® environment provides the functions fft and ifft to compute the discrete Fourier transform and its inverse, respectively. For the input sequence x and its transformed version X (the discrete-time Fourier transform at equally spaced frequencies around the unit circle), the two functions implement the relationships

X(k+1)=N1n=0x(n+1)WknN,

and

x(n+1)=1NN1k=0X(k+1)WknN.

In these equations, the series subscripts begin with 1 instead of 0 because of the MATLAB vector indexing scheme, and

WN=ej2/N.

1. Write a MATLAB or Octave program that, given a sequence, f[k], of samples in the time domain, calculates a filtered output y[k], given by the formula y[k]=-a

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site