UD ELEG 212 - Lab 2: Sampling, Aliasing, and Reconstruction

Unformatted text preview:

ELEG-212 Signals and Communications 1/8 Lab 2: Sampling, Aliasing, and Reconstruction 1 Overview This laboratory covers the topics of sampling, aliasing, and reconstruction. Sampling is a critical step in nearly all signal processing applications. Moreover, sampling must be properly applied to avoid aliasing and allow appropriate reconstruction of the continuous time signal. Sampling is investigated here by considering first a rotating disk illuminated by a strobe light. After applying sampling to this mechanical system, we consider one and two-dimensional signals. In the one-dimensional case, we employ chirp signals that have time varying frequency. Such signals can be visualized in the time and frequency domains, as well as listened to by outputting them through speakers. Lastly, we utilize images as two-dimensional signals to study the effects of sampling as well as reconstruction. In all cases, the results will be investigated and compared to the results predicted by the Sampling Theorem. 2 Procedures 2.1 Strobe Sampling of a Rotating Disk The effects of sampling and aliasing can be demonstrated through the use of a rotating disk and strobe light. Strobe lights, in addition to entertainment, can be utilized to determine the frequency of mechanical movements. In this experiment, a disk is affixed onto a motor that rotates at a constant speed. The disk is marked with an arrow representing a phaser. Thus, the system represents a rotating phaser. A strobe light can be used to illuminate the rotating phaser at a fixed frequency. Using this setup, complete the following and include the results in your report: a) Vary the frequency of the strobe light to determine the frequency of rotation of the phaser and motor. What should the apparent motion of the phaser be when the strobe light and phaser are at the same frequency? Determine what other strobe frequencies give the same result. What is the relation between the frequencies? b) After determining the frequency of the phaser, increase the frequency of the strobe light so that it is slightly greater than the frequency of the phaser. Observe the apparent motion of the phaser. Decrease the frequency of the strobe light so that is slightly less than the frequency of the phaser. Observe the apparent motion again. Can you explain this behavior? Is aliasing observed? Are aliasing and folding observed? c) Derive an expression for the complex phaser p[n] that gives the position of the phaser at the nth flash, assuming that the phaser is initially pointing straight up at n=0. Draw a two sided spectrum for the cases: (1) strobe frequency equals phaser frequency, (2) strobe frequency is slightly greater than phaser frequency, and (3) strobe frequency is slightly less than phaser frequency. Explain the observed apparent rotation (direction and speed) of the phaser based on the spectrums. 2.2 Chirp Signals and Aliasing Chirp signals, by definition, have time varying frequency. The time varying frequency can, for instance, be used to transmit information, which is the approach adopted in Frequency Modulation (FM) transmission. Here, we will use the frequency variations in such signals to further investigate sampling and aliasing.ELEG-212 Signals and Communications 2/8 2.2.1 Frequency Modulated Signals We will look at signals in which the frequency varies as a function of time. In the constant-frequency sinusoid 020() cos(2 ) { }jftjxt A ft eAe eπφπφ=+=ℜ (1) the argument of the cosine is also the exponent of the complex exponential, so the angle of this signal is the exponent 0(2 )ftπφ+ . This angle function changes linearly versus time, and its time derivative is 02fπwhich equals the constant frequency of the cosine in rad/sec. A generalization is available if we adopt the following notation for the class of signals represented by a cosine function with a time-varying angle: ()() cos( ()) { }jtxt A t eAeψψ==ℜ (2) The time derivative of the angle from (2) gives a frequency in rad/sec () ()idttdtωψ= (rad/sec) but we prefer units of hertz, so we divide by 2π to define the instantaneous frequency: 1() ()2idfttdtψπ= (Hz) (3) 2.2.2 Chirp, or Linearly Swept Frequency A chirp signal is a sinusoid whose frequency changes linearly from a starting value to an ending one. The formula for such a signal can be defined by creating a complex exponential signal with quadratic angle by defining ()tψ in (2) as 20() 2 2ttftψπμ π φ=++ The (scaled) derivative of ()tψ yields an instantaneous frequency, equation (3), that changes linearly versus time: 0() 2ifttfμ=+ The slope of ()ift is equal to 2μ and its intercept is equal to 0f. If the signal starts at time 0t = secs., then 0f is also the starting frequency. The frequency variation produced by such a time-varying angle is called frequency modulation. This kind of signal is an example of a frequency modulated (FM) signal. More generally, we often consider them to be part of a larger class called angle modulation signals. Finally, since the linear variation of the frequency can produce an audible sound similar to a siren or a chirp, the linear-FM signals are also called “chirps.” The following MATLAB code will synthesize a chirp: fsamp = 11025; dt = 1/fsamp; dur = 1.8; tt = 0 : dt : dur; psi = 2*pi*(0.25 + 200*tt + 500*tt.*tt);ELEG-212 Signals and Communications 3/8 xx = real( 7.7*exp(j*psi) ); soundsc( xx, fsamp ); (a) Determine the total duration of the synthesized signal in seconds, and also the length of the tt vector (number of samples). (b) In MATLAB, signals can only be synthesized by evaluating the signal’s defining formula at discrete instants of time. These are called samples of the signal. For the chirp we do the following: 20() cos(2 2 )nnnxt A t ftπμπ φ=++ where nstnT= represents discrete time instants. In the MATLAB code above, what is the value for nt ? What are the values of A, μ, 0f, and φ? (c) Determine the range of frequencies (in hertz) that will be synthesized by the MATLAB script above. Make a sketch/plot by hand or using Matlab of the instantaneous frequency versus time. What are the minimum and maximum frequencies that will be heard? (d) Listen to the signal to determine whether the signal’s frequency content is increasing or decreasing (use soundsc()). Notice that soundsc() needs to know the sampling rate at which the signal samples were created. For more information do help sound and help soundsc. Use


View Full Document

UD ELEG 212 - Lab 2: Sampling, Aliasing, and Reconstruction

Download Lab 2: Sampling, Aliasing, and Reconstruction
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab 2: Sampling, Aliasing, and Reconstruction and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab 2: Sampling, Aliasing, and Reconstruction 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?