Sunteți pe pagina 1din 11

Solution

Digital Signal Processing


Regular Examination 2010
Q1: Signal x(t) is to be digitized in an alias-free manner. The maximum frequency in the
signal is considered to be 5Hz. Consider that a 3-bit quantizer was used to quantize
the signal. Determine the discrete-time analogue signal x[n] and the quantized signal
x
q
[n]. Also, determine the signal to quantization noise ratio in the resulting digital
signal. Use the graph paper to sketch x(t), x[n], and x
q
[n].
( )
)
`

s s
=

elsewhere
t e
t x
t
0
1 0
3


ANSWER: f
max
=5Hz. According to Nyquist, the minimum sampling rate must be
f
nyquist
= 2f
max
= 10 Hz. [1 mark]
To digitize the signal in the alias free manner, f
s
f
nyquist
. We select f
s
= 10Hz.
Therefore, T=1/f
s
=0.1s. Replacing t by nT discretizes the signal x(t) into x[nT].

( )
)
`

s s
=

elsewhere
nT e
nT x
nT
0
1 0
3
OR ( )
)
`

s s
=

elsewhere
n e
n x
n
0
1 1 . 0 0
3 . 0


( )
)
`

s s
=

elsewhere
n e
n x
n
0
10 0
3 . 0

[2 marks]

x(0) = 1.0000 x(1) = 0.7408 x(2) = 0.5488
x(3) = 0.4066 x(4) = 0.3012 x(5) = 0.2231
x(6) = 0.1653 x(7) = 0.1225 x(8) = 0.0907
x(9) = 0.0672 x(10)= 0.0498 [2 marks]

These values are plotted below:

[1 mark]
The following is the plot of x(t)
0 5 10 15
0
0.2
0.4
0.6
0.8
1
n
x
[
n
]


The 3-bit quantizer shall have L=2
3
=8 levels and hence, the quantization resolution would be:
q = 1/(L-1) = 1/7 = 0.1429 [1 mark]

Therefore, the quantization levels are: 0, 0.1429, 0.2857, 0.4286, 0.5714, 0.7143, and 0.8571,
and 1. [1 marks]
x
q
(0) = 1 x
q
(1) = 0.7143 x
q
(2) = 0.5714
x
q
(3) = 0.4286 x
q
(4) = 0.2857 x
q
(5) = 0.2857
x
q
(6) = 0.1429 x
q
(7) = 0.1429 x
q
(8) = 0.1429
x
q
(9) = 0.0 x
q
(10) = 0.0 [2 marks]

The following is the plot of x
q
(n)
[1 mark]

The difference between x[n] and x
q
[n] is the quantization noise. The power of the
quantization noise is given by:
| | ( ) | | | | ( )


=

=
= =
1
0
2
1
0
2
1 1
N
n
q
N
n
q
n x n x
N
n e
N
Pq [1 marks]
P
q
= (1/11) {0
2
+ (0.7408-0.7143)
2
+ (0.5488-0. 0.5714)
2
+ (0.4066-0.4286)
2
+ (0.3012-
0.2857)
2
+ (0.2231-0.2857)
2
+ (0.1653-0.1429)
2
+ (0.1225-0.1429)
2
+ (0.0907-
0.1429)
2
+ (0.0672-0)
2
+ (0.0498-0)
2
}
-1 0 1 2 3 4
0
0.2
0.4
0.6
0.8
1
t
x
(
t
)
0 1 2 3 4 5 6 7 8 9 10
0
0.2
0.4
0.6
0.8
1
n
x
q
[
n
]
P
q
= 0.0165/11 P
q
= 0.0015 [2 marks]
The power of the actual discrete-time signal x[n] is given by: | | ( )

=
=
1
0
2
1
N
n
n x
N
Px
P
x
= 0.2012
The signal to quantization noise ratio is given by:
( )
q
x
P
P
dB
SQNR
10
log 10 = = 21.2778 dB [2 marks]
Q2(a): Linear Discrete-time (DT) system gives the output h(n) in response to a unit
impulse. Its output in response to a unit impulse delayed by m units is h(n-2m). Is this
system time invariant? explain. Also compute the output corresponding to the input
x[n]. (8 marks)
The given system is NOT time-invariant. Since, the response to impulse delayed by m units is
delayed by 2m units, the system response to pulses occurring at different times is different.
Hence, the system is time-variant. Let y[n] be the response of the system T for the input x[n].

| | | | ( ) n x T n y = (1)
The input x[n] can be resolved into discrete pulses as: | | ( ) ( )

