参考文献:高阶APSK信号载波同步技术研究-贺子龙(硕士论文)
仿真流程:1)产生调制数据;
2)插入帧头(帧同步);
3)成形滤波上采样;
4)加入采样偏差;
5)接收匹配滤波;
6)gardner定时同步;
7)载波同步;
8)帧同步;
9)解调;
10)误码统计;
clc
clear
close all
%% 参数设置
len = 1e5; % 每帧仿真数据长度
fame = 4; %% 帧数,帧数越多误码率越精确,仿真速度越慢
mtype = 3; %% 调制方式 1:bpsk , 2:qpsk , 3:8psk
snr = 30 ; %% 信噪比
fd = 1000; %% 多普勒频偏Hz
%% 生成bit数据
msg = randi([0 1],len*mtype,1); % 生成bit信号
[tx_mod] = modulation(mtype,msg);
figure(1)
plot(tx_mod,'.r')
title('调制后星座图')
%% 重复多帧
head = tx_mod(1:64); %% 取64个符号作为同步帧头
tx_mod_r = repmat(tx_mod.',1,fame); %% 重复帧数
%% 2倍成型滤波
sps = 2; %% 上采样倍数
Alpha = 0.45; %%滚降系数
[tx_fir,fir_hn] = rcos_up(tx_mod_r,sps,Alpha);
%% 加噪声
tx_agwn = awgn(tx_fir,snr);
%% 加频频
fs = 100e6;
ll=1:length(tx_agwn);
nco = exp(1j*fd/fs*2*pi*ll);
tx_freq = tx_agwn.*nco; %% 混频到基带
%% 加入采样偏差
ppm = 100e-6;
data_rx = func_reshape(tx_freq,fs,ppm);
%% 接收匹配滤波
data_farrow = filter(fir_hn,1,data_rx);
figure(9)
plot(data_farrow(end-1e4:end),'.r');
title('时间同步前星座图')
%% 时间同步
[gardner_out,miu_out] = gardner_func(data_farrow);
figure(10)
plot(gardner_out(end-1e4:end),'.r');
title('时间同步后星座图')
figure(11)
plot(miu_out );
title('时间同步收敛uk')
%% 载波同步
carrier_in = gardner_out(1e4:end);
[carrier_out, fo] = carrier_loop_func(carrier_in,fs/2,fd,mtype);
figure(12)
plot(carrier_in(end-1e5:end),'.r');hold on;
plot(carrier_out(end-1e5:end),'.b');hold off;
title('载波同步前后对比')
legend('载波同步前星座图','载波同步后星座图');
grid on;
%% 符号同步
sync_out = xcorr(head.',carrier_out);
figure(13)
plot(abs(sync_out));
title('符号同步相关峰')
需要matlab和FPGA代码可私信交流。