Question

In: Electrical Engineering

Part 1. Single-tone Modulation a –Write the code for an m-file (script) to generate a single...

Part 1. Single-tone Modulation a –Write the code for an m-file (script) to generate a single tone FM signal. The modulating (message) signal is a single tone signal with frequency 1kHz and the carrier frequency is 20kHz. Vary the modulation index as m=0.2; 0.5; 1; 5 and 10. Plot your original message signal and the modulated signal for each value of m. Discuss the results. Use cosine function to define the message signal.

b- Repeat the part above only that this time generate a single tone PM signal. Compare the plots in parts a and b.

Solutions

Expert Solution

%single tone FM signal
clc
clear all
close all
t=0:pi/100:2*pi;
fc=20000;
fm=1000;
m=0.2;
AC=input('enter carrier signal amplitude');
s=AC*(cos(2*pi*fc*t+m.*cos(2*pi*fm*t)));
subplot(3,2,1);
plot(t,s);
title('FM modulation when m=0.2');
xlabel('time');
ylabel('modulated signal');
%moduation indesm=0.5
t=0:pi/100:2*pi;
m=0.5;
s=AC*(cos(2*pi*fc*t+m.*cos(2*pi*fm*t)));
subplot(3,2,2);
plot(t,s);
title('FM modulation when m=0.5');
xlabel('time');
ylabel('modulated signal');
%modulation index m=1
t=0:pi/100:2*pi;
m=1;
s=AC*(cos(2*pi*fc*t+m.*cos(2*pi*fm*t)));
subplot(3,2,3);
plot(t,s);
title('FM modulation when m=1');
xlabel('time');
ylabel('modulated signal');
%modulation index m=5
t=0:pi/100:2*pi;
m=5;
s=AC*(cos(2*pi*fc*t+m.*cos(2*pi*fm*t)));
subplot(3,2,4);
plot(t,s);
title('FM modulation when m=5');
xlabel('time');
ylabel('modulated signal');
%modulation index m=10
t=0:pi/100:2*pi;
m=10;
s=AC*(cos(2*pi*fc*t+m.*cos(2*pi*fm*t)));
subplot(3,2,5);
plot(t,s);
title('FM modulation when m=10');
xlabel('time');
ylabel('modulated signal');

%PM signal
clc
clear all
close all
t=0:pi/100:2*pi;
fc=20000;
fm=1000;
%modulation index m=0.2
m=0.2;
AC=input('enter carrier signal amplitude');
s=AC*(cos(2*pi*fc*t+m.*sin(2*pi*fm*t)));
subplot(3,2,1);
plot(t,s);
title('PM modulation when m=0.2');
xlabel('time');
ylabel('modulated signal');
%moduation index m=0.5
t=0:pi/100:2*pi;
m=0.5;
s=AC*(cos(2*pi*fc*t+m.*sin(2*pi*fm*t)));
subplot(3,2,2);
plot(t,s);
title('PM modulation when m=0.5');
xlabel('time');
ylabel('modulated signal');
%modulation index m=1
t=0:pi/100:2*pi;
m=1;
s=AC*(cos(2*pi*fc*t+m.*sin(2*pi*fm*t)));
subplot(3,2,3);
plot(t,s);
title('PM modulation when m=1');
xlabel('time');
ylabel('modulated signal');
%modulation index m=5
t=0:pi/100:2*pi;
m=5;
s=AC*(cos(2*pi*fc*t+m.*sin(2*pi*fm*t)));
subplot(3,2,4);
plot(t,s);
title('PM modulation when m=5');
xlabel('time');
ylabel('modulated signal');
%modulation index m=10
t=0:pi/100:2*pi;
m=10;
s=AC*(cos(2*pi*fc*t+m.*sin(2*pi*fm*t)));
subplot(3,2,5);
plot(t,s);
title('PM modulation when m=10');
xlabel('time');
ylabel('modulated signal');



Related Solutions

a – DSB. Write the code for an m-file (script) to generate a DSB signal. The...
a – DSB. Write the code for an m-file (script) to generate a DSB signal. The modulating (message) signal is a single tone signal with frequency 1kHz and the carrier frequency is 30kHz. Time Vector: 3001 points over range from 0 to 3ms (3 cycles of the modulating signal). Plot your original message signal both in time and its spectrum. (Note: the Matlab examples 6.1 and 6.2 will help, but use the cosine functions for your signals instead of sine...
DSB: Write the code for an m-file (script) to generate a DSB signal. The modulating (message)...
DSB: Write the code for an m-file (script) to generate a DSB signal. The modulating (message) signal is a single tone signal with frequency 1kHz and the carrier frequency is 30kHz. Time Vector: 3001 points over range from 0 to 3ms (3 cycles of the modulating signal). Plot your original message signal both in time and its spectrum. (Note: use the cosine functions for your signals). In your report you should include the plots for the modulated signal in time...
Write a program in a script file that creates m × n matrix with elements that...
Write a program in a script file that creates m × n matrix with elements that have the following values. The value of each element in the last row is the number of the column. The value of each element in the last column is the number of row +1. For the rest of the elements, each has a value equal to the sum of the element below it and the element to the right.
Write a Matlab script-file probl1.m to execute the requested commands (as much as possible) in the...
Write a Matlab script-file probl1.m to execute the requested commands (as much as possible) in the exercises below. Increase N a number of times according to N = 4, 8, 16, 32, 64, 128, . . . (1) Determine for each N the (exact) error. (2) Determine for N ≥ 16 also the convergence ratio q(h/2). This script should be based on a function-file trap.m (trapezoidal integration) as follows: function [totarea] = trap(N) format long; a = 0; b =...
#python. Explain code script of each part using comments for the reader. The code script must...
#python. Explain code script of each part using comments for the reader. The code script must work without any errors or bugs. Ball moves in a 2D coordinate system beginning from the original point (0,0). The ball can move upwards, downwards, left and right using x and y coordinates. Code must ask the user for the destination (x2, y2) coordinate point by using the input x2 and y2 and the known current location, code can use the euclidean distance formula...
I didn't know , how to write this code // This file is part of www.nand2tetris.org...
I didn't know , how to write this code // This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by Nisan and Schocken, MIT Press. // File name: projects/04/Fill.asm // Runs an infinite loop that listens to the keyboard input. // When a key is pressed (any key), the program blackens the screen, // i.e. writes "black" in every pixel; // the screen should remain fully black as long as the key is...
Windows PowerShell 1) Write a PowerShell Script to monitor a file for changes. 2) Write a...
Windows PowerShell 1) Write a PowerShell Script to monitor a file for changes. 2) Write a PowerShell Script to create a user account in a specific OU.
I need a matlab code for my presentation. Code should include Single Sideband Amplitude Modulation and...
I need a matlab code for my presentation. Code should include Single Sideband Amplitude Modulation and Demodulation. It should figure 3 things: -time domain of given message signal in Amplitude Modulation and Single Sideband Amplitude Modulation -frequency domain of given signal in Amplitude Modulation and Single Sideband Amplitude Modulation -And it should demodulate and show message signal.
Write a script that prompts the user for a pathname of a file or directory and...
Write a script that prompts the user for a pathname of a file or directory and then responds with a description of the item as a file along with what the user's permissions are with respect to it (read, write, execute).
show the MATLAB Code with comments and Write an .m file in MATLAB, that records audio...
show the MATLAB Code with comments and Write an .m file in MATLAB, that records audio (you can record your own voice for 20 seconds), takes Fourier transform of the signal (probably FFT).
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT