Experiment 4 ampling and Aliasing INTRODUCTION One of the basic processes found in digital communications is sampling. Continuous signals from analog sources such as voice, music, video or other forms of continuous information are sampled, that is measured at discrete times. These samples represent the information at these times, be it sound pressure, voltage, light intensity or some other sensor input. With transmission, the discrete samples are converted back to a continuous signal in modulation. Remember, modulation is the process of placing information on a carrier, so that the information can be sent through space, over a light link or over a cable. The received signal, which is also a continuous signal, is often sampled again before being processed to estimate the original information that was input at the transmitter. Digital to analog conversion, the reverse of the sampling, is the end of the line for the information. At this point, individual samples are converted back to voltages, sound pressures, or light intensities. In the process, discrete samples are converted back to continuous information. This process involves estimating the signal for the times between the discrete samples. As noted above, in modern transmitters, digital to analog conversion may take place at the transmitter as part of the modulation process. While sampling offers many advantages for transmitting information, the process has limits. These were investigated during the last century. Harry Nyquist published a theorem in 1928 ( Certain topics in telegraph transmission theory ) stating that 2B independent pulse samples per second could be sent through a channel of bandwidth B Hertz. Notice that this is the reverse of the theorem that bears his name. Claude hannon proved the reverse in 1949, showing that a signal that contained no components above B hertz could be completely defined by samples taken at 2B samples/second. These theorems will be investigated in this experiment. PRE-LAB 1. A sample and hold circuit may be constructed using the circuit below. The switch closes only for an infinitesimally small length of time every T seconds. x(t) t=nt HOLD For T s X s (t) This circuit can be modeled mathematically by: x( t) p( t) x( t) ( t nt) n
Where p(t) is a rectangular pulse of width T and height 1. If x(t) has a single component at some frequency, f i, what is the amplitude spectrum of x (t)? 0.1 2. Given a T s of 0.001s, assume x(t) has a single component at f1. What is the resulting T spectrum? Note the frequencies and powers (assume 1 ohm load) of the components between 0 and 1000 Hz. 0.9 1.9 3. Repeat this calculation for f2 and f3. Are the resulting spectra any T T different? PROCEDURE 1. Construct the imulink model shown below. Use ine Wave blocks from the DP ystem Toolbox for the signal sources. et the ample Time in the blocks to 1/10000, the amplitudes to 1 and the frequencies to 100, 200 and 400 Hz. et the ample and Hold Block to trigger on the rising edge. et the Pulse Generator to a Pulse type to sample based, an Amplitude of 1, Period of 10, Pulse Width of 1 and a ample Time of 1/10000. This will simulate a sampling rate of 1000 Hz. 2. Turn off the 200 Hz and 400 Hz sine wave sources for now by setting their amplitudes to zero. Run the model for 0.02s and observe the cope. Observe the three waveforms and explain the operation of the ample and Hold block. 3. Modify your model as shown below. et the Low Pass Filter block for FIR with Fpass = 500 and Fstop = 600 and Frequency Units to Hertz. et the Input F s to 10000. et the pectrum Analyzerto Overlap (%) = 0 and the pectrum units to dbw.
4. Leave the 200 Hz and 400 Hz sine wave sources off for now. Run the model for 0.5s and observe the pectrum scope. Magnify the region between 0 and 1000 Hz. Is the spectrum of the output of the ample and Hold what you calculated in the Pre-Lab? Using the cope, observe the output of the Lowpass filter and compare it with output of the Add block. Are the signals the same? 5. Change the frequency of the 100 Hz sine wave source to 900 Hz. Run the model again for 0.5s and observe the pectrum scope. Again, magnify the region between 0 and 1000 Hz. Is the spectrum what you calculated in the Pre-Lab? How does this compare with the spectrum from tep 4? Using the cope, observe the output of the Lowpass filter and compare it with the output of the Add block. Are the signals the same? How does the Lowpass filter output compare to that of tep 4? 6. Reset the 900 Hz sine wave source back to 100 Hz. et the amplitudes of the 200 Hz and 400 Hz generators to 1. Run the model for 0.5s. Using the scope, compare the output of the adder with the output of the low pass filter. Is the lowpass filter output a good facsimile of the Add block output? Make careful note of the waveform of the lowpass filter output, saving a copy. 7. et the 100 Hz generator to 900 Hz again. Run the simulation again. Using the scope, compare the output of the adder to the output of the lowpass filter. Are the signals the same? Compare the output of the lowpass filter to that of tep 6. How do you account for the similarity? 8. Rebuild the model as shown below. et the Downsample factor to 10. et the input processing to Elements as channels (sample based). This will decimate the output of the ample and Hold Block by 10 and leave one simulation sample for every sample taken by the ample and Hold. That is, each sample is held for one new sample period which is ten times longer than the sample period at the input to the Downsample block. ince the
signal is not changing over the ten samples, no information is lost in this step. ee the figure below. 10 10 samples = 1 sample from &H 1 sample = 1 sample from &H Reset the top signal generator to 100 Hz again. Run the model for.5s and observe the output of the Downsample block on the scope. Compare that to the output of the ample and Hold block. Are they basically the same? Run the model for.5s and observe the pectrum Analyzer. Are each of the signal components there? 9. Increase the Downsample factor to 20. This will remove every other sample of the ample and Hold, as shown below. 20 1 2 3 4 amples from &H Decimated samples
The signal is now effectively being sampled at 500 Hz. Run the model for.5s again and observe the output of the Downsample block on the cope. What has changed? Run the model for 10 s and observe the spectrum scope. Are the components as you expected? Why not? Turn off the 400 Hz generator and run the model again for 10s. Has anything changed? Based on the Pre-Lab, sketch the spectrum you would expect to see now that the sampling rate is 500 Hz. Where does the energy from the 400 Hz component fall in the output spectrum? (Hint: The signals are INE waves. Make sure you take that into account when calculating the phase of the spectrum components. Try making them cosine waves by making the phase offset for all the blocks PI/2.) 10. Increase the Downsample factor again to 40. This will decimate the output of the ample and Hold by 4. The sampling frequency is now 250 Hz. Run the simulation again. ketch the spectrum you would expect to see based on the Pre-Lab. Based on that, how do you account for the frequency components in the output of the Downsampler? Thoughts for Conclusion Given your observations in this experiment, what linear process is sampling similar to? Given the results from teps 8 through 10, what should go before the Downsample Block to prevent the spurious signals (signals not at the input frequencies) you observed? Do not limit your conclusions to these questions.