This document discusses digital signal processing using digital filters in MATLAB. It begins by introducing signals and their analog and digital processing. It then covers key digital signal processing tasks like filtering, transforms, and convolution. It describes different filter types including FIR and IIR, and filter design methods. MATLAB sessions are included to demonstrate filtering and filter design. The overall document provides a conceptual overview of digital filters and digital signal processing.
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Digital Signal Processing-Digital Filters
1. DSPing with Digital Filters
An simulation through MATLAB
advanced tools
This work is licensed under a Creative Commons Attribution 2.5 India License.
By
nmx prime
@ssh daemon
catch~me<at>nelsonanand@gmail.com
2. Signals
• Exists as
– Physical quantity such as force, velocity, vibration
– Electrical such as electric & magnetic fields
– Optical quantity, the Photon
– Energy, the Quantum
• These are continuous i.e., analog in nature
3. Analog Processing
• Analog is continuously changing w.r.t time
• Before 19th century, we don’t have digital
world, where analog way is only available
signal processing tool
• Analog processing includes filtering,
impedance matching, transistor based
designs, etc.,
4. Digital signal processing
• When signal is processed as integers &
floating numbers, it’s DSP.
• Requires converting physical quantity to
numerical values, accompanied through ADC
• Even, we require less complication; so, we
digitized the Discrete domain, where all
dimensions are discrete
5. DSP Tasks,(usual)
• Filtering – Removing unwanted frequencies from
a signal.
• Spectrum Analysis – Determining the features
constellated in frequencies of a signal.
• Synthesis – Generating complex signals such as
speech.
• System Identification – Identifying the properties
of a system by numerical analysis.
• Compression – Reducing the memory or
bandwidth it takes to store a signal, such as audio
or video.
7. Convolution
• Mathematical way of combining two signals to
form a third signal.
• Resolving of a continuous function.
• Otherwise called ,
helps to analyze any complex signal as one
sample per instant.
• Indeed it’s sampling &actually filtering.
• This results in Impulse Response of LTI systems
Tells why shd use impulse
response & why every sys
has to be LTI
8. Convolution (cntd.,)
• Types –based on the graphical orientation,
–Linear
Resolute a continuous line into segments
–Circular
Resolute a circle into wheel of equal
separation
9. Linear Convolution
• Allows sequences of unequal lenghts to be
convolved.
• Let 2 sequences of length M and N (M≠N).
The resulting convolved signal will be of
length M+N-1.
10. Linear Convolution
• Allows sequences of unequal lenghts to be
convolved.
• Let 2 sequences of length M and N (M≠N).
The resulting convolved signal will be of
length M+N-1.
12. Fourier approach
• Split & work efficiently..
– Split complex signal into easier sinusoids…
• In the jargon of signal processing,
the input and output signals are viewed as
a superposition (sum) of simpler waveforms.
• This is the basis of nearly all signal processing
techniques.
13. • Jean Baptiste Joseph Fourier (1768-1830),
• 4 types
–Aperiodic-Continuous Fourier Transform
–Periodic-Continuous Fourier Series
–Aperiodic-Discrete Discrete Time Fourier
Transform.
• Periodic-Discrete Discrete Fourier
Transform(DFT)
14. • acc to review of Joseph Louis Lagrange & Simon
de Laplace, Fourier analysis fits to Infinite length
sequence
• But DSPs process only finite length sequence
• Way is “imagined infinitive”
– Seeing finite as periodic repetitions & considering
single periodic component, the actual signal .
• Indeed entire DSP is agreement & understanding
ha ha ha!! !! !!
15. • Extracting feature from the signal
Spectral Analysis
of Signals
• Describing a system & it’s
performance
Frequency
Response of
Systems
• Convolution in T.D. is Multiplication
of their Fourier Spectrum
Convolution
16. Spectral Analysis
13 Hz peak due to 3-blade propeller running @4.3 rpm
Analysis of submarine movements (SONAR)
Img courtesy of Steven W Smith, California Technical Pubs
17. Frequency Response of System
Img courtesy of Steven W Smith, California Technical Pubs
19. Time Domain (vs)
Frequency Domain
• TD Natural domain of every timely
described signals
• FD Analysis & Synthesis Domain
• TD compresses FD expands
• When the time domain is compressed until it
becomes an impulse, the frequency domain is
expanded until it becomes a constant value.
20. The MAG &PHASE(polar form)
Img courtesy of Steven W Smith,California Technical Pubs
22. Polar
Mag & phase
Graphs of polar co-ordinate
Suitable for representation
Rectangular
Real & Imaginary
Cosine & sine components
Suitable for software computations
23. sinc & pulse
Img courtesy of Steven W Smith, California Technical Pubs
24. Convolution from DFT
• This is called circular convolution
– Multiplication of DFTs of the sequences
• The convolving sequences should be of equal
length.
• If not equal, should be made equal using
zero padding[inserting zeros]
(agreement of trigonometry)
25. DFT
Sampled Fourier Tranform.
Spectrum viewer, relates
the contribution of each
frequency to the
information
26. So ,what’s ω,Ω,F and f
F-CTS Frequency (cycles / second)
f-DTS Frequency (cycles / sample)
t=nT, T is sampling period (seconds/sample)
1/F=n/Fs , Fs is sampling frequency
1/n=F/Fs
f=F/Fs
Cycles/second
Samples/second
Cycles
Samples
Ω=2πF
ω=2πf
Measured in
redians
28. Filtering
• separation of signals that have been combined
• restoration of signals that have been distorted
• every linear filter has an impulse response, a
step response and a frequency response.
30. Filtering (cntd.,)
• impulse response- specifies the filter
performance in time domain
• step response- describes the waveshape
preserving quality of filter
– Important when information is coded in the waveshape of the signal(modulations)
• frequency response-
– Linear scale-passband ripple &role-off(described well on linear)
– Logarithmic scale-stopband attenuation(described well on log)
31. Time domain parameters
• These can be analyzed through step response
• Rise & Fall time
• Overshoot
• Linear phase
32. Rise & Fall Time
Should be as fast as possible
Img courtesy of Steven W Smith, California Technical Pubs
33. Overshoot
Img courtesy of Steven W Smith, California Technical Pubs
distortion of the information contained in the time domain.
34. Linear Phase
The Symmetry, needed to make the rising edges look the same as the falling edges
Img courtesy of Steven W Smith, California Technical Pubs
36. Frequency domain parameters (cntd.,)
• All filters introduce a delay in response,
• Measured as group delay & phase delay
– Rate of change of phase to the frequency
37. Digital Filtering
• Filtering through lump of numerical values
those are actually real physical quantities
• They are called ARMA filters
– Auto Regressive Moving Average Filter
• Indeed, it’s basically averaging
38. To design a filter, we
need
• Filter specifications, the
need
• Filter response, how we
attain the need
• It’s efficiency in terms of
Real-Time
implementation
• This is why algorithms
are still developed
The DSP System
IIR
FIR
LMS
43. Custom responses
• Comb
• Notch
• All pass (sometime “all stop”)
• Interpolator
• Decimator
Multirate Signal Processing
44. Butterworth
Response
No ripple in
passband &
stopband
Long transition
region , i.e., skirt
length
Predictable phase
& group delay
Src & Img courtesy: White MS, Delmar EE series
45. Chebyshev
response
ripple in passband
& no ripples in
stopband
Shorter skirt
length i.e., steep
cut-off
Approximately
predictable phase
& group delay
Low pass filter
Src & Img courtesy: White MS, Delmar EE series
46. Inverse
chebyshev
Ripple in stopband
& no ripple in
passband
Shorter skirt
length i.e., steep
cut-off
Unpredictable
phase & group
delay Band pass filter
Src & Img courtesy: White MS, Delmar EE series
47. Cauer response
Ripple in pass & stp band
Highly distorted phase
response
Very narrow skirt, i.e.,
steeper response than
other
Only predicted data table
to design filters
Band stop filter
Src & Img courtesy: White MS, Delmar EE series
48. Analysis
• Mag res
• Phase res
Design
• FIR/IIR/LMS
& others
Implement
• structure
• platform
Transfer function
Real-time constraints
DSP
SYSTEM
49. Digital Filters
• IIR Infinite Impulse response
– Produces infinite output points when excited by
an impulse signal(very short signal of area=1)
• FIR Finite Impulse response
– Produces finite output points of length(size) N
when excited by an impulse signal
50. IIR Filters
• They are sampled versions of analog filters
• General DSP equation of IIR filter is
Filter co-efficients
Previous inputs
Previous outputs
Filtered
output
51. IIR Filters
• The transfer function model of IIR filters is
Zeros
poles
Transfer function
52. Poles & Zeros
• Pole location
– defines the frequencies to pass
• Zero location
– defines the frequencies to be stopped
54. IIR filter design
• They have poles & zeros as like analog filters tf
• So, they have parental s-plane poles & zeros
• Hence, analog parameters in s-plane can be
transformed into Digital parameters in z-plane
56. FIR Filters
• No poles no parental s-plane
• General DSP equation of FIR filter is
Filter co-efficients
Previous inputs
Filtered
output
57. Constraint on FIR filter
• In DSP jargon, the impulse response is not fully
immersed in input signal
• This causes a transient in TD
• That’s why brick wall filter with transiently spread
impulse response is yet possible not in real-time
0
Img courtesy of Steve Winder , Newnes Pubs
58. The solution is
• Shift negative time to zero time
• Approximate the filter kernel
Img courtesy of Steven W Smith, California Technical Pubs
59. Ensues
• Ripples
• -(N/2)th sample shifted as 0th sample
• 0th sample shifted to (N/2)-1th sample
• Or it could be
• -1th sample shifted as (N/2)th sample
0-N/2
(N/2)-1
Signal component
0 N-1
Usually ignored
61. FIR Types
– Consider M is filter order(taps)-no. of co-eff
• Symmetric h(n)=h(M-1-n) &
– M is Odd
– M is Even
• AntiSymmetric h(n)=-h(M-1-n) &
– M is Odd
– M is Even
63. FIR Design methods
• Frequency Sampling Method
• Windowing Technique
• Remez Algorithm (aka., equiripple)
– Based on Alternation theorem
– Implemented by Parks-McClellan Iteration
Program