Professional Documents
Culture Documents
Matlab LABs
ssbmod Function
Single sideband amplitude modulation Syntax y = ssbmod(x,Fc,Fs) y = ssbmod(x,Fc,Fs,ini_phase)
1
y = ssbmod(x,fc,fs,ini_phase,'upper') Description y = ssbmod(x,Fc,Fs) uses the message signal x to modulate a carrier signal with frequency Fc (Hz) using single sideband amplitude modulation in which the lower sideband is the desired sideband. The carrier signal and x have sample frequency Fs (Hz). The modulated signal has zero initial phase. y = ssbmod(x,Fc,Fs,ini_phase) specifies the initial phase of the modulated signal in radians. y = ssbmod(x,fc,fs,ini_phase,'upper') uses the upper sideband as the desired sideband. Construct an M-file and apply the following:
%DSB-SC vs SSB Time Domain Signals Fs = 8000; % Sampling rate is 8000 samples per second. Fc = 300; % Carrier frequency in Hz t = [0:.2*Fs]'/Fs; % Sampling times for .2 second x = sin(20*pi*t)+2*cos(2*pi*20*t); % Representation of the signal y = ammod(x,Fc,Fs); % DSB-SC signal z = ssbmod(x,Fc,Fs); % SSB signal figure; subplot(3,1,1); plot(t,x); % Plot x on top. title('Original Signal'); subplot(3,1,2); plot(t,y)% Plot y below. title('DSB-SC Modulated Signal'); subplot(3,1,3); plot(t,z)% Plot z below y. title('SSB Modulated Signal');
% Demodulation of DSB-SC AM signal s1 = amdemod(y,Fc,Fs); % Demodulate. figure; subplot(3,1,1); plot(t,y); title('DSB-SC Modulated Signal'); subplot(3,1,2); plot(t,x); title('Original Signal'); subplot(3,1,3); plot(t,s1); title('Recovered Signal');
2
% Demodulation of SSB AM signal s2 = ssbdemod(z,Fc,Fs); % Demodulate. figure; subplot(3,1,1); plot(t,z); title('SSB Modulated Signal'); subplot(3,1,2); plot(t,x); title('Original Signal'); subplot(3,1,3); plot(t,s2); title('Recovered Signal');