【高阶循环谱】基于FPGA的高阶循环谱的调制识别算法开发

260 篇文章 428 订阅

1.软件版本

matlab2013b,quartusii12.1

2.本算法理论知识

参考文献《基于高阶循环累积量的 OFDM 子载波盲估计》

3.部分源码

`timescale 1ns / 1ps
module C4012_cal(
               i_clk,
					i_rst,
					i_din,
					o_C40,
					o_FM
              );
				  
input i_clk;
input i_rst;
input signed[15:0]i_din;
output signed[15:0]o_C40;				  
output[1:0]   o_FM;
				  
reg signed[31:0]S2s;
reg signed[63:0]S4s;	
always @(posedge i_clk or posedge i_rst)
begin
     if(i_rst)
	  begin
	  S2s <= 32'd0;
	  S4s <= 64'd0;
	  end
else begin
	  S2s <= i_din * i_din;
	  S4s <= i_din * i_din * i_din * i_din;
     end
end


wire signed[15:0]S2;
wire signed[15:0]S4;

assign S2 = S2s[31:16];
assign S4 = S4s[63:48];


reg[11:0]cnt;
always @(posedge i_clk or posedge i_rst)
begin
     if(i_rst)
	  begin
	  cnt <= 12'd0;
	  end
else begin
          if(cnt == 12'd2000)
			 cnt <= 12'd2000;
	  else
	       cnt <= cnt + 12'd1;  
     end
end

reg start;
always @(posedge i_clk or posedge i_rst)
begin
     if(i_rst)
	  begin
	  start <= 1'd0;
	  end
else begin
          if(cnt == 12'd406)
			 start <= 1'd1;
	  else
	       start <= 1'd0;  
     end
end	
	
	
wire signed[15:0]DOUT;	
C4012 C4012_u( 
              .CLK  (i_clk),
				  .RST  (i_rst),
				  .START(start),
				  .DIN  (i_din[15:6]),
				  .DOUT (DOUT),
				  .FM   (o_FM)
				  );	
				  



reg       [15:0] CNT;
reg signed[15:0]o_C40;
reg             flag;
always @(posedge i_clk or posedge i_rst)
begin
     if(i_rst)
	  begin
	  flag <= 1'b0;
	  end
else begin    
          if(DOUT >= 1000)
			 flag <= 1'b1;
	  else
          flag <= flag;	  
     end
end

always @(posedge i_clk or posedge i_rst)
begin
     if(i_rst)
	  begin
	  CNT <= 16'd0;
	  end
else begin    
          if(flag == 1'b1)
			 begin
			     CNT <= CNT + 16'd1;
			     if(CNT >= 16'd10000)
			     CNT <= 16'd10000;
			 end
     end
end

always @(posedge i_clk or posedge i_rst)
begin
     if(i_rst)
	  begin
	  o_C40 <= 16'd0;
	  end
else begin    
         if(CNT <= 100)
		   o_C40 <= DOUT;
	  else
	      o_C40 <= 16'd0; 
     end
end
	
endmodule 				  

4.仿真分析

信号产生模块:

       这个部分主要是QPSK和BPSK信号的产生。根据QPSK和FSK的计算公式,获得如下的modelsim仿真结果:

信道模块:

        这个模块,主要是产生噪声信息。模拟一个高斯白噪声。即对输入信号加入白噪声。仿真结果如下所示:

计算4阶循环累积算法:

        下面开始对核心部分进行设计。计算C40,以及对应的FM。仿真结果如下所示:

QPSK:

FSK:

整个系统的RTL结构图如下所示:

5.参考文献

[1]郑文秀, 赵国庆, 罗明. 基于高阶循环累积量的OFDM子载波盲估计[J]. 电子与信息学报, 2008, 30(2):4.A01-107

  • 4
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
解决??? XML-file failed validation against schema located in: D:\Program Files\MATLAB\R2007b\sys\namespace\info\v1\info.xsd XML-file name: d:\program files\matlab\r2007b\toolbox\hosa_d\hosa\info.xml To retest the XML-file against the schema, call the following java method: com.mathworks.xml.XMLValidator.validate(... 'd:\program files\matlab\r2007b\toolbox\hosa_d\hosa\info.xml',... 'D:\Program Files\MATLAB\R2007b\sys\namespace\info\v1\info.xsd', true) Errors: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'area'. One of '{MathWorksID, type}' is expected. 运行hosaver: Warning: Could not find an exact (case-sensitive) match for 'hosaver'. D:\Program Files\MATLAB\R2007b\toolbox\hosa_d\hosa\HOSAVER.M is a case-insensitive match and will be used instead. You can improve the performance of your code by using exact name matches and we therefore recommend that you update your usage accordingly. Alternatively, you can disable this warning using warning('off','MATLAB:dispatcher:InexactMatch'). Higher-Order Spectral Analysis Toolbox. Version 2.0.3 (R12 compliant) 27 Dec 2000 安装原版工具箱之所以出现问题是因为没有将文件名全部改成小写,无法运行hosademo是因为缺少choices.m文件,参考http://cn.mathworks.com/matlabcentral/fileexchange/3013-hosa-higher-order-spectral-analysis-toolbox。本资源是整理后的工具箱,直接安装就可使用,运行hosaver显示成功安装信息,运行hosademo查看示例。
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

fpga和matlab

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值