63
CELLULAR COMMUNICATIONS DSP Intro

CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Embed Size (px)

Citation preview

Page 1: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

CELLULAR COMMUNICATIONS

DSP Intro

Page 2: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Signals: quantization and sampling

Page 3: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Signals are everywhere

Encode speech signal (audio compression)

Transfer encode signals using RF signal (modulation)

Detect antenna signal Pack several calls into a single RF signal

from the antenna (multiple access) Improve faded signal (equalization) Adjust transmitted signal power to save

battery

Page 4: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

What is signal?

Continuous signal Real valued-function of time x=x(t), t=0 is now,

t<0 is the past Can’t work with it in the computer But easy to analyze

Discrete signal A sequence s=s(n), n=0 is now Values are quantized (e.g. 256 possible values) Need a time scale: n=1 is 1ms, n=2 is 2 ms etc. Can process by computer (finite portion a time)

Page 5: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Discrete signal from continuous Sampling

Sample value of a continuous signal every fixed time interval

Quantization Represent the sampled value using fixed

number of levels (N=255)

Page 6: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Example:sampling

0 0sin(2 ) sin( )x f t w t 0 0sin(2 ) sin( )s f n t w n t

Page 7: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Example

Page 8: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Frequency Domain

Page 9: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

*almost* any wave from sine waves

Page 10: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Frequency domain

Can decompose *almost* every signal into sum of sinusoids multiplied by a *weight*

Frequently domain=*weights* of sinusoids

Example: Upper case letter for frequency domain X(0)=0,X(1)=1,X(2)=0.4,X(3)=0 X is the spectrum of x

( ) 1 2 0 0( ) ( ) sin(2 ) 0.4*sin(2 2 )sum nx x n x n f n t f n t

Page 11: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Example: Sawtooth

Frequency Domain X(k)=1/k

Page 12: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Spectrum of sawtooth

Page 13: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Example: Box

X(n)=1/n (n is odd), X(n)=0 (n is even)

Page 14: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Spectrum of a linear combination Spectrum of x1+x2 is

Spectrum of x1+ Spectrum of x2

Page 15: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Frequency Domain

*Almost* every good periodic function can be represented by

Two series (numbers) describe the function Recall Taylor expansion (polynomial base) Discreet Fourier Transform takes function

and gives it’s Fourier representation Inverse DFT….

Page 16: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Representing Fourier Series

Coefficient of cosines and sinus

Cosine amplitude and phase Still two series, not convenient

,k ka b

,k ka

Page 17: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

DFT summary

Can go back and forth from time-domain to frequency domain representation

Can be computed efficiently (FFT)

Signal Power in frequency and time domain (Parseval theorem)

Page 18: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Sampling theorem

Page 19: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Periodic Sampling

Discrete signals are obtained from continuous signals (acoustic/speech, RF) by sampling magnitude every fixed time period

How much should sampling period be for obtaining a good idea about the signal

Too much samples: need more CPU, power, clock etc.

Page 20: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Ambiguity problem

Page 21: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Ambiguity

Sample Frequency:

Digital sequence representing also represent infinitely many other sinusoids

1/s s sf t f

0 0 0( ) sin 2 sin 2 2 sin 2 ( )s s ss

kx n f nt f nt kn f nt

t

0( ) sin 2 ( )s sx n f kf nt

0f

0 sf kf

Page 22: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Aliasing

Suppose our signal is composed of sinusoids from 1kHz to 4KHz (with varying weights)

At sampling rate of 5 kHz we can discard 1kHz+5kHz and 4+5kHz as we know that signal has only up to 5kHz

At sampling rate of 2kHz we can distinguish between 1kHz and 3kHz which both are possible

Page 23: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Ambiguity in frequency domain

Page 24: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Nyquist sampling frequency

Signal band Avoid aliasing Nyquist sampling frequency Maximum frequency without aliasing

[ : ] [ : ]a b c h c hf f f f f f

a s b s b af f f f f f

2s hf f

2s

h

ff

Page 25: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Sampling low pass signals

A signal is within the known band of interest

But contains some noise with higher frequencies (above Nyquist frequency)

Spectrum of digital signal will be corrupted

Page 26: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Low Pass Filter

Page 27: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Time vs. Frequency Domain

Page 28: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Spectrum of the pulse

