14 views

Uploaded by wallhisg

- Signal Processing is Concerned With Improving the Quality of the Reading or Signal at the Output of a Measurement System
- 703 Pet 23
- Simulation of Power System Transient Disturbances
- Analog to Digital Conversion
- Data Converter SB v10 Iss7
- Lumi Track
- Main code lab 7
- xTRM_CPO_V1
- sampling
- Tutorial DAQ
- ED-2002-020 High Speed Mix Analog Input Output Module (4366).pdf
- Analysis of the Effects of Varying the Anti- Alias Filter in Kirchoff Pre- Stack Depth Migration
- 3rd Physics Periodics2016
- Presentation Intro AudioDSP
- simpleSDR
- Chapter 10
- IRJET- FPGA Implementation of a Wide Range Precise Temperature Monitoring System
- Mini Project Report-2
- IRJET-Plant Health Monitoring and Controlling of Environment in a Conservatorium
- Ch06 Hardware Components for Automation 14-210317

You are on page 1of 26

of Analog Signals

Lecture 5

Sampling and reconstruction of analog

signals

Analogy signals can be converted into discrete signals using

sampling and quantization operations: analogy-to-digital

conversion, or ADC

Digital signals can be converted into analog signals using a

reconstruction operation: digital-to-analogy conversion, or DAC

Using Fourier analysis, we can describe the sampling operation

from the frequency-domain view-point, analyze its effects and then

address the reconstruction operation.

We will also assume that the number of quantization levels is

sufficiently large that the effect of quantization on discrete signals

is negligible.

Sampling

Continuous-time Fourier transform and inverse CTFT

+

+

=

=

d e j X t x

dt e t x j X

t j

a a

t j

