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

  Determine and plot the equilibrium drawdown curve

Determine and plot the equilibrium drawdown curve on a line through the well and perpendicular to the barrier.

  Digital signal processing

1. Explain in brief the design stages for digital IIR filters. Design a low pass IIR filter to meet the following specification.

  What would the total delay

Assuming D/D/1 queuing, what is the maximum queue length, and what would the total delay be from 8:00 A.M. until the queue clears?

  Kk-3 system coding in grope technology

how to write code for any particle shape using KK-3 system coding in grope technology

  Prepare a report regarding renewable energy

Prepare a 3000 words report regarding renewable energy including 12 references. You are required to submit a report on renewable energy produced by solar photovoltaic technology.

  Provide a logic diagram that shows how a memr sometimes

provide a logic diagram that shows how a memr sometimes called oe signal and a memw signal can be generated from the

  Describes cold water systems into buildings

Prepare a portfolio include a fully illustrated report that describes cold water systems into buildings, covering, as minimum, ALL the above topics.

  Discuss important characteristic of differential amplifiers

Discuss at least three very important characteristic of differential amplifiers. What do the terms inverting and non-inverting mean in the context of amplifiers?

  Benefits of belongings to a p-i club

1. Outline the role of the P&I clubs. 2. State the benefits of belongings to a P&I club.

  List the steps taken to arrive at a solution

The table below shows readings for three different cases where the circuit above, was malfunctioning. Find the fault, assuming only one device in each case has a problem. List the steps taken to arrive at a solution.

  Develop an aon project network

1. From the following information, develop an AON project network. Complete the forward and backward pass, compute activity slack, and identify the critical path. How many days will the project take?

  Determine the force on the circular strut

Determine the force on the circular strut that extends across the duct. The upstream and downstream pressures

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