Page 29: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Time vs. Frequency

Short pulse in time domain->wide spectrum

Page 30: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Power Spectral Density(PSD)

2( ) ( )PSD f X f

Page 31: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

PSD and Separation of signals

Page 32: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Discrete systems

Page 33: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Discrete System

Example: ( ) 2 ( ) 1y n x n

Page 34: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Operation with signals

Can add and subtract two signal Graphical representation

Page 35: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Summation

Page 36: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Linear Systems

Simple but powerful Easy to implement

Page 37: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Example

Example 1Hz+3Hz sine waves

Page 38: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Frequency domain vs. Time Domain Analyze a discrete system in time

domain What it does to the sequence x(n)

Analyze a discrete system in frequency domain What it does to the spectrum

Change in coefficient of various sinusoids of a signal

Page 39: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Example:1Hz+3Hz

Page 40: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Nonlinear Example: 1Hz+3Hz

f(x1+x2)!=f(x1)+f(x2)

Page 41: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Non-linear systems

Might introduce additional sinusoids not present in input

Results from interaction between input sinusoids

Difficult to analyze Sometimes are used in practice We stick to linear systems for a while

Page 42: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Time-Invariant Systems

Has no absolute clock

Example:

Page 43: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Example

Page 44: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Unit Time Delay

Page 45: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Time-Delay

Feasible system can’t look into a future at n=0 can’t produce x’(0)=y(4) only at n=4, can output x’(0)=y(4)

Page 46: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

LTI: Linear Time Invariant

LTI is easy to analyze and build. Will focus on them

Page 47: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Analyzing LTI systems

Page 48: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

LTI systems

Linear Time-Invariant Recall linear algebra

A vector space has basis vectors Linear operator completely defined by its

behavior on basis vectors

LTI need to specify only on a single basis vector

( ) ( )n n n k n kS x y S x y

( ) ( ) ( )n n n nS ax by aS x bS y

Page 49: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Vector Space of Signals

Shifted Unit Impulse(SUI) signal

Basis for representation of the digital signals

1,( )

0, 0m

n mu n

n

Page 50: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

SUI are a basis

Page 51: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Representation

( ) ( ) ( )mm

x n x m u n

Page 52: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Impulse response

For time invariants systems

For linear systems

0 0( ( )) ( ) ( ( )) ( )m mS u n h n S u n h n

( ) ( ( )) ( ) ( ) ( ) ( ) ( ) ( )m mm m m

y n S x n S x m u n x m h n x m h n m

Page 53: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Finite Impulse Response

Filter

Impulse response

( ) ( 2) ( 1) ( )y n x n x n x n

( 1) 0

(0) 1

(1) 1

(2) 1

(3) 0

h

h

h

h

h

Page 54: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Infinite Impulse Response

1( ) ( 1) ( 1)

2( 1) 0

(1) 1/ 2

(2) 1/ 4

(3) 1/ 8

( ) 1/ 2n

y n x n y n

h

h

h

h

h n

Page 55: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Convolution with Finite Impulse

( ) ( ( )) ( ) ( ) ( ) ( ) ( ) ( )m mm m m

y n S x n S x m u n x m h n x m h n m

( ) (0) ( ) (1) (1 ) ... ( ) (0)y n x h n x h n x n h

Change Index

( ) ( ) (0) ( 1) (1) ... ( ) ( )y n x n k h x n k h x n h k

0

( ) ( ) ( )m

y n x n m h m x h

Page 56: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

LTI system

The output of the LTI system is the result of the convolution between the input and the impulse response

Page 57: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Convolution0

( ) ( ) ( )m

c n x n m h m x h

Page 58: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Convolution in Frequency Domain x(t), y(t) are signals X(f), Y(f) are their spectrum What is the spectrum C(f) of Convolution theorem C=X*Y

(multiplication)

Convolution in the time domain===Multiplication in the frequency domain

c x y

Page 59: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

What LTI does to a signal

Y=X*H Dump some sinusoids (|H(f)|<1) Boost other sinusoids (|H(f)|>1) Change phase of some sinusoids Never adds sinusoids that does not

existed in the input signal

y x h

Page 60: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Example: Moving average

Page 61: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Example: 3 points weighted

Page 62: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Example: simple avg,more points

Page 63: CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling

Magic 16 points filter