# Moving from continuous- to discrete- bob/signals2016Winter/Signals_&_Systems_2016... · PDF fileMoving from continuous- to discrete-time ... Discrete Fourier transform (DFT) ... Discrete-time

• View
217

3

Embed Size (px)

### Text of Moving from continuous- to discrete-...

• Moving from continuous- to discrete-time

Sampling ideas Uniform, periodic sampling rate, e.g. CDs at 44.1KHz

First we will need to consider periodic signals in order to appreciate how to interpret discrete-time signals as representative of continuous-time

Fourier series and transforms

Discrete-time Fourier transform (DTFT)

Discrete Fourier transform (DFT) & the fast Fourier transform (FFT)

Aliasing and signal reconstruction

Discrete-time signals then discrete-time systems Matlab tools and digital signal processing

Nothing on digital (finite bit-length) signals

MAE143A Signals & Systems Winter 2016 1

• Sampled signals discrete time

For computer use we need to sample signals Most commonly this is periodic sampling every T seconds we take a sample of the continuous signal This yields a sequence

A continuous-time signal is a function of time t A discrete-time signal is a sequence indexed by t

T is the sampling period (sec)

1/T is the sample rate (Hz)

Often we also quantize the samples to yield a digital signal of a fixed number of bits representation

This is a subject for the next course

MAE143A Signals & Systems Winter 2016 2

xn = x(nT )

• Analog-to-digital conversion

Signal conditioning Filtering (anti-aliasing), offset, ranging

Track and hold circuit Enabled by the rising edge trigger Holds the signal at the latched value

Analog-to-digital converter Converts held signal to 8-bit, 16-bit, 24-bit digital

Computer coordinates sampling, storage, 1/T sec MAE143A Signals & Systems Winter 2016 3

Electronic Signal

Conditioner Real-world signal

Track & hold Circuit ADC C

• Ideal sampling of signals

Continuous-time signal x(t) Continuous values of x, t

Discrete-time signal xn Continuous x, integer n A sequence

Sampled-data signal xs(t) Continuous x, t Modeled by a pulse train

MAE143A Signals & Systems Winter 2016 4

t

x(t)

t

xs(t)

0 T 2T 3T 4T 5T 6T 7T -T -2T

xn

0 1 2 3 4 5 6 7 -1 -2 n

xs(t) =1X

n=1xn(t nT ) = x(t)

1X

n=1(t nT )

• The Fourier transform (Roberts Chap 10)

Generalization of the Fourier series to non-periodic function only one single, very long period

X() is like the line spectrum with zero spacing between harmonic elements

Still represents the signal as a sum of exponentials Requires absolute integrability of x(t)- finite energy

Inverse Fourier transform

MAE143A Signals & Systems Winter 2016 5

T ! 1

X() =

Z 1

1x(t)ejt dt

x(t) =1

2

Z 1

1X(!)ej!t d!

• The Fourier transform - example

Two-sided decaying exponential

MAE143A Signals & Systems Winter 2016 6

X(!) =

Z 1

1e

|t|5 ej!t dt

=

Z 0

1e

t5j!t dt+

Z 1

0e

t5j!t dt

=1

j! 15+

1

j! + 15

|X(!)| =25

!2 + 125

x(t) = e|t|5, t 2 (1,1)

• The Fourier and Laplace transforms

For a one-sided signal x(t)with Laplace transform

Note that this is a signal property It mimics the Laplace transform and frequency response relationship for causal systems

The interest in Fourier transforms is in the infinite-time response to periodic inputs

Special Fourier transforms

MAE143A Signals & Systems Winter 2016 7

X(!) = X (s)|s=j!

X (s)

Y (!) = H(j!)U(!), H(!) = F(h(t))

F [(t)] = 1, F [cos!0t] = [(! !0) + (! + !0)]F  = 2(!), F [sin!0t] = j[(! !0) + (! + !0)]

• Bandlimited signals

Signals, x(t), whose Fourier transform, X(), is zero for frequencies outside a value, the bandwidth, B, i.e.

is referred to as bandlimited

A periodic signal with line spectrum zero outside the bandwidth B is also referred to as bandlimited

Bandlimited implies a level of smoothness

Fourier series: finite power, periodic

Fourier transform: finite energy, one-shot

MAE143A Signals & Systems Winter 2016 8

