Digital Signals and System [4] - Sampling and Digital Filters
Sampling
Computer cannot handle continuous-time signals, therefore We need Sampling.
Reconstruct x(t) with x[n]
you can reconstruct the original singal from its sampled version IF:
- sampling rate is high enough
Shannon Sampling Theorem
For distinguishing whether the sample sequence is from which signal.
If the maximum frequency component in is
The sampling frequency must be .
Otherwise cannot reconstruct from the samples.
In other words
- The sampling frequency must be at least a double of the signal bandwidth.
- Denoted as
- or Denoted as
Note: bandwidth = highest frequency component - lowest frequency component =
lowest frequency component is because it is always the DC component.
Nyquist sampling frequency
The Minimum sampling frequency
Aliasing
- If Aliasing occur, it is impossible to reconstruct the signal from the sampled signal.
- Aliasing occur when (which means )
- If No Aliasing occur, it is possible to reconstruct the signal from the sampled signal.
- No Aliasing occur when (which means )
Sampling Output
Signal Reconstruction by interpolation
Lowpass filtering is used to reconstructed a CT signal with its sampled version.
Aliasing problem can be reduced by Lowpass filtering the signal.
Lowpass filtering is generally performed before sampling to satisfy the rule.
Cutoff frequency is at most half of the sampling rate
cutoff frequency = sampling frequency/2
Low pass filter / Interpolation filter
Suppose that x(t) has bandwidth B,
The frequency response function of the interpolation filter is
Now we look at the output.
Where
To find :
Practice Questions - Sampling
![]
Q1.
Keypoint: Use this formula to sketch the graph.
Where is the height of your graph .
First locate the Bandwidth (Maximum frequency).
In this case, Maximum frequency = 10.
(a)
Hz
Therefore
Since , No aliasing occur.
(b)
Hz
Therefore
Since , Aliasing occur.
Q2
First Identify the frequency from the signal.
has 2 frequencies : Hz and Hz
Maximum frequency = 25Hz
Nyquist sampling frequency = Hz
Therefore the has to be at least 50Hz such that .
Q3
(a)
Given
Find first.
Hz
Therefore
(b)
Reconstructed frequencies
Hz
Need Hz therefore Aliasing occurs
Now lets find the frequencies of the reconstructed frequency components:
Hz
Hz
the frequencies of the reconstructed frequency components
- 5Hz
- 10Hz
Z-transform
Relationship Between DFT and Z-Transform
when a finite number of samples (N) are considered, the N-point DFT is expressed as:
while Z transform is expressed as:
So you can see the relationship.
is actually the radian frequency.
Connection between DFT & Z transform
Discrete signals can be expressed in the sampled-time, frequency, and z-plane domains.
Important Properties of Z-transform
Z-transform Time shift property
Z-transform of delta
Z-transform convolution property
Z-transform of shifted delta
IIR/FIR filters
Basic elements for constructing a DSP system
Note:
- Delay Block is fixed. Each use of delay block means we delay the output by 1 sample period.
- Multiplier g can be any number (0 => disconnected)
- Summing block can be used as subtracter by denoting
-
next to the arrow from the function you want to subtract.
Transfer function
Transfer function of the digital filter:
Zeros and Poles
- Roots of are called Zeros.
- Attenuate (reduce) particular frequency component
- Roots of are called Poles.
- Emphasize particular frequency components
- If Zeros (O) and Poles (X) overlap, they can be canceled each other.
- if Pole = 0, it means a delay.
- A filter is stable if the absolute value of Pole < 1.
- FIR must be stable (No Pole).
Find Transfer function from a difference equation
- Transform a difference equation into Z-domain.
- Write Transfer function by change of subject.
- Then you can find Zeros and Poles as well.
IIR/FIR filters
Finite impulse response (FIR) filter
FIR - All = 0
Basically
Only Zeros, no Poles. (Pole = 0)
independent of previous y output
Example:
- FIR filter is a LTI system. (Linear and Time-Invariant)
Signature of FIR
- Difference equation
- Unit pulse response
- Transfer function
- Power spectrum
Infinite impulse response (IIR) filter
IIR is a bit complicated than FIR.
IIR - Not all = 0 (Have feedback)
Basically a Fractional Polynomial
Why are FIR filters still stable even though they contain poles?
Example:
Signature of IIR
- Difference equation (Not all )
- Unit pulse response ( is a function of and )
- Transfer function
- Power spectrum
Filter design
Adjust poles and zeros of the filter to determine the frequency response of the filter.
- Adjust zeros to kill/attenuate selected frequencies.
- Adjust poles to amplify selected frequencies.
You can reduce cost on filter design.
Useful Info
Power frequency response
Amplitude response
Filters
Lowpass Filter (LPF)
A System that:
- Passes Low-frequency signals
- Attenuates (reduce) signals with frequencies higher than the cutoff frequency
LF > HF = Lowpass Filter
Highpass Filter (HPF)
A System that:
- Passes High-frequency signals
- Attenuates (reduce) signals with frequencies lower than the cutoff frequency
HF > LF = Highpass Filter
Bandpass Filter (BPF)
A System that:
- Passes frequencies within a certain range
- rejects/ attenuates frequencies outside that range
BF > HF and LF = Bandpass Filter
Cascade/Decomposition of systems
A polynomial (the transfer function of a system) can always be factorized and decomposed.
This means as long as you know how to handle a simple system (1st or 2nd order system), you can handle any complicated system by
- decomposing it into a cascade of simple systems with simple algebras
- then handling them one by one
Significance of Zeros and Poles
Zeros
You can design a FIR filter to remove any frequency components you don’t like by placing zeros at the right positions on the unit circle.
With placing Zeros into correct positions, LPF, BPF or HPF nature based filters can be designed.
Poles
- If absolute value of pole < 1, the filter will be stable.
- If absolute value of pole = 1 , the filter will oscillate or be steady
- If absolute value of pole > 1, the filter will be unstable. (Unstable means the filter is not usable)
The pole position will also determine whether the filter is LPF or HPF.
- If Pole is in Positive
- Decays if Pole < 1 (stable)
- Grows to infinity if Pole > 1 (Not stable)
- It is a LPF (Low Pass Filter)
- If Pole is in Negative
- Decays if Pole > -1 (stable)
- Grows to infinity if Pole < -1 (Not stable)
- It is a HPF (High Pass Filter)
Practice Questions - Filter and Z transform
(a)
(b)
Poles = 0
=> System is stable because pole < 1
©
It is a FIR because the current output sample y[n] is independent of any previous y samples.
(d)
(e)
It is LPF.
(f)
Hint: Try to minimise the usage of Delay blocks.
(a)
(b)
Poles = 1 or 0
=> Not stable because one of the poles is not < 1.
©
This filter is an IIR as current output sample y[n] is dependent of previous sample y[n-1].
(d)