SlideShare a Scribd company logo
Digital Signal Processing
Sampling a signal
using an impulse train
Our overall goal is to understand what happens to the
information when a signal is converted from a continuous
to a discrete form. The problem is, these are very different
things; one is a continuous waveform while the other is an
array of numbers. This "apples-to-oranges" comparison
makes the analysis very difficult. The solution is to
introduce a theoretical concept called the impulse train.
The impulse train is a continuous signal consisting of a
series of narrow spikes (impulses) that match the original
signal at the sampling instants. Each impulse is
infinitesimally narrow.
Between these sampling times the value of the waveform
is zero. Keep in mind that the impulse train is a
theoretical concept, not a waveform that can exist in an
electronic circuit. Since both the original analog signal
and the impulse train are continuous waveforms, we can
make an "apples-apples" comparison between the two.
Impulse Sampling
Sampling a signal x(t) uniformly at intervals Ts yields
Only information about x(t) at the sample points is retained.
The impulse train p(t) is
called the sampling function.
p(t) is periodic with
fundamental period Ts
(sampling period)
fs = 1/Ts and ฯ‰s = 2ฯ€/Ts are
called the sampling
frequency
๐‘ฅ๐›ฟ(๐‘ก) =
๐‘›=โˆ’โˆž
โˆž
๐‘ฅ(๐‘›๐‘‡ ) ๐›ฟ(๐‘ก โˆ’ ๐‘›๐‘‡ )
Fourier Transform
(frequency response)
Sampling a signal using a impulse train
๐‘“ ๐‘ก =
๐‘›=โˆ’โˆž
โˆž
๐ถ๐‘›๐‘’
๐‘–2๐œ‹๐‘›๐‘ก
๐‘‡
๐ถ๐‘› =
1
๐‘‡
๐‘‡
๐‘“(๐‘ก)๐‘’
โˆ’๐‘–2๐œ‹๐‘›๐‘ก
๐‘‡ ๐‘‘๐‘ก
Fourier exponential series
Cn Fourier coefficients
0 T
x(t) p(t)
t
7T
-T
-8T
x(t)
t
0 T
p(t)
-8T
Fourier Series of p(t)
๐ถ๐‘› =
1
๐‘‡ โˆ’
๐‘‡
2
๐‘‡
2
๐‘›=โˆ’โˆž
โˆž
๐›ฟ ๐‘ก โˆ’ ๐‘›๐‘‡ ๐‘’
โˆ’๐‘–2๐œ‹๐‘›๐‘ก
๐‘‡ ๐‘‘๐‘ก =
1
๐‘‡
๐‘ ๐‘ก =
๐‘›=โˆ’โˆž
โˆž
๐›ฟ ๐‘ก โˆ’ ๐‘›๐‘‡ =
1
๐‘‡
๐‘›=โˆ’โˆž
โˆž
๐‘’
๐‘–2๐œ‹๐‘›๐‘ก
๐‘‡ (๐น๐‘œ๐‘ข๐‘Ÿ๐‘–๐‘’๐‘Ÿ ๐‘ ๐‘’๐‘Ÿ๐‘–๐‘’๐‘ )
Fourier Transform of infinite impulse train p(t)
๐‘ƒ ฯ‰ = ๐น๐‘‡ ๐‘ ๐‘ก =
โˆ’โˆž
โˆž
๐‘ ๐‘ก ๐‘’โˆ’๐‘–๐œ”๐‘ก๐‘‘๐‘ก =
โˆ’โˆž
โˆž
1
๐‘‡
๐‘›=โˆ’โˆž
โˆž
๐‘’
๐‘–2๐œ‹๐‘›๐‘ก
๐‘‡ ๐‘’โˆ’๐‘–๐œ”๐‘ก๐‘‘๐‘ก =
1
๐‘‡
๐‘›=โˆ’โˆž
โˆž
โˆž
โˆž
๐‘’
๐‘–
2๐œ‹๐‘›
๐‘‡
โˆ’๐œ” ๐‘ก
๐‘‘๐‘ก
Fourier transform of exp ๐‘–๐œ”0 ๐‘ก (๐‘™๐‘’๐‘๐‘ก๐‘ข๐‘Ÿ๐‘’๐‘  ๐‘œ๐‘› ๐น๐‘œ๐‘ข๐‘Ÿ๐‘–๐‘’๐‘Ÿ ๐ด๐‘›๐‘Ž๐‘™๐‘ฆ๐‘ ๐‘–๐‘  โˆ’ ๐‘ ๐‘๐‘’๐‘๐‘–๐‘Ž๐‘™ ๐‘“๐‘ข๐‘›๐‘๐‘ก๐‘–๐‘œ๐‘›๐‘ )
๐น๐‘‡ ๐‘’๐‘–๐œ”0๐‘ก =
โˆ’โˆž
โˆž
๐‘’๐‘–๐œ”0๐‘ก๐‘’โˆ’๐‘–๐œ”๐‘ก๐‘‘๐‘ก =
โˆ’โˆž
โˆž
๐‘’โˆ’๐‘– ๐œ”โˆ’๐œ”0 ๐‘ก๐‘‘๐‘ก = 2๐œ‹ ๐›ฟ(๐œ” โˆ’ ๐œ”0)
Then
๐‘ƒ ฯ‰ = ๐น๐‘‡ ๐‘ ๐‘ก =
1
๐‘‡
๐‘›=โˆ’โˆž
โˆž
2๐œ‹ ๐›ฟ ๐œ” โˆ’
2๐œ‹๐‘›
๐‘‡
=
2๐œ‹
๐‘‡
๐‘›=โˆ’โˆž
โˆž
๐›ฟ ๐œ” โˆ’ ๐‘›
2๐œ‹
๐‘‡
we defined the convolution integral as,
One of the most central results of Fourier Theory is the convolution theorem (also called
the Wiener-Khitchine theorem.
where,
Convolution Integral
f ๏ƒ„ g ๏€ฝ f (x)g(x'๏€ญx)dx
๏€ญ๏‚ฅ
๏‚ฅ
๏ƒฒ
๏ƒ f ๏ƒ„ g
๏ป ๏ฝ๏€ฝ F(k)๏ƒ—G(k) f (x) ๏ƒ› F(k)
g(x) ๏ƒ› G(k)
http://mathworld.wolfram.com/ConvolutionTheorem.html
๐‘ฅ๐›ฟ(๐‘ก) =
๐‘›=โˆ’โˆž
โˆž
๐‘ฅ(๐‘›๐‘‡ ) ๐›ฟ(๐‘ก โˆ’ ๐‘›๐‘‡ )
0 T
x(t) p(t)
t
7T
-T
-8T
x(t)
t
0 T
p(t)
-8T
Fourier Transform of the sampled signal using Impulse Train
๐น๐‘‡[๐‘ฅ๐›ฟ ๐‘ก ] = ๐น๐‘‡
๐‘›=โˆ’โˆž
โˆž
๐‘ฅ(๐‘›๐‘‡ ) ๐›ฟ(๐‘ก โˆ’ ๐‘›๐‘‡ )
๐น๐‘‡ ๐‘ฅ๐›ฟ ๐‘ก = ๐น๐‘‡ ๐‘ฅ ๐‘ก ร— ๐‘ ๐‘ก =
1
2๐œ‹
๐‘‹ ๐œ” โจ‚๐‘ƒ ๐œ” =
1
2๐œ‹
๐‘‹ ๐œ” โจ‚
2๐œ‹
๐‘‡
๐‘›=โˆ’โˆž
โˆž
๐›ฟ ๐œ” โˆ’ ๐‘›
2๐œ‹
๐‘‡
๐‘ƒ ฯ‰ = ๐น๐‘‡ ๐‘ ๐‘ก =
2๐œ‹
๐‘‡
๐‘›=โˆ’โˆž
โˆž
๐›ฟ ๐œ” โˆ’ ๐‘›
2๐œ‹
๐‘‡
๐น๐‘‡ ๐‘ฅ๐›ฟ ๐‘ก =
1
๐‘‡
๐‘›=โˆ’โˆž
โˆž
๐‘‹ ๐œ” โจ‚๐›ฟ ๐œ” โˆ’ ๐‘›
2๐œ‹
๐‘‡
=
1
๐‘‡
๐‘›=โˆ’โˆž
โˆž
๐‘‹(๐œ” โˆ’ ๐‘›๐œ”0) ๐‘ญ๐‘ป ๐’™๐œน ๐’• =
๐Ÿ
๐‘ป
๐’=โˆ’โˆž
โˆž
๐‘ฟ(๐Ž โˆ’ ๐’๐Ž๐ŸŽ)
Fourier Transform of the sampled signal using Impulse Train
๐‘ญ๐‘ป ๐’™๐œน ๐’• =
๐Ÿ
๐‘ป
๐’=โˆ’โˆž
โˆž
๐‘ฟ(๐Ž โˆ’ ๐’๐Ž๐ŸŽ)
Conceptual Diagram of the relationship
Each shifted an integer multiply of ฯ‰0
Scale factor
Infinite collection of
shifted version of X(ฯ‰)
Here T is the periodic
time of the impulse
train
ฯ‰0 = ฯ‰s = 2ฯ€/T = 2ฯ€ f0
Aliasing from a different point of view
Consider an analogue signal with a certain bandwidth
When sampled, harmonics appear in the spectrum.
This results in duplication of the original spectrum
Original signal can be reconstructed by using a low pass filter
Aliasing from a different point of view
If the sampling rate is not sufficient, the duplicated frequency bands
overlap.
This makes it impossible to reconstruct the original signal using a low
pass filter
Aliasing from a different point of view
To remove signals with frequencies above the Nyquist frequency, a
low pass filter must be used before digitizing. Such a filter is
called an Antialiasing Filter.
Avoiding Aliasing
However, practical low pass filters do not have sharp cut-off
frequencies. This should be kept in mind, when deciding a sampling
rate for a signal.
Avoiding Aliasing
Ideal Low pass Filter
Realistic Filters:
Problem:
What are the suitable sample rates for digitizing
human speech?
music?
What should be the cut-off frequencies of the antialiasing
filters used in the above cases?
Digital to Analog Conversion
Digital data can be converted to an analog signal by creating a train of
impulses from digital data and then applying a low pass filter
This is theoretically perfect, but practically difficult !
Digital to Analog Conversion
A more practical method is to hold the last value until the
next is received - Zeroth-Order Hold
This results in multiplying the spectrum by the sinc function
However, in simple applications, this problem can be ignored.
Digital to Analog Conversion
The sinc function modifies the spectrum of the
original signal.
The output filter must
have a 1/sinc
response to correct
this problem.
Digital to Analog Conversion
If the correct filter is used, the reconstructed signal
will be identical to the original signal.
Analog Filters for Data Conversion
Analog filters are required both at input and at output.
Selecting an anti-alias filter
Is the analog signal time domain encoded or
frequency domain encoded?
Selecting an anti-alias filter
Example 1:
ECG
Information is contained in the shape of the signal in the time domain.
Time domain encoding
Selecting an anti-alias filter
Example 2:
EEG
Information is contained in the shape of the signal in the time domain.
Time domain encoding
Selecting an anti-alias filter
Example 3:
Sound
Our ear is sensitive to the frequency content of sound and not to the
time domain shape or to the phase.
Frequency domain encoding
Selecting an anti-alias filter
Example 4:
pictures
Time domain encoding
Information is contained in the shape of the signal in the time domain.
Filters may be classified as either digital or analog.
Filters
Digital filters use a digital processor to perform numerical calculations on sampled values of
the signal. The processor may be a general-purpose computer such as a PC, or a specialized
DSP (Digital Signal Processor) chip.
Analog filters may be classified as either passive or active and are usually implemented with
R, L, and C components and operational amplifiers. Such filter circuits are widely used in
such applications as noise reduction, video signal enhancement, graphic equalizers in hi-fi
systems, and many other areas.
An active filter is one that, along with R, L, and C components, also contains an energy source, such as that
derived from an operational amplifier.
A passive filter is one that contains only R, L, and C components. It is not necessary that all three be
present. L is often omitted (on purpose) from passive filter design because of the size and cost of inductors โ€“
and they also carry along an R that must be included in the design.
Ideal Four types of Filters
lowpass highpass
bandpass bandstop
Realistic Filters:
Ideal Filter Frequency Response Realistic vs. Ideal Filter Response
|H(ฯ‰)|
ฯ‰
ฯ€
0 ฯ‰a
ฯ‰b
1
|H(ฯ‰)|
ฯ‰
ฯ€
0 ฯ‰a ฯ‰b
1
|H(ฯ‰)|
ฯ‰
ฯ€
ฯ‰c
1
0
|H(ฯ‰)|
ฯ‰
ฯ€
ฯ‰c
1
0
๏ฎ In the passband we require
that with a deviation
๏ฎ In the stopband we require
that with a deviation
1
)
( ๏€
๏ท
j
e
G
0
)
( ๏€
๏ท
j
e
G s
๏ค
p
๏ค
๏‚ฑ
p
๏ท
๏ท ๏‚ฃ
๏‚ฃ
0
๏ฐ
๏ท
๏ท ๏‚ฃ
๏‚ฃ
s
p
p
j
p e
G ๏ท
๏ท
๏ค
๏ค ๏ท
๏‚ฃ
๏€ซ
๏‚ฃ
๏‚ฃ
๏€ญ ,
1
)
(
1
๏ฐ
๏ท
๏ท
๏ค
๏ท
๏‚ฃ
๏‚ฃ
๏‚ฃ s
s
j
e
G ,
)
(
โ€ข - passband edge frequency
โ€ข - stopband edge frequency
โ€ข - peak ripple value in the passband
โ€ข - peak ripple value in the stopband
p
๏ท
s
๏ท
s
๏ค
p
๏ค
Filter specification parameters
Analog Filters for Data Conversion
Before encountering the analog-to-digital converter the input signal is processed with an
electronic low-pass filter to remove all frequencies above the Nyquist frequency (one-half the
sampling rate). This is done to prevent aliasing during sampling, and is correspondingly called
an antialias filter.
Three types of analog filters are commonly used: Chebyshev, Butterworth, and Bessel
Building block for active filter design. The circuit
shown implements a 2 pole low-pass filter. Higher
order filters (more poles) can be formed by cascading
stages.
to design a 1 kHz, 2 pole Butterworth filter,
Table provides the parameters: k1 = 0.1592
and k2 = 0.586. Arbitrarily selecting R1 =
10K and C = 0.01uF (common values for
op amp circuits), R and Rf can be calculated
as 15.95K and 5.86K, respectively.
Rounding these last two values to the
nearest 1% standard resistors, results in R =
15.8K and Rf = 5.90K
1 kHz, 2 pole Butterworth filter
k1 = 0.1592 and k2 = 0.586. Arbitrarily selecting R1 = 10K and C = 0.01uF (common values
for op amp circuits), R and Rf can be calculated as 15.95K and 5.86K, respectively.
Rounding these last two values to the nearest 1% standard resistors, results in R = 15.8K
and Rf = 5.90K
A six pole Bessel filter formed by cascading three Sallen-Key circuits. This is a low-pass filter with a cutoff
frequency of 1kHz.
Need a high-pass filter?
Simply swap the R and C
components in the circuits
(leaving Rf and R1 alone).
The frequency response of the perfect low-pass filter is flat across the entire passband. All of the filters look
great in this respect logarithmic scale. Another story is told when the graphs are converted to a linear vertical
scale.
frequency response
Log scale
Linear scale
filters with a 1 hertz cutoff frequency
Frequency response of the three filters on a logarithmic scale.
The Chebyshev filter has the sharpest roll-off. Passband ripple can now be seen in the
Chebyshev filter (wavy variations in the amplitude of the passed frequencies). In fact, the
Chebyshev filter obtains its excellent roll-off by allowing this passband ripple. When more
passband ripple is allowed in a filter, a faster roll-off can be achieved.
Frequency response of the three filters on a linear scale.
The Butterworth filter provides the flattest passband. the Butterworth filter is optimized to
provide the sharpest roll off possible without allowing ripple in the passband. It is
commonly called the maximally flat filter. The Bessel filter has no ripple in the passband,
but the roll off far worse than the Butterworth.
step response
step response, how the filter responds when the input rapidly changes from one value to another. The horizontal
axis is shown for filters with a 1 hertz cutoff frequency. The Butterworth and Chebyshev filters overshoot and
show ringing (oscillations that slowly decreasing in amplitude). In comparison, the Bessel filter has neither of
these nasty problems.
Step response of the three filters. The times shown on the horizontal axis correspond to a one hertz cutoff frequency. The
Bessel is the optimum filter when overshoot and ringing must be minimized
Pulse response of the Bessel and Chebyshev filters. A key property of the Bessel filter is that the rising and
falling edges in the filter's output looking similar. In the jargon of the field, this is called linear phase. Figure
(b) shows the result of passing the pulse waveform in (a) through a 4 pole Bessel filter. Both edges are
smoothed in a similar manner. Figure (c) shows the result of passing (a) through a 4 pole Chebyshev filter. The
left edge overshoots on the top, while the right edge overshoots on the bottom. Many applications cannot
tolerate this distortion.
If this were a video signal, for instance, the distortion introduced by the Chebyshev filter would be devastating! The
overshoot would change the brightness of the edges of objects compared to their centers. Worse yet, the left side of objects
would look bright, while the right side of objects would look dark. Many applications cannot tolerate poor performance in the
step response. This is where the Bessel filter shines; no overshoot and symmetrical edges.
Three antialias filter options for time domain encoded signals. The goal is to
eliminate high frequencies (that will alias during sampling), while
simultaneously retaining edge sharpness (that carries information). Figure (a)
shows an example analog signal containing both sharp edges and a high
frequency noise burst. Figure (b) shows the digitized signal using a
Chebyshev filter. While the high frequencies have been effectively removed,
the edges have been grossly distorted. This is usually a terrible solution. The
Bessel filter, shown in (c), provides a gentle edge smoothing while removing
the high frequencies. Figure (d) shows the digitized signal using no antialias
filter. In this case, the edges have retained perfect sharpness; however, the
high frequency burst has aliased into several meaningless samples.
Multirate Data Conversion
There is a strong trend in electronics to replace analog circuitry with digital algorithms.
Consider the design of a digital voice recorder, a system that will digitize a voice signal, store the data in digital form, and
later reconstruct the signal for playback. To recreate intelligible speech, the system must capture the frequencies between
about 100 and 3000 hertz. However, the analog signal produced by the microphone also contains much higher frequencies, say
to 40 kHz.
The brute force approach is to pass the analog signal through an eight pole low-pass Chebyshev filter at 3 kHz, and then
sample at 8 kHz. On the other end, the DAC reconstructs the analog signal at 8 kHz with a zeroth order hold. Another
Chebyshev filter at 3 kHz is used to produce the final voice signal.
The next level of sophistication involves multirate techniques, using more than one sampling rate in the same system. It works
like this for the digital voice recorder example. First, pass the voice signal through a simple RC low-pass filter and sample the
data at 64 kHz. The resulting digital data contains the desired voice band between 100 and 3000 hertz, but also has an
unusable band between 3 kHz and 32 kHz. Second, remove these unusable frequencies in software, by using a digital low-pass
filter at 3 kHz. Third, resample the digital signal from 64 kHz to 8 kHz by simply discarding every seven out of eight samples,
a procedure called decimation. The resulting digital data is equivalent to that produced by aggressive analog filtering and
direct 8 kHz sampling.
Multirate techniques can also be used in the output portion of our example system. The 8 kHz data is pulled from
memory and converted to a 64 kHz sampling rate, a procedure called interpolation. This involves placing seven
samples, with a value of zero, between each of the samples obtained from memory. The resulting signal is a
digital impulse train, containing the desired voice band between 100 and 3000 hertz, plus spectral duplications
between 3kHz and 32 kHz. Everything above 3 kHz is then removed with a digital low-pass filter. After
conversion to an analog signal through a DAC, a simple RC network is all that is required to produce the final
voice signal.
Multirate data conversion is valuable for two reasons:
(1) it replaces analog components with software, a clear economic advantage in mass produced products, and
(2) it can achieve higher levels of performance in critical applications.
For example, compact disc audio systems use techniques of this type to achieve the best possible sound quality.
This increased performance is a result of replacing analog components (1% precision), with digital algorithms
(0.0001% precision from round-off error). As discussed in upcoming contents, digital filters outperform analog
filters by hundreds of times in key areas.
Introduction to Digital Filters
Digital filters are used for two general purposes: (1) separation of signals that have been combined, and (2) restoration of
signals that have been distorted in some way. Analog (electronic) filters can be used for these same tasks; however, digital
filters can achieve far superior results.
Signal separation is needed when a signal has been contaminated with interference, noise, or other signals. For example,
imagine a device for measuring the electrical activity of a baby's heart (EKG) while still in the womb. The raw signal will
likely be corrupted by the breathing and heartbeat of the mother. A filter might be used to separate these signals so that they
can be individually analyzed.
Signal restoration is used when a signal has been distorted in some way. For example, an audio recording made with poor
equipment may be filtered to better represent the sound as it actually occurred. Another example is the deblurring of an image
acquired with an improperly focused lens, or a shaky camera.
Digital filters can achieve thousands of times better performance than analog filters. This makes a dramatic difference in how
filtering problems are approached. With analog filters, the emphasis is on handling limitations of the electronics, such as the
accuracy and stability of the resistors and capacitors. In comparison, digital filters are so good that the performance of the
filter is frequently ignored. The emphasis shifts to the limitations of the signals, and the theoretical issues regarding their
processing.
What is a Digital Filter?
Digital Filter:
numerical procedure or algorithm that transforms a
given sequence of numbers into a second sequence
that has some more desirable properties.
Desired features
Advantages of using digital filters
The following list gives some of the main advantages of digital over analog filters.
1. A digital filter is programmable, i.e. its operation is determined by a program stored in the processorโ€™s memory. This
means the digital filter can easily be changed without affecting the circuitry (hardware). An analog filter can only be
changed by redesigning the filter circuit.
2. Digital filters are easily designed, tested and implemented on a general-purpose computer or workstation.
3. The characteristics of analog filter circuits (particularly those containing active components) are subject to drift and are
dependent on temperature. Digital filters do not suffer from these problems, and so are extremely stable with respect both
to time and temperature.
4. Unlike their analog counterparts, digital filters can handle low frequency signals accurately. As the speed of DSP
technology continues to increase, digital filters are being applied to high frequency signals in the RF (radio frequency)
domain, which in the past was the exclusive preserve of analog technology.
5. Digital filters are very much more versatile in their ability to process signals in a variety of ways; this includes the ability
of some types of digital filter to adapt to changes in the characteristics of the signal.
6. Fast DSP processors can handle complex combinations of filters in parallel or cascade (series), making the hardware
requirements relatively simple and compact in comparison with the equivalent analog circuitry. 45
Operation of digital filters
Here, we will develop the basic theory of the operation of digital filters. This is essential to an understanding of
how digital filters are designed and used.
Suppose the "raw" signal which is to be digitally filtered is in the form of a voltage waveform described by the
function
where t is time.
This signal is sampled at time intervals h (the sampling interval). The sampled value at time t = ih is
Thus the digital values transferred from the ADC to the processor can be represented by
the sequence
corresponding to the values of the signal waveform at
and t = 0 is the instant at which sampling begins.
At time t = nh (where n is some positive integer), the values available to the processor, stored in memory, are
Note that the sampled values xn+1, xn+2 etc. are not available, as they haven't happened yet!
46
The digital output from the processor to the DAC consists of the sequence of values
In general, the value of yn is calculated from the values x0, x1, x2, x3, ... , xn.
The way in which the y's are calculated from the x's determines the filtering action of the digital filter.
47
Examples of simple digital filters
The following examples illustrate the essential features of digital filters.
1. Unity gain filter:
Each output value yn is exactly the same as the corresponding input value xn:
This is a trivial case in which the filter has no effect on the
signal.
2. Simple gain filter: where K = constant.
This simply applies a gain factor K to each input value.
K > 1 makes the filter an amplifier, while 0 < K < 1 makes it an attenuator. K < 0 corresponds to an
inverting amplifier. Example (1) above is simply the special case where K = 1.
xn
yn = K xn
K
48
3. Pure delay filter:
The output value at time t = nh is simply the input at time t = (n-1)h, i.e. the signal is delayed by time h:
Note that as sampling is assumed to commence at t = 0, the input value x-1 at t = -h is undefined. It is usual to
take this (and any other values of x prior to t = 0) as zero.
4. Two-term difference filter:
The output value at t = nh is equal to the difference between the current input xn and the previous input xn-
1:
i.e. the output is the change in the input
over the most recent sampling interval h.
The effect of this filter is similar to that of
an analog differentiator circuit.
49
5. Two-term average filter:
The output is the average (arithmetic mean) of the current and previous input:
This is a simple type of low pass filter as it
tends to smooth out high-frequency variations
in a signal.
(We will look at more effective low pass filter
designs later).
50
6. Three-term average filter:
This is similar to the previous example, with the average being taken of the current and two previous
inputs:
As before, x-1 and x-2 are taken to be zero.
51
7. Central difference filter:
This is similar in its effect to example (4). The output is equal to half the change in the input signal over
the previous two sampling intervals:
52
Order of a digital filter
The order of a digital filter is the number of previous inputs (stored in the processor's memory) used to
calculate the current output.
Thus:
1. Examples (1) and (2) above are zero-order filters, as the current output yn depends only on the current
input xn and not on any previous inputs.
2. Examples (3), (4) and (5) are all of first order, as one previous input (xn-1) is required to calculate yn. (Note
that the filter of example (3) is classed as first-order because it uses one previous input, even though the
current input is not used).
3. In examples (6) and (7), two previous inputs (xn-1 and xn-2) are needed, so these are second-order filters.
Filters may be of any order from zero upwards.
53
Digital filter coefficients
All of the digital filter examples given above can be written in the following general forms:
Similar expressions can be developed for filters of any order.
The constants b0, b1, b2, ... appearing in these expressions are called the
filter coefficients. It is the values of these coefficients that determine
the characteristics of a particular filter.
๐‘ฆ๐‘› = ๐‘0๐‘ฅ๐‘›
๐‘ฆ๐‘› = ๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฅ๐‘›โˆ’1
๐‘ฆ๐‘› = ๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฅ๐‘›โˆ’1 + ๐‘2๐‘ฅ๐‘›โˆ’2
Zero order :
First order :
Second order:
xn
yn = b0 xn
b0
+
b0
xn
Z-1
yn
b1
+
b0
xn
Z-1
yn
b1
Z-1
b2
54
The following table gives the values of the coefficients of each of the filters given as examples above.
b0 b1 b2
55
Q1
56
a) Order = 1 : b0 = 2, b1 = -1
b) Order = 2 : b0 = 0, b1 = 0, b2 = 1
c) Order = 3 : b0 = 1, b1 = -2, b2 =2, b3 = 1
Recursive and non-recursive filters
For all the examples of digital filters discussed so far, the current output (yn) is calculated solely from the
current and previous input values (xn, xn-1, xn-2, ...). This type of filter is said to be non-recursive.
A recursive filter is one which in addition to input values also uses previous output values. These, like the
previous input values, are stored in the processor's memory.
The word recursive literally means "running back", and refers to the fact that previously-calculated output
values go back into the calculation of the latest output. The expression for a recursive filter therefore contains
not only terms involving the input values (xn, xn-1, xn-2, ...) but also terms in yn-1, yn-2, ...
From this explanation, it might seem as though recursive filters require more calculations to be performed, since
there are previous output terms in the filter expression as well as input terms. In fact, the reverse is usually the
case: to achieve a given frequency response characteristic using a recursive filter generally requires a much
lower order filter (and therefore fewer terms to be evaluated by the processor) than the equivalent non-recursive
filter. This will be demonstrated later.
57
Some people prefer an alternative terminology in which a non-recursive filter is known as an
FIR (or Finite Impulse Response) filter, and a recursive filter as an IIR (or Infinite Impulse
Response) filter.
These terms refer to the differing "impulse responses" of the two types of filter. The impulse
response of a digital filter is the output sequence from the filter when a unit impulse is applied
at its input. (A unit impulse is a very simple input sequence consisting of a single value of 1 at
time t = 0, followed by zeros at all subsequent sampling instants).
An FIR filter is one whose impulse response is of finite duration. An IIR filter is one whose
impulse response theoretically continues for ever because the recursive (previous output)
terms feed back energy into the filter input and keep it going. The term IIR is not very
accurate because the actual impulse responses of nearly all IIR filters reduce virtually to zero
in a finite time. Nevertheless, these two terms are widely used.
58
Example of a recursive filter
A simple example of a recursive digital filter is given by
In other words, this filter determines the current output (yn) by adding the current input (xn) to the previous
output (yn-1):
Note that y-1 (like x-1) is undefined, and is usually taken to be zero.
59
Let us consider the effect of this filter in more detail. If in each of the above expressions we substitute for yn-1 the
value given by the previous expression, we get the following:
Thus we can see that yn, the output at t = nh, is equal to the sum of the current input xn and all the previous
inputs. This filter therefore sums or integrates the input values, and so has a similar effect to an analog
integrator circuit.
60
This example demonstrates an important and useful feature of recursive filters: the economy with which the
output values are calculated, as compared with the equivalent non-recursive filter. In this example, each output
is determined simply by adding two numbers together. For instance, to calculate the output at time t = 10h, the
recursive filter uses the expression
To achieve the same effect with a non-recursive filter (i.e. without using previous output values stored in
memory) would entail using the expression
This would necessitate many more addition operations as well as the storage of many more values in memory.
61
Order of a recursive (IIR) digital filter
The order of a digital filter was defined earlier as the number of previous inputs which have to be stored in
order to generate a given output. This definition is appropriate for non-recursive (FIR) filters, which use only
the current and previous inputs to compute the current output. In the case of recursive filters, the definition
can be extended as follows:
The order of a recursive filter is the largest number of previous input or output values
required to compute the current output.
This definition can be regarded as being quite general: it applies both to FIR and IIR filters.
For example, the recursive filter discussed above, given by the expression
is classed as being of first order, because it uses one previous output value (yn-1), even though no previous
inputs are required.
In practice, recursive filters usually require the same number of previous inputs and outputs. Thus, a first-
order recursive filter generally requires one previous input (xn-1) and one previous output (yn-1), while a second-
order recursive filter makes use of two previous inputs (xn-1 and xn-2) and two previous outputs (yn-1 and yn-2); and
so on, for higher orders.
Note that a recursive (IIR) filter must, by definition, be of at least first order; a zero-order recursive filter is an
impossibility. (Why?) 62
Q2
63
From the above discussion, we can see that a recursive filter is basically like a non-recursive filter, with the
addition of extra terms involving previous inputs (yn-1, yn-2 etc.).
Coefficients of recursive (IIR) digital filters
A first-order recursive filter can be written in the general form
๐‘ฆ๐‘› =
๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฅ๐‘›โˆ’1 โˆ’ ๐‘Ž1๐‘ฆ๐‘›โˆ’1
๐‘Ž0
Note the minus sign in front of the "recursive" term a1yn-1, and the factor (1/a0) applied to all the coefficients.
The reason for expressing the filter in this way is that it allows us to rewrite the expression in the following
symmetrical form:
๐‘Ž0๐‘ฆ๐‘› + ๐‘Ž1๐‘ฆ๐‘›โˆ’1 = ๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฆ๐‘›โˆ’1
In the case of a second-order filter, the general form is
๐‘ฆ๐‘› =
๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฅ๐‘›โˆ’1 + ๐‘2๐‘ฅ๐‘›โˆ’2 โˆ’ ๐‘Ž1๐‘ฆ๐‘›โˆ’1 โˆ’ ๐‘Ž2๐‘ฆ๐‘›โˆ’2
๐‘Ž0
The alternative "symmetrical" form of this expression is
๐‘Ž0๐‘ฆ๐‘› + ๐‘Ž1๐‘ฆ๐‘›โˆ’1 + ๐‘Ž2๐‘ฆ๐‘›โˆ’2 = ๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฆ๐‘›โˆ’1 + ๐‘2๐‘ฅ๐‘›โˆ’2
64
Q3
65
a0 = 1 a1 = -1
b0 = 1 b1 = 0
For filters listed in Q2
a) b0 =2 b1 = -1 a0 = 1, a1 = -1
b) b0 = 0, b1 = 1, b2 = 0, b3 = -1, a0 =1, a1 =2, a2 =0, a3 = 0
c) b0 = 1, b1 = 2, b2 =1, a0 = 1, a1= 2, a2 =-1
The transfer function of a digital filter
In the last section, we used two different ways of expressing the action of a digital filter: a form giving the
output yn directly, and a "symmetrical" form with all the output terms on one side and all the input terms on the
other.
In this section, we introduce what is called the transfer function of a digital filter. This is obtained from the
symmetrical form of the filter expression, and it allows us to describe a filter by means of a convenient,
compact expression. We can also use the transfer function of a filter to work out its frequency response.
First of all, we must introduce the delay operator, denoted by the symbol z-1.
When applied to a sequence of digital values, this operator gives the previous value in the sequence. It
therefore in effect introduces a delay of one sampling interval.
Applying the operator z-1 to an input value (say xn) gives the previous input (xn-1):
66
Suppose we have an input sequence
Then
and so on. Note that z-1 x0 would be x-1, which is unknown (and usually taken to be zero, as we have already
seen).
67
Similarly, applying the z-1 operator to an output gives the previous output:
Applying the delay operator z-1 twice produces a delay of two sampling intervals:
We adopt the (fairly logical) convention
i.e. the operator z-2 represents a delay of two sampling intervals:
68
๐‘Ž0๐‘ฆ๐‘› + ๐‘Ž1๐‘ฆ๐‘›โˆ’1 + ๐‘Ž2๐‘ฆ๐‘›โˆ’2 = ๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฅ๐‘›โˆ’1 + ๐‘2๐‘ฅ๐‘›โˆ’2
Let us now use this notation in the description of a recursive digital filter. Consider, for example, a general
second-order filter, given in its symmetrical form by the expression
We will make use of the following identities:
Substituting these expressions into the digital filter gives
(๐‘Ž0 + ๐‘Ž1๐‘งโˆ’1 + ๐‘Ž2๐‘งโˆ’2)๐‘ฆ๐‘› = (๐‘0 + ๐‘1๐‘งโˆ’1 + ๐‘2๐‘งโˆ’2)๐‘ฅ๐‘›
๐‘ฆ๐‘›
๐‘ฅ๐‘›
=
(๐‘0 + ๐‘1๐‘งโˆ’1
+ ๐‘2๐‘งโˆ’2
)
(๐‘Ž0 + ๐‘Ž1๐‘งโˆ’1 + ๐‘Ž2๐‘งโˆ’2)
This is the general form of the transfer function for a second-order recursive (IIR) filter.
69
A non-recursive (FIR) filter has a simpler transfer function which does not contain any denominator terms.
The coefficient a0 is usually taken to be equal to 1, and all the other a coefficients are zero. The transfer
function of a second-order FIR filter can therefore be expressed in the general form
๐‘ฆ๐‘›
๐‘ฅ๐‘›
= ๐‘0 + ๐‘1๐‘งโˆ’1
+ ๐‘2๐‘งโˆ’2
70
[b0,b1,b2] = [1/3, 1/3, 1/3]
a0 =1, an>1 =0
71
72
Q4
Derive the transfer functions of each of the filters in Q 2
73
Determine the output sequence for the filter, from y0 to y5.
74
75
FIR filtering
โ€ข Finite Impulse Response (FIR) filters use past input samples only
โ€ข Example:
โ€ข y(n)=0.1x(n)+0.25x(n-1)+0.2x(n-2)
โ€ข Z-transform: Y(z)=0.1X(z)+0.25X(z)z-1+0.2X(z)z-2
โ€ข Transfer function: H(z)=Y(z)/X(z)=0.1+0.25z-1+0.2z-2
โ€ข No poles, just zeroes. FIR is stable
76
Example
โ€ข A filter is described by the following equation:
โ€ข y(n)=0.5x(n) + 1x(n-1) + 0.5x(n-2)
โ€ข What kind of filter is it?
โ€ข Plot the filterโ€™s transfer function on the z plane
โ€ข Is the filter stable?
โ€ข Plot the filterโ€™s unit step response
โ€ข Plot the filterโ€™s unit impulse response
77
FIR - IIR filter comparison
โ€ข FIR
โ€ข Simpler to design
โ€ข Inherently stable
โ€ข Can be designed to have linear phase
โ€ข Require lower bit precision
โ€ข IIR
โ€ข Need less taps (memory, multiplications)
โ€ข Can simulate analog filters
78
Example
โ€ข A filter is described by the following equation:
โ€ข y(n)=0.5x(n) + 0.2x(n-1) + 0.5y(n-1) + 0.2y(n-2),
with initial condition y(-1)=y(-2) = 0
โ€ข What kind of filter is it?
โ€ข Plot the filterโ€™s transfer function on the z plane
โ€ข Is the filter stable?
โ€ข Plot the filterโ€™s unit step response
โ€ข Plot the filterโ€™s unit impulse response
Theoretical Explanation
Linear, Time Invariant Systems
79
Systems
A signal is a description of how one parameter
varies with another parameter.
A system is any process that produces an output
signal in response to an input signal.
80
Systems
Notation:
Continuous signals: x(t), y(t)
Discrete signals: x[n], y[n]
Time domain: lower case
Frequency domain: upper case
81
Systems
82
Linear Systems
Requirements for Linearity:
Homogeneity
and
Additivity
83
Linear Systems
y[n]
x[n]
ay[n]
ax[n]
Homogeneity
84
Linear Systems
Additivity
y1[n]
x1[n]
x1[n] + x2[n] y1[n]+ y2[n].
x2[n] y2[n]
85
Linear Systems
Homogeneity and additivity
ax1[n] + bx2[n] ay1[n]+ by2[n].
y1[n]
x1[n]
x2[n] y2[n]
86
Time-Invariant Systems
If an input x[n] produces an output y[n]
then the input x[n+s] produces the output
y[n+s] for any value of s.
Note: Time invariance is not a requirement for linearity.
However, almost all linear systems we deal with in
DSP are time invariant.
87
Time-Invariant Systems
88
Sinusoidal Fidelity
If the input to a linear system is a sinusoidal
wave, the output will also be a sinusoidal
wave, and will have exactly the same frequency
as the input.
Sinusoids are the only waveforms that have this
property.
89
Special Properties of Linearity
Commutation
90
Special Properties of Linearity
A system with multiple inputs/outputs is linear if it is
composed of linear systems and signal additions.
91
Special Properties of Linearity
Multiplication by a constant is a linear
operation
Multiplication of two signals is not a linear
operation
92
Superposition
93
Superposition
Input and output signals can be viewed as
superpositions (sums) of simpler waveforms.
Superposition is the foundation of DSP.
The simpler waveforms may be impulses, sine
waves or some other waveforms.
94
When we are dealing with linear systems, the
only way signals can be combined is by scaling
(multiplication of the signals by constants)
followed by addition. For instance, a signal
cannot be multiplied by another signal.
Decomposition is the inverse operation of synthesis,
where a single signal is broken into two or more additive
components. This is more involved than synthesis,
because there are infinite possible decompositions for any
given signal.
This process of combining signals through scaling
and addition is called synthesis.
The Fundamental Concept of DSP
The fundamental concept in DSP - Any
signal, such as x [n], can be decomposed into
a group of additive components, shown here
by the signals: x0[n], x1[n], and x2[n]. Passing
these components through a linear system
produces the signals, y0[n], y1[n], and y2[n].
The synthesis (addition) of these output
signals forms y [n], the same signal produced
when x [n] is passed through the system.
input signal components
output signal components
Common Decompositions
Impulse Decomposition
Step Decomposition
Fourier Decomposition
Common Decompositions
Impulse decomposition
Step decomposition
Even/Odd decomposition
Interlaced decompositions
Fourier decomposition
97
Impulse Decomposition
As shown in the figure, impulse decomposition breaks an N samples
signal into N component signals, each containing N samples.
Each of the component signals contains one point from the original
signal, with the remainder of the values being zero. A single
nonzero point in a string of zeros is called an impulse. Impulse
decomposition is important because it allows signals to be
examined one sample at a time. Similarly, systems are
characterized by how they respond to impulses. By knowing how a
system responds to an impulse, the system's output can be
calculated for any given input. This approach is called convolution.
Impulse Decomposition
+
+ +
+ ...
X[n]=a
Each of the component signals contains one point from the original
signal, with the remainder of the values being zero. 99
Step Decomposition
+
+ +
+ ...
Zeros for points
0 through k-1.
Remaining points
have a value of:
x[k] - x[k-1]
100
Even/Odd Decomposition
A signal having N points broken into two components
- one having even symmetry around N/2
- the other having odd symmetry around N/2
101
Even/Odd Decomposition
102
Interlaced Decomposition
The signal broken into two
components
- even samples
- odd samples
Needed for Fast Fourier
Transform
103
Fourier Decomposition
Decomposition into Sine waves
Some signals are created this way
In a linear system, a sinusoidal input always
results in a sinusoidal output
Powerful mathematical analysis is possible
104
Linear time-invariant (LTI) digital filters
We limit ourselves to LTI digital filters only.
105
Analysis
106
๐‘Ž0๐‘ฆ๐‘› + ๐‘Ž1๐‘ฆ๐‘›โˆ’1 + ๐‘Ž2๐‘ฆ๐‘›โˆ’2 = ๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฅ๐‘›โˆ’1 + ๐‘2๐‘ฅ๐‘›โˆ’2
First method in time domain: Linear difference equations
The linear time-invariant digital filter can then be described by the linear difference equation:
107
Full set of possible linear operations
108
Linear difference equations and digital filter structure
109
110
Refer
slide 49
111
112
113
114
115
116
117
118
Liner Digital Filter in Python
https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.lfilter.html
Frequency Response of the Digital Filter
https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.freqz.html#scipy.signal.freqz
119
Python Implementation
Moving Average Filter
ฯ‰/ฯ€ =2f
120
121
Pole-zero plot and frequency response
122
โ€ข z-transform of the output/z transfer of the input
โ€ข Pole-zero form
)
(
)
(
)
(
z
X
z
Y
z
H ๏€ฝ
Transfer Function
Pole-zero plot
Return zero, pole, gain (z,p,k)
representation from a numerator,
denominator representation of a
linear filter.
123
M=11 moving Average Filter
124
125
126
127
128
129
130
131
132
133
134
Filtering example
135
Generate a Gaussian random noise sequence
Selective amplification
of one frequency
136
System Stability
โ€ข Position of the poles affects system stability
โ€ข The position of zeroes does not

More Related Content

Similar to SignalDecompositionTheory.pptx

DSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignDSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
Amr E. Mohamed
ย 
Vibration signal filtering
Vibration signal filteringVibration signal filtering
Vibration signal filtering
Safira Pralampita Larasati
ย 
Digital anti aliasing filter
Digital anti aliasing filterDigital anti aliasing filter
Digital anti aliasing filter
Deahyun Kim
ย 
dsp-1.pdf
dsp-1.pdfdsp-1.pdf
dsp-1.pdf
TB107thippeswamyM
ย 
Signal, Sampling and signal quantization
Signal, Sampling and signal quantizationSignal, Sampling and signal quantization
Signal, Sampling and signal quantization
SamS270368
ย 
Adc dac
Adc dacAdc dac
Adc dac
Balaji Naidu
ย 
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time SignalsDSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
Amr E. Mohamed
ย 
Source coding systems
Source coding systemsSource coding systems
Source coding systems
RAMYASREEKUPPALA
ย 
Sampling
SamplingSampling
Filters two design_with_matlab
Filters two design_with_matlabFilters two design_with_matlab
Filters two design_with_matlab
researchwork
ย 
About li as
About li asAbout li as
About li as
Hoopeer Hoopeer
ย 
Butterworth filter design
Butterworth filter designButterworth filter design
Butterworth filter design
Sushant Shankar
ย 
ECG Signal Denoising using Digital Filter and Adaptive Filter
ECG Signal Denoising using Digital Filter and Adaptive FilterECG Signal Denoising using Digital Filter and Adaptive Filter
ECG Signal Denoising using Digital Filter and Adaptive Filter
IRJET Journal
ย 
Speech technology basics
Speech technology   basicsSpeech technology   basics
Speech technology basics
Hemaraja Nayaka S
ย 
Sleep 2008 Electronicsv.3
Sleep 2008 Electronicsv.3Sleep 2008 Electronicsv.3
Sleep 2008 Electronicsv.3
weckhardt
ย 
Multrate dsp
Multrate dspMultrate dsp
VISHAV snp.pptx
VISHAV snp.pptxVISHAV snp.pptx
VISHAV snp.pptx
NeerajBhatt62
ย 
Sampling tutorial
Sampling tutorialSampling tutorial
Sampling tutorial
Cut Lilis
ย 
Discrete time signal processing unit-2
Discrete time signal processing unit-2Discrete time signal processing unit-2
Discrete time signal processing unit-2
selvalakshmi24
ย 
DSP_FOEHU - Lec 11 - IIR Filter Design
DSP_FOEHU - Lec 11 - IIR Filter DesignDSP_FOEHU - Lec 11 - IIR Filter Design
DSP_FOEHU - Lec 11 - IIR Filter Design
Amr E. Mohamed
ย 

Similar to SignalDecompositionTheory.pptx (20)

DSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignDSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
ย 
Vibration signal filtering
Vibration signal filteringVibration signal filtering
Vibration signal filtering
ย 
Digital anti aliasing filter
Digital anti aliasing filterDigital anti aliasing filter
Digital anti aliasing filter
ย 
dsp-1.pdf
dsp-1.pdfdsp-1.pdf
dsp-1.pdf
ย 
Signal, Sampling and signal quantization
Signal, Sampling and signal quantizationSignal, Sampling and signal quantization
Signal, Sampling and signal quantization
ย 
Adc dac
Adc dacAdc dac
Adc dac
ย 
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time SignalsDSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
ย 
Source coding systems
Source coding systemsSource coding systems
Source coding systems
ย 
Sampling
SamplingSampling
Sampling
ย 
Filters two design_with_matlab
Filters two design_with_matlabFilters two design_with_matlab
Filters two design_with_matlab
ย 
About li as
About li asAbout li as
About li as
ย 
Butterworth filter design
Butterworth filter designButterworth filter design
Butterworth filter design
ย 
ECG Signal Denoising using Digital Filter and Adaptive Filter
ECG Signal Denoising using Digital Filter and Adaptive FilterECG Signal Denoising using Digital Filter and Adaptive Filter
ECG Signal Denoising using Digital Filter and Adaptive Filter
ย 
Speech technology basics
Speech technology   basicsSpeech technology   basics
Speech technology basics
ย 
Sleep 2008 Electronicsv.3
Sleep 2008 Electronicsv.3Sleep 2008 Electronicsv.3
Sleep 2008 Electronicsv.3
ย 
Multrate dsp
Multrate dspMultrate dsp
Multrate dsp
ย 
VISHAV snp.pptx
VISHAV snp.pptxVISHAV snp.pptx
VISHAV snp.pptx
ย 
Sampling tutorial
Sampling tutorialSampling tutorial
Sampling tutorial
ย 
Discrete time signal processing unit-2
Discrete time signal processing unit-2Discrete time signal processing unit-2
Discrete time signal processing unit-2
ย 
DSP_FOEHU - Lec 11 - IIR Filter Design
DSP_FOEHU - Lec 11 - IIR Filter DesignDSP_FOEHU - Lec 11 - IIR Filter Design
DSP_FOEHU - Lec 11 - IIR Filter Design
ย 

Recently uploaded

ๅญฆๆ กๅŽŸ็‰ˆ็พŽๅ›ฝๆณขๅฃซ้กฟๅคงๅญฆๆฏ•ไธš่ฏๅญฆๅŽ†ๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ท
ๅญฆๆ กๅŽŸ็‰ˆ็พŽๅ›ฝๆณขๅฃซ้กฟๅคงๅญฆๆฏ•ไธš่ฏๅญฆๅŽ†ๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ทๅญฆๆ กๅŽŸ็‰ˆ็พŽๅ›ฝๆณขๅฃซ้กฟๅคงๅญฆๆฏ•ไธš่ฏๅญฆๅŽ†ๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ท
ๅญฆๆ กๅŽŸ็‰ˆ็พŽๅ›ฝๆณขๅฃซ้กฟๅคงๅญฆๆฏ•ไธš่ฏๅญฆๅŽ†ๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ท
171ticu
ย 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
PKavitha10
ย 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
LAXMAREDDY22
ย 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
ย 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
ย 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
ย 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
ย 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ElakkiaU
ย 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
ย 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
ย 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
ย 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
ย 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
ย 
ๅŽŸ็‰ˆๅˆถไฝœ(Humboldtๆฏ•ไธš่ฏไนฆ)ๆŸๆž—ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไธ€ๆจกไธ€ๆ ท
ๅŽŸ็‰ˆๅˆถไฝœ(Humboldtๆฏ•ไธš่ฏไนฆ)ๆŸๆž—ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไธ€ๆจกไธ€ๆ ทๅŽŸ็‰ˆๅˆถไฝœ(Humboldtๆฏ•ไธš่ฏไนฆ)ๆŸๆž—ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไธ€ๆจกไธ€ๆ ท
ๅŽŸ็‰ˆๅˆถไฝœ(Humboldtๆฏ•ไธš่ฏไนฆ)ๆŸๆž—ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไธ€ๆจกไธ€ๆ ท
ydzowc
ย 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
ย 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
ย 
ๅฎ˜ๆ–น่ฎค่ฏ็พŽๅ›ฝๅฏ†ๆญ‡ๆ นๅทž็ซ‹ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ท
ๅฎ˜ๆ–น่ฎค่ฏ็พŽๅ›ฝๅฏ†ๆญ‡ๆ นๅทž็ซ‹ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ทๅฎ˜ๆ–น่ฎค่ฏ็พŽๅ›ฝๅฏ†ๆญ‡ๆ นๅทž็ซ‹ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ท
ๅฎ˜ๆ–น่ฎค่ฏ็พŽๅ›ฝๅฏ†ๆญ‡ๆ นๅทž็ซ‹ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ท
171ticu
ย 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
ย 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
gowrishankartb2005
ย 
An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...
IJECEIAES
ย 

Recently uploaded (20)

ๅญฆๆ กๅŽŸ็‰ˆ็พŽๅ›ฝๆณขๅฃซ้กฟๅคงๅญฆๆฏ•ไธš่ฏๅญฆๅŽ†ๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ท
ๅญฆๆ กๅŽŸ็‰ˆ็พŽๅ›ฝๆณขๅฃซ้กฟๅคงๅญฆๆฏ•ไธš่ฏๅญฆๅŽ†ๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ทๅญฆๆ กๅŽŸ็‰ˆ็พŽๅ›ฝๆณขๅฃซ้กฟๅคงๅญฆๆฏ•ไธš่ฏๅญฆๅŽ†ๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ท
ๅญฆๆ กๅŽŸ็‰ˆ็พŽๅ›ฝๆณขๅฃซ้กฟๅคงๅญฆๆฏ•ไธš่ฏๅญฆๅŽ†ๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ท
ย 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
ย 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
ย 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
ย 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
ย 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
ย 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
ย 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ย 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
ย 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
ย 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
ย 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
ย 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
ย 
ๅŽŸ็‰ˆๅˆถไฝœ(Humboldtๆฏ•ไธš่ฏไนฆ)ๆŸๆž—ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไธ€ๆจกไธ€ๆ ท
ๅŽŸ็‰ˆๅˆถไฝœ(Humboldtๆฏ•ไธš่ฏไนฆ)ๆŸๆž—ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไธ€ๆจกไธ€ๆ ทๅŽŸ็‰ˆๅˆถไฝœ(Humboldtๆฏ•ไธš่ฏไนฆ)ๆŸๆž—ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไธ€ๆจกไธ€ๆ ท
ๅŽŸ็‰ˆๅˆถไฝœ(Humboldtๆฏ•ไธš่ฏไนฆ)ๆŸๆž—ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไธ€ๆจกไธ€ๆ ท
ย 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
ย 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
ย 
ๅฎ˜ๆ–น่ฎค่ฏ็พŽๅ›ฝๅฏ†ๆญ‡ๆ นๅทž็ซ‹ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ท
ๅฎ˜ๆ–น่ฎค่ฏ็พŽๅ›ฝๅฏ†ๆญ‡ๆ นๅทž็ซ‹ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ทๅฎ˜ๆ–น่ฎค่ฏ็พŽๅ›ฝๅฏ†ๆญ‡ๆ นๅทž็ซ‹ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ท
ๅฎ˜ๆ–น่ฎค่ฏ็พŽๅ›ฝๅฏ†ๆญ‡ๆ นๅทž็ซ‹ๅคงๅญฆๆฏ•ไธš่ฏๅญฆไฝ่ฏไนฆๅŽŸ็‰ˆไธ€ๆจกไธ€ๆ ท
ย 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
ย 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
ย 
An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...
ย 

SignalDecompositionTheory.pptx

  • 2. Sampling a signal using an impulse train Our overall goal is to understand what happens to the information when a signal is converted from a continuous to a discrete form. The problem is, these are very different things; one is a continuous waveform while the other is an array of numbers. This "apples-to-oranges" comparison makes the analysis very difficult. The solution is to introduce a theoretical concept called the impulse train. The impulse train is a continuous signal consisting of a series of narrow spikes (impulses) that match the original signal at the sampling instants. Each impulse is infinitesimally narrow. Between these sampling times the value of the waveform is zero. Keep in mind that the impulse train is a theoretical concept, not a waveform that can exist in an electronic circuit. Since both the original analog signal and the impulse train are continuous waveforms, we can make an "apples-apples" comparison between the two.
  • 3. Impulse Sampling Sampling a signal x(t) uniformly at intervals Ts yields Only information about x(t) at the sample points is retained.
  • 4. The impulse train p(t) is called the sampling function. p(t) is periodic with fundamental period Ts (sampling period) fs = 1/Ts and ฯ‰s = 2ฯ€/Ts are called the sampling frequency
  • 5. ๐‘ฅ๐›ฟ(๐‘ก) = ๐‘›=โˆ’โˆž โˆž ๐‘ฅ(๐‘›๐‘‡ ) ๐›ฟ(๐‘ก โˆ’ ๐‘›๐‘‡ ) Fourier Transform (frequency response) Sampling a signal using a impulse train ๐‘“ ๐‘ก = ๐‘›=โˆ’โˆž โˆž ๐ถ๐‘›๐‘’ ๐‘–2๐œ‹๐‘›๐‘ก ๐‘‡ ๐ถ๐‘› = 1 ๐‘‡ ๐‘‡ ๐‘“(๐‘ก)๐‘’ โˆ’๐‘–2๐œ‹๐‘›๐‘ก ๐‘‡ ๐‘‘๐‘ก Fourier exponential series Cn Fourier coefficients 0 T x(t) p(t) t 7T -T -8T x(t) t 0 T p(t) -8T Fourier Series of p(t) ๐ถ๐‘› = 1 ๐‘‡ โˆ’ ๐‘‡ 2 ๐‘‡ 2 ๐‘›=โˆ’โˆž โˆž ๐›ฟ ๐‘ก โˆ’ ๐‘›๐‘‡ ๐‘’ โˆ’๐‘–2๐œ‹๐‘›๐‘ก ๐‘‡ ๐‘‘๐‘ก = 1 ๐‘‡ ๐‘ ๐‘ก = ๐‘›=โˆ’โˆž โˆž ๐›ฟ ๐‘ก โˆ’ ๐‘›๐‘‡ = 1 ๐‘‡ ๐‘›=โˆ’โˆž โˆž ๐‘’ ๐‘–2๐œ‹๐‘›๐‘ก ๐‘‡ (๐น๐‘œ๐‘ข๐‘Ÿ๐‘–๐‘’๐‘Ÿ ๐‘ ๐‘’๐‘Ÿ๐‘–๐‘’๐‘ )
  • 6. Fourier Transform of infinite impulse train p(t) ๐‘ƒ ฯ‰ = ๐น๐‘‡ ๐‘ ๐‘ก = โˆ’โˆž โˆž ๐‘ ๐‘ก ๐‘’โˆ’๐‘–๐œ”๐‘ก๐‘‘๐‘ก = โˆ’โˆž โˆž 1 ๐‘‡ ๐‘›=โˆ’โˆž โˆž ๐‘’ ๐‘–2๐œ‹๐‘›๐‘ก ๐‘‡ ๐‘’โˆ’๐‘–๐œ”๐‘ก๐‘‘๐‘ก = 1 ๐‘‡ ๐‘›=โˆ’โˆž โˆž โˆž โˆž ๐‘’ ๐‘– 2๐œ‹๐‘› ๐‘‡ โˆ’๐œ” ๐‘ก ๐‘‘๐‘ก Fourier transform of exp ๐‘–๐œ”0 ๐‘ก (๐‘™๐‘’๐‘๐‘ก๐‘ข๐‘Ÿ๐‘’๐‘  ๐‘œ๐‘› ๐น๐‘œ๐‘ข๐‘Ÿ๐‘–๐‘’๐‘Ÿ ๐ด๐‘›๐‘Ž๐‘™๐‘ฆ๐‘ ๐‘–๐‘  โˆ’ ๐‘ ๐‘๐‘’๐‘๐‘–๐‘Ž๐‘™ ๐‘“๐‘ข๐‘›๐‘๐‘ก๐‘–๐‘œ๐‘›๐‘ ) ๐น๐‘‡ ๐‘’๐‘–๐œ”0๐‘ก = โˆ’โˆž โˆž ๐‘’๐‘–๐œ”0๐‘ก๐‘’โˆ’๐‘–๐œ”๐‘ก๐‘‘๐‘ก = โˆ’โˆž โˆž ๐‘’โˆ’๐‘– ๐œ”โˆ’๐œ”0 ๐‘ก๐‘‘๐‘ก = 2๐œ‹ ๐›ฟ(๐œ” โˆ’ ๐œ”0) Then ๐‘ƒ ฯ‰ = ๐น๐‘‡ ๐‘ ๐‘ก = 1 ๐‘‡ ๐‘›=โˆ’โˆž โˆž 2๐œ‹ ๐›ฟ ๐œ” โˆ’ 2๐œ‹๐‘› ๐‘‡ = 2๐œ‹ ๐‘‡ ๐‘›=โˆ’โˆž โˆž ๐›ฟ ๐œ” โˆ’ ๐‘› 2๐œ‹ ๐‘‡
  • 7. we defined the convolution integral as, One of the most central results of Fourier Theory is the convolution theorem (also called the Wiener-Khitchine theorem. where, Convolution Integral f ๏ƒ„ g ๏€ฝ f (x)g(x'๏€ญx)dx ๏€ญ๏‚ฅ ๏‚ฅ ๏ƒฒ ๏ƒ f ๏ƒ„ g ๏ป ๏ฝ๏€ฝ F(k)๏ƒ—G(k) f (x) ๏ƒ› F(k) g(x) ๏ƒ› G(k)
  • 9. ๐‘ฅ๐›ฟ(๐‘ก) = ๐‘›=โˆ’โˆž โˆž ๐‘ฅ(๐‘›๐‘‡ ) ๐›ฟ(๐‘ก โˆ’ ๐‘›๐‘‡ ) 0 T x(t) p(t) t 7T -T -8T x(t) t 0 T p(t) -8T Fourier Transform of the sampled signal using Impulse Train ๐น๐‘‡[๐‘ฅ๐›ฟ ๐‘ก ] = ๐น๐‘‡ ๐‘›=โˆ’โˆž โˆž ๐‘ฅ(๐‘›๐‘‡ ) ๐›ฟ(๐‘ก โˆ’ ๐‘›๐‘‡ ) ๐น๐‘‡ ๐‘ฅ๐›ฟ ๐‘ก = ๐น๐‘‡ ๐‘ฅ ๐‘ก ร— ๐‘ ๐‘ก = 1 2๐œ‹ ๐‘‹ ๐œ” โจ‚๐‘ƒ ๐œ” = 1 2๐œ‹ ๐‘‹ ๐œ” โจ‚ 2๐œ‹ ๐‘‡ ๐‘›=โˆ’โˆž โˆž ๐›ฟ ๐œ” โˆ’ ๐‘› 2๐œ‹ ๐‘‡ ๐‘ƒ ฯ‰ = ๐น๐‘‡ ๐‘ ๐‘ก = 2๐œ‹ ๐‘‡ ๐‘›=โˆ’โˆž โˆž ๐›ฟ ๐œ” โˆ’ ๐‘› 2๐œ‹ ๐‘‡ ๐น๐‘‡ ๐‘ฅ๐›ฟ ๐‘ก = 1 ๐‘‡ ๐‘›=โˆ’โˆž โˆž ๐‘‹ ๐œ” โจ‚๐›ฟ ๐œ” โˆ’ ๐‘› 2๐œ‹ ๐‘‡ = 1 ๐‘‡ ๐‘›=โˆ’โˆž โˆž ๐‘‹(๐œ” โˆ’ ๐‘›๐œ”0) ๐‘ญ๐‘ป ๐’™๐œน ๐’• = ๐Ÿ ๐‘ป ๐’=โˆ’โˆž โˆž ๐‘ฟ(๐Ž โˆ’ ๐’๐Ž๐ŸŽ)
  • 10. Fourier Transform of the sampled signal using Impulse Train ๐‘ญ๐‘ป ๐’™๐œน ๐’• = ๐Ÿ ๐‘ป ๐’=โˆ’โˆž โˆž ๐‘ฟ(๐Ž โˆ’ ๐’๐Ž๐ŸŽ) Conceptual Diagram of the relationship Each shifted an integer multiply of ฯ‰0 Scale factor Infinite collection of shifted version of X(ฯ‰) Here T is the periodic time of the impulse train ฯ‰0 = ฯ‰s = 2ฯ€/T = 2ฯ€ f0
  • 11. Aliasing from a different point of view Consider an analogue signal with a certain bandwidth
  • 12. When sampled, harmonics appear in the spectrum. This results in duplication of the original spectrum Original signal can be reconstructed by using a low pass filter Aliasing from a different point of view
  • 13. If the sampling rate is not sufficient, the duplicated frequency bands overlap. This makes it impossible to reconstruct the original signal using a low pass filter Aliasing from a different point of view
  • 14. To remove signals with frequencies above the Nyquist frequency, a low pass filter must be used before digitizing. Such a filter is called an Antialiasing Filter. Avoiding Aliasing
  • 15. However, practical low pass filters do not have sharp cut-off frequencies. This should be kept in mind, when deciding a sampling rate for a signal. Avoiding Aliasing Ideal Low pass Filter Realistic Filters:
  • 16. Problem: What are the suitable sample rates for digitizing human speech? music? What should be the cut-off frequencies of the antialiasing filters used in the above cases?
  • 17. Digital to Analog Conversion Digital data can be converted to an analog signal by creating a train of impulses from digital data and then applying a low pass filter This is theoretically perfect, but practically difficult !
  • 18. Digital to Analog Conversion A more practical method is to hold the last value until the next is received - Zeroth-Order Hold This results in multiplying the spectrum by the sinc function
  • 19. However, in simple applications, this problem can be ignored. Digital to Analog Conversion The sinc function modifies the spectrum of the original signal. The output filter must have a 1/sinc response to correct this problem.
  • 20. Digital to Analog Conversion If the correct filter is used, the reconstructed signal will be identical to the original signal.
  • 21. Analog Filters for Data Conversion Analog filters are required both at input and at output.
  • 22. Selecting an anti-alias filter Is the analog signal time domain encoded or frequency domain encoded?
  • 23. Selecting an anti-alias filter Example 1: ECG Information is contained in the shape of the signal in the time domain. Time domain encoding
  • 24. Selecting an anti-alias filter Example 2: EEG Information is contained in the shape of the signal in the time domain. Time domain encoding
  • 25. Selecting an anti-alias filter Example 3: Sound Our ear is sensitive to the frequency content of sound and not to the time domain shape or to the phase. Frequency domain encoding
  • 26. Selecting an anti-alias filter Example 4: pictures Time domain encoding Information is contained in the shape of the signal in the time domain.
  • 27. Filters may be classified as either digital or analog. Filters Digital filters use a digital processor to perform numerical calculations on sampled values of the signal. The processor may be a general-purpose computer such as a PC, or a specialized DSP (Digital Signal Processor) chip. Analog filters may be classified as either passive or active and are usually implemented with R, L, and C components and operational amplifiers. Such filter circuits are widely used in such applications as noise reduction, video signal enhancement, graphic equalizers in hi-fi systems, and many other areas. An active filter is one that, along with R, L, and C components, also contains an energy source, such as that derived from an operational amplifier. A passive filter is one that contains only R, L, and C components. It is not necessary that all three be present. L is often omitted (on purpose) from passive filter design because of the size and cost of inductors โ€“ and they also carry along an R that must be included in the design.
  • 28. Ideal Four types of Filters lowpass highpass bandpass bandstop Realistic Filters:
  • 29. Ideal Filter Frequency Response Realistic vs. Ideal Filter Response |H(ฯ‰)| ฯ‰ ฯ€ 0 ฯ‰a ฯ‰b 1 |H(ฯ‰)| ฯ‰ ฯ€ 0 ฯ‰a ฯ‰b 1 |H(ฯ‰)| ฯ‰ ฯ€ ฯ‰c 1 0 |H(ฯ‰)| ฯ‰ ฯ€ ฯ‰c 1 0
  • 30. ๏ฎ In the passband we require that with a deviation ๏ฎ In the stopband we require that with a deviation 1 ) ( ๏€ ๏ท j e G 0 ) ( ๏€ ๏ท j e G s ๏ค p ๏ค ๏‚ฑ p ๏ท ๏ท ๏‚ฃ ๏‚ฃ 0 ๏ฐ ๏ท ๏ท ๏‚ฃ ๏‚ฃ s p p j p e G ๏ท ๏ท ๏ค ๏ค ๏ท ๏‚ฃ ๏€ซ ๏‚ฃ ๏‚ฃ ๏€ญ , 1 ) ( 1 ๏ฐ ๏ท ๏ท ๏ค ๏ท ๏‚ฃ ๏‚ฃ ๏‚ฃ s s j e G , ) ( โ€ข - passband edge frequency โ€ข - stopband edge frequency โ€ข - peak ripple value in the passband โ€ข - peak ripple value in the stopband p ๏ท s ๏ท s ๏ค p ๏ค Filter specification parameters
  • 31. Analog Filters for Data Conversion Before encountering the analog-to-digital converter the input signal is processed with an electronic low-pass filter to remove all frequencies above the Nyquist frequency (one-half the sampling rate). This is done to prevent aliasing during sampling, and is correspondingly called an antialias filter.
  • 32. Three types of analog filters are commonly used: Chebyshev, Butterworth, and Bessel Building block for active filter design. The circuit shown implements a 2 pole low-pass filter. Higher order filters (more poles) can be formed by cascading stages. to design a 1 kHz, 2 pole Butterworth filter, Table provides the parameters: k1 = 0.1592 and k2 = 0.586. Arbitrarily selecting R1 = 10K and C = 0.01uF (common values for op amp circuits), R and Rf can be calculated as 15.95K and 5.86K, respectively. Rounding these last two values to the nearest 1% standard resistors, results in R = 15.8K and Rf = 5.90K
  • 33. 1 kHz, 2 pole Butterworth filter k1 = 0.1592 and k2 = 0.586. Arbitrarily selecting R1 = 10K and C = 0.01uF (common values for op amp circuits), R and Rf can be calculated as 15.95K and 5.86K, respectively. Rounding these last two values to the nearest 1% standard resistors, results in R = 15.8K and Rf = 5.90K
  • 34. A six pole Bessel filter formed by cascading three Sallen-Key circuits. This is a low-pass filter with a cutoff frequency of 1kHz. Need a high-pass filter? Simply swap the R and C components in the circuits (leaving Rf and R1 alone).
  • 35. The frequency response of the perfect low-pass filter is flat across the entire passband. All of the filters look great in this respect logarithmic scale. Another story is told when the graphs are converted to a linear vertical scale. frequency response Log scale Linear scale filters with a 1 hertz cutoff frequency
  • 36. Frequency response of the three filters on a logarithmic scale. The Chebyshev filter has the sharpest roll-off. Passband ripple can now be seen in the Chebyshev filter (wavy variations in the amplitude of the passed frequencies). In fact, the Chebyshev filter obtains its excellent roll-off by allowing this passband ripple. When more passband ripple is allowed in a filter, a faster roll-off can be achieved. Frequency response of the three filters on a linear scale. The Butterworth filter provides the flattest passband. the Butterworth filter is optimized to provide the sharpest roll off possible without allowing ripple in the passband. It is commonly called the maximally flat filter. The Bessel filter has no ripple in the passband, but the roll off far worse than the Butterworth.
  • 37. step response step response, how the filter responds when the input rapidly changes from one value to another. The horizontal axis is shown for filters with a 1 hertz cutoff frequency. The Butterworth and Chebyshev filters overshoot and show ringing (oscillations that slowly decreasing in amplitude). In comparison, the Bessel filter has neither of these nasty problems. Step response of the three filters. The times shown on the horizontal axis correspond to a one hertz cutoff frequency. The Bessel is the optimum filter when overshoot and ringing must be minimized
  • 38. Pulse response of the Bessel and Chebyshev filters. A key property of the Bessel filter is that the rising and falling edges in the filter's output looking similar. In the jargon of the field, this is called linear phase. Figure (b) shows the result of passing the pulse waveform in (a) through a 4 pole Bessel filter. Both edges are smoothed in a similar manner. Figure (c) shows the result of passing (a) through a 4 pole Chebyshev filter. The left edge overshoots on the top, while the right edge overshoots on the bottom. Many applications cannot tolerate this distortion. If this were a video signal, for instance, the distortion introduced by the Chebyshev filter would be devastating! The overshoot would change the brightness of the edges of objects compared to their centers. Worse yet, the left side of objects would look bright, while the right side of objects would look dark. Many applications cannot tolerate poor performance in the step response. This is where the Bessel filter shines; no overshoot and symmetrical edges.
  • 39. Three antialias filter options for time domain encoded signals. The goal is to eliminate high frequencies (that will alias during sampling), while simultaneously retaining edge sharpness (that carries information). Figure (a) shows an example analog signal containing both sharp edges and a high frequency noise burst. Figure (b) shows the digitized signal using a Chebyshev filter. While the high frequencies have been effectively removed, the edges have been grossly distorted. This is usually a terrible solution. The Bessel filter, shown in (c), provides a gentle edge smoothing while removing the high frequencies. Figure (d) shows the digitized signal using no antialias filter. In this case, the edges have retained perfect sharpness; however, the high frequency burst has aliased into several meaningless samples.
  • 40. Multirate Data Conversion There is a strong trend in electronics to replace analog circuitry with digital algorithms. Consider the design of a digital voice recorder, a system that will digitize a voice signal, store the data in digital form, and later reconstruct the signal for playback. To recreate intelligible speech, the system must capture the frequencies between about 100 and 3000 hertz. However, the analog signal produced by the microphone also contains much higher frequencies, say to 40 kHz. The brute force approach is to pass the analog signal through an eight pole low-pass Chebyshev filter at 3 kHz, and then sample at 8 kHz. On the other end, the DAC reconstructs the analog signal at 8 kHz with a zeroth order hold. Another Chebyshev filter at 3 kHz is used to produce the final voice signal. The next level of sophistication involves multirate techniques, using more than one sampling rate in the same system. It works like this for the digital voice recorder example. First, pass the voice signal through a simple RC low-pass filter and sample the data at 64 kHz. The resulting digital data contains the desired voice band between 100 and 3000 hertz, but also has an unusable band between 3 kHz and 32 kHz. Second, remove these unusable frequencies in software, by using a digital low-pass filter at 3 kHz. Third, resample the digital signal from 64 kHz to 8 kHz by simply discarding every seven out of eight samples, a procedure called decimation. The resulting digital data is equivalent to that produced by aggressive analog filtering and direct 8 kHz sampling.
  • 41. Multirate techniques can also be used in the output portion of our example system. The 8 kHz data is pulled from memory and converted to a 64 kHz sampling rate, a procedure called interpolation. This involves placing seven samples, with a value of zero, between each of the samples obtained from memory. The resulting signal is a digital impulse train, containing the desired voice band between 100 and 3000 hertz, plus spectral duplications between 3kHz and 32 kHz. Everything above 3 kHz is then removed with a digital low-pass filter. After conversion to an analog signal through a DAC, a simple RC network is all that is required to produce the final voice signal. Multirate data conversion is valuable for two reasons: (1) it replaces analog components with software, a clear economic advantage in mass produced products, and (2) it can achieve higher levels of performance in critical applications. For example, compact disc audio systems use techniques of this type to achieve the best possible sound quality. This increased performance is a result of replacing analog components (1% precision), with digital algorithms (0.0001% precision from round-off error). As discussed in upcoming contents, digital filters outperform analog filters by hundreds of times in key areas.
  • 42. Introduction to Digital Filters Digital filters are used for two general purposes: (1) separation of signals that have been combined, and (2) restoration of signals that have been distorted in some way. Analog (electronic) filters can be used for these same tasks; however, digital filters can achieve far superior results. Signal separation is needed when a signal has been contaminated with interference, noise, or other signals. For example, imagine a device for measuring the electrical activity of a baby's heart (EKG) while still in the womb. The raw signal will likely be corrupted by the breathing and heartbeat of the mother. A filter might be used to separate these signals so that they can be individually analyzed. Signal restoration is used when a signal has been distorted in some way. For example, an audio recording made with poor equipment may be filtered to better represent the sound as it actually occurred. Another example is the deblurring of an image acquired with an improperly focused lens, or a shaky camera. Digital filters can achieve thousands of times better performance than analog filters. This makes a dramatic difference in how filtering problems are approached. With analog filters, the emphasis is on handling limitations of the electronics, such as the accuracy and stability of the resistors and capacitors. In comparison, digital filters are so good that the performance of the filter is frequently ignored. The emphasis shifts to the limitations of the signals, and the theoretical issues regarding their processing.
  • 43. What is a Digital Filter? Digital Filter: numerical procedure or algorithm that transforms a given sequence of numbers into a second sequence that has some more desirable properties.
  • 45. Advantages of using digital filters The following list gives some of the main advantages of digital over analog filters. 1. A digital filter is programmable, i.e. its operation is determined by a program stored in the processorโ€™s memory. This means the digital filter can easily be changed without affecting the circuitry (hardware). An analog filter can only be changed by redesigning the filter circuit. 2. Digital filters are easily designed, tested and implemented on a general-purpose computer or workstation. 3. The characteristics of analog filter circuits (particularly those containing active components) are subject to drift and are dependent on temperature. Digital filters do not suffer from these problems, and so are extremely stable with respect both to time and temperature. 4. Unlike their analog counterparts, digital filters can handle low frequency signals accurately. As the speed of DSP technology continues to increase, digital filters are being applied to high frequency signals in the RF (radio frequency) domain, which in the past was the exclusive preserve of analog technology. 5. Digital filters are very much more versatile in their ability to process signals in a variety of ways; this includes the ability of some types of digital filter to adapt to changes in the characteristics of the signal. 6. Fast DSP processors can handle complex combinations of filters in parallel or cascade (series), making the hardware requirements relatively simple and compact in comparison with the equivalent analog circuitry. 45
  • 46. Operation of digital filters Here, we will develop the basic theory of the operation of digital filters. This is essential to an understanding of how digital filters are designed and used. Suppose the "raw" signal which is to be digitally filtered is in the form of a voltage waveform described by the function where t is time. This signal is sampled at time intervals h (the sampling interval). The sampled value at time t = ih is Thus the digital values transferred from the ADC to the processor can be represented by the sequence corresponding to the values of the signal waveform at and t = 0 is the instant at which sampling begins. At time t = nh (where n is some positive integer), the values available to the processor, stored in memory, are Note that the sampled values xn+1, xn+2 etc. are not available, as they haven't happened yet! 46
  • 47. The digital output from the processor to the DAC consists of the sequence of values In general, the value of yn is calculated from the values x0, x1, x2, x3, ... , xn. The way in which the y's are calculated from the x's determines the filtering action of the digital filter. 47
  • 48. Examples of simple digital filters The following examples illustrate the essential features of digital filters. 1. Unity gain filter: Each output value yn is exactly the same as the corresponding input value xn: This is a trivial case in which the filter has no effect on the signal. 2. Simple gain filter: where K = constant. This simply applies a gain factor K to each input value. K > 1 makes the filter an amplifier, while 0 < K < 1 makes it an attenuator. K < 0 corresponds to an inverting amplifier. Example (1) above is simply the special case where K = 1. xn yn = K xn K 48
  • 49. 3. Pure delay filter: The output value at time t = nh is simply the input at time t = (n-1)h, i.e. the signal is delayed by time h: Note that as sampling is assumed to commence at t = 0, the input value x-1 at t = -h is undefined. It is usual to take this (and any other values of x prior to t = 0) as zero. 4. Two-term difference filter: The output value at t = nh is equal to the difference between the current input xn and the previous input xn- 1: i.e. the output is the change in the input over the most recent sampling interval h. The effect of this filter is similar to that of an analog differentiator circuit. 49
  • 50. 5. Two-term average filter: The output is the average (arithmetic mean) of the current and previous input: This is a simple type of low pass filter as it tends to smooth out high-frequency variations in a signal. (We will look at more effective low pass filter designs later). 50
  • 51. 6. Three-term average filter: This is similar to the previous example, with the average being taken of the current and two previous inputs: As before, x-1 and x-2 are taken to be zero. 51
  • 52. 7. Central difference filter: This is similar in its effect to example (4). The output is equal to half the change in the input signal over the previous two sampling intervals: 52
  • 53. Order of a digital filter The order of a digital filter is the number of previous inputs (stored in the processor's memory) used to calculate the current output. Thus: 1. Examples (1) and (2) above are zero-order filters, as the current output yn depends only on the current input xn and not on any previous inputs. 2. Examples (3), (4) and (5) are all of first order, as one previous input (xn-1) is required to calculate yn. (Note that the filter of example (3) is classed as first-order because it uses one previous input, even though the current input is not used). 3. In examples (6) and (7), two previous inputs (xn-1 and xn-2) are needed, so these are second-order filters. Filters may be of any order from zero upwards. 53
  • 54. Digital filter coefficients All of the digital filter examples given above can be written in the following general forms: Similar expressions can be developed for filters of any order. The constants b0, b1, b2, ... appearing in these expressions are called the filter coefficients. It is the values of these coefficients that determine the characteristics of a particular filter. ๐‘ฆ๐‘› = ๐‘0๐‘ฅ๐‘› ๐‘ฆ๐‘› = ๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฅ๐‘›โˆ’1 ๐‘ฆ๐‘› = ๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฅ๐‘›โˆ’1 + ๐‘2๐‘ฅ๐‘›โˆ’2 Zero order : First order : Second order: xn yn = b0 xn b0 + b0 xn Z-1 yn b1 + b0 xn Z-1 yn b1 Z-1 b2 54
  • 55. The following table gives the values of the coefficients of each of the filters given as examples above. b0 b1 b2 55
  • 56. Q1 56 a) Order = 1 : b0 = 2, b1 = -1 b) Order = 2 : b0 = 0, b1 = 0, b2 = 1 c) Order = 3 : b0 = 1, b1 = -2, b2 =2, b3 = 1
  • 57. Recursive and non-recursive filters For all the examples of digital filters discussed so far, the current output (yn) is calculated solely from the current and previous input values (xn, xn-1, xn-2, ...). This type of filter is said to be non-recursive. A recursive filter is one which in addition to input values also uses previous output values. These, like the previous input values, are stored in the processor's memory. The word recursive literally means "running back", and refers to the fact that previously-calculated output values go back into the calculation of the latest output. The expression for a recursive filter therefore contains not only terms involving the input values (xn, xn-1, xn-2, ...) but also terms in yn-1, yn-2, ... From this explanation, it might seem as though recursive filters require more calculations to be performed, since there are previous output terms in the filter expression as well as input terms. In fact, the reverse is usually the case: to achieve a given frequency response characteristic using a recursive filter generally requires a much lower order filter (and therefore fewer terms to be evaluated by the processor) than the equivalent non-recursive filter. This will be demonstrated later. 57
  • 58. Some people prefer an alternative terminology in which a non-recursive filter is known as an FIR (or Finite Impulse Response) filter, and a recursive filter as an IIR (or Infinite Impulse Response) filter. These terms refer to the differing "impulse responses" of the two types of filter. The impulse response of a digital filter is the output sequence from the filter when a unit impulse is applied at its input. (A unit impulse is a very simple input sequence consisting of a single value of 1 at time t = 0, followed by zeros at all subsequent sampling instants). An FIR filter is one whose impulse response is of finite duration. An IIR filter is one whose impulse response theoretically continues for ever because the recursive (previous output) terms feed back energy into the filter input and keep it going. The term IIR is not very accurate because the actual impulse responses of nearly all IIR filters reduce virtually to zero in a finite time. Nevertheless, these two terms are widely used. 58
  • 59. Example of a recursive filter A simple example of a recursive digital filter is given by In other words, this filter determines the current output (yn) by adding the current input (xn) to the previous output (yn-1): Note that y-1 (like x-1) is undefined, and is usually taken to be zero. 59
  • 60. Let us consider the effect of this filter in more detail. If in each of the above expressions we substitute for yn-1 the value given by the previous expression, we get the following: Thus we can see that yn, the output at t = nh, is equal to the sum of the current input xn and all the previous inputs. This filter therefore sums or integrates the input values, and so has a similar effect to an analog integrator circuit. 60
  • 61. This example demonstrates an important and useful feature of recursive filters: the economy with which the output values are calculated, as compared with the equivalent non-recursive filter. In this example, each output is determined simply by adding two numbers together. For instance, to calculate the output at time t = 10h, the recursive filter uses the expression To achieve the same effect with a non-recursive filter (i.e. without using previous output values stored in memory) would entail using the expression This would necessitate many more addition operations as well as the storage of many more values in memory. 61
  • 62. Order of a recursive (IIR) digital filter The order of a digital filter was defined earlier as the number of previous inputs which have to be stored in order to generate a given output. This definition is appropriate for non-recursive (FIR) filters, which use only the current and previous inputs to compute the current output. In the case of recursive filters, the definition can be extended as follows: The order of a recursive filter is the largest number of previous input or output values required to compute the current output. This definition can be regarded as being quite general: it applies both to FIR and IIR filters. For example, the recursive filter discussed above, given by the expression is classed as being of first order, because it uses one previous output value (yn-1), even though no previous inputs are required. In practice, recursive filters usually require the same number of previous inputs and outputs. Thus, a first- order recursive filter generally requires one previous input (xn-1) and one previous output (yn-1), while a second- order recursive filter makes use of two previous inputs (xn-1 and xn-2) and two previous outputs (yn-1 and yn-2); and so on, for higher orders. Note that a recursive (IIR) filter must, by definition, be of at least first order; a zero-order recursive filter is an impossibility. (Why?) 62
  • 63. Q2 63
  • 64. From the above discussion, we can see that a recursive filter is basically like a non-recursive filter, with the addition of extra terms involving previous inputs (yn-1, yn-2 etc.). Coefficients of recursive (IIR) digital filters A first-order recursive filter can be written in the general form ๐‘ฆ๐‘› = ๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฅ๐‘›โˆ’1 โˆ’ ๐‘Ž1๐‘ฆ๐‘›โˆ’1 ๐‘Ž0 Note the minus sign in front of the "recursive" term a1yn-1, and the factor (1/a0) applied to all the coefficients. The reason for expressing the filter in this way is that it allows us to rewrite the expression in the following symmetrical form: ๐‘Ž0๐‘ฆ๐‘› + ๐‘Ž1๐‘ฆ๐‘›โˆ’1 = ๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฆ๐‘›โˆ’1 In the case of a second-order filter, the general form is ๐‘ฆ๐‘› = ๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฅ๐‘›โˆ’1 + ๐‘2๐‘ฅ๐‘›โˆ’2 โˆ’ ๐‘Ž1๐‘ฆ๐‘›โˆ’1 โˆ’ ๐‘Ž2๐‘ฆ๐‘›โˆ’2 ๐‘Ž0 The alternative "symmetrical" form of this expression is ๐‘Ž0๐‘ฆ๐‘› + ๐‘Ž1๐‘ฆ๐‘›โˆ’1 + ๐‘Ž2๐‘ฆ๐‘›โˆ’2 = ๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฆ๐‘›โˆ’1 + ๐‘2๐‘ฅ๐‘›โˆ’2 64
  • 65. Q3 65 a0 = 1 a1 = -1 b0 = 1 b1 = 0 For filters listed in Q2 a) b0 =2 b1 = -1 a0 = 1, a1 = -1 b) b0 = 0, b1 = 1, b2 = 0, b3 = -1, a0 =1, a1 =2, a2 =0, a3 = 0 c) b0 = 1, b1 = 2, b2 =1, a0 = 1, a1= 2, a2 =-1
  • 66. The transfer function of a digital filter In the last section, we used two different ways of expressing the action of a digital filter: a form giving the output yn directly, and a "symmetrical" form with all the output terms on one side and all the input terms on the other. In this section, we introduce what is called the transfer function of a digital filter. This is obtained from the symmetrical form of the filter expression, and it allows us to describe a filter by means of a convenient, compact expression. We can also use the transfer function of a filter to work out its frequency response. First of all, we must introduce the delay operator, denoted by the symbol z-1. When applied to a sequence of digital values, this operator gives the previous value in the sequence. It therefore in effect introduces a delay of one sampling interval. Applying the operator z-1 to an input value (say xn) gives the previous input (xn-1): 66
  • 67. Suppose we have an input sequence Then and so on. Note that z-1 x0 would be x-1, which is unknown (and usually taken to be zero, as we have already seen). 67
  • 68. Similarly, applying the z-1 operator to an output gives the previous output: Applying the delay operator z-1 twice produces a delay of two sampling intervals: We adopt the (fairly logical) convention i.e. the operator z-2 represents a delay of two sampling intervals: 68
  • 69. ๐‘Ž0๐‘ฆ๐‘› + ๐‘Ž1๐‘ฆ๐‘›โˆ’1 + ๐‘Ž2๐‘ฆ๐‘›โˆ’2 = ๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฅ๐‘›โˆ’1 + ๐‘2๐‘ฅ๐‘›โˆ’2 Let us now use this notation in the description of a recursive digital filter. Consider, for example, a general second-order filter, given in its symmetrical form by the expression We will make use of the following identities: Substituting these expressions into the digital filter gives (๐‘Ž0 + ๐‘Ž1๐‘งโˆ’1 + ๐‘Ž2๐‘งโˆ’2)๐‘ฆ๐‘› = (๐‘0 + ๐‘1๐‘งโˆ’1 + ๐‘2๐‘งโˆ’2)๐‘ฅ๐‘› ๐‘ฆ๐‘› ๐‘ฅ๐‘› = (๐‘0 + ๐‘1๐‘งโˆ’1 + ๐‘2๐‘งโˆ’2 ) (๐‘Ž0 + ๐‘Ž1๐‘งโˆ’1 + ๐‘Ž2๐‘งโˆ’2) This is the general form of the transfer function for a second-order recursive (IIR) filter. 69
  • 70. A non-recursive (FIR) filter has a simpler transfer function which does not contain any denominator terms. The coefficient a0 is usually taken to be equal to 1, and all the other a coefficients are zero. The transfer function of a second-order FIR filter can therefore be expressed in the general form ๐‘ฆ๐‘› ๐‘ฅ๐‘› = ๐‘0 + ๐‘1๐‘งโˆ’1 + ๐‘2๐‘งโˆ’2 70
  • 71. [b0,b1,b2] = [1/3, 1/3, 1/3] a0 =1, an>1 =0 71
  • 72. 72
  • 73. Q4 Derive the transfer functions of each of the filters in Q 2 73
  • 74. Determine the output sequence for the filter, from y0 to y5. 74
  • 75. 75 FIR filtering โ€ข Finite Impulse Response (FIR) filters use past input samples only โ€ข Example: โ€ข y(n)=0.1x(n)+0.25x(n-1)+0.2x(n-2) โ€ข Z-transform: Y(z)=0.1X(z)+0.25X(z)z-1+0.2X(z)z-2 โ€ข Transfer function: H(z)=Y(z)/X(z)=0.1+0.25z-1+0.2z-2 โ€ข No poles, just zeroes. FIR is stable
  • 76. 76 Example โ€ข A filter is described by the following equation: โ€ข y(n)=0.5x(n) + 1x(n-1) + 0.5x(n-2) โ€ข What kind of filter is it? โ€ข Plot the filterโ€™s transfer function on the z plane โ€ข Is the filter stable? โ€ข Plot the filterโ€™s unit step response โ€ข Plot the filterโ€™s unit impulse response
  • 77. 77 FIR - IIR filter comparison โ€ข FIR โ€ข Simpler to design โ€ข Inherently stable โ€ข Can be designed to have linear phase โ€ข Require lower bit precision โ€ข IIR โ€ข Need less taps (memory, multiplications) โ€ข Can simulate analog filters
  • 78. 78 Example โ€ข A filter is described by the following equation: โ€ข y(n)=0.5x(n) + 0.2x(n-1) + 0.5y(n-1) + 0.2y(n-2), with initial condition y(-1)=y(-2) = 0 โ€ข What kind of filter is it? โ€ข Plot the filterโ€™s transfer function on the z plane โ€ข Is the filter stable? โ€ข Plot the filterโ€™s unit step response โ€ข Plot the filterโ€™s unit impulse response
  • 79. Theoretical Explanation Linear, Time Invariant Systems 79
  • 80. Systems A signal is a description of how one parameter varies with another parameter. A system is any process that produces an output signal in response to an input signal. 80
  • 81. Systems Notation: Continuous signals: x(t), y(t) Discrete signals: x[n], y[n] Time domain: lower case Frequency domain: upper case 81
  • 83. Linear Systems Requirements for Linearity: Homogeneity and Additivity 83
  • 85. Linear Systems Additivity y1[n] x1[n] x1[n] + x2[n] y1[n]+ y2[n]. x2[n] y2[n] 85
  • 86. Linear Systems Homogeneity and additivity ax1[n] + bx2[n] ay1[n]+ by2[n]. y1[n] x1[n] x2[n] y2[n] 86
  • 87. Time-Invariant Systems If an input x[n] produces an output y[n] then the input x[n+s] produces the output y[n+s] for any value of s. Note: Time invariance is not a requirement for linearity. However, almost all linear systems we deal with in DSP are time invariant. 87
  • 89. Sinusoidal Fidelity If the input to a linear system is a sinusoidal wave, the output will also be a sinusoidal wave, and will have exactly the same frequency as the input. Sinusoids are the only waveforms that have this property. 89
  • 90. Special Properties of Linearity Commutation 90
  • 91. Special Properties of Linearity A system with multiple inputs/outputs is linear if it is composed of linear systems and signal additions. 91
  • 92. Special Properties of Linearity Multiplication by a constant is a linear operation Multiplication of two signals is not a linear operation 92
  • 94. Superposition Input and output signals can be viewed as superpositions (sums) of simpler waveforms. Superposition is the foundation of DSP. The simpler waveforms may be impulses, sine waves or some other waveforms. 94
  • 95. When we are dealing with linear systems, the only way signals can be combined is by scaling (multiplication of the signals by constants) followed by addition. For instance, a signal cannot be multiplied by another signal. Decomposition is the inverse operation of synthesis, where a single signal is broken into two or more additive components. This is more involved than synthesis, because there are infinite possible decompositions for any given signal. This process of combining signals through scaling and addition is called synthesis.
  • 96. The Fundamental Concept of DSP The fundamental concept in DSP - Any signal, such as x [n], can be decomposed into a group of additive components, shown here by the signals: x0[n], x1[n], and x2[n]. Passing these components through a linear system produces the signals, y0[n], y1[n], and y2[n]. The synthesis (addition) of these output signals forms y [n], the same signal produced when x [n] is passed through the system. input signal components output signal components Common Decompositions Impulse Decomposition Step Decomposition Fourier Decomposition
  • 97. Common Decompositions Impulse decomposition Step decomposition Even/Odd decomposition Interlaced decompositions Fourier decomposition 97
  • 98. Impulse Decomposition As shown in the figure, impulse decomposition breaks an N samples signal into N component signals, each containing N samples. Each of the component signals contains one point from the original signal, with the remainder of the values being zero. A single nonzero point in a string of zeros is called an impulse. Impulse decomposition is important because it allows signals to be examined one sample at a time. Similarly, systems are characterized by how they respond to impulses. By knowing how a system responds to an impulse, the system's output can be calculated for any given input. This approach is called convolution.
  • 99. Impulse Decomposition + + + + ... X[n]=a Each of the component signals contains one point from the original signal, with the remainder of the values being zero. 99
  • 100. Step Decomposition + + + + ... Zeros for points 0 through k-1. Remaining points have a value of: x[k] - x[k-1] 100
  • 101. Even/Odd Decomposition A signal having N points broken into two components - one having even symmetry around N/2 - the other having odd symmetry around N/2 101
  • 103. Interlaced Decomposition The signal broken into two components - even samples - odd samples Needed for Fast Fourier Transform 103
  • 104. Fourier Decomposition Decomposition into Sine waves Some signals are created this way In a linear system, a sinusoidal input always results in a sinusoidal output Powerful mathematical analysis is possible 104
  • 105. Linear time-invariant (LTI) digital filters We limit ourselves to LTI digital filters only. 105
  • 107. ๐‘Ž0๐‘ฆ๐‘› + ๐‘Ž1๐‘ฆ๐‘›โˆ’1 + ๐‘Ž2๐‘ฆ๐‘›โˆ’2 = ๐‘0๐‘ฅ๐‘› + ๐‘1๐‘ฅ๐‘›โˆ’1 + ๐‘2๐‘ฅ๐‘›โˆ’2 First method in time domain: Linear difference equations The linear time-invariant digital filter can then be described by the linear difference equation: 107
  • 108. Full set of possible linear operations 108
  • 109. Linear difference equations and digital filter structure 109
  • 111. 111
  • 112. 112
  • 113. 113
  • 114. 114
  • 115. 115
  • 116. 116
  • 117. 117
  • 118. 118 Liner Digital Filter in Python https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.lfilter.html Frequency Response of the Digital Filter https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.freqz.html#scipy.signal.freqz
  • 119. 119 Python Implementation Moving Average Filter ฯ‰/ฯ€ =2f
  • 120. 120
  • 121. 121 Pole-zero plot and frequency response
  • 122. 122 โ€ข z-transform of the output/z transfer of the input โ€ข Pole-zero form ) ( ) ( ) ( z X z Y z H ๏€ฝ Transfer Function Pole-zero plot Return zero, pole, gain (z,p,k) representation from a numerator, denominator representation of a linear filter.
  • 124. 124
  • 125. 125
  • 126. 126
  • 127. 127
  • 128. 128
  • 129. 129
  • 130. 130
  • 131. 131
  • 132. 132
  • 133. 133
  • 135. 135 Generate a Gaussian random noise sequence Selective amplification of one frequency
  • 136. 136 System Stability โ€ข Position of the poles affects system stability โ€ข The position of zeroes does not