您现在的位置:首页 >> 通信 >> 内容

基于OFDM的通信链路误码率matlab仿真,采用多径信道,卷积编码,16QAM

时间:2023/1/2 20:00:50 点击:

  核心提示:A173包括程序操作录像...

1.完整项目描述和程序获取

>面包多安全交易平台:https://mbd.pub/o/bread/Y52ckptr

>如果链接失效,可以直接打开本站店铺搜索相关店铺:

点击店铺

>如果链接失效,程序调试报错或者项目合作可以加微信或者QQ联系。

2.部分仿真图预览



3.算法概述

        在通信系统中,信道所能提供的带宽通常比传送一路信号所需的带宽要宽得多。如果一个信道只传送一路信号是非常浪费的,为了能够充分利用信道的带宽,就可以采用频分复用的方法。

        OFDM主要思想是:将信道分成若干正交子信道,将高速数据信号转换成并行的低速子数据流,调制到在每个子信道上进行传输。正交信号可以通过在接收端采用相关技术来分开,这样可以减少子信道之间的相互干扰(ISI) 。每个子信道上的信号带宽小于信道的相关带宽,因此每个子信道上可以看成平坦性衰落,从而可以消除码间串扰,而且由于每个子信道的带宽仅仅是原信道带宽的一小部分,信道均衡变得相对容易。

       OFDM技术是HPA联盟(HomePlug Powerline Alliance)工业规范的基础,它采用一种不连续的多音调技术,将被称为载波的不同频率中的大量信号合并成单一的信号,从而完成信号传送。由于这种技术具有在杂波干扰下传送信号的能力,因此常常会被利用在容易受外界干扰或者抵抗外界干扰能力较差的传输介质中

4.部分源码

Assuming the channel response is invariant during one frame

pilot_sym = pilot_generator(128);               % Generate the pilot symbols, all in BPSK modulation

pilot_syms=pilot_sym';

pilot_syms=pilot_syms(:)';

idx=0;

for snr = 0:4:40

    idx=idx+1;

    nframe = 0;

    nerror = 0;

    while nframe < frame_num

        nframe

        info_bits = round(rand(1, N_DBPF));     % Generate the information bites randomly

        tail = zeros(1,6);                      % Tail bits for convolutional encoder

        info_bits = [info_bits tail];           % Append the tail bits to the infomation bits

        trl = poly2trellis(7,[133 171]);        % Trellis structure of convolutional encoder,

                                                % Constraint length K = 7,generator polynomial in octal g0 = 133, g1 = 171

        code_bits = convenc(info_bits, trl);    % Convolutional encoder,rate R = 1/2

        TX = tx_16qam_mod(code_bits); % 16-QAM modulation

        figure(1)

        a=real(TX);

        b=imag(TX);

        plot(a,b,'bx')

        pilot_num = 1;               % The start number of the cyclic pilot symbols 

        tx = tx_fre_to_time(TX,N_SPF,pilot_syms,pilot_num);    % Serial to parallel,Add pilot symbols, IFFT ( Oversampling),Add cyclic prefix                                      

        temp_channel = channel_response(:,nframe+1).'; % Channel response at the current frame

        ry = channel_multipath(tx,temp_channel);      % Multi-path channel

        ry = awgn(ry,snr);                            % Add addictive white gaussian noise

        [RY,R_pilot] = ry_time_to_fre(ry,N_SPF,temp_channel); % Recover the time signal to frequency symbols of each subcarrier and Channel Equalization

        figure(2)

        a=real(RY);

        b=imag(RY);

        plot(a,b,'bx')

        axis([-2 2  -2 2]);

        hold on

        Rcode_bits = ry_16qam_demod(RY);                        % Demodulate the received symbols

        dec_bits = ry_sovadec(Rcode_bits, trl, N_DBPF,N_DBPF);  % Soft output viterbi decoding, out = ln( p(info_bits(i)=1)/p(info_bits(i)=0));

        for i = 1:N_DBPF

            if dec_bits(i) >= 0

                hard_det(i) = 1;                                % hard_det refers to the hard decision   

            else 

                hard_det(i) = 0;

            end

            if hard_det(i) ~= info_bits(i)

                nerror = nerror+1;

            end

        end

        nframe = nframe + 1;

    end

    BER(idx) = nerror/(frame_num * N_DBPF);

end

A173

作者:我爱C编程 来源:我爱C编程
本站最新成功开发工程项目案例
相关文章
相关评论
发表我的评论
  • 大名:
  • 内容:
本类固顶
  • 没有
  • FPGA/MATLAB商业/科研类项目合作(www.store718.com) © 2025 版权所有 All Rights Reserved.
  • Email:1480526168@qq.com 站长QQ: 1480526168