Create a MATLAB based program in order measure and display the time lag between two delayed signals.
Added by Caitlin J.
Step 1
Sure! Here’s a step-by-step guide to create a MATLAB program that measures and displays the time lag between two delayed signals. Show more…
Show all steps
Your feedback will help us improve your experience
Adi S and 59 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Adi S.
To develop elementary signal function modules (m-files) for unit sample, unit step, exponential, and unit ramp sequences.
Sri K.
3.2 Spectrogram of Periodic Full-Wave Rectified Sinusoid A periodic signal is known to have a Fourier Series, which is usually described as a harmonic line spectrum because the only frequencies present in the spectrum are integer multiples of the fundamental frequency. With the spectrogram, it is easy to exhibit this harmonic line characteristic. More detail about the materials below can be found in Lectures 7 & 8, and the Fourier Series text in Section 3-5 and Appendix C. (a) Write a simple MATLAB script that will generate a periodic full-wave rectified sine wave once the period is given. The peak amplitude should be equal to 1. Here is a MATLAB one-liner that can form the basis of this script: tt=0:(1/fs):tStop;xx=Amp*abs(sin(2*pi*tt/T)); The values of fs, tStop, T, Amp will have to be determined. (b) Generate a full-wave rectified sine wave with T=1 sec, using a sampling rate of fs = 1000 Hz. The duration should be 5 secs, and Amp = 1. (c) Make a spectrogram with a long section duration. It is important to pick a section duration that is equal to an integer number of periods of the periodic full-wave rectified sine waveform created in the previous part. Define TSECT to get exactly 5 periods, and then determine the section length LSECT (an integer) to be used in plotspec. (d) You should expect to see a "harmonic line spectrum" in the spectrogram. Since frequency is along the vertical axis, the harmonic lines will appear as horizontal lines in the spectrogram. Make a list of all the harmonic frequencies that you can see in the spectrogram. Note the Fourier series coefficient can be found as (see Section 3-5.2): ak = 2 / (pi * (1-4k^2)) = 2 / (pi * (4k^2-1)) * e^(j*pi). (e) Determine the fundamental frequency for the harmonic lines. Note here the fundamental frequency doubles the original frequency of the sine wave after the full-wave rectification operation. (f) Measure the magnitudes of the first and third harmonic lines by using the fseriesdemo GUI first (see Slide 21 of Lecture 07 for an illustration. Another example in in Figure 2 in the Pre-Lab part on Page 6 of Lab 05 here) and then confirm your values with the Fourier Series coefficient formula: ak = 2 / (pi * (1-4k^2)) = 2 / (pi * (4k^2-1)) * e^(j*pi).
Akash M.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD