Introduction to Discrete-Time Systems and z-Transform
I. Introduction to Discrete-Time Systems and z-Transform
A discrete-time system is a computational process for tranforming the input signal to output signal, both of which are of discrete-time signals. Such a system can always be represented using the following block diagram.
![]() |
(1)
(2)
The design of a FIR concentrates on the determination of the coefficients bk
in Eq. (2) since the FIR filter can be wholely characterized by its transfer function H(z).
Due to the fact that FIR filter can guarantee linear phase, what we need to take care
about is the magnitude reponse of the transfter function. Consequently, we will use the
magnitude reponse of H(z) to approximate a desired magnitude
response.
The desired transfer function is
(3)
(4)
(5)
(6)
![]() |
In Eq. (6), we truncated the infinite series in the transfer function equation by applying a rectangular window function with an amplitude of 1 between -Q and +Q, and ignoring the coefficients outside that window. The following window functions are commonly used in the design of FIR filter.
The rectangular window function is the simplest window function used in FIR filter design. It is defined as
The Hamming window function is
The Hanning window or raised cosine window function is
The Blackman window function is
The Kaiser window function is
This laboratory experiment consists of three exercises, each of which is a real-time excercise showing the properties discussed above. All the programs which will be used in this experiment are accessed by C:\DSP\CH4 and C:\DSP\APPB of each station in the lab and the listings of these programs are shown in the chapter 4 of "Digital Signal Processing - Laboratory Experiments Using C and the TMS320C31 DSK". Please read chapter 4, then follow the step-by-step procedure very carefully and complete all the lab exercises. Call the TA for assistance if you have any problems at any time.
In this lab exercise, you will use the Example 4.3 FIRNC.ASM of chapter 4 to test different filter characteristics. Follow the steps below to finish this exercise:
copy %1 FIR.COF
DSK3A FIRNC.ASM
DSK3LOAD FIRNC.DSK
Save your batch file in the C:\DSP\CH4 directory.
FIR BP45.COF
to invoke the batch file you just created, where BP45.COF is the coefficient file for
the bandpass filter which looks like:
;BP45.COF - FIR BANDPASS COEFFICIENTS (Fc = fs/10)
.data ;data section
COEFF .float -1.839E-3 ;H44
.float -2.657E-3,-1.437E-7, 3.154E-3, 2.595E-3,-4.159E-3,-1.540E-2
.float -2.507E-2,-2.547E-2,-1.179E-2, 1.392E-2, 4.206E-2, 5.888E-2
.float 5.307E-2, 2.225E-2,-2.410E-2,-6.754E-2,-8.831E-2,-7.475E-2
.float -2.956E-2, 3.030E-2, 8.050E-2, 1.000E-1, 8.050E-2, 3.030E-2
.float -2.956E-2,-7.475E-2,-8.831E-2,-6.754E-2,-2.410E-2, 2.225E-2
.float 5.307E-2, 5.888E-2, 4.206E-2, 1.392E-2,-1.179E-2,-2.547E-2
.float -2.507E-2,-1.540E-2,-4.159E-3, 2.595E-3, 3.154E-3,-1.437E-7
.float -2.657E-3 ;H1
H0 .float -1.839E-3 ;H0
LENGTH .set H0-COEFF+1 ;# of coefficients
In this lab exercise, you will use the Example B.4 MAT33.M of APPENDIX B to implement a bandpass filter and use the program of Exercise I to test its characteristics. Follow the steps below to finish the exercise:
%MAT33.M FIR BANDPASS WITH 33 COEFFICIENTS USING MATLAB fs=10 kHz nu=[0 0.1 0.15 0.25 0.3 1]; %normalized frequencies mag=[0 0 1 1 0 0]; %magnitude at normalized frequencies c=remez(32,nu,mag); %invoke remez algorithm for 33 coeff bp33=c'; %coeff values transposed save matbp33.cof bp33 -ascii; %save in ASCII file with coefficients [h,w]=freqz(c,1,256); %frequency response with 256 points plot(w/pi,abs(h)); %plot ideal magnitude responseThis program will generate a bandpass filter with 33 coefficients. Run the program in the Matlab enviroment.
In this exercise, you are required to design four FIR filters using Matlab to meet the following requirements:
Implement your design, plot the resulting frequency responses and save the generated coefficent files. Choose one of the filter you designed to test its characteristics as in Exercise I. Compare the frequency responses of the first two filters you designed and comment the difference between them.
In this exercise, you will need first to save a 10-second piece of music from any of your favoriate music CD; then design a lowpass filter which will process the music you recorded by using the filter design technique you learned from previous exercises. Finally, you will need to use an audio player to play the processed music and observe the quality change after running the music signal through a lowpass filter. Following carefully the exercise steps listed below to finish this exercise.
Note: