You are on page 1of 5

HO CHI MINH CITY

VIETNAM AVIATION ACADEMY MIDTERM EXAM


Subject : Digital Signal Processing (DSP)

DSP : 001 Course ID : 0101000144 Credits : 03


Student’s name :................. Time allowed : 120’ Level : Undergraduate
Student’s ID :................. Dean of Dept. :
Signature :
Note: The exam has 01 page; materials are permitted; using Matlab to plot/check gets 0.5 bonus marks for
each problem; and copying answers from each other is invalid

P01 (2.5 marks): Consider the analog signal xa(t) = x1(t) + x2(t) + x3(t) = cos(480t) + 2cos(560t) + 3cos(640t)
sampled at Fs = 600Hz.
a) Determine the fundamental period of the sampled signal x1(n)? (0.5)
b) Determine the Nyquist sampling rate for xa(t) and the folding frequency. (0.5)
c) Is there any alias frequencies in the sampled signal x(n), why? (0.75)
d) If x(n) is passed through an ideal D/A converter, what is the reconstructed signal ya(t)? (0.75)
Solution
a) x1(n) = cos(480n/Fs) = cos(480n/600) = cos(2n2/5)  f = 2/5 = k/N  the fundamental period N = 5
samples/period

b) FN = 2Max{F1, F2, F3} = 2Max{240Hz, 280Hz, 320Hz} = 2320Hz = 640Hz


The folding frequency is Ffold = Fs/2 = 300Hz
c) Because F3 = 320Hz > Ffold = Fs/2 = 300Hz, F3 is an alias frequency of F’ such that F3 = F’ + kFs
 320 = F’ + k600  F’ = (-)280Hz = F2, for k = 1.
d) The sampled x(n) of xa(t) is given by
x(n)   F   F   F   240   280   320 
2 n 1  n 2   n 3  cos 2 n   2 cos  2 n   3cos  2 n 
cos  2 cos 2  3cos  2   600 600 600
F F F
 s   s   s       
 4 n   14 n   16 n   4 n   14 n   16  n 
= cos   2 cos
   3cos
   cos   2 cos    3cos 152 n 
5 15 15 5 15
           
 4 n   14 n   14 n   4 n   14 n 
= cos   2 cos
   3cos
   cos   5cos 
5 15 15 5 15
         
So, there are two frequencies w1 = 4/5 & 4w2 n=14/15 14 n 
Because F1 & F2 are sampled, ya(t) = cos  5cos
   
5 15
   
P02 (1.5 mark): A digital communication link carries binary-coded words representing samples of an input signal
xa(t) = 2cos(600t) + 3cos(900t). The link is operated at 10Kbits/s & each input sample is quantized into 256
different voltage levels.
a) What is the sampling frequency Fs? Please provide further discussions about Fs and data rate of the link. (1.0)
b) What is the resolution of ? (0.5)
Solution
a) 256 levels  need log2(256) = 8 bits/sample
To obtain 10Kbits/s  we have to sample at Fs = 1250 samples/s.
However, we can see that Fmax of xa(t) is 450Hz, so Fs should be 2Fmax = 900 ~ 1000Hz  the link should be operated
at 8Kbits/s.
b)
x(n) 
 F1   F2   300   450  12 n   18 n
2cos 2 n   3cos 2 n   2cos 2 n   3cos 2 n  25
F =2cos 1250 1250 25 
3cos
F  s  s         
Amax = 5 (n = 0), Amin = -4 (n = 10)
 = (Amax - Amin)/(256 - 1) = 0.0353

P03 (1.5 marks): Consider the signal x(n) as shown in Fig. 1, determine
a) x(n – 3) b) x(3 – n) c) x(n)us(n – 1) d) x(n)us(1 – n)
e) x(n – 2)(n – 1) f) x(n2) g) even part of x(n) h) old part of x(n)
Solution
x(n) = {…, 0, 0, 0, -1, -1, -1, 0, 2, 2, 2, 0, 0, 0,…}
a) x(n – 3)
Shift right 3  x(n – 3) = {…, 0, 0, 0, -1, -1, -1, 0, 2, 2, 2, 0, 0, 0,…}

b) x(3 – n)
fold x(n)  x(–n) = {…, 0, 0, 0, 2, 2, 2, 0, -1, -1, -1, 0, 0, 0,…}
shift right 3  x(– (n – 3)) = x(3 – n) = {…, 0, 0, 0, 2, 2, 2, 0, -1, -1, -1, 0, 0, 0,…}

c) x(n)us(n – 1)
x(n) = 0 if n < 1  x(n)us(n – 1) = {…, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0,…}

d) x(n)us(1 – n)
x(n) = 0 if n > 1  x(n)us(1 – n) = {…, 0, 0, 0, -1, -1, -1, 0, 2, 0, 0, 0, 0, 0,…}

