For help on printing figures in Simulink select the link.
In the previous experiments, we saw that the frequency
content of a signal must be limited to half the sampling rate in order
to avoid aliasing effects in the reconstructed signal.
However, reconstruction can be difficult
if the sampling rate is chosen to be just above the Nyquist frequency.
Reconstruction is much easier for a higher sampling
rate because the sampled signal will better “track”
the original analog signal.
From another perspective, the analog output filter must have
a very sharp cutoff in order to accurately reconstruct
a signal that was sampled just above the Nyquist rate.
Such filters are difficult and expensive to manufacture.
Alternatively, a higher sampling rate allows the use
analog output filters that have a slow roll-off.
These filters are much less expensive.
However, a high sampling rate is not practical in most applications, as
it results in unnecessary samples and excessive storage requirements.
A practical solution to this dilemma is to interpolate
the digital signal
to create new (artificial) samples between the existing samples.
This may be done by first upsampling the digital representation, and then
filtering out unwanted components using a discrete-time filter.
This discrete-time filter serves the same purpose as an
analog filter with a sharp cutoff, but it is generally simpler
and more cost effective to implement.
Upsampling a signal by a factor of LL is simply the process of inserting
L-1L-1 zeros in between each sample. The frequency domain relationship
between a signal x(n)x(n) and its upsampled version z(n)z(n)
can be shown to be the following
Z
(
e
j
ω
)
=
X
(
e
j
ω
L
)
.
Z
(
e
j
ω
)
=
X
(
e
j
ω
L
)
.
(11)Therefore the DTFT of z(n)z(n) is simply X(ejω)X(ejω) compressed
in frequency by a factor of L. Since X(ejω)X(ejω) has a period of
2π2π, Z(ejω)Z(ejω) will have a period of 2π/L2π/L. All
of the original information of x(n)x(n) will be contained in the
interval [-π/L,π/L][-π/L,π/L] of Z(ejω)Z(ejω), and the new
aliases that are created in the interval [-π,π][-π,π] are the
unwanted components that need to be filtered out. In the time domain,
this filtering has the effect
of changing the inserted zeros into artificial
samples of x(n)x(n), commonly known as interpolated samples.
Figure 6 shows a Simulink model
that demonstrates discrete-time interpolation.
The interpolating system contains three main components:
an upsampler which inserts L-1L-1 zeros between each input sample,
a discrete-time low pass filter which removes aliased
signal components in the interpolated signal,
and a gain block to correct the magnitude of the final signal.
Notice that "signal a" is the input discrete-time
signal while "signal c" is the final interpolated
discrete-time signal.
Open the experiment by double clicking on the icon labeled
Discrete Time Interpolator.
The components of the system are initially set
to interpolate by a factor of 1.
This means that the input and output signals will
be the same except for a delay.
Run this model with the initial settings,
and observe the signals on the Scope.
Simulink represents any discrete-time signal
by holding each sample value over a certain time period.
This representation is equivalent to a sample-and-hold reconstruction
of the underlying discrete-time signal.
Therefore, a continuous-time Spectrum Analyzer
may be used to view the frequency content
of the output "signal c". The Zero-Order Hold at the Gain
output is required as a buffer for the Spectrum Analyzer in order
to set its internal sampling period.
The lowest frequency component in the spectrum corresponds to the frequency
content of the original input signal,
while the higher frequencies are aliased components
resulting from the sample-and-hold reconstruction.
Notice that the aliased components of "signal c"
appear at multiples of the sampling frequency of 1 Hz.
Print the output of the Spectrum Analyzer.
Submit your plot of "signal c" and its frequency spectrum.
Circle the aliased components in your plot.
Next modify the system to upsample by a factor
of 4 by setting this parameter in the Upsampler.
You will also need to set the Sample time of the DT filter to 0.25.
This effectively increases the sampling frequency of the system to
4 Hz.
Run the simulation again and observe the behavior of the system.
Notice that zeros have been inserted between samples of the input signal.
After you get an accurate plot of the output frequency spectrum,
print the output of the Spectrum Analyzer.
Notice the new aliased components generated by the upsampler.
Some of these spectral components lie between the frequency
of the original signal and the new sampling frequency, 4 Hz.
These aliases are due to the zeros that are
inserted by the upsampler.
Submit your plot of "signal c"
and its frequency spectrum.
On your frequency plot, circle the first aliased component
and label the value of its center frequency.
Comment on the shape of the envelope of the spectrum.
Notice in the previous Scope output that the process of
upsampling causes a decrease in the energy of the
sample-and-hold representation by a factor of 4. This is
the reason for using the Gain block.
Now determine the gain factor of the Gain block and
the cutoff frequency of the
Discrete-time LP filter needed to produce the desired
interpolated signal.
Run the simulation and observe the behavior of the system.
After you get an accurate plot of
the output frequency spectrum,
print the output of the Spectrum Analyzer.
Identify the change in the location of
the aliased components in the output signal.
Submit your plot of "signal c"
and its frequency spectrum.
Give the values of the cutoff frequency and gain that were used.
On your frequency plot, circle the location
of the first aliased component.
Explain why discrete-time interpolation is desirable before
reconstructing a sampled signal.