Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

ECEN 644 – ADVANCED DIGITAL SIGNAL

http://www.comm.utoronto.ca/~dkundur/course/discrete-time-systems/
PROCESSING

HOMEWORK #1 - SOLUTIONS
1.2
For a sinusoid of the form x(n ) = A cos(ω ⋅ n + θ ) , the frequency can be expressed as
ω
f = .

Definition B1 from the textbook states:


“A discrete-time sinusoid is periodic only if its frequency f 0 is a rational number.”

Furthermore, the fundamental period of a sinusoid when it exists is equal to N where


k
f0 = and k, N are relatively prime.
N

(a) cos(0.01π ⋅ n )
ω 0.01π 1
f = = = is rational and (1,200) are relatively prime.
2π 2π 200

cos(0.01π ⋅ n ) is periodic with fundamental period N = 200.

30
(b) cos π ⋅ n
105
ω 30π 1 1
f = = ⋅ = is rational and (1,7) are relatively prime.
2π 105 2π 7

30
cos π ⋅ n is periodic with fundamental period N = 7.
105

(c) cos(3π ⋅ n )
ω 3π 3
f = = = is rational and (3,2) are relatively prime.
2π 2π 2

cos(3π ⋅ n ) is periodic with fundamental period N = 2.

(d) sin (3 ⋅ n )
ω 3 3
f = = = is not rational.
2π 2π 2π

sin (3 ⋅ n ) is non-periodic.

62
(d) sin π ⋅ n
10
ω 62π 1 31
f = = ⋅ = is rational and (31,10) are relatively prime.
2π 10 2π 10

62
sin π ⋅ n is periodic with fundamental period N = 10.
10

1.4

(a) As mentioned previously the fundamental period of a sinusoid when it exists is equal to
ω k
N where f 0 = = and k, N are relatively prime.
2π N

2π ⋅ kn ω k
For s k (n ) = exp j , k = 0,1,2,... , we have f = = .
N 2π N

Suppose now that k and N are not relatively prime, i.e. ∃α such that α = GCD (k , N ) and
k = k '⋅α and N = N '⋅α where k’ and N’ are relatively prime. We can now rewrite:
ω k k '⋅α k'
f0 = = = = .
2π N N '⋅α N '

As k’ and N’ are relatively prime, the fundamental period of the signals


2π ⋅ kn N
s k (n ) = exp j , k = 0,1,2,... is N p = N ' =
N GCD (k , N )

(b) Fundamental period for N = 7

N 7 7 7 7 7 7 7 7
k 0 1 2 3 4 5 6 7
GCD(k,N) 7 1 1 1 1 1 1 7
Np 1 7 7 7 7 7 7 1

(c) Fundamental period for N = 16

N 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
k 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
GCD(k,N) 16 1 2 1 4 1 2 1 8 1 2 1 4 1 2 1 16
Np 1 16 8 16 4 16 8 16 2 16 8 16 4 16 8 16 1
1.6

1
Because x(n ) is a discrete-time sinusoid obtained by sampling at a rate Fs = a
T
1
continuous-time sinusoid x a (t ) with fundamental period Tp = , we find x(n ) as follows:
F0
x a (t ) = A cos(2πF0 t + θ ) x(n ) = x a (nT ) = A cos(2π ⋅ F0 nT + θ )
F0
= A cos 2π ⋅ n +θ
Fs
T
= A cos 2π ⋅ n +θ
Tp

T T k
(a) If = f is rational i.e., = , we have straight from definition B1 from the
Tp Tp N
textbook that x(n ) is periodic.

k
(b) x(n ) is periodic implies f rational i.e., f = . N here represents the period in
N
samples which means that to get the period in seconds N must be multiplied by T.
k T
Then we get Td = N ⋅ T = T but f = and therefore the final result:
f Tp

Tp
Td = k T = kT p
T

(c) Supposing the fundamental period Tp of x(n ) verifies Td = kT p , it implies that


T k
Td = NT = kTp or = = f . f is therefore rational i.e., from the result obtained
Tp N
in (a), x(n ) is periodic.

1.7

