Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
18 views13 pages

Tut#01 DSP MNNIT Sol

tutr mff

Uploaded by

Avneesh Sahu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views13 pages

Tut#01 DSP MNNIT Sol

tutr mff

Uploaded by

Avneesh Sahu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Digital Signal Processing (ECN15101)

Electronics & Communications Engineering


MNNIT Allahabad, Prayagraj, U.P., India
Tutorial Sheet #01 Solution

Essential Steps for Problem Solving Approach:


Step 1: Collect given information and identifying desired/required information
Step 2: Obtain additional information for given information and desired information
Step 3: Find the relation between given information with the aid of obtained additional information and
desired/required information

1
1) Determine the values of power P∞ and energy E∞ of the following signals:
a) x[n] = ( 12 )n u[n], where u[·] denotes the discrete-time unit step function.
b) x[n] = cos( π4 n).
Solution:

a) Given:
 n
1
x[n] = u[n]
2
 n
 12 ; n≥0
=
0, elsewhere.

We have

X
a rk = a + a r + a r2 + a r3 + a r4 + . . .
k=0
a
=
1−r
Proof:

X
E∞ = |x[n]|2
n=−∞
∞  2n
X 1
=
n=0
2
∞  n
X 1
=
n=0
4
1
=
1 − 41
4
=
3
As we know that classification of signals based on their energy and power is mutually exclusive.
Hence,
P∞ = 0
Now we have
4
E∞ = , P∞ = 0,
3
Hence, the signal x[n] is energy signal.

2
b) Given
π 
x[n] = cos n
4
π
= cos (ω0 n) ; ω0 =
4
Let N be the fundamental period of x[n].
ω0 m
= = rational number; ω0 6= 0
2π N

gcd(N, m) = 1 (N and m have no factors in common)


π
ω0 1
⇒ = 4 =
2π 2π 8
⇒N =8
We know that
Z 2π Z π Z 2π+t0 Z 2π m+t0
cos(t)dt = cos(t)dt = cos(t)dt = cos(t)dt = 0; m = ±1, ±2 . . .
0 −π t0 t0
2π m
Note that cos (ω0 n) is periodic with fundamental period N = ω0
, i.e.,
N
X
cos (ω0 n) = 1
n=−N

For example

n −2 −1 0 1 2
cos (π n) 1 −1 1 −1 1

n −4 −3 −2 −1 0 1 2 3 4
cos (π n) 1 −1 1 −1 1 −1 1 −1 1

and

X N
X
cos (ω0 n) = lim cos (ω0 n) = 1
N →∞
n=−∞ n=−N

3
Proof:
N
1 X
P∞ = lim |x[n]|2
N →∞ 2N + 1
n=−N
N
1 X π 
= lim cos2 n
N →∞ 2N + 1 4
n=−N
N
1 X 1  π 
= lim 1 + cos n
N →∞ 2N + 1 2 2
n=−N
N N
1 1 X 1 1 X π 
= × lim 1 + × lim cos n
2 N →∞ 2N + 1 n=−N 2 N →∞ 2N + 1 n=−N 2
1 2N + 1 1 1
= × lim + × lim
2 N →∞ 2N + 1 2 N →∞ 2N + 1
1 1 1
= ×1+ ×
2 2 2×∞+1
1 1 1
= + ×
2 2 ∞
1 1
= + ×0
2 2
1
= +0
2
1
=
2


X
E∞ = |x[n]|2
n=−∞
X∞ π 
2
= cos n
n=−∞
4

X 1  π 
= 1 + cos n
n=−∞
2 2
∞ ∞
1 X 1 X π 
= 1+ cos n
2 n=−∞ 2 n=−∞ 2
1 1
= ×∞+ ×1
2 2
=∞
Now, we have
1
P∞ = , E∞ = ∞
2
Hence, the signal x[n] is power signal.

4
2) A discrete-time signal x[n] is defined by

 1, n = 1, 2
x[n] = −1, n = −1, −2
 0, elsewhere
Sketch each of the following discrete-time signals:
a) y1 [n] = x[2n + 5].
b) y2 [n] = x[3n − 4].
Solution:
Note: For discrete-time signals: first do shifting and then scaling/reflection.
a) y1 [n] = x[2n + 5]
shift left by 5 scale by 2
x[n] −−−−−−→ x[n + 5] −−−−−→ x[2n + 5]
Plot:
x[n]

1 1

−1 −1
0 1 2 n

−1 −1
Figure: x[n]

x[n + 5]

1 1

−7 −6
−5 −4 −3 −2 −1 0 1 2 n

−1 −1
Figure: x[n + 5]

x[2n + 5]

