how to do vestiage signal ?

5 次查看(过去 30 天)
ong jia eek
ong jia eek 2019-10-18
%>>>>>>>>>>>>>>>>>>>> Tuterial on AM vestigial sideband Modulation <<<<<<<<<<<<<<<<<<<<<<<<<<
clc;
close all;
clear all;
%XXXXXXXXXXXXXXXXXXXXXXXXXXX Define AM modulation Index XXXXXXXXXXXXXXXXXXX
disp(' example: m=1 means 100% modulation');
m=input(' Enter the value of modulation index (m) = ');
%m=1; % for 100% modulation
if (0>m||m>1)
error('m may be less than or equal to one and greater0 than to zero');
end
%XXXXXXXXXXXXXXXXX modulating signal generation XXXXXXXXXXXXXXXXXXXXXXXXXX
Am =input('Enter the value of amplitude modulation =');
n=input('Enter number of cycles = '); % input for number of modulationd signal cycles
%Am=5; % Amplitude of modulating signal
fa=2000; % Frequency of modulating signal
Ta=1/fa; % Time period of modulating signal
t=0:Ta/999:n*Ta; % Total time for simulation
ym=Am*sin(2*pi*fa*t); % Equation of modulating signal
figure(1)
subplot(3,1,1);
plot(t,ym), grid on;% Graphical representation of Modulating signal
%axis ([0 1 -5 5]);
title ( ' Modulating Signal ');
xlabel ( ' time(sec) ');
ylabel (' Amplitud(volt) ');
%XXXXXXXXXXXXXXXXXXXXX carrier signal generation XXXXXXXXXXXXXXXXXXXXXXXXXX
Ac=Am/m;% Amplitude of carrier signal [ where, modulation Index (m)=Am/Ac ]
fc=fa*10;% Frequency of carrier signal
Tc=1/fc;% Time period of carrier signal
yc=Ac*sin(2*pi*fc*t);% Eqation of carrier signal
subplot(3,1,2);
plot(t,yc), grid on;% Graphical representation of carrier signal
title ( ' Carrier Signal ');
xlabel ( ' time(sec) ');
ylabel (' Amplitud(volt) ');
%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX AM Modulation XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
y=Ac*(1+m*sin(2*pi*fa*t)).*sin(2*pi*fc*t)(; % Equation of Amplitude
%modulated signal
subplot(3,1,3);
plot(t,y);% Graphical representation of AM signal
title ( ' Amplitude Modulated signal ');
xlabel ( ' time(sec) ');
ylabel (' Amplitud(volt) ');
grid on;
%>>>>>>>>>>>>>>>>>>>>>> end of program <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
How to change this matlab code to vestigial side band?

回答(1 个)

Vidhi Agarwal
Vidhi Agarwal 2024-10-1
VSB is a type of amplitude modulation where one sideband is partially suppressed. This is typically done using a filter to shape the spectrum of the modulated signal. Following steps might help you in getting started:
  1. Start with the standard AM signal generation.
  2. Create a filter that will partially suppress one of the sidebands.
  3. Use the filter to modify the AM signal, resulting in a VSB signal.
Below is the code snippet for creating and using the filter:
% VSB Modulation
% Design a simple low-pass filter to simulate VSB
% Note: For a real-world application, this filter needs to be carefully designed
f_cutoff = fc + fa/2; % Example cutoff frequency for VSB
[b, a] = butter(5, f_cutoff/(fc*10), 'low'); % 5th order Butterworth filter
% Apply the filter to the AM signal
y_vsb = filter(b, a, y_am);
Sample output after considering above points is given below:
Hope that Helps!

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by