Title: Discrete version of a differential equation
1Discrete version of a differential equation
Approximating the derivative (backward
difference) with discrete values at time
intervals n?
and writing as sequences
2Describing a Discrete Systemin terms of Input
and Output Signals
mn
yn
H(z)
Difference equation yn a1yn-1
akyn-k blmn b1mn-1 blmn-l
Convolution Sum
Transfer function H(z) Y(z) / X(z) Frequency
response H(ej?) Y(ej?) / X(ej?)
3A recursive system
A non-recursive system
yn0.25 xn0.5xn-10.25 xn-2 The
z-transform is The frequency response is
yn 0.9 yn-1 xn - xn-1 The
z-transform is The frequency response is
4Output of a discrete system
Consider the 3-point smoother hn ¼xn
½xn-1 ¼xn-2 with input xn a discrete
pulse xn dn dn - 1 The output yn
can be computed by convolving hn with xn
Energy 12 12 2
Energy 0.252 0.752 0.752 0.252 1.25
5The Unit Circle in the z-plane
Imag z
zej?/2 j
z-plane
zej?/4 (1j)/?2
zej0 1
zej? -1
?
Real z
zej2? 1
unit circle
6Things to know about z-Transforms
How pole and zero locations affect system
stability Transfer function of discrete
systems Frequency response (magnitude and
phase) From transfer function From
discrete-time Fourier transform Periodicity of
frequency response and relation to half the
sampling frequency
7Discrete Fourier Transformsamples the
discrete-time Fourier transform
Direct Transform
z-plane
Imag z
X
X
X
Real z
X
X
Inverse Transform
X
X
X
Illustrates N 8
88-point Discrete Fourier Transform
xn sin(2?n/8)
Xk 0 -j4 0 0 0 0 0 j4
0 (0.5 - j0.5) (-j) ( -0.5 - j0.5) 0
(0.5 - j0.5) (-j) (-0.5 - j0.5) -j4
98-point inverse Discrete Fourier Transform
Xk 0 -j4 0 0 0 0 0 -j4
xn 0 0.7071 1.0000 0.7071 0.0000
-0.7071 -1.0000 -0.7071
10Periodicity in discrete Fourier Series
time (seconds)
0
0.05
0.1
-0.05
2?
-2?
frequency (Hz)
0
4?
11This is what we work with!
fs 160 Hz
Upper half of sequence represents the negative
frequencies
12Sampling a continuous signal
x(t) 0.2 sin(2? 20t)
Sampling frequency fs 160 Hz Ts 1/160
xn x(t)tnTs 0.2 sin (2p 20n/160)
0.2 sin (n 2p / 8) Period N 8
and Discrete frequency 2 p/N p/4
rad Discrete frequency as a fraction of the
sampling rate is 2 p(20/160) p/4 Sampling
frequency corresponds to a discrete frequency of
2 p rad.
13Frequency axes for the DFT
16 points sampled at 800 Hz gives 20 millisec of
data
MATLAB
n 16 corresponds to ? 2?-?? which
corresponds to 800 Hz-?f
1
1
14(No Transcript)
15Demonstration of aliasing caused by sampling at
too low a rate
16Zero-extended Spectrum
length(x) 32 fx fft(x)intx
zeros(1,732)fxlong fx(116) intx
fx(1732)xlong (256/32)real(ifft(fxlong))
Need to adjust amplitude so that inverted signal
has same energy as original signal.
17Power Spectra (periodic sequences) orEnergy
Spectra (finite sequences)
where INk is the periodogram and Xk are the
magnitudes (real) of the DFT coefficients