Digital Signal Processing Reference
In-Depth Information
X ( f )
1
f , Hz
−B
0 B
X s ( f )
f s X(f+1.f s )
f s X ( f )
f s X(f−1.f s )
f s
f , Hz
−B
0 B f s −B
f s +B
−f s /2
f s /2
2f s
f s
X s ( v )
f s X( v + 1)
f s X( v )
f s X( v − 1)
f s X( v − 2)
f s
v
−b
0 b
1− b
1+ b
Note: b = B / f s
−0.5
0.5
1
2
Fig. D.9
Spectra of an analog signal and its digitized version
MATLAB Simulations
Task 1
Write a MATLAB code to simulate the sampling process of an analog signal.
Since analog signals are approximated on the computer, you should distinguish
between the simulation sampling period (frequency) and the actual sampling
period (frequency). Take the system sampling period to be T = 1e-4 s. With a
time limit of 10 s, generate the global time and frequency vectors. Sinusoidal and
linear FM signals are important in applications. Simulate a sinusoid of frequency
20 Hz (hence, to avoid aliasing, the sampling frequency should be more than
40 Hz). Plot the time signal and its spectrum.
Task 2
Use the MATLAB function square to simulate the time impulse train. Its duty
cycle (the ''ON''/''OFF'' duration ratio) should be very small to simulate impulses.
Its frequency would be the actual sampling frequency. Plot it in the time and the
frequency domains and verify the theoretical formulas stated above.
Task 3
Now multiply the analog signal by the sampling signal (the impulse train). Plot the
resulting spectrum for a sampling frequency of 25, 100, and 500 Hz and check for
aliasing.
 
Search WWH ::




Custom Search