−3
−7 −6 −5 −4 −2 −1 0 1 2 n

−1
Figure: x[2n + 5]
b) y2 [n] = x[3n − 4]
shift right by 4 scale by 3
x[n] −−−−−−−→ x[n − 4] −−−−−→ x[3n − 4]
Plot: do it yourself

5
3) In particular, a system may or may not be the following properties:
a) Static (Memory-less)
b) Time invariant
c) Linear
d) Causal
e) Stable
Determine which of these properties hold and which do not hold for each of the following systems.
Justify your answers.
i) y[n] = nPx[n] + x[n − 1].
ii) y[n] = nk=−∞ x[k].
Solution:
For a system to possess a given property, the property must hold for every possible input and parameter
of the system.
• to disprove a property, need a single counter-example
• to prove a property, need to prove for the general case
i) Given:
y[n] = n x[n] + x[n − 1]
Proof:
a) Memory-less:
Since the current output value y[n] depends on the present and also past values of the input
x[n], the system is not memory-less. For example, y[0] = 0 + x[−1] = x[−1] and y[1] =
x[1] + x[0]
b) Time-Invariant:

Let y1 [n] be the output produced by the shifted input x1 [n] = x[n − n0 ]. Then
y1 [n] = n x1 [n] + x1 [n − 1]
= n x[n − n0 ] + x[n − n0 − 1]; (1)
But
y[n − n0 ] = (n − n0 ) x[n − n0 ] + x[n − n0 − 1] 6= y1 [n]; (2)
Eq. (2) shows that a shift n0 in the input does not lead to a same shift in the output. This
implies that the system is not time-invariant.
c) Linearity=Additivity and Homogeneity:
Let y1 [n] and y2 [n] be the outputs corresponding to the inputs x1 [n] and x2 [n] respectively.
Therefore, we have
y1 [n] = n x1 [n] + x1 [n − 1]; (3)

y2 [n] = n x2 [n] + x2 [n − 1]; (4)


Let x[n] = ax1 [n] + bx2 [n], where a and b are constants. Then
y[n] = n (ax1 [n] + bx2 [n]) + ax1 [n − 1] + bx2 [n − 1]
= a(n x1 [n] + x1 [n − 1]) + b(n x2 [n] + x2 [n − 1])
= a y1 [n] + b y2 [n] (5)
Eq. (5) shows that the linearity properties (additivity and homogeneity) are satisfied. Hence,

6
the given system is linear.
d) Causality:
Since the current output value y[n] depends on only the present and past values of the input
x[n], the system is causal. For example, y[0] = 0 + x[−1] = x[−1] and y[1] = x[1] + x[0]
e) Stability:
We assume that the input x[n] satisfies the condition (i.e. bounded input)
x[n] ≤ Mx < ∞; for all n; (6)
Hence
x[n − 1] ≤ Mx < ∞; for all n; (7)
We then find that
y[n] = n x[n] + x[n − 1]
≤ n x[n] + x[n − 1]
≤ n x[n] + x[n − 1]
≤ (|n| + 1)Mx (8)
From Eq. (8), we obtain
y[n] → ∞; for |n| → ∞; (9)
Eq. (9) shows that the output y[n] is not bounded for the bounded input x[n] for all n. Hence,
the given system is not BIBO (bounded input and bounded output) stable.

7
ii)
n
X
y[n] = x[k].
k=−∞

Following properties hold: Time invariant, Linear, Causal.


Proof: do it yourself

8
4) A digital communication link carries binary-coded words representing samples of an input signal
xa (t) = 3 cos(600πt) + 2 cos(1800πt).
The link is operated at 10, 000 bits/s and each input sample is quantized into 1024 different voltage
levels.
a) What are the sampling frequency and the folding frequency?
b) What is the Nyquist rate for the signal xa (t)?
c) What are the frequencies in the resulting discrete-time signal x[n]?
d) What is the resolution?
Solution:
Suppose
Fs = Sampling frequency
Fmax = Maximum frequency of the signal xa (t)
xmax = Maximum value of x[n] = xa (nT )
xmin = Minimum value of x[n] = xa (nT )
xmax − xmin = Dynamic range
b = Number of bits/sample
R = Bit rate bits/s
∆ = Resolution or the quantization step size
L = 2b = Number of quantization levels
Given
R = 10, 000 bits/s
L = 1024
For L = 1024 quantization levels
b = log2 (L) = log2 (1024) = 10 bits/sample
a) Bit rate is defined as
R = bFs bits/s