(a) To avoid any aliasing problem, it is known that a signal must be sampled as at least
twice its maximum frequency : Fs ≥ 2 ⋅ Fmax . In this case Fmax = 10kHz and
therefore the sample frequency should be at least 20kHz.
Fs ≥ 20kHz

(b) If Fs = 8kHz and F1 = 5kHz the sampled signal becomes

F1 5 3
x(n ) = cos 2π ⋅ n = cos(2π ⋅ f ⋅ n ) = cos π n or cos π n
Fs 4 4
From the equality F0 = f ⋅ Fs , we obtain F0 = 3 kHz and we can therefore conclude that
for Fs = 8 kHz, the frequency F1 = 5 kHz is aliased to 3 kHz.

(c) If Fs = 8kHz and F2 = 9kHz the sampled signal becomes


F 9 1
x(n ) = cos 2π ⋅ 2 n = cos(2π ⋅ f ⋅ n ) = cos π n or cos π n
Fs 4 4
From the equality F0 = f ⋅ Fs , we obtain F0 = 1 kHz and we can therefore conclude that
for Fs = 8 kHz, the frequency F2 = 9 kHz is aliased to 1 kHz.

2.2

Original Signal:

x(n)-- 1/2

0
-10-9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
n
(a)

1
x(n-2)

-- 1/2

0
-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
n

(b)

1
x(4-n)

-- 1/2

0
-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
n
(c)

x(n+2) 1

-- 1/2

0
-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
n

(d)

1
x(n)u(2-n)

0
-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
n
(e)

x(n-1)d(n-3) 1

0
-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
n

(f)

1
x(n2)

-- 1/2

0
-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
n
(g)

x e(n)=[x(n)+x(-n)]/2 1

-- 1/2

-- 1/4

0
-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
n

(h)

-- 1/2
x o(n)=[x(n)-x(-n)]/2

-- 1/4

-- -1/4

-- -1/2

-1
-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10
n
2.4

The even and odd parts of a signal x(n ) can be found using the following formulas:

xeven (n ) =
[x(n ) + x(− n )] xodd (n ) =
[x(n ) − x(− n )]
2 2

Where xeven (n ) being the even part verifies xeven (− n ) = xeven (n ) and xodd (n ) being the odd
part verifies xodd (− n ) = − xodd (n ) .

Therefore any x(n ) can be written as x(n ) = xeven (n ) + xodd (n ) i.e., any signal can be
decomposed into an even and an odd component and this decomposition is unique.

Example:
{ }
x(n ) = 2 3 4 5 6

x(− n ) = {6 5 4 3 2}

x (n ) = {4 4 4 4 4}
even

x (n ) = {− 2 − 1 0 1 2}
odd

2.5

The energy of a real-valued signal x(n ) is defined as:



E= x 2 (n )
n = −∞
From the previous problem, it can also be expressed by a combination of the even and odd
parts of the signal as follows:
∞ ∞
E= x 2
(n ) = [xeven (n ) + xodd (n )]2
n = −∞ n = −∞
∞ ∞ ∞
= 2
x even (n ) + 2
xodd (n ) + 2 ⋅ xeven (n ) ⋅ xodd (n )
n = −∞ n = −∞ n = −∞

As it can be seen, the term 2 ⋅ xeven (n ) ⋅ xodd (n ) in the previous equation should be equal
n = −∞
to zero if we believe the problem formulation. Let’s try to prove it. Because the summation
is symmetric in n, we have:

∞ ∞
2⋅ xeven (n ) ⋅ x odd (n ) =2 ⋅ xeven (− m ) ⋅ xodd (− m )
n = −∞ m = −∞

We know that xeven (n ) being the even part verifies xeven (− n ) = x even (n ) and xodd (n ) being
the odd part verifies xodd (− n ) = − x odd (n ) , therefore we can write:

∞ ∞
2⋅ xeven (− m ) ⋅ x odd (− m ) = 2 ⋅ xeven (m ) ⋅ (− x odd (m ))
m = −∞ m = −∞

= − 2⋅ xeven (n ) ⋅ xodd (n )
n = −∞

∞ ∞
We then obtain the equality 2 ⋅ xeven (n ) ⋅ xodd (n ) = − 2 ⋅ xeven (n ) ⋅ x odd (n ) which proves
n = −∞ n = −∞