X(!) = 0 for {! > B} [ {! < B}

• Fourier transform of a sampled signal

The spectrum of a perfectly sampled signal xs(t) is a repeated and scaled version of X()

Bandlimited signal bandwidth Bs/2

Expect trouble in reconstruction of x(t) from xs(t)

MAE143A Signals & Systems Winter 2016 9

X()

Xs()

s 2s-s 0

X()

Xs()

s 2s-s 0

• Reconstructing sampled bandlimited signals

Reconstruction of the original signal from samples

We can reconstruct using an ideal lowpass filter This only works if

is called the Nyquist sampling frequency

MAE143A Signals & Systems Winter 2016 10

Xs()

s 2s-s 0B -B

H(!)x(t)xs(t)

Lowpass Filter Bandwidth B

!s 2B

A signal of bandwidth B can be reconstructed completely and exactly from the sampled signal if the sampling frequency s is greater than 2B

Nyquists Sampling Theorem

!s = 2B

• Sampling and reconstruction

If the continuous-time signal is bandlimited to B and we sample faster than the Nyquist frequency

Then we can exactly reconstruct the original signal from the sample sequence

Conversely: if we sample at or more slowly than the Nyquist frequency then we cannot reconstruct the original signal from the samples alone

We might have other information that helps the reconstruction. Without such extra information we suffer from Aliasing some frequencies masquerading as others

MAE143A Signals & Systems Winter 2016 11

• Aliasing

Sampling rate is less than the Nyquist rate Spectra overlap in sampled signal Impossible to disentangle

Signals from above s/2 masquerade as signals of a lower frequency

This is what happens to wagon wheels in western movies

fs=30Hz but the passing rate of the spokes is greater than this

Dopplegnger and impersonation

Alias: a false or assumed identity

Samuel Langhorne Clemens alias Mark Twain

5.5KHz sampled at 10KHz a.k.a. 4.5KHz

MAE143A Signals & Systems Winter 2016 12

• Aliasing II

MAE143A Signals & Systems Winter 2016 13

• Dealing with aliasing

Anti-aliasing filters Before we sample a signal x(t) at fs we lowpass filter it through a filter of bandwidth Bfs/2

This is straightforward but not simple 1. An ideal lowpass filter has non-timelimited

non-causal response 2. A timelimited signal has a Fourier transform of

unbounded support in frequency 3. We can only approximately lowpass filter

1. We need to worry about roll-off near fs/2 2. We have to back off from fs/2 3. Fast roll-off is accompanied by passband ripple

You cannot remove aliasing after sampling

MAE143A Signals & Systems Winter 2016 14

• Aliasing in practice

Any data-logging equipment worth a dime has anti-aliasing filtering built in

It is switched in at sample-rate selection time and is handled by the equipment software

DSpace, LabView, HP analyzers Often this (and timing questions) limits the available sampling rates High-performance data acquisition is an art The data quality near Nyquist is dodgy

So why do we need to know about aliasing? Because of the mistakes you can/might/will make!!

MAE143A Signals & Systems Winter 2016 15

• Downsampling scenario

An email arrives containing two columns of data sampled at 44.1KHz

You look at it and figure that it is oversampled and that most of the interesting information is in the range less than 10KHz in the signal

This would be captured by data sampled at 22.5KHz

So you toss out every second sample Now it is the same data sampled at half the rate

Let us try this out with a former Hilltop High student

MAE143A Signals & Systems Winter 2016 16

• Downsampling

MAE143A Signals & Systems Winter 2016 17

Original data at 44.1KHz

Downsampled data at 22.05KHz

Decimated data at 22.05 KHz

Difference at 22.05 KHz Between downsample and decimate

The mistake earlier was that the reconstructed content of the 44.1KHz data contains signals in the range 0-20KHz roughly

Downsampling to 22KHz and then reconstructing should yield signals in the 0-10KHz range

The 10-20KHz material has been aliased into 0-10KHz

Before downsampling we should filter the data with a lowpass digital filter of bandwidth ~10KHz

This is called decimation

MAE143A Signals & Systems Winter 2016 18

• Matlabs decimate

MAE143A Signals & Systems Winter 2016 19

>> help decimate decimate Resample data at a lower rate after lowpass filtering. Y = decimate(X,R) resamples the sequence in vector X at 1/R times the original sample rate. The resulting resampled vector Y is R times shorter, i.e., LENGTH(Y) = CEIL(LENGTH(X)/R). By default, decimate filters the data with an 8th order Chebyshev Type I lowpass filter with cutoff frequency .8*(Fs/2)/R, before resampling. Y = decimate(X,R,N) uses an N'th order Chebyshev filter. For N greater than 13, decimate will produce a warning regarding the unreliability of the results. See NOTE below. Y = decimate(X,R,'FIR') uses a 30th order FIR filter generated by FIR1(30,1/R) to filter the data. Y = decimate(X,R,N,'FIR') uses an Nth FIR filter. Note: For better results when R is lar ##### Embedding discrete- into continuous-time Markov chains stochastik/betreute...Embedding discrete- into continuous-time Markov chains ... The de ning characteristic of a discrete-time
Documents ##### Lecture 2: Discrete-Time Signals 2: Discrete-Time Signals Systems ... Continuous-Time vs Discrete-Time Continuous-Valued vs Discrete-Valued ... Solution method 1 31
Documents ##### Event-history analysis: discrete- continuous-time SLLS...Event-history analysis: discrete- continuous-time methods ... Applied longitudinal data analysis: ... method of event history
Documents ##### Integrating continuous-time and discrete-event continuous-time and discrete-event concepts in modelling and simulation of manufacturing machines van ... to a continuous variable of
Documents ##### 1 Basics of Data Communications Discrete-time Communication vs Continuous-time Communication Is human communication continuous-time or discrete-time ?
Documents ##### DISCRETE TIME REPRESENTATION OF CONTINUOUS TIME ARMA is an author produced version of DISCRETE TIME REPRESENTATION OF CONTINUOUS TIME ... We thank the editor, ... CONTINUOUSTIMEARMAPROCESSES
Documents Documents