mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-trx.git
synced 2025-11-03 05:33:16 +00:00
Transceiver52M: Narrow resampling filter bandwidth
This patch only applies to resampling use at 4 samples-per-symbol. By extention that means only USRP2 / N2xx devices are affected. At 4 samples-per-symbol we restrict output bandwidth to roughly roughly 700 MHz, which combined with the 2 pulse Laurent approximation yields < 0.5 degrees of RMS phase error at the resampler output. Signed-off-by: Thomas Tsou <tom@tsou.cc>
This commit is contained in:
@@ -39,7 +39,15 @@ extern "C" {
|
||||
/* Resampling parameters for 100 MHz clocking */
|
||||
#define RESAMP_INRATE 52
|
||||
#define RESAMP_OUTRATE 75
|
||||
#define RESAMP_FILT_LEN 16
|
||||
|
||||
/*
|
||||
* Resampling filter bandwidth scaling factor
|
||||
* This narrows the filter cutoff relative to the output bandwidth
|
||||
* of the polyphase resampler. At 4 samples-per-symbol using the
|
||||
* 2 pulse Laurent GMSK approximation gives us below 0.5 degrees
|
||||
* RMS phase error at the resampler output.
|
||||
*/
|
||||
#define RESAMP_TX4_FILTER 0.45
|
||||
|
||||
#define INCHUNK (RESAMP_INRATE * 4)
|
||||
#define OUTCHUNK (RESAMP_OUTRATE * 4)
|
||||
@@ -92,13 +100,8 @@ bool RadioInterfaceResamp::init()
|
||||
|
||||
close();
|
||||
|
||||
/*
|
||||
* With oversampling, restrict bandwidth to 150% of base rate. This also
|
||||
* provides last ditch bandwith limiting if the pulse shaping filter is
|
||||
* insufficient.
|
||||
*/
|
||||
if (sps > 1)
|
||||
cutoff = 1.5 / sps;
|
||||
if (mSPSTx == 4)
|
||||
cutoff = RESAMP_TX4_FILTER;
|
||||
|
||||
dnsampler = new Resampler(RESAMP_INRATE, RESAMP_OUTRATE);
|
||||
if (!dnsampler->init(cutoff)) {
|
||||
|
||||
Reference in New Issue
Block a user