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

  Characterization technology for nanomaterials

Calculate the reciprocal lattice of the body-centred cubic and Show that the reciprocal of the face-centred cubic (fcc) structure is itself a bcc structure.

  Calculate the gasoline savings

How much gasoline do vehicles with the following fuel efficiencies consume in one year? Calculate the gasoline savings, in gallons per year, created by the following two options. Show all your work, and draw boxes around your answers.

  Design and modelling of adsorption chromatography

Design and modelling of adsorption chromatography based on isotherm data

  Application of mechatronics engineering

Write an essay on Application of Mechatronics Engineering

  Growth chracteristics of the organism

To examine the relationship between fermenter design and operating conditions, oxygen transfer capability and microbial growth.

  Block diagram, system performance and responses

Questions based on Block Diagram, System Performance and Responses.

  Explain the difference in a technical performance measure

good understanding of Mil-Std-499 and Mil-Std-499A

  Electrode impedances

How did this procedure affect the signal observed from the electrode and the electrode impedances?

  Write a report on environmental companies

Write a report on environmental companies

  Scanning electron microscopy

Prepare a schematic diagram below of the major parts of the SEM

  Design a pumping and piping system

creating the pumping and piping system to supply cool water to the condenser

  A repulsive potential energy should be a positive one

Using the data provided on the webvista site in the file marked vdw.txt, try to develop a mathematical equation for the vdW potential we discussed in class, U(x), that best fits the data

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