1.完整项目描述和程序获取
>面包多安全交易平台:https://mbd.pub/o/bread/ZJyXkppq
>如果链接失效,可以直接打开本站店铺搜索相关店铺:
>如果链接失效,程序调试报错或者项目合作也可以加微信或者QQ联系。
2.部分仿真图预览
3.算法概述
QPSK(Quadrature Phase Shift Keying)是一种常用的调制方式,它可以在相位和幅度上分别携带两个比特的信息。在无线通信中,由于信号传输过程中可能会受到频偏(Frequency Offset)的影响,导致接收端信号的频率和发送端信号的频率不完全一致。频偏会引起接收信号的相位偏移,从而导致解调错误和误码率的增加。为了减少频偏对通信系统性能的影响,需要进行频偏估计和补偿。本文将详细介绍基于FFT傅里叶变换的QPSK基带信号频偏估计和补偿算法,包括数学原理、实现过程和应用领域。
4.部分源码
`timescale 1ns / 1ps
//
// Company:
// Engineer:
//
// Create Date: 2023/05/03 06:21:37
// Design Name:
// Module Name: TEST
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//
module TEST();
reg i_clk;
reg i_rst;
reg i_clkSYM;
reg i_dat;
wire o_Idiff;
wire o_Qdiff;
wire signed[15:0]o_Ifir_T;
wire signed[15:0]o_Qfir_T;
wire signed[9:0]mcos0;
wire signed[9:0]msin0;
//QPSK调制
TQPSK TQPSKU(
.i_clk (i_clk),
.i_rst (i_rst),
.i_clkSYM(i_clkSYM),
.i_dat (i_dat),
.o_Idiff(o_Idiff),
.o_Qdiff(o_Qdiff),
.o_Ifir (o_Ifir_T),
.o_Qfir (o_Qfir_T),
.mcos0 (mcos0),
.msin0 (msin0)
);
wire [31:0]o_freq;
wire signed[15:0]o_cos;
wire signed[15:0]o_sin;
wire signed[15:0]o_Ifir;
wire signed[15:0]o_Qfir;
wire o_ends;
wire o_start;
wire o_enable;
wire signed[31:0]absy;
//QPSK相位估计和补偿
RQPSK_phase_est RQPSKU(
.i_clk (i_clk),
.i_rst (i_rst),
.i_clkSYM(i_clkSYM),
.i_I(o_Ifir_T),
.i_Q(o_Qfir_T),
.o_ends(o_ends),
.o_start(o_start),
.o_enable(o_enable),
.absy (absy),
.o_freq(o_freq),
.o_cos (o_cos),
.o_sin (o_sin),
.o_Ifir (o_Ifir),
.o_Qfir (o_Qfir)
);
reg writeen;
initial
begin
writeen = 1'b0;
i_clk = 1'b1;
i_clkSYM=1'b1;
i_rst = 1'b1;
#1600
i_rst = 1'b0;
#100
writeen = 1'b1;
end
always #5 i_clk=~i_clk;
always #80 i_clkSYM=~i_clkSYM;
initial
begin
i_dat = 1'b0;
#1440
repeat(250)
begin
#160 i_dat = 1'b1;
#160 i_dat = 1'b1;
#160 i_dat = 1'b0;
#160 i_dat = 1'b0;
#160 i_dat = 1'b0;
#160 i_dat = 1'b1;
#160 i_dat = 1'b0;
#160 i_dat = 1'b1;
#160 i_dat = 1'b1;
#160 i_dat = 1'b0;
#160 i_dat = 1'b0;
#160 i_dat = 1'b0;
#160 i_dat = 1'b0;
#160 i_dat = 1'b0;
#160 i_dat = 1'b0;
#160 i_dat = 1'b0;
#160 i_dat = 1'b0;
#160 i_dat = 1'b0;
#160 i_dat = 1'b1;
#160 i_dat = 1'b1;
#160 i_dat = 1'b1;
#160 i_dat = 1'b0;
#160 i_dat = 1'b0;
#160 i_dat = 1'b1;
#160 i_dat = 1'b0;
#160 i_dat = 1'b0;
#160 i_dat = 1'b1;
#160 i_dat = 1'b1;
#160 i_dat = 1'b0;
end
$stop();
end
//显示发射端带相位旋转的星座图
integer fout1;
integer fout2;
initial begin
fout1 = $fopen("It.txt","w");
fout2 = $fopen("Qt.txt","w");
end
always @ (posedge i_clk)
begin
if(writeen==1)
begin
$fwrite(fout1,"%d\n",o_Ifir_T);
$fwrite(fout2,"%d\n",o_Qfir_T);
end
end
//显示接收端相位估计和补偿之后的星座图
integer fout3;
integer fout4;
initial begin
fout3 = $fopen("Ir.txt","w");
fout4 = $fopen("Qr.txt","w");
end
always @ (posedge i_clk)
begin
if(writeen==1)
begin
$fwrite(fout3,"%d\n",o_Ifir);
$fwrite(fout4,"%d\n",o_Qfir);
end
end
endmodule
00_033m
---