【发布时间】:2018-06-18 16:17:40
【问题描述】:
正在执行一个非常基本的 BPSK BER 测试(仅考虑 AWGN)。测试通过使用gr-mapper OOT 完成。第一个模拟基于一个简单的 BPSK 映射器 (1->1, 0->-1),如下所示。
结果与理论BER非常接近,如下图所示 在仿真中,通过改变高斯噪声源的噪声电压来指定 SNR。 Eb = RMS = sqrt((1^2 + 1^2)/2) = 1。因此,噪声电压 = sqrt(No) = math.sqrt(1/math.pow(10,SNR/10.0))。更多信息请访问link
我现在专注于在发射器和接收器处添加一个匹配滤波器,该滤波器由一个 RRC 滤波器完成,如下所示。该流程图的 BER 性能非常差。
仔细检查滤波后的 BPSK 信号后,幅度不再为 1(实际值约为 0.15),因此使用的 Eb 值不准确。为了进一步验证我的结论,我使用了 gnuradio 滤波器设计工具。该工具显示,要获得 1 的幅度,必须将增益设置为 7 左右(在此值下,BER 在某种程度上接近理论值)。
- 问题:如何确保脉冲幅度(在 t=0 时)为 1,而不将滤波器增益调整为任意值?
脉冲整形器 (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 */
如有需要,请随时询问更多信息。
问候,
【问题讨论】:
标签: gnuradio gnuradio-companion