Home > other >  To solve on the basis of single tone to implement SSB dual signal modulation and demodulation method
To solve on the basis of single tone to implement SSB dual signal modulation and demodulation method

Time:11-18

Dear bosses, I on the basis of the single tone to achieve dual SSB modulation and demodulation of the signal, solve the demodulation code here how should change?

clc; clear all; close all; % to delete all the source code and procedures the results
% % %========================baseband signal parameter========================% % %
Am1=2; % Am1 is the first baseband signal amplitude/V
Am2=3; % Am2 as the second baseband signal amplitude/V
Fm1=100; % fm1 for first baseband signal frequency (Hz)
Fm2=200; % fm2 for second baseband signal frequency/Hz
Fc=300; % fc as the carrier signal frequency/Hz
Fs=4 * fc; % the Fs of sampling frequency/Hz
T=1-0/4 * (fc) : 1-1/4 * (fc); % t for modulation signal time discrete values/s
Mt1=Am1 * cos (2 * PI * fm1 * t); % the baseband signal generation
Fmt1=FFT (Mt1); % of the baseband signal Fourier transform
F1=(0: length (Fmt1) - 1) * Fs/length (Fmt1); % in the frequency domain frequency values
N1=length (Mt1);
Fshift1=(n1/2: n1/2-1) * (length (f1)/n1); % spectrum move
Ffmt1=fftshift (Fmt1);
Mt2=Am2 * cos (2 * PI * fm2 * t); % the baseband signal generation
Fmt2=FFT (Mt2); % of the baseband signal Fourier transform
F2=(0: length (Fmt2) - 1) * Fs/length (Fmt2); % in the frequency domain frequency values
N=length (Mt2);
Fshift2=(n2/2: n2/2-1) * (length (f2)/n2); % spectrum move
Ffmt2=fftshift (Fmt2);
Mt=Mt1 + Mt2; Synthetic baseband signal %
Fmt=FFT (Mt); % of the baseband signal Fourier transform
F=(0: length (Fmt) - 1) * Fs/length (Fmt); % in the frequency domain frequency values
N3=length (Mt);
Fshift=(n3/2: n3/2-1) * (length (f)/n3); % spectrum move
Ffmt=fftshift (Fmt);
% % %========================carrier signal parameter========================% % %
Cm=5; Ac for carrier signal amplitude/V %
Ct=Cm * cos (2 * PI * fc * t); % generated carrier signal
Ct0=Cm * sin (2 * PI * fc * t);
% generated carrier signal sine transformFct has grown=FFT (Ct); % of the carrier signal Fourier transform
F2=(0: length (Fct has grown) - 1) * 4 * fc/length (Fct has grown); % in the frequency domain frequency values
N=length (Ct);
Fshift2=(n/2: n/2-1) * (length (f2)/n); % spectrum move
Ffct=fftshift (Fct has grown);
% % %==================the baseband signal time domain waveform and spectrum graph==================% % %
Figure (1)
Subplot (2, 2, 1);
The plot (t, Mt1, '-' b)
Xlabel (' time t/s); Ylabel (' range of A/V); The title (' first baseband signal time domain waveform figure)
The axis ([0, 1-3 of 3])
Subplot (2,2,2);
The plot (fshift1, abs (Ffmt1), 'g -')
Xlabel (' frequency f/Hz); Ylabel (' amplitude/dB); The title (' first baseband signal frequency domain waveform figure)
The axis ([- 200, 200, 1500])
% % %==================the baseband signal time domain waveform and spectrum graph==================% % %
Subplot (2, 2, 3);
The plot (t, Mt2, '-' b)
Xlabel (' time t/s); Ylabel (' range of A/V); The title (' second baseband signal time domain waveform figure)
Axis ([0, 1-4 of 4])
Subplot (2, 2, 4-trichlorobenzene);
The plot (fshift2, abs (Ffmt2), 'g -')
Xlabel (' frequency f/Hz); Ylabel (' amplitude/dB); The title (' second baseband signal frequency domain waveform figure)
The axis ([- 300, 300, 2000])
% % %==================synthesis of baseband signal time domain waveform and spectrum graph==================% % %
Figure (2)
Subplot (2, 2, 1);
The plot (t, Mt, '-' b)
Xlabel (' time t/s); Ylabel (' range of A/V); The title (' synthetic baseband signal time domain waveform figure)
The axis ([0, 1-6 of 6])
Subplot (2,2,2);
The plot (fshift, abs (Ffmt), 'g -')
Xlabel (' frequency f/Hz); Ylabel (' amplitude/dB); The title (' synthetic baseband signal frequency domain waveform figure)
The axis ([- 300, 300, 2000])
% % %====================carrier signal time domain waveform and spectrum graph====================% % %
Subplot (2, 2, 3);
The plot (t, Ct, b '-')
Xlabel (' time t/s); Ylabel (' range of A/V); The title (' carrier signal time domain waveform figure)
The axis ([0, 1-6 of 6])
Subplot (2, 2, 4-trichlorobenzene);
The plot (fshift2, abs (Ffct), 'g -')
Xlabel (' frequency f/Hz); Ylabel (' amplitude E/V); The title (' carrier signal frequency domain waveform figure)
The axis ([- 400, 400, 4000])
% % %=======================modulated and demodulation signal generated=======================% % %
St=Mt. * Ct + imag (Hilbert (Mt). * Ct0; % to generate the modulated signals of lower
Fst=FFT (St);
Fst=abs (Fst (round (1: length (Fst)/2 + 1))); % the frequency spectrum of the modulated signal
F3=[0: length (Fst) - 1) * Fs/length (Fst)/2; % frequency spectrum of modulated signal
Jt=ssbdemod (St, fc, Fs); % demodulation, the role of the low-pass filter using ssbdemod function
Fjt=FFT (Jt);
Fjt=abs (Fjt (round (1: length (Fjt)/2 + 1))); % demodulation signal spectrum
F4=[0: length (Fjt) - 1) * Fs/length (Fjt)/2; The frequency of the % demodulation signal spectrum
% % %====================modulated signal time domain waveform and spectrum graph====================% % %
Figure (3)
Subplot (2, 2, 1);
The plot (t, St, '-' b)
Xlabel (' time t/s); Ylabel (' range of A/V); The title (' LSB LSB modulated signal time domain waveform figure ')
Axis ([0, 1-15 15])
Subplot (2,2,2);
The plot (f3, Fst, 'g -')
Xlabel (' frequency f/Hz); Ylabel (' amplitude E/V); The title (' LSB lower frequency modulated signal waveform figure ')
The axis ([0, 400, 10000])
% % %====================demodulation signal time domain waveform and spectrum graph====================% % %
Subplot (2, 2, 3);
The plot (t, Jt, '-' b)
Xlabel (' time t/s); Ylabel (' range of A/V); The title (' demodulation signal time domain waveform figure)
Axis ([0, 1-15 15])
Subplot (2, 2, 4-trichlorobenzene);
The plot (f4, Fjt, 'g -')
Xlabel (' frequency f/Hz); Ylabel (' amplitude E/V); The title (' demodulation signal frequency domain waveform figure)
The axis ([0, 400, 10000])
% % %=====================reception and treatment and observation window=====================% % %
N1=length (St);
W_han1=(boxcar (N1) ';
N=length (Fst);
W_han2=(boxcar (N2)) ';
J1=st. * w_han1;
J2=abs (Fst). * w_han2;
Figure (4)
Subplot (2,1,1)
The plot (t, J1, '-' b)
Xlabel (' time t/s); Ylabel (' range of A/V); Title (' lower time domain waveform figure after add window reception ')
Axis ([0, 1-15 15])
Subplot (2,1,2)
The plot (f3, J2, 'g -')
Xlabel (' frequency f/Hz); Ylabel (' amplitude E/V); Title (' receiving lower frequency domain after add window modulation signal waveform figure ')
The axis ([0, 400, 10000])
  • Related