R
Fs = samples/s
b
10, 000 bits/s
=
10 bits/sample
= 1000 samples/s
The folding frequency is
Fs 1000
= = 500 Hz
2 2
b) The frequencies existing in the analog signal xa (t) = 3 cos(600πt) + 2 cos(1800πt) are
600π 1800π
F1 = = 300 Hz, F2 = = 900 Hz
2π 2π

9
Thus
Fmax = max{F1 , F2 }
= max{300 Hz, 900 Hz}
= 900 Hz
According to sampling theorem, the Nyquist rate FN is
FN = 2 Fmax = 2 × 900 = 1800 Hz
c) The frequencies in the resulting discrete-time signal x[n] are
F1 300
f1 = = = 0.3
Fs 1000

F2 900
f2 = = = 0.9
Fs 1000
As we know that the range of discrete-time frequency variable is
1 1
− <f <
2 2
But
1 1
f2 = 0.9 > ⇒ f2 = 2 × − 0.9 = 1 − 0.9 = 0.1
2 2
Hence,
x[n] = 3 cos(2πf1 n) + 2 cos(2πf2 n)
= 3 cos (2π(0.3)n) + 2 cos (2π(0.1)n)
= 3 cos(0.6πn) + 2 cos(0.2πn)
d) For n = 0
x[0] = 3 cos(0) + 2 cos(0)
=3+2
=5
For n = 15
x[15] = 3 cos(9π) + 2 cos(3π)
= −3 − 2
= −5
Thus
xmax = 5, xmin = −5

10
Resolution is defined as
xmax − xmin
∆=
L−1
5 − (−5)
=
1024 − 1
10
=
1023
= 0.0098
For Large L,
L−1∼
=L
Thus
xmax − xmin 10
∆∼
= = = 0.0098
L 1024

11
5) Consider a discrete-time LTI system initially at rest and described by the difference equation
1
y[n] − y[n − 1] = x[n].
2
a) Find the impulse response h[n] of this system.
b) Determine the output signal y[n] of this system for the input signal x[n] = u[n] − u[n − 3].
Solution:

a) Given
1
y[n] − y[n − 1] = x[n]
2
We have
x[n] = δ[n] −→ y[n] = h[n].

1; n=0
x[n] = δ[n] =
0; elsewhere
Since x[n] = 0 for n ≤ −1, the condition of initial rest implies that
y[n] = 0; n ≤ −1
For n = 0
1
y[0] − y[−1] = x[0]
2
1
y[0] − × 0 = 1
2
y[0] = 1
For n = 1
1
y[1] − y[0] = x[1]
2
1
y[1] − × 1 = 0
2
1
y[1] =
2
For n = 2
1
y[2] − y[1] = x[2]
2
1 1
y[2] − × = 0
2 2  
2
1
y[2] =
2
For n = 3
1
y[3] − y[2] = x[3]
2  2
1 1
y[3] − × =0
2 2
 3
1
y[3] =
2

12
For n = n
1
y[n] − y[n − 1] = x[n]
2 
n−1
1 1
y[n] − × =0
2 2
 n
1
y[n] =
2
Therefore, the impulse response h[n] is
 n
1
h[n] = u[n]
2
b) The input signal
x[n] = u[n] − u[n − 3] = δ[n] + δ[n − 1] + δ[n − 2]
Method-I
Recall
x[n] ∗ δ[n − n0 ] = x[n − n0 ]
The output signal y[n] is given as
y[n] = x[n] ∗ h[n]
= (δ[n] + δ[n − 1] + δ[n − 2]) ∗ h[h]
= δ[n] ∗ h[h] + δ[n − 1] ∗ h[h] + δ[n − 2] ∗ h[h]
= h[n] + h[n − 1] + h[n − 2]
 n  n−1  n−2
1 1 1
= u[n] + u[n − 1] + u[n − 2]
2 2 2
Method-II: Graphical Approach:
Convolution Sum

X ∞
X
y[n] = x[n] ∗ h[n] = x[k]h[n − k] = h[k]x[n − k]
k=−∞ k=−∞

Perform the following sequence to obtain y[n]:


i) Sketch both x[k] and h[k]as a function of k.
ii) Choose which signal to flip. Here, we flip h[k] to get h[−k].
iii) Shift h[−k] to the left such that the most left non-zero element of x[k] and the most right
element of h[n − k] are overlapping.
iv) Multiply x[k] and h[n − k] at each k and sum over all values of k.
v) Shift h[n − k] to the right to obtain y[n] by repeating the step above.
vi) Keep repeating step v) just above until h[n − k] completely sweeps through to the right so
that h[n − k] and x[k] do not have any overlaps.
Then, you get y[n] for the value n you chose.
Do it yourself.

For every disciplined effort there is a multiple reward. - Jim Rohn (1930-2009)

13

You might also like