0% found this document useful (0 votes)
87 views26 pages

Lecture 3 PDF

This document discusses key concepts in digital signal processing including: 1. Energy and power in discrete signals - A signal has finite energy if the total energy is bounded, finite power if the average power is bounded, and is neither if these conditions are not met. Examples are provided to classify signals. 2. Properties of linear and time-invariant systems - A system is linear if the output of a weighted sum of inputs equals the weighted sum of individual outputs. It is time-invariant if a time-shifted input results in a time-shifted output. 3. Causality of systems - A causal system has output that depends only on current and past input values, while a noncausal system depends on

Uploaded by

Ahmed Mohamed
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)
87 views26 pages

Lecture 3 PDF

This document discusses key concepts in digital signal processing including: 1. Energy and power in discrete signals - A signal has finite energy if the total energy is bounded, finite power if the average power is bounded, and is neither if these conditions are not met. Examples are provided to classify signals. 2. Properties of linear and time-invariant systems - A system is linear if the output of a weighted sum of inputs equals the weighted sum of individual outputs. It is time-invariant if a time-shifted input results in a time-shifted output. 3. Causality of systems - A causal system has output that depends only on current and past input values, while a noncausal system depends on

Uploaded by

Ahmed Mohamed
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/ 26

Digital Signal Processing ECE 222

MEC222

Chapter One
Introduction to Digital Signals Processing

Associate Professor/ Mohamed Saber


Lecture 3
27-3-2023
4. Energy and Power Discrete Signals

Discrete
Signals

Energy Signal
Power Signal Neither Energy nor Power Signal
If and only if If and only if
If previous conditions not met.
 0 < 𝐸𝐸 < ∞  0 < 𝑃𝑃 < ∞
 𝑃𝑃 = 0  𝐸𝐸 = ∞  𝐸𝐸 = ∞ 𝑎𝑎𝑎𝑎𝑎𝑎 𝑃𝑃 = 0
Or
 𝐸𝐸 = 0 𝑎𝑎𝑎𝑎𝑎𝑎 𝑃𝑃 = ∞

2
4. Energy and Power Discrete Signals

The total energy in the discrete signal x(n) is E and mathematically written as

𝐸𝐸 = � 𝑥𝑥 𝑛𝑛 2

𝑛𝑛=−∞

The average power in the discrete signal x(n) is P and is written mathematically as

𝑁𝑁
1 2
𝑃𝑃 = lim � 𝑥𝑥 𝑛𝑛
𝑁𝑁→∞ 2𝑁𝑁 + 1
𝑛𝑛=−𝑁𝑁
N: fundamental period
3
Example 13
Consider the following finite discrete signals:
1) 𝑥𝑥 𝑛𝑛 = −𝛿𝛿 𝑛𝑛 + 2𝛿𝛿 𝑛𝑛 − 1 − 2𝛿𝛿(𝑛𝑛 − 2)
2) x(n)={1,0,-1}

Find the energy in both signals.


Solution

2- The second signal x(n)


1- The first signal x(n) can be written as
x(n)={1,0,-1}
x(n)={-1,2,2}
The energy in the signal is then
The energy in the signal is then
2 1
2 2 2 2
𝐸𝐸 = � 𝑥𝑥 𝑛𝑛 2
= −1 2
+ 2 2
+ −2 2
=9 𝐸𝐸 = � 𝑥𝑥 𝑛𝑛 = 1 + 0 + −1 =2
𝑛𝑛=0 𝑛𝑛=−1

This means that x(n) has finite energy.


4
Example 14
𝑥𝑥 𝑛𝑛 = 2 −1 𝑛𝑛
Consider the discrete signals 𝑢𝑢(𝑛𝑛) Find the energy and the power in x(n).

Solution
 The energy in the signal is

𝐸𝐸 = � 2 −1 𝑛𝑛 2 = 4 1+1 + ⋯ =∞
𝑛𝑛=0

 The power in the signal is

𝑥𝑥 𝑛𝑛 = (2, −2,2, −2,2, −2, . . )

It is a periodic signal with fundamental period N=2

