About this Course Subject: ◦Digital Signal Processing ◦EE 541 Textbook ◦Discrete Time Signal...

Preview:

Citation preview

About this Course Subject:

◦ Digital Signal Processing◦ EE 541

Textbook◦ Discrete Time Signal Processing

◦ A. V. Oppenheim and R. W. Schafer, Prentice Hall, 3rd Edition

Reference book◦ Probability and Random Processes with Applications to Signal Processing

◦ Henry Stark and John W. Woods, Prentice Hall, 3rd Edition

Course website◦ http://sist.shanghaitech.edu.cn/faculty/luoxl/class/2014Fall_DSP/DSPclass.htm◦ Syllabus, lecture notes, homework, solutions etc.

About this Course Grading details:

◦ Homework: (Weekly) 20%◦ Midterm: 30%◦ Final: 30%◦ Project: 20%

20%

30%30%

20%

Final Score

HomeworkMidtermFinalProject

Matlab Powerful software you will like for the rest of your time in ShanghaiTech SIST

Ideal for practicing the concepts learnt in this class and doing the final projects

About the Lecturer Name: Xiliang Luo (罗喜良 )

Research interests:◦ Wireless communication◦ Signal processing◦ Information theory

More information:◦ http://sist.shanghaitech.edu.cn/faculty/luoxl/

About TAName: 裴东Contact: peidong@shanghaitech.edu.cn

Office hour: Friday, 6-8pm,

Some survey background

coolest thing you have ever done

what you want to learn from this course?

Lecture 1: Introduction to DSPXILIANG LUO

2014/9

Signals and Systems Signal

something conveying information speech signal video signal communication signal

continuous time

discrete time digital signal : not only time is discrete, but also is the amplitude!

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6

-1

-0.5

0

0.5

1

Am

plitu

de

Time (secs)

chirp

Discrete Time Signals Mathematically, discrete-time signals can be expressed as a sequence of numbers

In practice, we obtain a discrete-time signal by sampling a continuous-time signal as:

where T is the sampling period and the sampling frequency is defined as 1/T

Speech Signal

Question:1. What is the sampling frequency?2. Are we losing anything here by sampling?

Some Basic Sequences

Unit Sample Sequence

Unit Step Sequence

Some Basic Sequences

Sinusoidal Sequence x

Question:1. Is discrete sinusoidal periodic?2. What is the period?

Question:Cos(pi/4xn) vs Cos(7pi/4xn), which One has faster oscillation?

Some Basic Sequences Sinusoidal Sequence

x Question:Cos(pi/4xn) vs Cos(7pi/4xn), which One has faster oscillation?

0 2 4 6 8 10 12 14 16 18 20-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

/4

7/4

a transformation or operator mapping discrete time input to discrete time output

Example: ideal delay system y[n] = x[n-d]

Example: moving average y[n] = average{x[n-p],….,x[n+q]}

Discrete-Time Systems

Memoryless System

Definition: output at time n depends only on the input at the sample time n

Question:Are the following memoryless?1. y[n] = x[n-d]2. y[n] = average{x[n-p], …, x[n+q]}

Linear System

Definition: systems satisfying the principle of superposition

Additivity Property

Scaling Property

Superposition Principle

Time-Invariant System A.k.a. shift-invariant system: a time shift in the input causes a corresponding time shift in the output:

𝑇 {𝑥 [𝑛] }=𝑦 [𝑛 ] 𝑇 {𝑥 [𝑛−𝑑] }=𝑦 [𝑛−𝑑 ]

Question:Are the following time-invariant?1. y[n] = x[n-d]2. y[n] = x[Mn]

The output of the system at time n depends only on the input sequence at time values before or at time n;

Causality

Is the following system causal?y[n] = x[n+1] – x[n]

Stability: BIBO Stable A system is stable in the Bounded-Input, Bounded-Output (BIBO) sense if and only if every bounded input sequence produces a bounded output sequence.

A sequence is bounded if there exists a fixed positive finite value B such that:

|𝑥 [𝑛 ]|≤𝐵<∞

LTI Systems LTI : both Linear and Time-Invariant systems

convenient representation: completely characterized by its impulse response

significant signal-processing applications

Impulse response

LTI System

𝑥 [𝑛 ]=∑𝑘

𝑥 [𝑘 ]𝛿 [𝑛−𝑘]

h [𝑛 ]=𝑇 {𝛿 [𝑛 ]}

𝑦 [𝑛 ]=𝑇 {∑𝑘

𝑥 [𝑘 ]𝛿 [𝑛−𝑘]}=∑𝑘

𝑥 [𝑘 ]𝑇 {𝛿 [𝑛−𝑘 ] ¿¿=∑𝑘

𝑥 [𝑘 ]h [𝑛−𝑘]

LTI System LTI system is completely characterized by its impulse response as follows:

h [𝑛 ]=𝑇 {𝛿 [𝑛 ]}

𝑦 [𝑛 ]=∑𝑘

𝑥 [𝑘 ]h [𝑛−𝑘 ]convolution sum

≜𝑥 [𝑛 ]∗h[𝑛]

Properties of LTI Systems Commutative:

Distributive:

Associative:

𝑥 [𝑛 ]∗h [𝑛 ]=h [𝑛 ]∗ 𝑥[𝑛]

𝑥 [𝑛 ]∗ (h1 [𝑛 ]+h2 [𝑛 ] )=𝑥 [𝑛 ]∗h1 [𝑛 ]+𝑥 [𝑛 ]∗h2[𝑛]

(𝑥 [𝑛 ]∗h1 [𝑛 ])∗h2 [𝑛 ]=𝑥 [𝑛 ]∗(h1 [𝑛 ]∗h2[𝑛])

Properties of LTI SystemsEquivalent systems:

Properties of LTI SystemsEquivalent systems:

Stability of LTI System LTI systems are stable if and only if the impulse response is absolutely summable:

sufficient condition need to verify bounded input will have also bounded output under this condition

necessary condition need to verify: stable system the impulse response is absolutely summable equivalently: if the impulse response is not absolutely summable, we can prove the system is

not stable!

∑𝑘=−∞

+∞

¿ h[𝑘]∨¿<∞¿

Stability of LTI System Prove: if the impulse response is not absolutely summable, we can define the following sequence:

x[n] is bounded clearly when x[n] is the input to the system, the output can be found to be the

following and not bounded:

𝑥 [𝑛 ]={ h∗ [−𝑛]¿ h[−𝑛]∨¿ , h [−𝑛 ] ≠0¿

0 , h [−𝑛 ]=0

𝑦 [0 ]=∑❑

𝑥 [𝑘 ] h [−𝑘 ]=∑❑

❑ |h [𝑘 ]|2

¿ h[𝑘]∨¿¿

Some Convolution Examples

Matlab cmd: conv()

1 2 3 4 5 6 7 8 9 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1 2 3 4 5 6 7 8 9 100

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 2 4 6 8 10 12 14 16 18 200

1

2

3

4

5

6

7

8

9

10

what is the resulting shape?

Some Convolution Examples

0 2 4 6 8 10 12 14 16 18 200

1

2

3

4

5

6

7

8

9

10

0 2 4 6 8 10 12 14 16 18 200

1

2

3

4

5

6

7

8

9

10

0 5 10 15 20 25 30 35 400

100

200

300

400

500

600

700what is the resulting shape?

Some Convolution Examples

0 2 4 6 8 10 12 14 16 18 200

1

2

3

4

5

6

7

8

9

10

0 20 40 60 80 100 120-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

0 20 40 60 80 100 120-30

-20

-10

0

10

20

30

40

sin (𝑛𝜋8

)

what is the freq here?

Frequency Domain Representation Eigenfunction for LTI Systems

complex exponential functions are the eigenfunction of all LTI systems

𝑦 [𝑛 ]=𝑒 𝑗 𝜔𝑛∗h [𝑛 ]=∑𝑘

h [𝑘 ]𝑒 𝑗 𝜔 (𝑛−𝑘)=𝑒 𝑗𝜔 𝑛×∑𝑘

h [𝑘 ]𝑒− 𝑗 𝜔𝑘

𝐻 (𝑒 𝑗 𝜔)=∑𝑘

h [𝑘 ]𝑒− 𝑗𝜔 𝑘

𝑦 [𝑛 ]=𝐻 (𝑒 𝑗 𝜔 )𝑒 𝑗𝜔 𝑛

Frequency Response of LTE Systems For an LTI system with impulse response h[n], the frequency response is defined as:

In terms of magnitude and phase:

𝐻 (𝑒 𝑗 𝜔)=∑𝑘

h [𝑘 ]𝑒− 𝑗𝜔 𝑘

𝐻 (𝑒 𝑗 𝜔)=|𝐻 (𝑒 𝑗𝜔 )|𝑒∠𝐻 (𝑒 𝑗 𝜔)

magnitude response

phase response

Frequency Response of Ideal Delay

h [𝑛 ]=𝛿 [𝑛−𝑛𝑑]

𝐻 (𝑒 𝑗 𝜔 )=∑𝑛

𝛿 [𝑛−𝑛𝑑 ]𝑒− 𝑗 𝜔𝑛=𝑒− 𝑗 𝜔𝑛𝑑

-4 -3 -2 -1 0 1 2 3 4-8

-6

-4

-2

0

2

4

6

8

phas

e re

spon

se

-2

Frequency Response for a Real IR For real impulse response, we can have:

Response to a sinusoidal of an LTI with real impulse response

𝐻 (𝑒− 𝑗 𝜔 )=𝐻∗(𝑒 𝑗 𝜔)why?

𝑥 [𝑛 ]=Acos(𝜔0𝑛+𝜙)=𝐴2𝑒 𝑗 (𝜙+𝜔0𝑛)+

𝐴2𝑒− 𝑗 (𝜙+𝜔0𝑛)

𝑦 [𝑛 ]= 𝐴2𝐻 (𝑒 𝑗𝜔 𝑜)𝑒 𝑗 (𝜙+𝜔0𝑛)+

𝐴2𝐻 (𝑒− 𝑗 𝜔0)𝑒− 𝑗 (𝜙+𝜔0𝑛)

¿𝐴2

∨𝐻 (𝑒 𝑗𝜔 𝑜)∨𝑒 𝑗 (𝜙+𝜔0𝑛+∠𝐻 (𝑒 𝑗 𝜔𝑜 ) )+𝐴2

∨𝐻 (𝑒 𝑗𝜔 0 )∨𝑒− 𝑗 (𝜙+𝜔0𝑛+∠𝐻 (𝑒 𝑗 𝜔𝑜 ))

¿|𝐻 (𝑒 𝑗𝜔 𝑜)|𝐴cos (𝜔0𝑛+𝜙+∠𝐻 (𝑒 𝑗𝜔 0))

Frequency Response Property Frequency response is periodic with period 2π

fundamentally, the following two discrete frequencies are indistinguishable

We only need to specify frequency response over an interval of length 2π : [- π, + π];

In discrete time: low frequency means: around 0 high frequency means: around +/- π

Frequency Response of Typical Filters

low pass

high pass

band-stop

band-pass

Representation of Sequences by FT Many sequences can be represented by a Fourier integral as follows:

x[n] can be represented as a superposition of infinitesimally small complex exponentials

Fourier transform is to determine how much of each frequency component is used to synthesize the sequence

𝑥 [𝑛 ]= 12𝜋 ∫

−𝜋

𝜋

𝑋 (𝑒 𝑗 𝜔 )𝑒 𝑗𝜔𝑛𝑑𝜔

𝑋 (𝑒 𝑗𝜔 )=∑𝑛

𝑥[𝑛]𝑒− 𝑗𝜔𝑛

Synthesis: Inverse Fourier Transform

Analysis: Discrete-Time Fourier Transform

Prove it!

Convergence of Fourier Transform A sufficient condition: absolutely summable

it can be shown the DTFT of absolutely summable sequence converge uniformly to a continuous function

Square Summable A sequence is square summable if:

For square summable sequence, we have mean-square convergence:

∑𝑛=−∞

|𝑥 [𝑛 ]|2<∞

Ideal Lowpass Filter

DTFT of Complex Exponential Sequence Let a Fourier Transform function be:

Now, let’s find the synthesized sequence with the above Fourier Transform:

Symmetry Properties of DTFT Conjugate Symmetric Sequence

Conjugate Anti-Symmetric Sequence

Any sequence can be expressed as the sum of a CSS and a CASS as

𝑥𝑒 [𝑛 ]=𝑥𝑒∗ [−𝑛]

𝑥𝑜 [𝑛 ]=−𝑥𝑜∗ [−𝑛 ]

𝑥 [𝑛 ]=𝑥𝑒 [𝑛 ]+𝑥𝑜[𝑛]

Real even sequence

Real odd sequence

How?

Symmetry Properties of DTFT DTFT of a conjugate symmetric sequence is conjugate symmetric

DTFT of a conjugate anti-symmetric sequence is conjugate anti-symmetric

Any real sequence’s DTFT is conjugate symmetric

Fourier Transform Theorems Time shifting and frequency shifting theorem

Prove it!

Fourier Transform Theorems Time Reversal Theorem

Prove it!

Fourier Transform Theorems Differentiation in Frequency Theorem

Prove it!

Fourier Transform Theorems Parseval’s Theorem: time-domain energy = freq-domain energy

HW Problem 2.84: Prove a more general format

Fourier Transform Theorems Convolution Theorem

Prove it!

Fourier Transform Theorems Windowing Theorem

Prove it!

Discrete-Time Random Signals Wide-sense stationary random process (assuming real)

Consider an LTE system, let x[n] be the input, which is WSS, the output is denoted as y[n], we can show y[n] is WSS also

𝜙𝑥𝑥 [𝑛 ,𝑚 ]=𝐸 [𝑥 [𝑛 ] 𝑥 [𝑛+𝑚] ]=𝜙𝑥𝑥[𝑚] autocorrelation function

Discrete-Time Random Signals WSS in, WSS out

Discrete-Time Random Signals WSS in, WSS out

Discrete-Time Random Signals WSS in, WSS out

Power Spectrum Density

band-pass

White Noise Very widely utilized concept in communication and signal processing

A white noise is a signal for which:

From its PSD, we can see the white noise has equal power distribution over all frequency components

Often we will encounter the term: AWGN, which stands for: additive white Gaussian noise the underlying random noise is Gaussian distributed

𝜙𝑥𝑥 [𝑚 ]=𝜎𝑥2 𝛿 [𝑚 ]

Review LTI system

Frequency Response

Impulse Response

Causality

Stability

Discrete-Time Fourier Transform

WSS

PSD

Homework Problems 2.11 Given LTI frequency response, find the output when input a sinusoidal sequence …

2.17 Find DTFT of a windowed sequence …

2.22 Period of output given periodic input …

2.40 Determine the periodicity of signals …

2.45 Cascade of LTE systems …

2.51 Check whether system is linear, time-invariant …

2.63 Find alternative system …

2.84 General format of Parseval’s theorem …

Try to use Matlab to plot the sequences and results when required

Next Week Z – Transform

Please read the textbook Chapter 3 in advance!

Recommended