a a

) (

2

1

) (

) ( ) (

1. Absolutely integrable

2. Omega is an analogy frequency in radians/sec

Sampling

Sample x

a

(t) at sampling interval T

s

sec apart to obtain the discrete-

time signal x(n)

Let X(e

j

) be discrete-time Fourier transform of x(n).

X(e

j

) is a countable sum of amplitude-scaled, frequency-scaled,

and translated version of the Fourier transform X

a

(j)

) ( ) (

s a

nT x n x =

This is known as the aliasing formula

+

=

=

l

s s

a

s

j

l

T T

j X

T

e X

2 1

) (

The analog and digital frequencies

s

s

s

T

F

T w

1

=

=

F

s

: the sampling frequency, sam/sec

Amplitude scaled factor: 1/T

s

;

Frequency-scaled factor: =T

s

(=0~2)

Frequency-translated factor: 2k/T

s

;

+

=

=

l

s s

a

s

j

l

T T

j X

T

e X

2 1

) (

The discrete signal is an aliased

version of the corresponding

analog signal

It is possible to recover X

a

(j)

from X(e

j

), or x

a

(t) from x(n)

if the infinite replicas of X

a

(j)

do not overlap with each other

to form X(ejw).

This is true for band-limited

analog signals.

Suppose signal band is

limited to

0

,

If T

s

is small,

0

T

s

<, or

F

0

=

0

/2 < Fs/2=1/2T

s

Then the freq. Resp. of x(t)

is an infinite replica series

of its analog signal x

a

(t),

If T

s

is large,

0

T

s

>, or

F

0

=

0

/2 > Fs/2=1/2T

s

Then the freq. Resp. of x(t)

is a overlaped replica of its

analog signal x

a

(t), so

cannot be reconstructed

+

=

=

l

s s

a

s

j

l

T T

j X

T

e X

2 1

) (

Ban-limited signal

A signal is band-limited if there exists a finite radians frequency

0

such that X

a

(j ) is zero for | |>

0

.

The frequency F

0

=

0

/2pi is called the signal bandwidth in Hz

Referring to this picture, if pi>

0

T

s

, then

s s s s

a

s

jw

T T

w

T T

w

j X

T

e X

<

= ;

1

) (

Sampling Principle

A band-limited signal x

a

(t) with bandwidth F

0

can be

reconstructed from its sample values x(n)=x

a

(nT

s

) if the

sampling frequency F

s

=1/T

s

is greater than twice the

bandwidth F

0

of x

a

(t) ,

F

s

>2 F

0

.

Otherwise aliasing would result in x(n). The sampling rate of 2

F

0

for an analog band-limited signal is called the Nyquist rate.

After xa(t) is sampled, the highest anal og frequency that x(n)

represents is Fs/2 Hz (or = )

MATLAB implementation

Let t be the grid interval such that t <= Ts

Can be used as an array to simulate an analog signal

The Fourier transformrelation should also be approximated:

=

m

t m j

G

m

t m j

G a

e m x t t e m x j X ) ( ) ( ) (

) ( ) ( t m x m x

a G

=

Example 1

Let x

a

(t)=e

-1000|t|

+ = =

0

1000

0

1000

) ( ) ( dt e e dt e e dt e t x j X

t j t t j t t j

a a

2

1000

1

002 . 0

+

=

To evaluate X

a

(j) numerically, we have to approximate x

a

(t) by a

finite duration grid sequence x

G

(m)

Using the approximation e-5=0, x

a

(t) can be approximate by a finite

duration signal over -0.005 <= t <= 0.005

Xa(j) = 0 for >= 2(2000)

Hence, choosing

We can obtain xG(m) and then implement in MATLAB

5 5

10 25

) 2000 ( 2

1

10 5

= = t

-5 -4 -3 -2 -1 0 1 2 3 4 5

0

0.5

1

t in msec.

x

a

(

t

)

Analog S ignal

-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

0

0.5

1

1.5

2

F requency in K Hz

X

a

(

j

W

)

*

1

0

0

0

Continuous -time F ourier Trans form

Dt = 0. 00005;

t = - 0. 005: Dt : 0. 005;

xa = exp( - 1000*abs( t ) ) ;

%Cont i nuous- t i me Four i er Tr ansf or m

Wmax = 2*pi *2000;

K = 500; k = 0: 1: K;

W= k*Wmax/ K;

Xa = xa * exp( - j *t ' *W) * Dt ;

Xa = r eal ( Xa) ;

W= [ - f l i pl r ( W) , W( 2: 501) ] ; %Omega f r om- Wmax t o Wmax

Xa = [ f l i pl r ( Xa) , Xa( 2: 501) ] ;

subpl ot ( 1, 1, 1)

subpl ot ( 2, 1, 1) ; pl ot ( t *1000, xa) ;

xl abel ( ' t i n msec. ' ) ; yl abel ( ' xa( t ) ' )

t i t l e( ' Anal og Si gnal ' )

subpl ot ( 2, 1, 2) ; pl ot ( W/ ( 2*pi *1000) , Xa*1000) ;

xl abel ( ' Fr equency i n KHz' ) ; yl abel ( ' Xa( j W) *1000' )

t i t l e( ' Cont i nuous- t i me Four i er Tr ansf or m' )

To reduce the number of computation

we compute X

a

(j) over [0,4000] rad/sec

then duplicate it over [-4000,0] for plotting

purpose

Example 2a

Sample x

a

(t) in example 1 at F

s

= 5000 sam/sec to obtain x

1

(n)

Nyquist rate is 4000 sam/sec. F

s

= 5000 > 4000

No aliasing

%Anal og Si gnal

Dt = 0. 00005;

t = - 0. 005: Dt : 0. 005;

xa = exp( - 1000*abs( t ) ) ;

%Di scr et e- t i me Si gnal

Ts = 0. 0002; n = - 25: 1: 25;

x = exp( - 1000*abs( n*Ts) ) ;

%Di scr et e- t i me Four i er t r ansf or m

K = 500; k = 0: 1: K;

w = pi *k/ K;

X = x * exp( - j *n' *w) ;

X = r eal ( X) ;

w = [ - f l i pl r ( w) , w( 2: K+1) ] ;

X = [ f l i pl r ( X) , X( 2: K+1) ] ;

subpl ot ( 1, 1, 1)

subpl ot ( 2, 1, 1) ; pl ot ( t *1000, xa) ;

xl abel ( ' t i n msec. ' ) ; yl abel ( ' xa( t ) ' )

t i t l e( ' Di scr et e Si gnal ' ) ; hol d on

st em( n*Ts*1000, x) ; hol d of f

subpl ot ( 2, 1, 2) ; pl ot ( w/ pi , X) ;

xl abel ( ' Fr equency i n pi uni t s' ) ; yl abel ( ' X( w) ' )

t i t l e( ' Di scr et e- t i me Four i er Tr ansf or m' )

-5 -4 -3 -2 -1 0 1 2 3 4 5

0

0.5

1

t in msec.

x

a

(

t

)

Discrete Signal

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1

0

5

10

Frequency in pi units

X

(

w

)

Discrete-time Fourier Transform

Example 2b

Sample x

a

(t) in example 1 at F

s

= 1000 sam/sec to obtain x

1

(n)

Nyquist rate is 4000 sam/sec. F

s

= 1000 < 4000

Some aliasing

-5 -4 -3 -2 -1 0 1 2 3 4 5

0

0.5

1

t in msec.

x

a

(

t

)

Discrete Signal

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1

0

1

2

3

Frequency in pi units

X

(

w

)

Discrete-time Fourier Transform

%Anal og Si gnal

Dt = 0. 00005;

t = - 0. 005: Dt : 0. 005;

xa = exp( - 1000*abs( t ) ) ;

%Di scr et e- t i me Si gnal

Ts = 0. 001; n = - 5: 1: 5;

x = exp( - 1000*abs( n*Ts) ) ;

%Di scr et e- t i me Four i er t r ansf or m

K = 500; k = 0: 1: K;

w = pi *k/ K;

X = x * exp( - j *n' *w) ;

X = r eal ( X) ;

w = [ - f l i pl r ( w) , w( 2: K+1) ] ;

X = [ f l i pl r ( X) , X( 2: K+1) ] ;

subpl ot ( 1, 1, 1)

subpl ot ( 2, 1, 1) ; pl ot ( t *1000, xa) ;

xl abel ( ' t i n msec. ' ) ; yl abel ( ' xa( t ) ' )

t i t l e( ' Di scr et e Si gnal ' ) ; hol d on

st em( n*Ts*1000, x) ; hol d of f

subpl ot ( 2, 1, 2) ; pl ot ( w/ pi , X) ;

xl abel ( ' Fr equency i n pi uni t s' ) ; yl abel ( ' X( w) ' )

t i t l e( ' Di scr et e- t i me Four i er Tr ansf or m' )

Shape of X(e

j

) is different from X

a

(j)

Result of adding overlapping replicas

Reconstruction

Impulse train

conversion

Ideal lowpass

filter

) (n x

) (t x

a

L L + + + + + =

+

=

) ( ) 1 ( ) ( ) 0 ( ) ( ) 1 ( ) ( ) (

s s

n

s

T t x t x T t x nT t n x

+

=

=

n

s s a

nT t F n x t x )] ( [ sinc ) ( ) (

sinc(x) = sin(x)/x

Lowpass filter band-limited to the [-Fs/2,Fs/2] band

The ideal interpolation is not practically feasible because the entire

system is noncausal and hence not realizable.

Interpolating formula

Reconstruction of band-limited signal

Practical D/A converters

Zero-order-hold (ZOH) interpolation:

In this interpolation a given sample value is held for the

sample interval until the next sample is received.

It can be obtained by filtering the impulse train through an

interpolating filter of the form

=

+ =

otherwise 0

0 1

) (

) 1 ( ), ( ) (

0

s

s s a

T t

t h

T n n nT n x t x

The resulting signal is a piecewise-constant (staircase) waveform which

requires an appropriately designed analog post-filter for accurate

waveform reconstruction.

ZOH Post-Filter

) (n x

) (t x

a

) (

t x

a

First-order-hold (FOH) interpolation

In this case the adjacent samples are joined

by straight lines.

+

=

otherwise 0

2 1

0 1

) (

1 s s

s

s

s

T t T

T

t

T t

T

t

t h

Cubic-order-hold (COH) interpolation

This approach uses spline interpolation for a smoother, but not

necessarily more accurate, estimate of the analog signal between

samples.

Hence this interpolation does not require an analog post-filter

The smoother reconstruction is obtained by using a set of

piecewise continuous third-order polynomials called cubic splines

Where {

i

(n), 0 <= i <= 3}are polynomial coefficients determined

by using least squares analysis on the sample values

s s

s s s a

T n t nT

nT t n nT t n nT t n n t x

) 1 (

, ) )( ( ) )( ( ) )( ( ) ( ) (

3

3

2

2 1 0

+

+ + + =

Matlab Implementation

N=n1: n2; t =t 1: t 2; Fs=1/ Ts; nTs = n*Ts

Xa = x*si nc( Fs*( ones( l engt h( n) , 1) *t - nTs *ones( 1, l engt h( t ) ) ) )

sinc function which generates the sin(x)/x can be use to

implement interpolation

If {x(n), n1 <= n <= n2}is given, to interpolate x

a

(t) with grid

interval t

+

=

=

n

s s a

nT t F n x t x )] ( [ sinc ) ( ) (

2 1

, )] ( [ sinc ) ( ) (

2

1

t t m t nT t m F n x t m x

n

n n

s s a

=

=

Example 3

From the sample x(n) in example 2a, reconstruct x

a

(t)

x(n) was obtained by sampling x

a

(t) at Ts = 1/Fs = 0.0002 sec.

We will use the grid spacing 0.00005 sec over -0.005 <= t <= 0.005,

which gives x(n) over -25 <= n <= 25

-5 -4 -3 -2 -1 0 1 2 3 4 5

0

0. 1

0. 2

0. 3

0. 4

0. 5

0. 6

0. 7

0. 8

0. 9

1

t in ms ec .

x

a

(

t

)

R ec ons truc ted S ignal from x 1(n) us ing s inc func tion

Ts = 0. 0002; Fs = 1/ Ts; n = - 25: 1: 25; nTs = n*Ts;

x = exp( - 1000*abs( nTs) ) ;

%Anal og Si gnal r econst r uct i on

Dt = 0. 00005;

t = - 0. 005: Dt : 0. 005;

xa = x * si nc( Fs*( ones( l engt h( nTs) , 1) *t - nTs' *ones( 1, l engt h( t ) ) ) ) ;

%check

er r or = max( abs( xa - exp( - 1000*abs( t ) ) ) )

%Pl ot s

pl ot ( t *1000, xa) ;

xl abel ( ' t i n msec. ' ) ; yl abel ( ' xa( t ) ' )

st em( n*Ts*1000, x) ; hol d of f

er r or =

0. 0363

Example 4

From the sample x(n) in example 2b, reconstruct x

a

(t)

x(n) was obtained by sampling x

a

(t) at Ts = 1/Fs = 0.001 sec.

We will use the grid spacing 0.00005 sec over -0.005 <= t <= 0.005,

which gives x(n) over -5 <= n <= 5

Ts = 0. 001; Fs = 1/ Ts; n = - 5: 1: 5; nTs = n*Ts;

x = exp( - 1000*abs( nTs) ) ;

%Anal og Si gnal r econst r uct i on

Dt = 0. 00005;

t = - 0. 005: Dt : 0. 005;

xa = x * si nc( Fs*( ones( l engt h( nTs) , 1) *t - nTs' *ones( 1, l engt h( t ) ) ) ) ;

%check

er r or = max( abs( xa - exp( - 1000*abs( t ) ) ) )

%Pl ot s

pl ot ( t *1000, xa) ;

xl abel ( ' t i n msec. ' ) ; yl abel ( ' xa( t ) ' )

st em( n*Ts*1000, x) ; hol d of f

er r or =

0. 1852

-5 -4 -3 -2 -1 0 1 2 3 4 5

-0. 2

0

0. 2

0. 4

0. 6

0. 8

1

1. 2

t in ms ec .

x

a

(

t

)

R ec ons truc ted S ignal from x 2(n) us ing s inc func tion

Example 5a

Reconstruct signal from the samples in example 2 using ZOH

interpolation

It is a crude one and the further processing of analog signal is

neccessary

Ts = 0. 0002; n = - 25: 1: 25; nTs = n*Ts;

x = exp( - 1000*abs( nTs) ) ;

%Anal og Si gnal r econst r uct i on usi ng st ai r s

st ai r s( nTs*1000, x) ;

xl abel ( ' t i n msec. ' ) ; yl abel ( ' xa( t ) ' )

st em( n*Ts*1000, x) ; hol d of f

-5 -4 -3 -2 -1 0 1 2 3 4 5

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

t in ms ec.

x

a

(

t

)

Recons tructed S ignal from x1(n) us ing z ero-order-hold

Example 5a

Reconstruct signal from the samples in example 2 using FOH

interpolation

It appears to be good but a carefully observation near t=0

reveals that the peak is not carefully reproduce

In general, if the sampling frequency is much higher than the

Nyquist rate, FOH provides acceptable reconstruction

Ts = 0. 0002; n = - 25: 1: 25; nTs = n*Ts;

x = exp( - 1000*abs( nTs) ) ;

%Anal og Si gnal r econst r uct i on usi ng pl ot s

pl ot ( nTs*1000, x) ;

xl abel ( ' t i n msec. ' ) ; yl abel ( ' xa( t ) ' )

st em( n*Ts*1000, x) ; hol d of f

-5 -4 -3 -2 -1 0 1 2 3 4 5

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

t in ms ec.

x

a

(

t

)

Recons tructed S ignal from x1(n) us ing firs t-order-hold

Example 6a

Reconstruct the sample in example 2a using spline function

Maximum error is lower due to nonideal interpolation and the

fact that x

a

(t) is nonband-limited

The ideal interpolation suffers more from time-limitedness

The plot is excellent

Ts = 0. 0002; n = - 25: 1: 25; nTs = n*Ts;

x = exp( - 1000*abs( nTs) ) ;

%Anal og Si gnal r econst r uct i on

Dt = 0. 00005;

t = - 0. 005: Dt : 0. 005;

xa = spl i ne( nTs, x, t ) ;

pl ot ( t *1000, xa) ;

xl abel ( ' t i n msec. ' ) ; yl abel ( ' xa( t ) ' )

st em( n*Ts*1000, x) ; hol d of f

%check

er r or = max( abs( xa - exp( - 1000*abs( t ) ) ) )

er r or =

0. 0317

-5 -4 -3 -2 -1 0 1 2 3 4 5

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

t in msec.

x

a

(

t

)

Reconstructed S ignal from x1(n) using cubic spline function

Example 6b

Reconstruct the sample in example 2b using spline function

Maximum error is high and cannot be attributed to the

nonideal interpolation or nonband-limitedness of x

a

(t)

The reconstructed signal differs from the actual one

Ts = 0. 001; n = - 5: 1: 5; nTs = n*Ts;

x = exp( - 1000*abs( nTs) ) ;

%Anal og Si gnal r econst r uct i on

Dt = 0. 00005;

t = - 0. 005: Dt : 0. 005;

xa = spl i ne( nTs, x, t ) ;

%check

er r or = max( abs( xa - exp( - 1000*abs( t ) ) ) )

%Pl ot s

pl ot ( t *1000, xa) ;

xl abel ( ' t i n msec. ' ) ; yl abel ( ' xa( t ) ' )

st em( n*Ts*1000, x) ; hol d of f

er r or =

0. 1679

-5 -4 -3 -2 -1 0 1 2 3 4 5

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

t in msec.

x

a

(

t

)

Reconstructed Signal from x2(n) using cubic spline function

- Signal Processing is Concerned With Improving the Quality of the Reading or Signal at the Output of a Measurement SystemUploaded byRykudou Zudyn
- 703 Pet 23Uploaded byrodriguesvasco
- Simulation of Power System Transient DisturbancesUploaded byAhmed58seribegawan
- Analog to Digital ConversionUploaded bykalyan499
- Data Converter SB v10 Iss7Uploaded bysef370
- Lumi TrackUploaded byJutzul
- Main code lab 7Uploaded byWilliam Huang
- xTRM_CPO_V1Uploaded bymansour14
- samplingUploaded byBedanga Kashyap
- Tutorial DAQUploaded byPuspendra Singh Yadav
- ED-2002-020 High Speed Mix Analog Input Output Module (4366).pdfUploaded byRaj Chavan
- Analysis of the Effects of Varying the Anti- Alias Filter in Kirchoff Pre- Stack Depth MigrationUploaded byBobby Siswanto
- 3rd Physics Periodics2016Uploaded byOGBAGA ONOME JAMES
- Presentation Intro AudioDSPUploaded bysebastian nasi
- simpleSDRUploaded bybilal
- Chapter 10Uploaded byJeremy Hensley
- IRJET- FPGA Implementation of a Wide Range Precise Temperature Monitoring SystemUploaded byIRJET Journal
- Mini Project Report-2Uploaded byRemya Ramakrishnan
- IRJET-Plant Health Monitoring and Controlling of Environment in a ConservatoriumUploaded byIRJET Journal
- Ch06 Hardware Components for Automation 14-210317Uploaded byMONICA YUNITA ,
- C_2008_06_KCSUploaded byHajri Mohamed
- AE2105 Exam 2012 Jan23Uploaded bytmkhoyan
- 1EZ52_0EUploaded byNguyễn Thế Đạt
- Ads1220 Adc 24 BitUploaded byMirza Tufekcic
- InstrumentationUploaded byfpttmm
- adc0804 Data SheetUploaded byRicardo Alan Vargas Gamboa
- Mini Project Report-2Uploaded byRemya Ramakrishnan
- The Basics of Analog SensorUploaded bymatrixworld20
- AI 374070a 02Uploaded byLuis Herrera
- T-CON Schematic (1).pdfUploaded byMahmoued Yasin

- WCDMA Air InterfaceUploaded byArindam Bhattacharaya
- Capture EffectUploaded byramez1
- Cambium PTP650 Precsion Timing WhitePaperUploaded byAla'a Abdulla
- Power Line NoiseUploaded byGeroldo 'Rollie' L. Querijero
- OMB021120 BTS3900 GU V100R002 Hardware Description ISSUE 1.00Uploaded byTrongNghia Jsc
- FTTHUploaded byBayu Bentar Kumbara
- 76XXUploaded byDuy Le
- Data Sheet 1260 APUploaded bynaelibrahim
- 802.11 Wireless LANsUploaded byclu5t3r
- RF Power Control and Handovers in BSCUploaded byBang Ben
- kchiboUploaded bygreekd
- WiMAX Lisboa May 2011 - CelPlan TechnologiesUploaded byleonhardk
- Chapter9Uploaded byapi-19794302
- Ch4Uploaded byMalu Mohan
- mwe labUploaded byPrashanth Reddy
- a138_DVB-C2Uploaded byminodora
- GSM.pptUploaded byraufthegreat
- Performance Analysis of Massive MIMO With and Without Hardware ImpairmentsUploaded byXiangyu Liu
- Card 3Uploaded byPedro Bortot
- 17535 - Digital CommunicationUploaded byJaya Rajesh Raaj
- Helix AntennasUploaded bySwethaSingampalli
- Enhancement in Divide and Conquer Scheme to Increase Efficiency of the NetworksUploaded byijsret
- Electronics_ Working Principle Television (TV)Uploaded bySuman Das
- Zte Gpon Rfp Template_20150320Uploaded byAnonymous GK9mHwnr
- DSP BIT Chapter0Uploaded byYuewen Gao
- lecturenotes2018 part2Uploaded byapi-277396867
- VEICULAR 43 175MHzUploaded byZamfir Geo
- Spectrum Shaping for Interference Management in Cognitive Radio NetworksUploaded bysahathermal6633
- Acomparison of Seismic Instrument Noise Coherence Analysis - T. RinglerUploaded byzorrito56
- PIM Distortion Effects and TestingUploaded byzillion