1 1 4(𝑁𝑁+1)
𝑃𝑃 = lim ∑𝑁𝑁
𝑛𝑛=−𝑁𝑁 𝑥𝑥 𝑛𝑛 2
= lim 4 ∑𝑁𝑁
𝑛𝑛=0 1 = lim =2
𝑁𝑁→∞ 2𝑁𝑁+1 𝑁𝑁→∞ 2𝑁𝑁+1 𝑁𝑁→∞ 2𝑁𝑁+1

Therefore, x(n) has finite power and is a power signal.


5
Example 15

Find the energy in the signal: 1


𝑥𝑥 𝑛𝑛 = , 𝑛𝑛 ≥ 1
𝑛𝑛

Solution

The energy is given by


∞ 2 2 2
1 1 1
𝐸𝐸 = � = 1 2+ + +⋯
𝑛𝑛 2 3
𝑛𝑛=1

𝜋𝜋2
which converges to .
6

This means that x(n) has finite energy.

6
Discrete time System

 In this section, we study:

 Linear time-invariant
 Causal systems
 Time-invariance
 Stability of system

7
1.1 Linear Discrete Systems

A linear system is illustrated in next Figure,


 where 𝑦𝑦1 (𝑛𝑛) is the system output using an input 𝑥𝑥1 (𝑛𝑛),
 and 𝑦𝑦2 (𝑛𝑛) the system output with an input 𝑥𝑥2 (𝑛𝑛)

The system is linear if :


The system output due to the weighted sum inputs 𝛼𝛼𝑥𝑥1 𝑛𝑛 + 𝛽𝛽𝑥𝑥2 (𝑛𝑛) is equal to the same weighted sum of the
individual outputs obtained from their corresponding inputs, that is, 𝑦𝑦 𝑛𝑛 = 𝛼𝛼𝑦𝑦1 𝑛𝑛 + 𝛽𝛽𝑦𝑦2 (𝑛𝑛)

8
Example 15

Check the linearity of the following system 𝑦𝑦 𝑛𝑛 = 10 𝑥𝑥(𝑛𝑛)


Solution
𝑦𝑦1 𝑛𝑛 = 10 𝑥𝑥1 (𝑛𝑛)
𝑦𝑦2 𝑛𝑛 = 10 𝑥𝑥2 (𝑛𝑛)

For an input:
𝑥𝑥 𝑡𝑡 = 𝛼𝛼𝑥𝑥1 𝑛𝑛 + 𝛽𝛽𝑥𝑥2 (𝑛𝑛)

The output will be


𝑦𝑦 𝑛𝑛 = 10[𝛼𝛼𝑥𝑥1 𝑛𝑛 + 𝛽𝛽𝑥𝑥2 (𝑛𝑛)] 1

We get 𝛼𝛼𝑦𝑦1 𝑛𝑛 + 𝛽𝛽𝑦𝑦2 𝑛𝑛 and Check the condition

𝛼𝛼𝑦𝑦1 𝑛𝑛 + 𝛽𝛽𝑦𝑦2 𝑛𝑛 = 10𝛼𝛼𝑥𝑥1 𝑛𝑛 + 10𝛽𝛽𝑥𝑥2 (𝑛𝑛) 2


1 = 2

∴ The system is linear 9


Example 15

Check the linearity of the following system 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 2 (𝑛𝑛)

Solution
𝑦𝑦1 𝑛𝑛 = 𝑥𝑥12 (𝑛𝑛)
𝑦𝑦2 𝑛𝑛 = 𝑥𝑥22 (𝑛𝑛)

For an input:
𝑥𝑥 𝑡𝑡 = 𝛼𝛼𝑥𝑥1 𝑛𝑛 + 𝛽𝛽𝑥𝑥2 (𝑛𝑛)

The output will be


𝑦𝑦 𝑛𝑛 = 𝛼𝛼𝑥𝑥1 𝑛𝑛 + 𝛽𝛽𝑥𝑥2 𝑛𝑛 2 1

We get 𝛼𝛼𝑦𝑦1 𝑛𝑛 + 𝛽𝛽𝑦𝑦2 𝑛𝑛 and Check the condition

𝛼𝛼𝑦𝑦1 𝑛𝑛 + 𝛽𝛽𝑦𝑦2 𝑛𝑛 = 𝛼𝛼𝑥𝑥12 𝑛𝑛 + 𝛽𝛽𝑥𝑥22 (𝑛𝑛) 2


1 ≠ 2

∴ The system is non linear 10


Time Invariance

A time-invariant system is illustrated in next figure, where 𝑦𝑦1 𝑛𝑛 is the system output for the input 𝑥𝑥1 (𝑛𝑛)

If the system is time invariant and 𝑦𝑦1 (𝑛𝑛) is the system output due to the input 𝑥𝑥1 𝑛𝑛 , then the shifted system
input 𝑥𝑥1 (𝑛𝑛 − 𝑛𝑛0 ) will produce a shifted system output 𝑦𝑦1 (𝑛𝑛 − 𝑛𝑛0 ) by the same amount of time 𝑛𝑛0 .

11
Example 15
Check the time invariance of the following system 𝑦𝑦 𝑛𝑛 = 3 𝑥𝑥(𝑛𝑛 − 4)

Solution

Apply a shift with 𝑛𝑛0 to the whole equation

𝑦𝑦 𝑛𝑛 − 𝑛𝑛0 = 3𝑥𝑥(𝑛𝑛 − 𝑛𝑛0 − 4) 1

Apply a shift with 𝑛𝑛0 to the input 𝑥𝑥 𝑛𝑛 only

𝑦𝑦 𝑛𝑛 = 3𝑥𝑥(𝑛𝑛 − 𝑛𝑛0 − 4) 2

1 = 2

∴ The system is time invariant

12
Example 15
Check the time invariance of the following system 𝑦𝑦 𝑛𝑛 = 2𝑛𝑛 𝑥𝑥(𝑛𝑛 − 5)

Solution

Apply a shift with 𝑛𝑛0 to the whole equation

𝑦𝑦 𝑛𝑛 − 𝑛𝑛0 = 2 𝑛𝑛 − 𝑛𝑛0 𝑥𝑥(𝑛𝑛 − 𝑛𝑛0 − 5) 1

Apply a shift with 𝑛𝑛0 to the input 𝑥𝑥 𝑛𝑛 only

𝑦𝑦 𝑛𝑛 = 2𝑛𝑛𝑛𝑛(𝑛𝑛 − 𝑛𝑛0 − 5) 2

1 ≠ 2

∴ The system is not time invariant


or
The system is time varying

13
Causality

 A causal system is the one in which the output 𝑦𝑦(𝑛𝑛) at time n depends only on:
 The current input 𝑥𝑥(𝑛𝑛) at time n,
 and its past input sample values such as 𝑥𝑥 𝑛𝑛 − 1 , 𝑥𝑥(𝑛𝑛 − 2)

 A Noncausal system is the one in which the output 𝑦𝑦(𝑛𝑛) at time n depends only on:

 future input values such as 𝑥𝑥 𝑛𝑛 + 1 , 𝑥𝑥(𝑛𝑛 + 2

The noncausal system cannot be realized in real time.

14
Example 15

Determine whether the systems


a) 𝑦𝑦 𝑛𝑛 = 0.5𝑥𝑥 𝑛𝑛 + 2.5𝑥𝑥 𝑛𝑛 − 2 , 𝑓𝑓𝑓𝑓𝑓𝑓 𝑛𝑛 ≥ 0
b) 𝑦𝑦 𝑛𝑛 = 0.25𝑥𝑥 𝑛𝑛 − 1 + 0.5𝑥𝑥 𝑛𝑛 + 1 − 0.4𝑦𝑦 𝑛𝑛 − 1 , 𝑓𝑓𝑓𝑓𝑓𝑓 𝑛𝑛 ≥ 0

Are causal
Answer

a) Since for 𝑛𝑛 ≥ 0, the output y(n) depends on the current input x(n) and its past value 𝑥𝑥(𝑛𝑛 − 2) the
system is causal.

a) Since for 𝑛𝑛 ≥ 0, the output y(n) depends on the current input x(n) and its future value 𝑥𝑥(𝑛𝑛 + 1) the
system is noncausal.

15
Example 15

If x(n) is given as X(n)={1,1,1} and the output y(n) is y(n)={1,1/2,1/4}

Is this system causal?


Answer

The first sample of the input has appeared at n = 0, as does the first sample of the output.
Therefore, the system is causal.

16
2.3 Systems with Memory

 If at any value of n, y(n) depends totally on x(n) at that particular value, then in such a case, we say the system
is without memory. Otherwise the system is with memory.

Example 7

2
Consider the input–output relation. 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 Is the system with or without memory?

Solution

For any value of n, y(n) depends on x(n) at that particular value. If we look at the output at n = 4 then we look at the
input at n = 4 as well. In this case, the system is without memory.

17
Example 8

Consider the input–output relation. 𝑦𝑦 𝑛𝑛 = 𝑛𝑛𝑛𝑛(𝑛𝑛 − 1) Is the system with or without memory?

Solution

The output y(n) at n = 0 depends on x(n) at n = −1. Therefore, the system is with memory.

18
2.7 Stable System
 The signal x(n) is considered bounded if |x(n)| < β < ∞ for all n, where β is a real number.
 A system is said to be BIBO (bounded-input bounded-output) stable if and when the input is bounded the
output is also bounded.
 y(n), the output, is bounded if |y(n)| < β < ∞.
𝑀𝑀−1
Example 11 Consider the system 𝑦𝑦 𝑛𝑛 = � 𝑥𝑥(𝑛𝑛 − 𝑘𝑘) and assume that x(n) is bounded. Is the system stable?
𝑘𝑘=0

Solution

If x(n) is bounded, this implies that 𝑥𝑥 𝑛𝑛 < 𝛽𝛽

But a shifted version of x(n) is also bounded for x(n) is bounded. Therefore,
𝑀𝑀−1

𝑦𝑦 𝑛𝑛 = � 𝑥𝑥 𝑛𝑛 − 𝑘𝑘 ≤ 𝑀𝑀𝑀𝑀
𝑘𝑘=0

and the system is BIBO.


19
Example 12 𝑀𝑀−1

Consider that x(n) is bounded and applied to a system where y(n) is 𝑦𝑦 𝑛𝑛 = 𝑛𝑛 � 𝑥𝑥(𝑛𝑛 − 𝑘𝑘)
obtained as 𝑘𝑘=0

Is the system BIBO?

Solution

Since x(n) is bounded, we have |x(n)| < β. We also know that a shifted version of x(n) is also bounded. Thus,

𝑀𝑀−1

𝑦𝑦 𝑛𝑛 = 𝑛𝑛 � 𝑥𝑥 𝑛𝑛 − 𝑘𝑘 ≤ 𝑛𝑛𝑛𝑛𝑛𝑛
𝑘𝑘=0

However, as n approaches infinity, y(n) will grow without bounds and the system is not BIBO.

20
3.3 Difference Equations and Impulse Responses

Format of the Difference Equation

A causal, linear, time-invariant system can be described by a difference equation having the following general form:

𝑦𝑦 𝑛𝑛 + 𝑎𝑎1 𝑦𝑦 𝑛𝑛 − 1 + ⋯ + 𝑎𝑎𝑁𝑁 𝑦𝑦 𝑛𝑛 − 𝑁𝑁 = 𝑏𝑏0 𝑥𝑥 𝑛𝑛 + 𝑏𝑏1 𝑥𝑥 𝑛𝑛 − 1 + ⋯ + 𝑏𝑏𝑀𝑀 𝑥𝑥(𝑛𝑛 − 𝑀𝑀)

where 𝑎𝑎1 , 𝑏𝑏1 , 𝑎𝑎𝑁𝑁 , 𝑏𝑏𝑁𝑁 … are the coefficients of the difference equation. Previous equation can also be written as

𝑦𝑦 𝑛𝑛 = −𝑎𝑎1 𝑦𝑦 𝑛𝑛 − 1 − ⋯ − 𝑎𝑎𝑁𝑁 𝑦𝑦 𝑛𝑛 − 𝑁𝑁 + 𝑏𝑏0 𝑥𝑥 𝑛𝑛 + 𝑏𝑏1 𝑥𝑥 𝑛𝑛 − 1 + ⋯ + 𝑏𝑏𝑀𝑀 𝑥𝑥(𝑛𝑛 − 𝑀𝑀)

or

𝑁𝑁 𝑀𝑀

𝑦𝑦 𝑛𝑛 = − � 𝑎𝑎𝑖𝑖 𝑦𝑦 𝑛𝑛 − 𝑖𝑖 + � 𝑏𝑏𝑗𝑗 𝑥𝑥(𝑛𝑛 − 𝑗𝑗)


𝑖𝑖=1 𝑗𝑗=0

21
Example 12

Given the difference equation

𝑦𝑦 𝑛𝑛 = 0.25𝑦𝑦 𝑛𝑛 − 1 + 𝑥𝑥(𝑛𝑛)

identify the nonzero system coefficients.

Answers

𝑏𝑏0 = 1 𝑎𝑎1 = −0.25

22
Example 12

Given a linear system described by the difference equation

𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 0.5 𝑥𝑥(𝑛𝑛 − 1)

determine the nonzero system coefficients.

Answers

𝑏𝑏0 = 1 𝑏𝑏1 = 0.5

23
Sheet 3

1 Compute the signal energy and signal power for the discrete-time signals
1 𝑛𝑛
a) 𝑥𝑥 𝑛𝑛 =
4
𝑢𝑢(𝑛𝑛) b) 𝑥𝑥 𝑛𝑛 = 𝑒𝑒 𝑗𝑗10𝑛𝑛 𝑢𝑢(𝑛𝑛)

2 Check the linearity of the following systems

𝑅𝑅2 2
a) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 b) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥(𝑛𝑛) c) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥(𝑛𝑛)
𝑅𝑅1 +𝑅𝑅2
2𝑥𝑥 𝑛𝑛 +1

3 Check the time invariance of the following systems

a) y(n) = cos(x(n)). b) y(n) = x(n)cos(n). c) 𝑦𝑦 𝑛𝑛 = 𝑛𝑛𝑒𝑒 −𝑛𝑛 𝑥𝑥(𝑛𝑛)

24
Sheet 3

4 Let the input x(n) be as x(n)={1,0,1,0}


Let this signal be the input to a system where the output was recorded as
y(n)={1,1,0,1,0}
Is the system causal?

5 Determine the causality for each of the following linear systems

a) 𝑦𝑦 𝑛𝑛 = 0.5𝑥𝑥 𝑛𝑛 + 20𝑥𝑥 𝑛𝑛 − 2 − 0.1𝑦𝑦(𝑛𝑛 − 1)

b) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 + 2 − 0.4 𝑦𝑦(𝑛𝑛 − 1)

c) 𝑦𝑦 𝑛𝑛 = 𝑥𝑥 𝑛𝑛 − 1 + 0.5 𝑦𝑦(𝑛𝑛 + 2)

25
Sheet 3

6 Check weather each of the following systems is linear and time invariant :

a) 𝑦𝑦 𝑛𝑛 = 0.5 𝑛𝑛 𝑥𝑥 𝑛𝑛 + 1
b) 𝑦𝑦 𝑛𝑛 = 0.5 𝑛𝑛 cos(2𝑥𝑥 𝑛𝑛 )
c) 𝑦𝑦 𝑛𝑛 = sin 𝑛𝑛 − 𝑥𝑥(𝑛𝑛)

7 Consider the following systems for n ≥ 0:

a) 𝑦𝑦 𝑛𝑛 = 0.5 𝑛𝑛 𝑥𝑥 𝑛𝑛

b) 𝑦𝑦 𝑛𝑛 = 𝑛𝑛 0.5 𝑛𝑛 𝑥𝑥 𝑛𝑛

If x(n) is bounded, what about y(n)?

26

You might also like