e) x(n – 1)[(n – 1) + (n – 2)]


Applying x(n)(n – k) = x(k)(n – k)
x(n – 1)[(n – 1) + (n – 2)] = x(n – 1)(n – 1) + x(n – 1)(n – 2) = x(0)(n – 1) + x(1)(n – 2) = 2(n – 2)
 x(n – 1)[(n – 1) + (n – 2)] = {…,0, 0, 0, 0, 0, 0, 2, 0, 0, 0,…}

f) x(n2) = {…,0, 0, 0, x(4), x(1), x(0), x(1), x(4), 0, 0, 0,…} = {…, 0, 0, 0, 2, 0, 2, 0, 0, 0,…}

g) even part of x(n)


xe(n) = [x(n) + x(–n)]/2
x(n) = {…, 0, 0, 0, -1, -1, -1, 0, 2, 2, 2, 0, 0, 0,…}
x(–n) = {…, 0, 0, 0, 2, 2, 2, 0, -1, -1, -1, 0, 0, 0,…}
xe(n) = {…, 0, 0, 0, 1/2, 1/2, 1/2, 0, 1/2, 1/2, 1/2, 0, 0, 0,…}

h) old part of x(n)


xo(n) = [x(n) – x(–n)]/2
x(n) = {…, 0, 0, 0, -1, -1, -1, 0, 2, 2, 2, 0, 0, 0,…}
x(–n) = {…, 0, 0, 0, 2, 2, 2, 0, -1, -1, -1, 0, 0, 0,…}
xo(n) = {…, 0, 0, 0, -3/2, -3/2, -3/2, 0, 3/2, 3/2, 3/2, 0, 0, 0,…}

P04 (1 mark): Consider the signals x(n) and h(n) as shown in Fig. 1 and Fig. 2, determine
a) y(n) = (n)*h(n) b) y(n) = x(n)*h(n)

Solution
a) It is easy to obtain y(n) = (n)*h(n) = h(n)
b) y(n) = x(n)*h(n)
y(n) = 0 for n  -3 and n  7
y(-2) = –1 + 0 = –1
y(-1) = –2 –1 + 0 = –3
y(0) = –3 –2 –1 + 0 = –6
y(1) = –3 –2 + 0 = –5
y(2) = –3 + 0 + 2 = –1

P05 (1 mark): Compute the convolution the signals x(n) and h(n) as shown in Fig. 3 and Fig. 4.

y(n) = 0 for n  -1
When n  0, we have
y(0) = 1
y(1) = 1 + 1 = 2
y(2) = 1 + 1 + 1 = 3
y(3) = 1 + 1 + 1 + 1 = 4
y(4) = 1 + 1 + 1 + 1 = 4
y(5) = 1 + 1 + 1 + 1 = 4

0, n  1
In summary y(n)  n 1,1  n  3
4, n  3

P06 (1 mark): Determine if the input-output system y(n) = nx(n) + A is static/dynamic, linear/nonlinear, time
invariant/variant, causal/noncausal, stable/unstable?

Solution

1) static/dynamic

No memory requires: static

2) linear/nonlinear

y(n) = n[a1x1(n) + a2x2(n)] + A


y’(n) = [nx1(n) + A]a1 + [nx2(n) + A]a2  y(n)  nonlinear
3) time invariant/variant

If we delay the input by k, we have y(n) = nx(n – k) + A


But we delay the output by k, we have y’(n) = y(n – k) = (n – k)x(n – k) + A  y(n)  time variant

4) causal/noncausal

y(n) only depends on the current values of x(n)  causal

5) stable/unstable

Assume that x(n) = us(n) is always bounded, but y(n) = n + A is unbounded  unstable

P07 (1.5 marks): Determine total solution of the difference 1


y(n)  y(n 1)  x(n) when the forcing function
equation is x(n) = 2nus(n). 2

Solution

For x(n) = 0, we have the homogeneous equation

1
y(n)  y(n 1)  0
2
Let
yh (n)  n , we have

1 1
 n   n1  0   
2 2

 yh (n)  C  1 n
n C 
 2
For particular solution, let yp(n) be similar from of x(n), we have
1
y (n)  k 2n u (n)  k 2n u (n)  k 2n1u (n 1)  2n u (n)
p s s s s
2
For n = 1 (no terms vanish), we obtain
1 4
2k  k2k
2 3
So far
 1 n 4
y(n)  yh (n)  yp (n)  C   u s (n)  2n us (n)
 2 3
Now, we determine C by assuming that y(-1) = 0
1 4 1
y(0)  y(1)  1  y(0)  1 1  C  C
2 3 3
Finally, the total solution is
11
n u (n)  4 2n u (n)
y(n)     s 3 s
3 2 

You might also like