Question

In: Electrical Engineering

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 and for the spectrum of the modulated signal.

AM:

For the same message signal and same carrier as in part a. write the code for an m-file to generate an AM signal. Do simulations for the following percentages of modulation: 1. 25% 2. 50% 3. 100% and 4.125%. In your report you should include the plots for the modulated signal in time and for the spectrum of the modulated signal for each of the 4 cases.

Discuss the results relative to the modulation index m.

SSB:

Use Matlab to implement a 4 pole-pair Butterworth band-pass filter to select the lower frequency component of the DSB modulated signal in part a. Plot the signal at the output of the filter in time and its spectrum.

Solutions

Expert Solution

Dear user,

Please find the Code attached.

Code:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clc;
clear all;
close all;
%% Problem 1
fm=1e3;
fc=30e3;
t=0:1/1e6:3e-3;
m=1*cos(2*pi*fm.*t);
s=1*cos(2*pi*fc.*t);
subplot(2,1,1);
plot(t,m);title('Message Signal time domain');
subplot(2,1,2);
plot([0:length(m)-1]*1e6/length(m),abs(fft(m)));
title('Freq Domain');
%% Problem 1 DSB
modulated=m.*s; % DSB =m(t)*c(t)
figure(2)
subplot(2,1,1);
plot(t,modulated);title('Modulated Signal time domain');
subplot(2,1,2);
plot([0:length(modulated)-1]*1e6/length(modulated),abs(fft(modulated)));
title('Freq Domain');
%% Am=Ac(1+Ka*m(t))*cos(2*pi*fc*t) AM
%% Problem 2
per_modu=[0.0125 0.5 1 0.04125];
for i=1:length(per_modu)
am(i,:)=(1+(per_modu(i).*m)).*s; %AM = Ac(1+Ka*Am*cos(2*pi*fm*t))*cos(2*i*fc*t)
end
figure(3)
subplot(4,2,1)
plot(t,am(1,:));title('Time domain % of modulation=1.25');
subplot(4,2,2)
plot([0:length(modulated)-1]*1e6/length(modulated),abs(fft(am(1,:))));
title('Freq domain for same');
subplot(4,2,3)
plot(t,am(2,:));title('Time domain % of modulation=50');
subplot(4,2,4)
plot([0:length(modulated)-1]*1e6/length(modulated),abs(fft(am(2,:))));
title('Freq domain for same');
subplot(4,2,5)
plot(t,am(3,:));title('Time domain % of modulation=100');
subplot(4,2,6)
plot([0:length(modulated)-1]*1e6/length(modulated),abs(fft(am(3,:))));
title('Freq domain for same');
subplot(4,2,7)
plot(t,am(4,:));title('Time domain % of modulation=4.125');
subplot(4,2,8)
plot([0:length(modulated)-1]*1e6/length(modulated),abs(fft(am(4,:))));
title('Freq domain for same');
%% Butter Worth Filter Design
%% Allowing Freq= 29KHz
fc=[28.995e3 29.005e3];
fs=1e6;
[b,a]=butter(2,fc./[fs/2],'bandpass'); %design butter worth filter here
%figure(4)
%freqz(b,a);
%title('Butter worth Filter');
%% SSB reception
out=filter(b,a,modulated);
figure
subplot(2,1,1)
plot(t,out);
title('Time domain');
subplot(2,1,2)
plot([0:length(m)-1]*1e6/length(m),abs(fft(out)));
title('Freq Domain');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Outputs:

From figure (3) for various modulation index, we can see that the AM wave gets distorted in the frequency spectrum this can be seen in the form of phase reversal occuring for 100% modulation index which is undesirable.

thus we maintain modulation index <1 to have good reception as we can see from plots 0.125 and 0.4125 .

For the fourth figure, please note that we need to receive 29KHz signal from DSB and in frequency domain it is shown by zooming and placing cursor on the peak i.e 2.899e4=29KHz.

Thus we have obtained as expected.

Please let me know if you have any doubts

ThankYou.


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...
5. What are two methods to generate single-side band AM signal. If the modulating signal (message)...
5. What are two methods to generate single-side band AM signal. If the modulating signal (message) has DC omponent, which method you will choose? Why? could you please answer this in a complete brief explanation?
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...
A DSB signal is squared to generate a carrier component that may then be used for...
A DSB signal is squared to generate a carrier component that may then be used for demodulation. (A technique for doing this, namely the phase-locked loop, will be studied in the next chapter.) Derive an expression that illustrates the impact of interference on this technique.
Generate a baseband message signal m(t) to be a square waveform of duration 120 msec and...
Generate a baseband message signal m(t) to be a square waveform of duration 120 msec and amplitude 1 V. The sampling frequency is - = 10 . Use a carrier of amplitude 1 and frequency 600 Hz and perform the following modulation/demodulation operations: 1. DSB-SC a. modulation of the message signal m(t) b. coherent demodulation, assuming that the local carrier @ the receive-side is perfectly synchronized in frequency and phase with the transmit-side carrier. c. lowpass filtering of the demodulated...
6.“It is easy to generate a code given a message, but virtually impossible to generate a...
6.“It is easy to generate a code given a message, but virtually impossible to generate a message given a code”describes the __________ hash function property. A.second preimage resistant B.preimage resistant C.strong collision resistant D.collision resistant
Using Matlab, write code to generate Three signal components We will use a sum of sinusoids,...
Using Matlab, write code to generate Three signal components We will use a sum of sinusoids, all of which are sampled at 10 kHz. Signal 1 should contain a sum of sinusoids with frequencies at 25Hz, 40Hz and 75Hz. Signal 2 should contain a sum of sinusoids with frequencies at 600Hz, 730Hz, and 800Hz. Signal 3 should contain a sum of sinusoids with frequencies at 3500Hz, 4000Hz, and 4200Hz. Choose a variety of amplitudes and phase shifts for the sinusoids....
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 =...
Consider a message signal m(t) with bandwidth W = 5.86 kHz. This signal is applied to...
Consider a message signal m(t) with bandwidth W = 5.86 kHz. This signal is applied to a product modulator, together with a carrier wave c t = cos(210000πt) producing the DSB-SC modulated wave s(t). This modulated wave is next applied to a coherent detector producing an output signal y(t). The coherent detector consists of a product modulator that multiplies s(t) by c r = 2cos(222000πt) and a low pass filter which has a cut off frequency 21 kHz. The output...
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