mirror of https://github.com/PentHertz/srsLTE.git
Added option in pdsch_ue for experimental robust MMSE equalization (currently not working)
This commit is contained in:
parent
121fe89ac1
commit
cd5f750c86
|
@ -39,7 +39,6 @@
|
|||
|
||||
#include "srslte/srslte.h"
|
||||
|
||||
|
||||
#ifndef DISABLE_RF
|
||||
#include "srslte/rf/rf.h"
|
||||
#include "srslte/rf/rf_utils.h"
|
||||
|
@ -75,6 +74,7 @@ typedef struct {
|
|||
bool disable_plots;
|
||||
bool disable_plots_except_constellation;
|
||||
bool disable_cfo;
|
||||
bool use_robust_lmmse;
|
||||
uint32_t time_offset;
|
||||
int force_N_id_2;
|
||||
uint16_t rnti;
|
||||
|
@ -95,6 +95,7 @@ typedef struct {
|
|||
|
||||
void args_default(prog_args_t *args) {
|
||||
args->disable_plots = false;
|
||||
args->use_robust_lmmse = false;
|
||||
args->disable_plots_except_constellation = false;
|
||||
args->nof_subframes = -1;
|
||||
args->rnti = SRSLTE_SIRNTI;
|
||||
|
@ -117,7 +118,7 @@ void args_default(prog_args_t *args) {
|
|||
}
|
||||
|
||||
void usage(prog_args_t *args, char *prog) {
|
||||
printf("Usage: %s [agpPoOcildDnruv] -f rx_frequency (in Hz) | -i input_file\n", prog);
|
||||
printf("Usage: %s [agpPoOcilLdDnruv] -f rx_frequency (in Hz) | -i input_file\n", prog);
|
||||
#ifndef DISABLE_RF
|
||||
printf("\t-a RF args [Default %s]\n", args->rf_args);
|
||||
printf("\t-g RF fix RX gain [Default AGC]\n");
|
||||
|
@ -132,6 +133,7 @@ void usage(prog_args_t *args, char *prog) {
|
|||
printf("\t-c cell_id for input file [Default %d]\n", args->file_cell_id);
|
||||
printf("\t-r RNTI in Hex [Default 0x%x]\n",args->rnti);
|
||||
printf("\t-l Force N_id_2 [Default best]\n");
|
||||
printf("\t-L (Experimental) Use Robust LMMSE estimation [Default false]\n");
|
||||
printf("\t-C Disable CFO correction [Default %s]\n", args->disable_cfo?"Disabled":"Enabled");
|
||||
printf("\t-t Add time offset [Default %d]\n", args->time_offset);
|
||||
#ifndef DISABLE_GRAPHICS
|
||||
|
@ -151,7 +153,7 @@ void usage(prog_args_t *args, char *prog) {
|
|||
void parse_args(prog_args_t *args, int argc, char **argv) {
|
||||
int opt;
|
||||
args_default(args);
|
||||
while ((opt = getopt(argc, argv, "aoglipPcOCtdDnvrfuUsS")) != -1) {
|
||||
while ((opt = getopt(argc, argv, "aoglLipPcOCtdDnvrfuUsS")) != -1) {
|
||||
switch (opt) {
|
||||
case 'i':
|
||||
args->input_file_name = argv[optind];
|
||||
|
@ -195,6 +197,9 @@ void parse_args(prog_args_t *args, int argc, char **argv) {
|
|||
case 'l':
|
||||
args->force_N_id_2 = atoi(argv[optind]);
|
||||
break;
|
||||
case 'L':
|
||||
args->use_robust_lmmse = true;
|
||||
break;
|
||||
case 'u':
|
||||
args->net_port = atoi(argv[optind]);
|
||||
break;
|
||||
|
@ -408,6 +413,11 @@ int main(int argc, char **argv) {
|
|||
/* Configure downlink receiver for the SI-RNTI since will be the only one we'll use */
|
||||
srslte_ue_dl_set_rnti(&ue_dl, prog_args.rnti);
|
||||
|
||||
/* (Experimental) setup robust LMMSE estimation */
|
||||
if (prog_args.use_robust_lmmse) {
|
||||
srslte_chest_dl_set_robust_mmse_filter(&ue_dl.chest);
|
||||
}
|
||||
|
||||
/* Initialize subframe counter */
|
||||
sf_cnt = 0;
|
||||
|
||||
|
|
|
@ -83,6 +83,8 @@ SRSLTE_API void srslte_chest_dl_free(srslte_chest_dl_t *q);
|
|||
SRSLTE_API void srslte_chest_dl_set_filter_w(srslte_chest_dl_t *q,
|
||||
cf_t *w);
|
||||
|
||||
SRSLTE_API void srslte_chest_dl_set_robust_mmse_filter(srslte_chest_dl_t *q);
|
||||
|
||||
SRSLTE_API int srslte_chest_dl_estimate(srslte_chest_dl_t *q,
|
||||
cf_t *input,
|
||||
cf_t *ce[SRSLTE_MAX_PORTS],
|
||||
|
|
|
@ -41,6 +41,9 @@
|
|||
|
||||
#define ESTIMATE_NOISE_LS_PSS
|
||||
|
||||
#include "robust_mmse_25prb.h"
|
||||
#include "robust_mmse_50prb.h"
|
||||
|
||||
/** 3GPP LTE Downlink channel estimator and equalizer.
|
||||
* Estimates the channel in the resource elements transmitting references and interpolates for the rest
|
||||
* of the resource grid.
|
||||
|
@ -132,6 +135,18 @@ void srslte_chest_dl_set_filter_w(srslte_chest_dl_t *q, cf_t *w) {
|
|||
q->w_filter = w;
|
||||
}
|
||||
|
||||
void srslte_chest_dl_set_robust_mmse_filter(srslte_chest_dl_t *q) {
|
||||
if (q->cell.nof_prb == 25) {
|
||||
printf("Using robust LMMSE interpolation filter\n");
|
||||
srslte_chest_dl_set_filter_w(q, (cf_t*) w_robust_25prb);
|
||||
} else if (q->cell.nof_prb == 50) {
|
||||
printf("Using robust LMMSE interpolation filter\n");
|
||||
srslte_chest_dl_set_filter_w(q, (cf_t*) w_robust_50prb);
|
||||
} else {
|
||||
fprintf(stderr, "Error setting robust MMSE filter. Not available for %d PRB\n", q->cell.nof_prb);
|
||||
}
|
||||
}
|
||||
|
||||
/* Uses the difference between the averaged and non-averaged pilot estimates */
|
||||
static float estimate_noise_pilots(srslte_chest_dl_t *q, cf_t *ce, uint32_t port_id)
|
||||
{
|
||||
|
@ -215,7 +230,7 @@ static void interpolate_filter_pilots(srslte_chest_dl_t *q, cf_t *pilot_estimate
|
|||
srslte_interp_linear_vector(&q->srslte_interp_linvec, &cesymb(0), &cesymb(3), &cesymb(1), 2);
|
||||
srslte_interp_linear_vector(&q->srslte_interp_linvec, &cesymb(3), &cesymb(6), &cesymb(4), 2);
|
||||
srslte_interp_linear_vector(&q->srslte_interp_linvec, &cesymb(6), &cesymb(9), &cesymb(7), 2);
|
||||
srslte_interp_linear_vector(&q->srslte_interp_linvec, &cesymb(6), &cesymb(9), &cesymb(9), 2);
|
||||
srslte_interp_linear_vector2(&q->srslte_interp_linvec, &cesymb(6), &cesymb(9), &cesymb(9), &cesymb(10), 2);
|
||||
} else {
|
||||
srslte_interp_linear_vector(&q->srslte_interp_linvec, &cesymb(7), &cesymb(1), &cesymb(0), 1);
|
||||
srslte_interp_linear_vector(&q->srslte_interp_linvec, &cesymb(1), &cesymb(7), &cesymb(2), 5);
|
||||
|
@ -255,7 +270,7 @@ static void interpolate_pilots(srslte_chest_dl_t *q, cf_t *pilot_estimates, cf_t
|
|||
srslte_interp_linear_vector(&q->srslte_interp_linvec, &cesymb(0), &cesymb(3), &cesymb(1), 2);
|
||||
srslte_interp_linear_vector(&q->srslte_interp_linvec, &cesymb(3), &cesymb(6), &cesymb(4), 2);
|
||||
srslte_interp_linear_vector(&q->srslte_interp_linvec, &cesymb(6), &cesymb(9), &cesymb(7), 2);
|
||||
srslte_interp_linear_vector(&q->srslte_interp_linvec, &cesymb(6), &cesymb(9), &cesymb(9), 2);
|
||||
srslte_interp_linear_vector2(&q->srslte_interp_linvec, &cesymb(6), &cesymb(9), &cesymb(9), &cesymb(10), 2);
|
||||
} else {
|
||||
srslte_interp_linear_vector(&q->srslte_interp_linvec, &cesymb(7), &cesymb(1), &cesymb(0), 1);
|
||||
srslte_interp_linear_vector(&q->srslte_interp_linvec, &cesymb(1), &cesymb(7), &cesymb(2), 5);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -141,7 +141,7 @@ bool srslte_cqi_send(uint32_t I_cqi_pmi, uint32_t tti) {
|
|||
/* SNR-to-CQI conversion, got from "Downlink SNR to CQI Mapping for Different Multiple Antenna Techniques in LTE"
|
||||
* Table III.
|
||||
*/
|
||||
static float cqi_to_snr_table[15] = { 1.95, 4, 6, 8, 10, 11.95, 14.05, 16, 17.9, 19.9, 21.5, 23.45, 25.0, 27.30, 29};
|
||||
static float cqi_to_snr_table[15] = { 1.95, 4, 6, 8, 10, 11.95, 14.05, 16, 17.9, 19.9, 21.5, 24, 26, 28, 30};
|
||||
|
||||
uint8_t srslte_cqi_from_snr(float snr)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue