赞
踩
发送三个波,波特率2G,中心频率分别是2G 6G和10G,现在做一个带通的滤波器滤出10G的波,4阶带通开始8G,截止10G,采样率64G
[B,A]=butter(4,[8e9/(SampleRate/2) 12e9/(SampleRate/2)]);
SpectrumAnalyzer(RxWfmTemp,'fs',64)
freqz(B,A)
RxWfmTemp=filter(B,A,RxWfmTemp);
- close all;
- clear;
-
- %% parameter
- RollOff = 0.1;
- N_T = 100;
- SampleRate = 64e9;
- BaudRate = 2e9;
- UpRate = SampleRate / BaudRate;
- Len = 8192;
- TrainLen = 2048;
-
- rand('seed', 15);
- TxBit = randi([0 1],1, Len);
- TxSym = qammod(TxBit.', 2, 'InputType', 'Bit').'; %BPSK
-
- %% upsampling & RRC
- RRCFilt = rcosdesign(RollOff, N_T, UpRate, 'sqrt');
- TxWfm=upfirdn(TxSym,RRCFilt,UpRate,1);
-
- %% Frequency offset emulation
- FreOffReal1 = 2*1e9; % unknown to the receiver Hz
- RxWfm1 = TxWfm.*exp(1i*2*pi*FreOffReal1*[1:length(TxWfm)]/BaudRate/UpRate);
- FreOffReal2 = 6*1e9; % unknown to the receiver Hz
- RxWfm2 = TxWfm.*exp(1i*2*pi*FreOffReal2*[1:length(TxWfm)]/BaudRate/UpRate);
- FreOffReal3 = 10*1e9; % unknown to the receiver Hz
- RxWfm3 = TxWfm.*exp(1i*2*pi*FreOffReal3*[1:length(TxWfm)]/BaudRate/UpRate);
-
- RxWfm_Orin = RxWfm1+RxWfm2+RxWfm3;
- signalF = fftshift(fft(RxWfm_Orin));
- fs=(-length(RxWfm_Orin)/2+1:length(RxWfm_Orin)/2)*SampleRate/length(RxWfm_Orin);
- figure(1)
- plot(fs,10*log10(abs(signalF)));
- grid on
- title('滤波前')
-
- %% filter
- RxWfmTemp = RxWfm_Orin;
- [B,A]=butter(4,[8e9/(SampleRate/2) 12e9/(SampleRate/2)]);
- SpectrumAnalyzer(RxWfmTemp,'fs',64)
- freqz(B,A)
- RxWfmTemp=filter(B,A,RxWfmTemp);
- signalF = fftshift(fft(RxWfmTemp));
- fs=(-length(RxWfm_Orin)/2+1:length(RxWfm_Orin)/2)*SampleRate/length(RxWfm_Orin);
- figure(2)
- plot(fs,10*log10(abs(signalF)));
- grid on
- title('滤波后')
-
但是这个解调是错的,之后再改
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。