GNU Radio BPSK BER仿真:RRC脉冲幅度归一化

时间:2018-06-08 12:37:01

标签: gnuradio gnuradio-companion

正在执行非常基本的BPSK BER测试(仅考虑AWGN)。使用gr-mapper OOT完成测试。第一次模拟基于如下所示的简单BPSK映射器(1-> 1,0-> -1)。 BER without MF

结果非常接近理论BER,如下所示 BER 在模拟中,通过改变高斯噪声源的噪声电压来指定SNR。 Eb = RMS = sqrt((1 ^ 2 + 1 ^ 2)/ 2)= 1.因此,噪声电压= sqrt(否)= math.sqrt(1 / math.pow(10,SNR / 10.0))。可在此link

找到更多信息

我现在专注于在发射器和接收器处添加由一个RRC滤波器完成的匹配滤波器,如下所示。该流程图的BER性能非常差。

flowgraph

仔细检查滤波的BPSK信号后,幅度不再为1(实际值约为0.15),因此使用的Eb值不准确。为了进一步验证我的结论,我使用了gnuradio过滤器设计工具。该工具显示,要获得1的幅度,增益必须设置为7(在此值,BER在某种程度上接近理论)。

  1. 问题:如何在不将滤波器增益控制为任意值的情况下确保脉冲幅度(t = 0)为1?
  2. RRC pulse  脉冲整形器的代码(debug_pulseshape_pam_2)如下所示

    #ifdef HAVE_CONFIG_H
    #include "config.h"
    #endif
    
    #include <gnuradio/io_signature.h>
    #include "debug_pulseshape_pam_2_impl.h"
    #include <gnuradio/blocks/char_to_float.h>
    #include <gnuradio/digital/map_bb.h>
    #include <gnuradio/filter/interp_fir_filter_fff.h>
    
    namespace gr {
         namespace baseband {
    
    debug_pulseshape_pam_2::sptr
    debug_pulseshape_pam_2::make(std::vector<float> taps,float sps)
    {
      return gnuradio::get_initial_sptr
        (new debug_pulseshape_pam_2_impl(taps, sps));
    }
    
    /*
     * The private constructor
     */
    debug_pulseshape_pam_2_impl::debug_pulseshape_pam_2_impl(std::vector<float> taps,float sps)
      : gr::hier_block2("debug_pulseshape_pam_2",
              gr::io_signature::make(1, 1, sizeof(unsigned char)),
              gr::io_signature::make(1, 1, sizeof(float)))
    {
      //Initializing the map block
      std::vector<int> map;
      map.push_back(-1);
      map.push_back(1);
      gr::digital::map_bb::sptr mapper(gr::digital::map_bb::make(map));
    
      //Initializing char_to_float block
      gr::blocks::char_to_float::sptr float_char(gr::blocks::char_to_float::make());
    
      //Initializing add const block
      //gr::blocks::add_const_ff::sptr const_add(gr::blocks::add_const_ff::make(-0.5));
    
      //Initializing an interpolating FIR filter
      gr::filter::interp_fir_filter_fff::sptr fir(gr::filter::interp_fir_filter_fff::make(int(sps),taps));
    
      connect(self(),0,mapper,0);
      connect(mapper,0,float_char,0);
      connect(float_char,0, fir, 0);
      connect(fir, 0,    self(), 0);
    }
    
    /*
     * Our virtual destructor.
     */
    debug_pulseshape_pam_2_impl::~debug_pulseshape_pam_2_impl()
    {
    }
    
    
    } /* namespace baseband */
    } /* namespace gr */
    

    如有需要,请随时询问更多信息。

    此致

1 个答案:

答案 0 :(得分:0)

我终于能够解决问题了。原来噪声必须除以每个符号的样本数。 enter image description here