ELEC4620 Digital Signal Processing Assignment 3
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
ELEC4620 Digital Signal Processing
Assignment 3
(Due Date: Friday 28/ 10/2022 at 4pm)
1. We wish to extract tones at 100 and 200 Hz from tones at 900 and 1100 Hz and then downsample the output by the largest possible factor. Assume the signal containing the four tones is sampled at 35 kHz. Use a Kaiser window FIR filter with a passband from 0 to 300 Hz (3 dB down at band edge) and attenuation > 100 dB at 400 Hz. Implement the filter, maximally downsample the output, and examine the output spectrum to ensure that it meets specifications. Now reimplement the filtering and downsampling with a single polyphase downsampling filter. Compare the number of operations required for the original FIR implementation and the polyphase implementation.
(3 marks)
2. Upsample the output of the downsampling filter of Question 1 back to the original 35 kHz sampling rate by designing an appropriate upsampling filter using zero packing and low-pass filtering. Then reimplement as a polyphase upsampling filter. Check the output of the polyphase upsampler against the filtered zero-packed output to show they are the same. Compare the number of operations required for the original single-rate FIR implementation from Q1 and the polyphase downsampling/upsampling implementation in this question.
(3 marks)
3. Without incurring additional computation, modify the polyphase upsampling filter to frequency shift the data by heterodyning with a 14 kHz carrier. That is, the tones at 100, and 200 Hz will now be placed at 13.8, 13.9, 14.1, and 14.2 kHz.
( 1 mark)
4. Use the Euclidean algorithm to find the Greatest Common Divisor (GCD) of the numbers
41303874 and 52041209. Are these numbers relatively prime? Hence or otherwise derive two numbers with at least 10 digits each that have GCD=71. Hint — use fprintf() to print large numbers in MATLAB without exp notation.
( 1 mark)
5. A general counts the number of surviving soldiers of a battle by aligning them successively in rows of certain sizes. Each time, he counts the number of remaining soldiers who failed to fill a row. The general initially had 1200 soldiers before the battle; after the battle
• aligning them in rows of 5 soldiers leaves 3 remaining soldiers;
• aligning them in rows of 6 soldiers leaves 3 remaining soldiers;
• aligning them in rows of 7 soldiers leaves 1 remaining soldier;
• aligning them in rows of 11 soldiers leaves 0 remaining soldiers.
How many soldiers survived the battle? Solve this using the Chinese Remainder Theorem.
( 1 mark)
6. Write code to calculate a 30-point (N=30) Cooley-Tukey FFT. Use a 5x6 array for the transform. Transforms on the individual rows and columns should be performed by direct implementation of the DFT as nested FOR loops or DFT matrix multiplications. Compare the number of operations required for the FFT versus the DFT in this case. Indicate the twiddle factors and describe where and why they are used. In your answer you should describe the steps required to perform the transform and explain the indexing of the data. Make sure you check that your FFT gives the same result as the direct application of a 30x30 DFT matrix.
(2 marks)
7. Re-implement Question 5 using the Good-Thomas (Prime Factor) algorithm to perform the FFT. Comment on the performance of this implementation as compared to the Cooley-Tukey Method. Why is this method preferred over the Cooley-Tukey method?
(3 Marks)
8. Extend Question 5 by writing code to perform a 210-point (N=210) Cooley-Tukey FFT. Use a 3-stage 5x6x7 structure for the transform. Transforms on the individual rows and columns should be performed by direct implementation of the DFT as nested FOR loops or DFT matrices. Compare the number of operations required for your FFT versus the DFT in this case and also to the 2 stage methods (using both 30x7 and 5x42 structures) of Question 5 (no implementation required). In your answer you should describe the steps required to perform the transform and explain the indexing of the data. Make sure you check that your FFT gives the same result as the direct application of the DFT matrix.
How many different (cosine and sine) coefficients are required for this 3-stage implementation? How many coefficients are required for a simple radix-2 Cooley Tukey Transform with N=256.
Is it possible to also implement this using a 3D Good-Thomas algorithm on a 5x6x7 tensor? Explain.
Note: Actually implementing the Good-Thomas Algorithm is not required.
(3 Marks)
Simulation Laboratory
9. Simulate the single rate system of Q1 in Simulink. Listen to the output on your loudspeaker/headphones. Shows graphs and images in your report.
Method
1. Create new Simulink Model
2. Open Simulink Library Browser
3. Select Sine Wave Source
4. Set parameters as per Q1
5. Build model with Spectrum Analyser, Filter, and Scope
6. Ask Tutors for help
(3 marks) (Total: 20 marks)
2022-10-17