Lab #4 (AM and FM Sinusoidal Signals)

Lab #4 (AM and FM Sinusoidal Signals)

DSP First Lab oratory Exercise AM and FM Sinusoidal Signals The ob jective of this lab is to intro duce more complicated signals that are related to the basic sinusoid These are signals which implement frequency mo dulation FM and amplitude mo du lation AM are widely used in communication systems such as radio and television but they also can be used to create interesting sounds that mimic musical instruments There are a num nkht ber of demonstrations on the CDROM that provide examples of these signals for many dierent CDROM conditions FM Syn thesis Overview Wehavespent a lot of time learning ab out the prop erties of sinusoidal waveforms of the form o n j j f t xtA cos f t e Ae e In this lab wewillcontinue to investigate sinusoidal waveforms but for more complicated signals comp osed of sums of sinusoidal signals or sinusoids with changing frequency Amplitude Mo dulation If weaddseveral sinusoids each with a dierent frequency f we can express the result as k N N X X j f t k Z e xt A cos f t e k k k k k k j k where Z A e is the complex exp onential amplitude The choice of f will determine the k k k nature of the signalfor amplitude mo dulation we picktwo or three frequencies very close together see Chapter Frequency Mo dulated Signals We will also lo ok at signals in which the frequency varies as a function of time In the constant frequency sinusoid the argument of the cosine is also the exp onent of the complex exp onential so the phase of this signal is the exp onentf t This phase function changes linearly versus time and its time derivativeisf which equals the constant frequency of the cosine nkht notation for the class of signals with A generalization is available if we adopt the following CDROM timevarying phase FM Syn jt thesis xtA cos t efAe g The time derivative of the phase from gives a frequency d t radsec t i dt but we prefer units of hertz so wedivideby to dene the instantaneous frequency d f t t Hz i dt Chirp or Linearly Swept Frequency nkht A chirp signal is a sinusoid whose frequency changes linearly from some lowvalue to a high one The CDROM formula for such a signal can b e dened by creating a complex exp onential signal with quadratic Sp ectrograms phase by dening tinas Sounds Wide tt f t band FM The derivativeof t yields an instantaneous frequency that changes linearly versus time f tt f i The slop e of f t is equal to and its intercept is equal to f If the signal starts at t then i f is also the starting frequency The frequency variation pro duced by the timevarying phase is called frequency modulation and this class of signals is called FM signals Finally since the linear variation of the frequency can pro duce an audible sound similar to a siren or a chirp the linearFM signals are also called chirps Advanced Topic Sp ectrograms It is often useful to think of signals in terms of their sp ectra A signals sp ectrum is a representation of the frequencies present in the signal For a constant frequency sinusoid as in the sp ectrum consists of two spikes one at f the other at f For more complicated signals the sp ectra may be very interesting and in the case of FM the sp ectrum is considered to be timevarying One way to represent the timevarying sp ectrum of a signal is the spectrogram see Chapter in t in short sections of the the text A sp ectrogram is found by estimating the frequency conten nkht signal The magnitude of the sp ectrum over individual sections is plotted as intensityor color on CDROM atwodimensional plot versus frequency and time Sounds Sp ec There are a few imp ortantthingsto know ab out sp ectrograms trograms In Matlab the function specgram will compute the sp ectrogram as already explained in Lab Typ e help specgram to learn more ab out this function and its arguments Sp ectrograms are numerically calculated and only provide an estimate of the timevarying frequency content of a signal There are theoretical limits on how well they can actually representthe frequency content of a signal Lab will treat this problem when we use the sp ectrogram to extract the frequencies of piano notes Warmup The instructor verication sheet may b e found at the end of this lab Matlab Synthesis of Chirp Signals a The following Matlab co de will syn thesize a chirp fsamp dt fsamp dur tt dt dur psi pi tt tttt xx real expjpsi sound xx fsamp Determine the range of frequencies in hertz that will b e synthesized by this Matlab script Make asketch byhandoftheinstantaneous frequency versus time What are the minimum and maximum frequencies that will b e heard Listen to the signal to verify that it has the exp ected frequency content Instructor Verication separate page b Use the co de provided in part a to help you write a Matlab function that will synthesize achirp signal according to the following comments function xx mychirp f f dur fsamp MYCHIRP generate a linearFM chirp signal usage xx mychirp f f dur fsamp f starting frequency f ending frequency dur total time duration fsamp sampling frequency OPTIONAL default is if nargin Allow optional input argument fsamp end When unsure ab out a command use help Generate a chirp sound to match the frequency range of the chirp in part a Listen to the chirp using the sound function Also compute the sp ectrogram of your chirp using the Matlab function specgramxxfsamp Instructor Verication separate page Lab A Chirps and Beats Synthesize a Chirp Use your Matlab function mychirp to synthesize a chirp signal for your lab rep ort Use the following parameters A total time duration of secs with a DA conversion rate of f Hz s The instantaneous frequency starts at Hz and ends at Hz Listen to the signal What comments can you make regarding the sound of the chirp eg is it linear Do es it chirp down or chirp up or b oth Create a sp ectrogram of your chirp signal Use the sampling theorem from Chapter in the text to help explain what you hear and see Beat Notes In the section on beat notes in Chapter of the text we analyzed the situation in whichwe had twosinusoidal signals of slightly dierent frequencies ie xtA cos f f tB cos f f t c c In this part we will compute samples of such a signal and listen to the result a Write an Mle called beatm that implements and has the following as its rst lines function xx tt beatA B fc delf fsamp dur BEAT compute samples of the sum of two cosine waves usage xx tt beatA B f delf fsamp dur A amplitude of lower frequency cosine B amplitude of higher frequency cosine fc center frequency delf frequency difference fsamp sampling rate dur total time duration in seconds xx output vector of samples OPTIONAL Output tt time vector corresponding to xx Hand in a copy of your Mle You might want to call the sumcos written in Lab to do the calculation The function could also generate its own time vector You may elect to not nkht implement the second output vector tt but it is quite convenient for plotting To assist you CDROM in your exp eriments with b eat notes a new to ol called beatcon has b een created This user beatconm interfacecontrol ler actually calls your function beatm Therefore b efore you invoke beatcon you should b e sure your Mle is free of errors Once you have the function beatm working prop erly invoke the demoto ol by typing beatcon at the Matlab prompt A small control panel will app ear on the screen with buttons and sliders that vary the dierent parameters for these exercises Exp eriment with the beatcon control panel and use it to complete the remainder of exercises in this section fc b Test the Mle written in part a via beatcon by using the values A B delf fsamp and dur secs Plot the rst seconds of the resulting signal Describ e the waveform and explain its prop erties Hand in a copyofyour plot with measure ments of the p erio d of the envelop e and p erio d of the high frequency signal underneath the envelop e c For this part set delf to Hz Send the resulting signal to the DtoA converter and listen to the sound there is a button on beatcon that will do this for you automatically Explain the nature of the sound based on the waveform plotted in part b and on the theory develop ed in Chapter d Exp eriment with dierentvalues of the frequency dierence f More on Sp ectrograms Optional Beat notes provide an interesting waytoinvestigate the timefrequency characteristics of sp ectro grams Although some of the mathematical details are beyond the reach of this course it is not dicult to understand the following issue there is a fundamental tradeo b etween knowing which frequencies are present in a signal or its sp ectrum and knowing how those frequencies vary with time As mentioned previously in Section a sp ectrogram estimates the frequency content over short sections of the signal Long sections give excellent frequency resolution but fail to track frequency changes well Shorter sections have p o or frequency resolution but go o d tracking This tradeo b etween the section length in time and frequency resolution is equivalent to Heisenburgs Uncertainty Principle in physics More discussion of the sp ectrogram can be found in Chapter and Lab A b eat note signal maybeviewed as a single frequency signal whose amplitude varies with time or as two signals with dierent constant frequencies Both views will b e useful in evaluating the eect of window length when nding the sp ectrogram of a b eat signal a Create and plot a b eat signal with i f Hz ii T sec dur iii f Hz or Hz s iv f Hz b Find the sp ectrogram

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us