=
=
m
m n m x n x o
Replacing x[n] in (1) gives

| | ( ) ( )
(

= m
m n m x T n y o


| | ( ) ( ) | |

=
=
m
m n T m x n y o
| | ( ) | |

=
=
m
m n h m x n y 2
Q2(b): An ECG signal of a heart patient in a remote area, shown in figure Q2, was
transmitted electronically in discrete form to a doctor in Karachi for his expert
opinion. Unfortunately, the signal was corrupted heavily by a stationary noise present
in the medium. The doctor is now interested in only recovering the information about
duration of R-R interval. Explain how can this information be retrieved from the
noise-riddled signal using the time-domain operations only? Present the necessary
mathematics and theoretical notions behind it. (8 marks)

Figure 2: The Patients ECG signal
Recovering the timing information from a noise-ridden signal is one of the major applications
of autocorrelation. Hence, one can compute autocorrelation of the ECG signal. [2 marks]

Let x(n) be the discrete-time ECG signal. Its autocorrelation is computed as: [2 marks]
( ) ( ) ( )

=
= I
n
xx
l n x n x l
The time interval RR would be equal to 2NT, where N is the sample spaces between two
successive highest peaks in the autocorrelation signal and T is the sampling time used to
sample the continuous time ECG signal. [2 marks]

Although the ECG cycles are not identical, they are quite similar. Therefore, there exists a self
similarity, i.e. each ECG cycle contains a P, QRS, and T spikes. Autocorrelation is a measure
of self similarity. Hence, autocorrelation of the ECG signal can reveal the time shift (interval)
after which the signal is SELF SIMILAR. [2 marks]


Q3: The signal x(t) is to be discretized. Explain the steps to be followed to get the DT
signal x[nT]. Given the spectrum of the signal, ( )
|
|
.
|

\
|
=
5
exp
f
f X , determine the
Nyquist rate for sampling the signal keeping intact at least 80% of the signal energy.
STEPS TO BE FOLLOWED [4 marks]
1. Determine the maximum frequency component in the signal continuous-time signal
x(t), i.e. determine f
max
.
2. Use Nyquist rule to determine the minimum required sampling rate f
n

3. Decide sampling frequency f
s
that is greater than f
n

4. Determine the sampling time T
5. Replace t by nT in the signals mathematical model x(t), to determine the discrete-
time signal x(nT)


FOR DETERMINING THE NYQUIST RATE FOR THE GIVEN SIGNAL [12 marks]
( )
5
f
e f X

=
( )
}


= df f X Ex df e Ex
f
}

=
5

=
5
5
1
f
e Ex
Since X(f) is symmetric,

=
0
5
5
2
f
e Ex ( ) 4 . 0
5
2
0
= =

e e Ex
We want to retain 80% of the total signal energy i.e. 0.40.8 E
req
= 0.32.
( )
}

=
max
f
req
df f X E df e E
f f
req
}

=
max
5

max
5
5
1
f
f
req
e E

=
max
0
5
5
2
f
f
req
e E

= ( )
0
max
5
2

= e e E
f
req
( ) 1
5
2
max
=
f
req
e E
( ) 1
5
2
32 . 0
max
=
f
e ( )
2
5
32 . 0 1
max
=
f
e 1
2
5
32 . 0
max
+ =
f
e
2 . 0 8 . 0 1
max
= =
f
e ( ) 2 . 0 log
max
= f 6094 . 1
max
= f
Hz f 6094 . 1
max
=
Hence the Nyquist rate is 6094 . 1 2 2
max
= = f f
nyquist

Hz f
nyquist
22 . 3 =
Q4: QUESTION BY THE EXTERNAL EXAMINER

Q5(a): Determine the z transform of the signal x[n] and determine its region of convergence
(ROC). Also, sketch its ROC. (10 marks)
| | { } ...... 1 0 1 0 0 1 0 1 0 0 1 0 1 = n x
The signal x[n] can be broken into two parts, x
1
[n], and x
2
[n]. That is: x[n] = x
1
[n] + x
2
[n]
| | { } ...... 0 0 1 0 0 0 0 1 0 0 0 0 1
1
= n x

( ) ( )

=
0
1 1
n
n
z n x z X

( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ....... 6 5 4 3 2 1 0
7
1
6
1
4
1
3
1
2
1
1
1
0
1 1
+ + + + + + + =

z x z x z x z x z x z x z x z X

( ) ....... 0 1 0 0 0 0 1
7 6 4 3 2 1 0
1
+ + + + + + + =

z z z z z z z z X

( ) ....... 1
24 18 12 6
1
+ + + + + =

z z z z z X

Let a = z
-6
, and z = a
6
. Hence X
1
(z) becomes
( ) ....... 1
4 3 2
1
+ + + + + = a a a a z X

This geometric series converges to
( ) 1 if
1
1
6
1
<

= a
a
a X

( ) 1 if
1
1
6 -
6 1
<

=

z
z
z X

( ) 1
1
if
1
1
6 6 1
<

=

z z
z X

( ) 1 if
1
1
6
6 1
>

=

z
z
z X

( ) 1 if
1
1
6 1
>

=

z
z
z X

| | { } ...... 1 0 0 0 0 1 0 0 0 0 1 0 0
2
= n x
( ) ( )

=
0
2 2
n
n
z n x z X

( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ....... 6 5 4 3 2 1 0
7
2
6
2
4
2
3
2
2
2
1
2
0
2 2
+ + + + + + + =

z x z x z x z x z x z x z x z X

( ) ....... 1 0 0 0 0 1 0 0 0 0 1 0 0
13 12 11 10 9 8 7 6 4 3 2 1 0
2
+ + + + + + + + + + + + + =

z z z z z z z z z z z z z z X

( ) .......
17 12 7 2
2
+ + + + =

z z z z z X

( ) ( ) ....... 1
15 10 5 2
2
+ + + + =

z z z z z X

( ) ....... 1
15 10 5 2
2
+ + + + =

z z z z z X

Let a = z
-5
, and z = a
5
. Hence X
2
(z) becomes
( ) ....... 1
3 2 10 5
2
+ + + + = a a a a a X

( )
a
a a X

=
1
1
10 5
2

This geometric series converges to
( ) 1 ROC
1
1
10 5
2
<

= a
a
a a X

( ) 1 ROC
1
1
-5
5
2
2
<

=

z
z
z z X

-
( ) 1
1
ROC
1
1
5 5
2
2
<

=

z z
z z X

( ) 1 ROC
1
1
5
5
2
2
>

=

z
z
z z X

( ) 1 ROC
1
1
5
2
2
>

=

z
z
z z X

( ) 1 ROC
1
5
2
2
>

z
z
z
z X

We know that the Z-transform is a Linear transform. That is, ( ) ( ) ( ) z X z X z X
2 1
+ =

( ) 1 z ROC
1 1
1
5
2
6
>

z
z
z
z X

( )
( )
( )( )
1 z ROC
1 1
1 1
6 5
6 2 5
>

+
=


z z
z z z
z X

( ) 1 z ROC
1
1
11 6 5
8 5 2
>
+
+
=


z z z
z z z
z X


Q5(b): Find the discrete-time signal x[n], corresponding to the z-plot shown in figure Q5.
Plot the signal x[n]. (6 marks)

Figure Q5: The Z-plot
There are two possible solutions. Both should be considered correct. The candidate is
supposed to provide any one of the two:
Solution 1
=
1
1 0.8

We know that
1
1

<
Therefore = 0.8

< 0.8
x(-10) = 0.1074 x(-9) = 0.1342 x(-8) = 0.1678 x(-7) = 0.2097 x(-6) = 0.2621
x(-5) = 0.3277 x(-4) = 0.4096 x(-3) = 0.5120 x(-2) = 0.6400 x(-1) = 0.8000
x(0) = 1.0000 x(1) = 0 x(2) = 0



Solution 2
From the table of z-transforms, we have:
1
1
1

1 for z <
Therefore = 0.8

1 < 0.8
x(-11) = -0.1074 x(-10) = -0.1342 x(-9) = -0.1678 x(-8) = -0.2097 x(-7)=-0.2621
x(-6) = -0.3277 x(-5) = -0.4096 x(-4) = -0.5120 x(-3) = -0.6400 x(-2)=-0.8000
x(-1) = -1.0000 x(0) = 0 x(1) = 0 x(2) = 0
-10 -8 -6 -4 -2 0 2
-0.8
-0.6
-0.4
-0.2
0
n
x
[
n
]


Q6: Describe the notions behind finite impulse response (FIR) and the infinite impulse
response (IIR) LTI systems. Explain and compare the methods of bringing an actually
IIR to finite time bounds. Also explain how quantization affects an IIR LTI system.
NOTIONS BEHIND FIR AND IIR [4 marks]
The examinee needs explaining and comparing [8 marks]
1. Window Method
2. Frequency Sampling Methods
HOW QUANTIZATION AFFECTS IIR LTI SYSTEM [4 marks]
Q7(a): What is periodogram? Express it mathematically. (4 marks)
It is the Power Density Spectrum of a discrete-time (DT) signal. It is computed by
squaring the L-point DFT of the DT signal, where L is any integer greater than or
equal to N, i.e., the no. of samples in the DT signal.
The L-point Periodogram of a DT signal x(n) is given by
( )
2
1
0
2
1

=
|
.
|

\
|
N
n
L
nk j
xx
e n x
N L
k
P
t
(2)
1 ,...... 3 , 2 , 1 , 0 = L k
Sometimes, the Periodogram is smoothed by using a window other than rectangular to
truncate the otherwise time-unlimited signal. Taking finite number of samples causes
spectral leakage. Windows other than rectangular help reduce this spectral leakage at
the cost of reduced spectral resolution.
Q7(b): Consider that the sampled version of the ECG signal of figure Q2 is transmitted over a
noisy medium. How can computing its periodogram help measure the durations of R-
R and R-T intervals, explain. Consider that the actual duration of the R-R interval is
1.5 seconds, that of R-P interval is 1.3 seconds, and that of the R-T interval is 0.5
-10 -8 -6 -4 -2 0 2
0
0.2
0.4
0.6
0.8
n
x
[
n
]
seconds. What should be the minimum sampling rate so the two intervals can be
measured from the periodograms? Give necessary calculations. (6 marks)

We are interested in measuring R-R and R-P intervals. Hence, the difference between
the R-R and R-P intervals should also be measurable. The difference between the two
is 1.5-1.3 = 0.2 sec. Therefore, let x(t) be the component of the ECG signal, i.e. ecg(t)
having the smallest time period T
x
=0.2 sec. The corresponding frequency is f
x
=1/T
x
=5.
According to Nyquist, the sampling rate should be at least twice this frequency. F
n
=10
samples per sec. There will be seven or more peaks in the periodogram, each
corresponding to an interval in the time domain, e.g. R-R interval, R-P interval, and
R-T interval. Obviously, the peak at the smallest frequency (the leftmost in the
periodoram) corresponds to the largest interval, i.e. R-R interval. Similarly, the
second peak from the left must correspond to the second largest interval, i.e. R-P
interval.
After sampling the signal with a sampling frequency (f
s
) greater than 10 Hz, we obtain
the DT signal ecg(nT). Then the DFT of this signal, ECG(k), is computed. Then, the
L-point Periodogram is computed as in equation (2). Later, the fundamental frequency
must correspond to the R-R interval, as latter is the time period of the ECG signal.
The frequency corresponding to the k
th
bin is kf
s
/L.
Q7(c): How to compute the periodogram in order to ensure that the error in the estimate of R-
R interval is not more than 0.01 sec. Do necessary calculations and explain. (6 marks)
The duration of the R-R interval is 1.5 seconds. The precision required is 0.01
seconds. The ratio 1.5/0.01 gives 150. Therefore, one must compute at least 150-point
periodogram to measure the R-R interval with the required accuracy.

Q8: Figure Q8 shows a multirate DSP system. Let the N-point DFT of the input signal
x[n] be X(k). Determine the 2N-point and N/2-point discrete spectra of the signals
y
1
[n] and y
2
[n], respectively, in terms of X(k). Assume that the signal x(t) was
sufficiently over-sampled to obtain the DT signal x[n].
Determining Y
1
(k) [8 marks]
Determining Y
2
(k) [8 marks]
Figure Q8: A Multirate DSP system

1
=

2

0
(3)
We can use decimation in time method to find out the 2N-point DFT of y
1
(n). Let two signals
g
1
(n) and h(n) defined as follows:
g
1
(n) = x(2n) for 0 n < N (Even numbered elements)
h
1
(n) = x(2n+1) for 0 n < N (Odd numbered elements)

1
=
1
+

1
0 < and (4)

1
=
1

1
< 2 (5)
Where G
1
(k) is DFT of g
1
(n) and H
1
(k) is DFT of h
1
(n).
From (3), we have:
g
1
(n) = x(n) and h
1
(n) = 0 for 0 n < N
Therefore, G
1
(k)=X(k) and H
1
(k)=0. Putting these values, (4) becomes

1
= 0 < and (5) becomes

1
= < 2
Therefore,
1
= + 0 < 2
Now for y
2
(n)

2
= 2 0 <

2
(6)

2
=
2

2
/2

2
1
=0
0 <

2
= 2
2
/2

2
1
=0
0 <

2

Replace 2n by m

2
=
2

1
=0
0 <

2
= 0 <

S-ar putea să vă placă și