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 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.
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).
Linux Script Convert String (Part 1) Write a simple shell script that takes a permission string...
Linux Script Convert String (Part 1) Write a simple shell script that takes a permission string expressed as -rwxrwxrwx and prints out whether or not theobject is a directory, file or link. The string is read in from standard input. Convert String (Part 2) Modify the script so its able to print out the octal permission which the string represents along with the file type. This is in addition to part 1. Convert String (Part 3) For the script in...
Create a bash script file named assessment-script-a that: 1. Accepts any number of file names on...
Create a bash script file named assessment-script-a that: 1. Accepts any number of file names on the command line 2. For each file name provided, delete any line that contains the string: qwe.rty When the changes are completed, the script should display the total number of files scanned, and the total number of files changed. Example Command: assessment-script-a file.a file.b file.c file.d file.e    Example Output: 5 files scanned, 3 files changed 3. Your script should include a series of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT