Matlab: A single tone modulated FM waveform can be expressed as shown in Equation (A.29); and the frequency domain in Equation (A.30). Using Equation (A.30), plot the one-sided frequency domain PSD (use 20*log10 |S(f)|) using a range of n=-5 to 5 in Equation (A.30) and an Ac=1 for the following signals: e) fc=200KHz, fm = 200Hz and frequency deviation of 400 f) fc=200KHz, fm = 200Hz and frequency deviation of 1000 g) fc=200KHz, fm = 500Hz and frequency deviation of 1000 h)_fc=200KHz, fm = 500Hz and frequency deviation of 2500 For each case, answer the following questions: 1. If all the components from n=+/- 5 are included, what is the total bandwidth of the modulated signal? 2. From the component shown on the plot, what is the percent of power represented in the last frequency component? 3. Based on your answer to the question above, is the bandwidth sufficient? Suggestions/Comments Use stem plotting command to generate the plots. The parameter 'BaseValue' of the stem plot will enable you to adjust the base value of the stem plot. Always label axis and title graph
use this code on the bottom to answer the question in the photo
clc;
clearvars;
% Read the file
[y, Fs] = audioread('106miles.wav');
N = length(y);
Nfft = 2^nextpow2(N);
dt = 1/Fs;
t = (0:dt:(N-1)*dt)'; % Ensure t is a column
y = y - mean(y); % Remove DC component (if not already zero-mean)
% Carrier signal (25 kHz)
fc = 25000; % Carrier frequency in Hz
carrier = cos(2 * pi * fc * t);
% DSB-SC Modulation
modulated_signal = y .* carrier;
% Plot Time Domain Signal
figure;
subplot(2,1,1);
plot(t, y);
title('Original Signal (Time Domain)');
xlabel('Time (s)');
ylabel('Amplitude');
subplot(2,1,2);
plot(t, modulated_signal);
title('DSB-SC Modulated Signal (Time Domain)');
xlabel('Time (s)');
ylabel('Amplitude');
% Frequency Domain (FFT)
Y = fft(y, Nfft) / Nfft;
Modulated_Y = fft(modulated_signal, Nfft) / Nfft;
f = Fs * (0:(Nfft/2)) / Nfft; % Frequency vector
% Plot Frequency Domain Signal
figure;
subplot(2,1,1);
plot(f, abs(Y(1:Nfft/2+1)));
title('Original Signal (Frequency Domain)');
xlabel('Frequency (Hz)');
ylabel('Magnitude');
subplot(2,1,2);
plot(f, abs(Modulated_Y(1:Nfft/2+1)));
title('DSB-SC Modulated Signal (Frequency Domain)');
xlabel('Frequency (Hz)');
ylabel('Magnitude');
% Power Calculations
power_TDomainSignal = sum(y.^2) / length(y);
power_FDomainSignal = sum(abs(Y).^2);
disp(['Power (Time Domain): ' num2str(power_TDomainSignal)]);
disp(['Power (Frequency Domain): ' num2str(power_FDomainSignal)]);
% Observations
disp('Observations:');
disp('1. The original signal has a dominant low-frequency spectrum.');
disp('2. After DSB-SC modulation, the spectrum shifts around ±25 kHz, indicating successful modulation.');
disp('3. The time-domain waveform shows the original signal amplitude modulated by the carrier wave.');
disp('4. Power in both domains remains consistent, confirming energy conservation.');


Step by step
Solved in 2 steps with 1 images









