Ece 201 - introduction to signal analysis fall 2016 lab am


Introduction to Signal Analysis Lab: AM & FM Signals

The objective of this lab is to generate samples of frequency modulated sound signals that mimic musical instruments such as bell. We will study the effect of modulation by listening to the signal converted to audio via the MATLAB command sound. This set of instructions is adapted from your textbook (DSP First - A Multimedia Approach), Section C.4.4.

I. Generating the Bell Envelopes

1. Write a function named bell_env that generates the bell's amplitude envelope, A(t), and modulation index envelope, I(t), which are both decaying exponentials given by the following equations:

A(t) = A0e-t/τ

I(t) = I0e-t/τ

The function should have the following input and output parameters:

Inputs:

  • A0: scale factor for amplitude envelope (real and positive)
  • I0: scale factor for modulation index (real and positive)
  • tau: time constant (real and positive)
  • dur: duration of the envelope (real and positive)
  • fsamp: sampling rate (integer and positive)

Outputs:

  • t: time vector ranging from 0 to dur with the sampling rate of fsamp
  • At: vector containing samples of the amplitude envelope
  • It: vector containing samples of the modulation index envelope

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

3. The function should define the time vector based on fsamp and dur in the first step, and use it in the second step to generate the decaying exponentials.

II. Parameters for the Bell

1. Write a function named bell that creates the actual sound signal for the bell by specifying the parameters in the FM synthesis formula given below:

X(t) = A(t) cos(2πfct + I(t) cos(2πfmt - π/2) - π/2)

The function should have the following input and output parameters:

Inputs:

  • ff: frequency vector containing fc and fm (1 × 2 matrix with real elements)
  • A0: scale factor for amplitude envelope (real and positive)
  • I0: scale factor for modulation index (real and positive)
  • tau: time constant (real and positive)
  • dur: duration of the envelope (real and positive)
  • fsamp: sampling rate (integer and positive)

Output:

  • X: vector containing samples of the bell signal

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

3. The first and second elements of the input vector ff should be stored in variables named fc and fm respectively.

4. In order to calculate the time vector, t, as well as the bell envelopes, At and  It,  the function bell_env should be called with input arguments A0, I0, tau, dur, and fsamp.

5. The bell function should use the FM synthesis formula to generate samples of the bell signal and store them in the output variable,  X.

6. The function should convert the bell signal to sound using the MATLAB function sound. It should also compute and plot the spectrogram of the bell signal using the MATLAB function spectrogram with the following syntax:

win=2048; noverlap=1024;           nfft=2048;

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

7. The function should plot about 300 samples from the middle of the signal in a second figure window with proper axis labels and  title.

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

CASE

fc(Hz)

fm(Hz)

A0

I0

τ(sec)

Tdur(sec)

fsamp(Hz)

1

110

220

1

10

2

6

11025

2

110

220

1

10

12

3

11025

3

110

220

1

10

0.3

3

11025

4

220

440

1

5

2

6

11025

5

250

350

1

5

2

5

11025

6

250

350

1

3

1

5

11025

Listen to the signal. What comments can you make regarding the sound quality? Describe how the frequency content changes, and how that change is related to I0, τ, and Tdur.

Questions

1. Try to find a closed form expression for the instantaneous frequency of the bell signal, fi(t). The equation for the bell signal is provided in part II. What is the frequency of the signal at t = 0?

2. Try to find the fundamental frequency of the bell sound signal, denoted by f0, from the second plot generated for each input set in part II (Hint: find the fundamental period from the plot and invert it to obtain the fundamental frequency).  Try to verify if the value you obtained for fundamental frequency is correct by listening to the sound. What is the relationship between f0 and the input frequencies, fc and fm? Is the lowest frequency component in the spectrogram of the sound signal always equal to the fundamental frequency? Provide a brief discussion of your results in each one of the above six cases.

3. Try to express the harmonic pattern of the bell signal in terms of the fundamental frequency, f0, carrier frequency, fc, and modulating frequency, fm (Hint: consider at least 7 frequency components in the spectrogram of each input set and study their relationship). Feel free to test your function with other combinations of fc and fm.

Attachment:- Project Report Format.rar

Request for Solution File

Ask an Expert for Answer!!
Dissertation: Ece 201 - introduction to signal analysis fall 2016 lab am
Reference No:- TGS01664500

Expected delivery within 24 Hours