• 大小: 5KB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2021-04-17
  • 语言: Matlab
  • 标签: ofdm  频谱感知  

资源简介

基于OFDM信号的能量频谱感知算法仿真代码,认知无线电,频谱感知法 ,

资源截图

代码片段和文件信息

clear all;
clc;





%--------1---------2---------3---------4---------5---------6---------7---------8
% OFDM Simulation
%
%    - ECE 5664 Project
%    - Erich Cosby
%    - December 4 2001
%    - Virginia Tech Nothern Va. Center
%
% based on the matlab work of Eric Lawrey in his 1997 BSEE thesis
% “The suitability of OFDM as a modulation (调制)technique for wireless 
%  telecommunications with a CDMA comparison“ 
% refer to www.eng.jcu.edu.au/eric/thesis/Thesis.htm.
%
%

%
% Basic OFDM system parameters
%  - choice of defaults or user selections
%
fprintf (‘OFDM Analysis Program\n\n‘);
defaults = input(‘To use default parameters input “1“ otherwise input “0“:  ‘);%default  默认
%
if defaults == 1
    IFFT_bin_length = 1024;     % IFFT bin count for Tx FFT bin count for Rx
    carrier_count = 200;        % number of carriers
    bits_per_symbol = 2;        % bits per symbol
    symbols_per_carrier = 50;   % symbols per carrier
    SNR = 10;                   % channel signal to noise ratio (dB)                           
else
    IFFT_bin_length = input(‘IFFT bin length = ‘);
    carrier_count = input(‘carrier count = ‘);
    bits_per_symbol = input(‘bits per symbol = ‘);
    symbols_per_carrier = input(‘symbols per carrier =‘);
    SNR = input(‘SNR = ‘);
end
%
% Derived parameters  导出参数
%
baseband_out_length =  carrier_count * symbols_per_carrier * bits_per_symbol; 
carriers = (1:carrier_count) + (floor(IFFT_bin_length/4) - floor(carrier_count/2));%???????
conjugate_carriers = IFFT_bin_length - carriers + 2;%????????????????????????
%
%
%--------1---------2---------3---------4---------5---------6---------7---------8
%
% TRANSMIT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
%
%
% Generate a random binary output signal:生成一个随机的二进制输出信号
%   - a row of uniform random numbers (between 0 and 1) rounded to 0 or 1
%   - this will be the baseband signal which is to betransmitted.基带信号,并作为发送信号
%
baseband_out = round(rand(1baseband_out_length));
%
% Convert to ‘modulo(模) N‘ integers where       N = 2^bits_per_symbol    转换为“模N‘个整数,其中N=2^ bits_per_symbol
%   - this defines how many states each symbol can represent               这定义了每个符号可以有多少个状态
%   - first make a matrix with each column representing consecutive bits  首先,设定一个每列代表连续位的矩阵
%     from the input stream and the number of bits in a column equal to the输入流和比特量等于每码元的比特数的列数
%     number of bits per symbol
%   - then for each column multiply each row value by the power of 2 that 然后,对于每列,它代表由2的幂乘以每一行的值,并加上所有行
%     it represents and add all the rows
%   - for example:  input 0 1 1 0 0 0 1 1 1 0  重要例子。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
%                   bits_per_symbol = 2
%                   convert_matrix = 0 1 0 1 1  上下两个2进制构成一个符号  也即input输入的前后连个构成
%                                    1 0 0 1 0
%
%                   modulo_baseband = 1 2 0 3 2
%
convert_matrix = reshape(baseband_out bits_per_sy

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件       14758  2014-04-25 08:59  energy_SNR.m

评论

共有 条评论