DSP MARKING SCHEME : Main exam 2013 Section A: Compulsory Question 1: a) Distinguish between energy and power signals. Test whether the discrete-time signal x[n] = (1/2)n u[n] is a power signal or energy signal. 1. 𝑥[𝑛] is said to be an energy signal if and only if 0 < 𝐸 < ∞, and so 𝑃 = 0. 2. 𝑥[𝑛] Is said to be a power signal if and only if 0 < 𝑃 < ∞, and so 𝐸 = ∞. 1. For a discrete-time signal 𝑥[𝑛], the normalized energy content 𝐸 of 𝑥[𝑛] is defined as: The normalized average power 𝑃 of 𝑥[𝑛] is defined as: Given a signal 𝑥[𝑛] = (1/2)𝑛 𝑢[𝑛] Energy of 𝑥[𝑛] is given by: 2 1 𝑛 1 𝑛 ∞ ∞ 2 𝐸 = ∑∞ 𝑛=−∞|𝑥[𝑛]| = ∑𝑛=0 [(2) ] = ∑𝑛=0 (4) 𝐸= 1 1 1−4 = 1 4 = 4−1 3 4 2. Power of 𝑥[𝑛] is given by: 𝑁 𝑁 𝑛=−𝑁 𝑛=0 1 1 1 𝑛 𝑃 = lim ∑ |𝑥[𝑛]|2 = lim ∑( ) 𝑁→∞ 2𝑁 + 1 𝑁→∞ 2𝑁 + 1 4 1 𝑁+1 1−( ) 1 4 = lim [ ]=0 1 𝑁→∞ 2𝑁 + 1 1−4 The energy is finite 0 < 𝐸 < ∞, and 𝑃 = 0 , therefore 𝑥[𝑛] is an energy signal. [5 Marks] b) Using the property of z-transform, determine the z-transforms of the following signals and the corresponding pole-zero patterns. x (n) = (1 + n) u (n) Or in terms of positive powers The pole-zero patterns are as follows: Double pole at z = 1 and a zero at z = 0. (5 Marks) c) Compare finite-impulse response (FIR) filters with infinite-impulse response (IIR) filters in terms phase, flexibility, stability and noise. Mathematical expressions are required to clarify your answers. Finite-impulse response (FIR) filters Infinite-impulse response (IIR) filters 1. Have precisely linear phase 2. Greater flexibility 3. Are always stable while IIR 4. Less severe errors due to round off noise are 5. Restricted to finite number of samples 1. Do not have linear phase 2. Less flexibility 3. Are not always stable 4. More susceptible to errors due to round off noise. 5. Extend over an infinite duration. y[n] k 0 h[k ] x[n k ] N y[n] k h[k ] x[n k ] (5 Marks) d) Compute 4-Point DFT of a sequence x[n] = {0, 1, 2, 3} using DIT algorithm and sketch its butterfly diagram. [5 Marks] DIT Algorithm Twiddle factors associated with the butterflies are: W40 = e-j(2π/4)0 = e0 = cos (0) – j sin (0) = 1 W41 = e-j(2π/4)1 = e-j(π/2) = cos (π/2) – j sin (π/2) = - j W42 = e-j(2π/4)2 = e-j(π) = cos (π) – j sin(π) = - 1 W43 = e-j(2π/4)3 = e-j(3π/2) = cos (3π/2) – j sin(3π/2) = j Input x(0)= 0 x(2)= 2 x(1)= 1 x(3)= 3 S1 0+2=2 0 – 2 = -2 1+ 3 = 4 1 – 3 = -2 Output X(k) X(0) = 2 + 4 = 6 X(1) = -2 + (-j)(-2) = -2 +2j X(2) = 2- 4 = -2 X(3) = -2 + (-2) (j) = -2 - 2j X (k) = {6, -2 +2j, -2, -2-2j} SECTION B: Choose any two questions Question 2 a) A discrete-time signal x [n] is defined as i) ii) iii) i) Determine its values and sketch the signal x[n] Give the sequential representations of x[-n], x[-n +4], x[-n -4] Can you express the signal x[n] in terms of δ[n] and u[n]? ( in one expression) ii) Yes (6 Marks) b) Determine the causal signal x[n] if its z-transform is: Eliminate the negative powers by multiplying both numerator and denominator by z2, we get Dividing X (z) by z and by using partial fraction, we obtain: (6 Marks) c) Make a comparison between analogue and digital filters. (4 Marks) Analog filters Digital filters 1.Work on analog signals 1. Operate on the digital samples of the signals. 2.Defined by linear differential equations 2. Defined by linear differential equations. 3. Made in electrical components like resistors, capacitors and inductors are used. 3. Made in digital logic components such as adders, delays, multipliers, subtractors, etc… 4. For stability and causality, the poles should lie on the left half of s-plane. 4. For stability and causality, the poles should lie inside the unit circle in z-plane. c) What is the speed improvement factor in calculating 64-point DFT of a sequence using direct computation DFT and FFT algorithms? Hints: use only number of multiplications! [4 Marks] For N point sequence (DFT: FFT) Total number of addition N (N-1): N log2N. Total number of multiplication N2: (N/2) log2N. The number of multiplications required using direct computation DFT is N2 = 642 = 4096 The number of multiplications required using FFT is: (N/2) log2N = (64/2)log2 64 =32 x(ln 64/ ln2) = 32 x 6 =192 Speed improvement factor= 4096/ 192 = 21.33 [4 marks] Question 3 a) List 4 disadvantages of digital filters compared to analog filters. [4 marks] 1. 2. 3. 4. Speed limitation Long design and development time Finite word length effects: quantization noise Finite word length effects: round off noise b) State and prove the differentiation property in z-transform. [5 marks] If ZT x[n] X ( z ), with ROC R Then We know that: X ( z) n x [ n ] z n Differentiating both sides with respect to z, we have By multiplying both sides by – z, we get: Thus, we conclude that dX ( z ) nx[n] z , with ROC R dz ZT b) What are the differences and similarities between Decimation-in-time (DIT) and Decimationin-frequency (DIF) algorithms? [5 Marks] Differences In DIT, the input is bit–reversed while the output is in natural order. For DIF, the input is normal order, while output is bit–reversed. Butterfly diagram of DIF slightly different from DIT butterfly. The DIF FFT is the transpose of the DIT FFT Considering the butterfly diagram, in DIF, the complex multiplication takes place after the add–subtract operation. Similarities Both algorithms require same number of operations to compute the DFT. Both algorithms can be done in place and both require bit–reversed at same place during computation. d) Compute the Inverse DFT of: [6 Marks] j 1 N 1 x(n) X (k )e N n 0 2nk N 1 N 1 X (k )WNnk N n 0 n 0,1, N 1 Question 4 a) List any 5 advantages of digital filters over analog filters. (5 marks) Any five advantages of digital filters of the following: 1. 2. 3. 4. 5. 6. 7. Linear phase response Performance does not vary with environment Automatically adjustable frequency response (adaptive filters) Several input signals can be filtered by one digital filter Both filtered and unfiltered data can be saved for future use Reproducibility & Can work at very low frequencies Fast re-designing or modifications b) Compute 4-Point DFT of a sequence x[n] = {0, 1, 2, 3} using DIF algorithm and sketch its butterfly diagram. [6 Marks] DIF Algorithms Twiddle factors associated with the butterflies are: W40 = e-j(2π/4)0 = e0 = cos (0) – j sin (0) = 1 W41 = e-j(2π/4)1 = e-j(π/2) = cos (π/2) – j sin (π/2) = - j W42 = e-j(2π/4)2 = e-j(π) = cos (π) – j sin(π) = - 1 W43 = e-j(2π/4)3 = e-j(3π/2) = cos (3π/2) – j sin(3π/2) = j Input x(0) = 0 x(1) = 1 x(2) = 2 x(3) = 3 S1 0+2=2 1+ 3 = 4 0–2=-2 (-j) + 3j = 2j Output X(k) X(0) = 2 + 4 = 6 X(2) = 2 + 4 (-1) = -2 X(1) = -2 +2j X(3) = -2 + (2j)(-1)= - 2 -2j X (k) = {6, -2 +2j, -2, -2-2j} d) Nowadays, there is a need of other very fast processing architectures; briefly explain and sketch a not detailed Super Harvard Architecture (SHARC® DSPs) [4 Marks] The Super Harvard Architecture is a digital signal processor with higher speed that is improved upon the Harvard design which uses separate memories for data and instructions by adding an instruction cache and a dedicated I/O controller. d) Express the following discrete-time sequence: as a sum of weighted impulse sequences and as a sum of minimum of scaled and shifted unit steps. [5 Marks] x[n] = 2 δ [n +1] + 4 δ [n] + δ [n -1] + 3 δ [n -2] as [n] u[n] u[n 1] x[n] = 2{u[n +1]-u[n]} + 4{ u[n]-u[n -1]} + { u[n- 1] -u[n- 2]}+ 3{u[n-2]- u[n-3]} x[n] = 2u [n+1] + 2u [n]- 3u [n-1] + 2u [n -2]- 3u[n – 3] Marking Scheme : Supplementary DSP Exam 2013 SECTION A: Compulsory Question 1 a) Determine the z-transforms of the following signals, the corresponding pole-zero patterns and sketch the pole-zero plot with the ROC of the following sequence. [5 Marks] Or X (z) = 3z/(z -2) – 4z/(z -3) X (z) = (3 z2 – 9 z – 4 z2 + 8 z)/(z -2)(z -3) = (- z2 – z)/(z -2)(z -3) The pole-zero patterns are as follows: (a) Poles at z = 2 and z = 3 and And zeros at z = 0 and z = - 1 and POLE-ZERO PLOT b) State and prove the differentiation property in z-transform. [5 Marks] If ZT x[n] X ( z ), with ROC R Then We know that: X ( z) x[n]z n n Differentiating both sides with respect to z, we have By multiplying both sides by – z, we get: Thus, we conclude that ZT nx[n] z dX ( z ) , with ROC R dz c) Find the circular convolution of the two sequences: x1 (n) = {1, 2, 2, 1} and x2 (n) = { 1, 2, 3, 1} using circle method or matrix method Circle method [5 Marks] The circular convolution is x3[n] = {11, 9, 10, 12} Or Matrix method d) Using tabular method, determine the convolution sum of two sequences: [5 Marks] SECTION B: Choose any two questions Question 2 a) Any 5 advantages of digital signal processing over analog signal processing. [5 Marks] 1. Noise-resistance and high accuracy 2. Great flexibility: DSP operations can be changed by changing the program in digital programmable system. 3. Stability and repeatability: easily duplicated and independent of temperature, ageing and other external parameters. 4. Simplicity: easy to build any digital system 5. Easy upgradations: because of use of software 6. Compatibility: all applications need standard hardware. Thus operations of DSP system are mainly dependent on software. 7. Remote processing: Easy information storage on magnetic media without loss of quality of reproduction of signal and easily transported, digital signals can be processed off line. 8. In some cases, Cheaper, digital hardware cheaper and digital circuits can be reproduced easily in large quantities or by time-sharing of given processor among a number of signals. 9. Sophisticated signal processing algorithms can be implemented by DSP method b) Find the z-transform of each of the following sequences: In all cases assume that n ≥ 0 [6 Marks] or c) Make a comparison between fixed-point and floating-point digital signal processors. [9 Marks] Fixed versus floating point Fixed-point DSPs 1. A minimum of 16 bits 2. Up to 65,536 possible bit patterns (216). 3. Represent and manipulate integers : whole numbers 4. Generally cheaper 5. Worst precision 6. More quantization ‘noise’ 7. Lower dynamic range 8. Longer development cycle 9. For high-volume, general purpose applications Floating-point DSPs 1. A minimum of 32 bits 2. Up to 4,294,967,296 possible bit patterns (232). 3. Represent and manipulate rational numbers 4. Generally more expensive 5. Better precision 6. Less quantization ‘noise’ 7. Higher dynamic range, 8. Shorter development cycle. 9. For specialized, computationally intensive applications Question 3 a) A causal discrete-time LTI system is described by: Where x[n] and y[n] are the input and output of the system, respectively. i) Determine the system function H (z). ii) Find the impulse response h[n] of the system. Solution [6 Marks] b)Sketch and describe the working principle of the Harvard architecture processor compared with the traditional processor von Neumann machine. [6 Marks] The Harvard architecture is based on separate memories for data and program instructions with separate buses for each. Since the buses operate independently, program instructions and data can be fetched at the same time, improving the speed over the traditional processor von Neumann Machine with its single bus design. Having two separate buses for the program and data memory; content of program memory and data memory can be accessed in parallel. The instruction code can be fed from the program memory to the control unit while the operand is fed to the processing unit from the data memory. c) [4 Marks] d) What are the limitations of digital signal processing compared with the analog signal processing? [4 Marks] 1. Bandwidth limitations, limited speed of operation of AD converters and digital signal processors 2. System complexity: usage of ADC or DAC, time required for this conversion is more 3. In some cases, DSP systems are expensive as compared to analog system 4. More power consumption Question 4 a) List any five main applications of digital signal processing. [5 Marks] Any five from the following applications 1. Audio and speech signal processing 2. SONAR (Sound Navigation And Ranging) signal processing 3. RADAR (Radio Detection And Ranging) signal processing 4. Digital image processing 5. Signal processing for communications 6. Control of systems 7. Biomedical signal processing 8. Seismic data processing, etc… b) State and prove the time-shifting property in z-transform. [5 Marks] ZT x[n] X ( z ), with ROC R If Then ZT x[n n0 ] z n0 X ( z ), Proof with ROC R Verification of the time-shifting property By the change of variables m = n – no & n = m +no c) Sketch the butterflies diagram and compute 4-Point DFT of a sequence x[n] = {1, 2, 3, 0} using DIT algorithm and DIF algorithm. [10 Marks] i)DIT Algorithm Twiddle factors associated with the butterflies are: W40 = e-j(2π/4)0 = e0 = cos (0) – j sin (0) = 1 W41 = e-j(2π/4)1 = e-j(π/2) = cos (π/2) – j sin (π/2) = - j W42 = e-j(2π/4)2 = e-j(π) = cos (π) – j sin(π) = - 1 W43 = e-j(2π/4)3 = e-j(3π/2) = cos (3π/2) – j sin(3π/2) = j Input x(0) = 1 x(2) = 3 x(1) = 2 x(3) = 0 S1 1+3=4 1 - 3=-2 2+0=2 2 -0=2 Output X(k) X(0) = 4 + 2= 6 X(1) = -2 + (-j) (2)= -2 - 2j X(2) = 4 + 2 (-1) = 2 X(3) = (-2) + 2 (j) + = – 2 + 2j X (k) = {6, - 2- 2j, 2, -2 + 2j} ii)DIF Algorithm Input x(0) = 1 x(1) = 2 x(2) = 3 S1 1+3=4 2+0=2 1– 3 = - 2 Output X(k) 4 + 2 = 6 = X(0) 4 – 2 = 2 = X(2) -2 -2j= X(1) x(3) = 0 (-j) (2) + 0 (j)= - 2j X (k) = {6, -2 - 2j, 2, -2 + 2j} -2 + (-2j)(-1)= -2 +2j= X(3)