CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling.

Post on 23-Dec-2015

223 views 0 download

Tags:

Transcript of CELLULAR COMMUNICATIONS DSP Intro. Signals: quantization and sampling.

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

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)

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)

Example:sampling

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

Example

Frequency Domain

*almost* any wave from sine waves

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

Example: Sawtooth

Frequency Domain X(k)=1/k

Spectrum of sawtooth

Example: Box

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

Spectrum of a linear combination Spectrum of x1+x2 is

Spectrum of x1+ Spectrum of x2

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….

Representing Fourier Series

Coefficient of cosines and sinus

Cosine amplitude and phase Still two series, not convenient

,k ka b

,k ka

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)

Sampling theorem

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.

Ambiguity problem

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

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

Ambiguity in frequency domain

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

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

Low Pass Filter

Time vs. Frequency Domain

Spectrum of the pulse

Time vs. Frequency

Short pulse in time domain->wide spectrum

Power Spectral Density(PSD)

2( ) ( )PSD f X f

PSD and Separation of signals

Discrete systems

Discrete System

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

Operation with signals

Can add and subtract two signal Graphical representation

Summation

Linear Systems

Simple but powerful Easy to implement

Example

Example 1Hz+3Hz sine waves

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

Example:1Hz+3Hz

Nonlinear Example: 1Hz+3Hz

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

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

Time-Invariant Systems

Has no absolute clock

Example:

Example

Unit Time Delay

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)

LTI: Linear Time Invariant

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

Analyzing LTI systems

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

Vector Space of Signals

Shifted Unit Impulse(SUI) signal

Basis for representation of the digital signals

1,( )

0, 0m

n mu n

n

SUI are a basis

Representation

( ) ( ) ( )mm

x n x m u n

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

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

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

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

LTI system

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

Convolution0

( ) ( ) ( )m

c n x n m h m x h

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

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

Example: Moving average

Example: 3 points weighted

Example: simple avg,more points

Magic 16 points filter