that 2 ⋅ xeven (n ) ⋅ xodd (n ) = 0 and finally:
n = −∞

∞ ∞ ∞
E= x 2 (n ) = 2
x even (n ) + 2
xodd (n )
n = −∞ n = −∞ n = −∞

2.7

Recall that:

- A system is static if the output at time n depends only on inputs at the same time n.

- A system y (n ) = F [x(n )] is linear if and only if it verifies:

F [a1 x1 (n ) + a 2 x 2 (n )] = a1 F [x1 (n )] + a 2 F [x 2 (n )]

- A system is time invariant if and only if


F F
x(n ) → y (n ) x(n − k ) → y (n − k ), ∀k time shift.
- A system is causal if it depends only on past or present inputs.

- A system is (BIBO) stable if when the input x(n ) is bounded, the output y (n ) is also
bounded.

(a) y (n ) = cos[x(n )]

- the output at time n depends only on the input at time n, the system is static.

- the system is nonlinear, e.g., x(n ) = π y (n ) = cos[π ] = −1 but


1 π π 1 1
x1 (n ) = x(n ) = y1 (n ) = cos = 0 ≠ y (n ) = −
2 2 2 2 2

- the system is time invariant :


n→n−k y (n ) = cos[x(n )] → y (n − k ) = cos[x(n − k )], ∀k

- the system is static and therefore is also causal.

- the output of the system is always bounded therefore it is obviously stable.

The system y (n ) = cos[x(n )] is static, nonlinear, time invariant, causal and stable.

(g) y (n ) = x(n )

- the output at time n depends only on the input at time n, the system is static.

- the system is nonlinear, e.g.,


x1 (n ) = 1, x 2 (n ) = −1 y (n ) = x1 (n ) + x 2 (n ) = 0 ≠ y1 (n ) + y 2 (n ) = x1 (n ) + x 2 (n ) = 2

- the system is time invariant : n → n − k y (n ) = x(n ) → y (n − k ) = x(n − k ) , ∀k

- the system is static and therefore is also causal.

- x(n ) ≤ M < ∞ y (n ) = x(n ) ≤ y (n ) ≤ M < ∞ therefore it is obviously stable.

The system y (n ) = x(n ) is static, nonlinear, time invariant, causal and stable.
(j) y (n ) = x(2n )

- the output at time n depends on inputs at time future time 2n, the system is dynamic.

- the system is linear (trivial)


y1 (n ) = x1 (2n ), y 2 (n ) = x 2 (2n ) y (n ) = [a1 x1 (2n ) + a 2 x 2 (2n )] = a1 y1 (n ) + a 2 y 2 (n )

- the system is time variant : y (n − k ) = x(2(n − k )) = x(2n − 2k ) ≠ x(2n − k )

- the system depends on future inputs and therefore is noncausal.

- x(n ) ≤ M < ∞ y (n ) = x(2n ) ≤ y (n ) ≤ M < ∞ therefore it is obviously stable.

The system y (n ) = x(2n ) is dynamic, linear, time variant, noncausal and stable.

x(n ) if x(n ) ≥ 0
(k) y (n ) =
0 if x(n ) < 0

- the output at time n depends only on the input at time n, the system is static.

- the system is nonlinear x1 (n ) = 2, x 2 (n ) = −1 y1 (n ) = 2, y 2 (n ) = 0 but


y (n ) = F [x1 (n ) + x 2 (n )] = F [1] = 1 ≠ y1 (n ) + y 2 (n ) = 2

- the system is time invariant :


x(n ) if x(n ) ≥ 0 x(n − k ) if x(n − k ) ≥ 0
n→n−k y (n ) = → y (n − k ) = , ∀k
0 if x(n ) < 0 0 if x(n − k ) < 0

- the system is static and therefore is also causal.

- x(n ) ≤ M < ∞ y (n ) ≤ x(n ) ≤ M < ∞ therefore it is obviously stable.

x(n ) if x(n ) ≥ 0
The system y (n ) = is static, nonlinear, time invariant, causal and
0 if x(n ) < 0
stable.

You might also like