Compute and plot the spectrogram of beat notes

Assignment Help Other Engineering
Reference no: EM131247034

Introduction to Signal Analysis Lab

The objective of this lab is to generate samples of frequency and amplitude modulated sinusoids. We will study the effect of modulation by listening to the results converted to audio via the MATLAB command sound. This set of instructions is adapted from your textbook (DSP First - A Multimedia Approach),

A. Synthesize Beat Notes: An Example of Amplitude Modulation

1. Write a function named beat_notes that implements the sum of two sinusoidal signals of slightly different frequencies, given by the following equation:

X(t) = A cos(2π(fc - f?)t) + B cos(2π(fc + f?)t)

The function should have the following input and output parameters:

Inputs:

  • A: amplitude of lower frequency cosine (real)
  • B: amplitude of higher frequency cosine (real)
  • fc: center frequency (real and positive)
  • fdelta: frequency difference (real and positive)
  • fsamp: sampling rate (integer and positive)
  • dur: total time duration in seconds (real and positive)

Outputs:

  • t: time vector ranging from 0 to dur with a sampling rate of fsamp
  • X: vector containing samples of the sum of two sinusoids

2. An error message should be generated if any of the inputs does not meet the specified conditions.

3. The function should produce the plot of X versus t with proper labels and title. Select a small portion of the signal in order to get a clean graph (e.g. select 0.2 seconds if the total duration is 2 seconds).

4. The function should also convert the signal to audio and play it by using the MATLAB function sound with two input arguments X and fsamp.

5. Call the function in the command window for the following input sets:

i. A=10, B=10, fc=50, fdelta=10, fsamp=8000, dur=4

ii. A=10, B=10, fc=200, fdelta=10, fsamp=8000, dur=2

iii. A=10, B=10, fc=2000, fdelta=10, fsamp=8000, dur=1.5

Listen to the signal and verify that the amplitude and frequency of the "envelope" is correct in each case.

B. Synthesize a Chip: An Example of Frequency Modulation

1. Write a function named my chirp that synthesizes a "chirp" signal (a sinusoid whose frequency changes linearly over time). The equations of the chirp signal and its instantaneous frequency are as follows

X(t) = A cos(2πµt2 + 2πf0t + φ)

fi(t) = 2µt + f0

The function should have the following input and output parameters:

Inputs:

  • A: amplitude of the sinusoid (real)
  • f1: starting frequency (real and positive)
  • f2: ending frequency (real and positive)
  • phi: phase of the sinusoid (real)
  • fsamp: sampling rate (integer and positive)
  • dur: total time duration (real and positive)

Output:

  • X: vector containing samples of the chirp signal

2. An error message should be generated if any of the inputs does not meet the specified conditions.

3. To generate the chirp signal, first you need to calculate the slope and intercept of the instantaneous frequency (µ and f0) given the values of the starting and ending frequencies (f1 and f2).

4. The function should convert the signal to audio using the MATLAB function sound.

5. The function should also compute and plot the spectrogram of the chirp signal using the MATLAB function spectrogram with the following syntax:

win=256; noverlap=128; nfft=256;

spectrogram(X , win, noverlap, nfft , fsamp)

6. Call the function in the command window for the following input sets:

i. A=0.5, f1=100, f2=2000, phi=0, fsamp=8000, dur=2

ii. A=0.5, f1=100, f2=2000, phi=0, fsamp=8000, dur=5

iii. A=0.5, f1=300, f2=15000, phi=0, fsamp=8000, dur=2

iv. A=0.5, f1=300, f2=15000, phi=0, fsamp=8000, dur=5

Listen to the signal. What comments can you make regarding the sound of the chirp? Is it linear? Use the sampling theorem (from chapter 4) to explain the behavior of the chirp signal. For each input set, include in your report the spectrogram and a brief description of what you hear and observe.

Question

Compute and plot the spectrogram of beat notes by adding the spectrogram command to your beat notes function. Use the syntax and input values given in part B-5 for the spectrogram command. Call the beat notes function in the command window for the following input set:

A=10, B=10, fc=1000, fdelta=20, fsamp=8000, dur=2

How many frequency components do you expect to see in the spectrogram? at what frequencies? should the frequencies vary with time or be constant for the whole duration of the signal? is the plot consistent with your expectation? why? or why not?

Change the parameters of the spectrogram as follows:

i. win=1024; noverlap=512; nfft=1024;

ii. win=4096; noverlap=2048; nfft=4096;

Comment on how the spectrogram changes in each case. How many and what frequency components do you observe now?

Reference no: EM131247034

Questions Cloud

Describing the strategy spaces and payoff functions : Represent this game in the normal form by describing the strategy spaces and payoff functions.
What changes to the american family : What changes to the American family do you believe will be the most advantageous to children - Which will be the least advantageous? What reasons do you have to believe your opinions on this are correct?
Define way criminal justice system might address interracial : An explanation of whether or not there is a continued need for the criminal justice system to have mechanisms in place to ensure representation of racial and ethnic minorities in criminal justice professions. Then explain one way the criminal just..
Basic description of the discoveries of copernicus : Describe the early evolution of these bodies in terms of their formation and atmospheres - How is motion involved in this formation? Include a description of other bodies directly involved with their formation (such as asteroids, comets, and other..
Compute and plot the spectrogram of beat notes : ECE 201 - Introduction to Signal Analysis Fall 2016 Lab. Compute and plot the spectrogram of beat notes by adding the spectrogram command to your beat notes function. Use the syntax and input values given in part B-5 for the spectrogram command
Define the three types of data flow : Q1: Define the three types of data flow. Q2: What are the two principles of Protocol Layering?
How does this constrain a b and g : Suppose that there is limited verifiability in the sense that the court can observe only the revenue (10, x, or 0) of the team, rather than the players' individual effort levels. How does this constrain a, b, and g?
Describe the backward induction outcome of this game : If neither player chooses to stop by the end of the kth round, then both players obtain zero. Assume players want to maximize the amount of money they earn.
Calculate the mass of uranium fissioned per hour : An atomic power reactor can deliver 300 MW. If due to fission of each atom of 92U235, the energy released is 200 MeV, - calculate the mass of uranium fissioned per hour.

Reviews

Write a Review

Other Engineering Questions & Answers

  How fast will the driver be going when the stopped traffic

How fast will the driver be going when the stopped traffic is hit if the coefficient of rolling resistance is constant at 0.013? (assume minimum theoretical stopping distance and ignore aerodynamic resistance)

  Discrete-state process control

Work the problems below.  To receive any credit, you must show all work.  You may submit your work in a word processing document or in a pdf file.  Graphic files are not acceptable submissions.  Your file submission document should be entitled We..

  Determine the transfer function of the system

Determine the transfer function of the system and determine and plot the amplitude response of the system - Sketch the poles and zeros of the transfer function in the complex plane. Is the system BIBO stable?

  Simulate the hydrodynamic conditions

Coastal Engineering and Modelling 6110ENG Assignments. In the second part of the assignment, the calibrated model will be applied to simulate the hydrodynamic conditions in the period of  1997-09-06 00:00  -  1997  -09-15 00:00, 9  days). Complete ..

  Process of deterioration for concrete structures

Discuss the stages/process of deterioration for concrete structures exposed to a marine environment and provide a considered argument as to what stage of deterioration should the end service life of a structure be declared

  Why is sputtering preferable to evaporation

Explain why there is a trade-off between minimum resolution and depth of focus when using shorter wavelength photons for projection lithography

  Nominal interest rate is being charged

A loan of $12,000 is to be financed to assist in buying an automobile. On the basis of monthly compounding for 42 months, the end of month equal payment is quoted as $445. What nominal interest rate is being charged?

  Compare critically the cycle of operations

Determine, making and justifying assumptions as required, the maximum axial boring rate in units - Describe in detail with the aid of sketches

  Find the values of af - rin and rout

It is required to derive expressions for Af ≡Vo/Is, Rin , and Rout . Assume that C1 and C2 are sufficiently small that their loading effect on the basic amplifier can be neglected. Also neglect ro. Find the values of Af , Rin , and Rout for the ca..

  What structural number should be used

If a section of flexible pavement is used to replace a section of the PCC that was removed for utility work, what structural number should be used so that the PCC and flexible pavements have the same life expectancy

  Explain the application of each diode in the given diagram

State the two types of diodes being utilised in the schematic diagram shown below. Explain the application of each diode in the above diagram. Explain the application of each diode in the above diagram.

  Using multisim construct the circuits

Which types of applications are field-effect transistors preferred over bipolar junction transistors? Why?  Explain why junction field-effect transistors are considered voltage-controlled devices.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd