Defines | |
| #define | SYNCH_HYST 4 |
| Timing drift hysterisis in samples. | |
Functions | |
| void | phy_synch_time (short *in, unsigned int *sync_pos, unsigned int length, unsigned int skip, SCH_t synch_type, unsigned char synch_source) |
| void | phy_channel_estimation_top (int rx_offset, int pilot_offset, int ignore_prefix, int sch_index, unsigned char nb_antennas_rx, SCH_t sch_type) |
| void | phy_channel_estimation (short *rxsig_f, short *channel_est_t, short *channel_est_f, short *channel_matched_filter_f, short *pilot_conj_f, char log2_pilot_amp, char smoothen_flag) |
| void | phy_subband_powers (unsigned int sch_index, SCH_t sch_type, unsigned int nb_antennas_tx, unsigned int aa, int *n0) |
| This function is used during the channel estimation procedure to compute subband signal strenghts from the received SCH signal. These are used by the MAC layer for feedback signaling in support of scheduling and for deriving measurement information for higher layer protocols. | |
| void | phy_channel_est_emos (int ref_pilot, int from_pilot, int to_pilot, int sch_index, int perform_estimate, int ignore_prefix) |
| This function is used by EMOS to estimate the channel from the pilots. | |
| int | phy_calc_mmse_filter (int **channel_est_f1, int **channel_est_f2, int *channel_mmse_filter[NB_ANTENNAS_TX][NB_ANTENNAS_RX], int *det, int *idet, int *sigma2) |
| This routine calculates the MMSE filter matrix. | |
| int | phy_channel_interpolation (int *channel_est_f, int *channel_est_f_interp, int antenna_tx) |
| void | phy_adjust_gain (unsigned char clear, short coef, unsigned char ind) |
| void | phy_adjust_gain_mesh (unsigned char clear, short coef) |
| void | phy_adjust_synch (unsigned char clear, int sch_index, short coef, SCH_t sch_type) |
| int | phy_calc_timing_offset (int clear, int sch_index, short coef, SCH_t sch_type, int *max_pos_fil) |
| void | phy_adjust_synch_multi_CH (unsigned char clear, short coef, SCH_t sch_type) |
| int | phy_adjust_sync_CH2 (int clear, int sch_index, short coef, SCH_t sch_type) |
| int | model_based_detection (void) |
| #define SYNCH_HYST 4 |
Timing drift hysterisis in samples.
| void phy_synch_time | ( | short * | in, | |
| unsigned int * | sync_pos, | |||
| unsigned int | length, | |||
| unsigned int | skip, | |||
| SCH_t | synch_type, | |||
| unsigned char | synch_source | |||
| ) |
This routine performs a sliding block correlation (using FFT based correlator) by looping across overlapping blocks in a received frame.
| in | Input signal frame (usually a whole TTI) for correlation | |
| sync_pos | Pointer to integer to store position of absolute maximum of correlation modulus. | |
| length | Total length of signal frame (usually the number of samples in one TTI) | |
| skip | Increment in samples between windows (usually an overlap of one complete OFDM symbols is guaranteed | |
| synch_type | Type of synch sequence (SCH or CHSCH). CHSCH is used by UE/MR to synch to CH, SCH is used by CH to synch to MR | |
| synch_source | Index of CHSCH or SCH to use for timing acquisition |
| phy_channel_estimation_top | ( | int | rx_offset, | |
| int | pilot_offset, | |||
| int | ignore_prefix, | |||
| int | sch_index, | |||
| unsigned char | nb_antennas_rx, | |||
| SCH_t | sch_type | |||
| ) |
This routine is the top-level entry-point for wideband multi-source channel estimation.
| rx_offset | Sample offset in signal buffer for beginning of TTI | |
| pilot_offset | Symbol offset for position of pilot symbol for channel estimation in TTI | |
| ignore_prefix | Flag to indicate that the cyclic extension should be ignored in the event that the HW removes the extension samples | |
| sch_index | Index of SCH pilot to use | |
| nb_antennas_rx | Number of RX antennas | |
| sch_type | Type of SCH (CHSCH or SCH). CHSCH is used by UE/MR and SCH is used by CH and MR (in mesh topology only). |
| void phy_channel_estimation | ( | short * | rxsig_f, | |
| short * | channel_est_t, | |||
| short * | channel_est_f, | |||
| short * | channel_matched_filter_f, | |||
| short * | pilot_conj_f, | |||
| char | log2_pilot_amp, | |||
| char | smoothen_flag | |||
| ) |
This routine performs least-squares channel estimation with optional noise reduction via smoothing (time-windowing).
| rxsig_f | Pointer to eceived symbol in frequency-domain with which channel estimation is to be performed. | |
| channel_est_t | Pointer to least-squares channel estimate in time-domain | |
| channel_est_f | Pointer to least-squares channel estimation in frequency-domain | |
| channel_matched_filter_f | Pointer to channel matched filter in frequency-domain (conjugate of channel_est_f) | |
| pilot_conj_f | Pointer to conjugate of pilot symbol in frequency-domain | |
| log2_pilot_amp | Log base2 of pilot amplitude | |
| smoothen_flag | Flag to activate time-domain windowing for noise-reduction or multi-channel separation |
, channel_est_t by
, channel_est_f by
, channel_matched_filter_f by
, pilot_conj_f by
. The procedures are:

else 

Signals and pilots are stored in complex Q1.15 format, with complex pairs repeated in adjacent positions for efficient SIMD processing, that is a signal vector in memory looks like:
.
The pilot signals are assumed to be precomputed and in the correct format for SIMD Q1.15 complex multiplication, that is:
| void phy_subband_powers | ( | unsigned int | sch_index, | |
| SCH_t | sch_type, | |||
| unsigned int | nb_antennas_tx, | |||
| unsigned int | aa, | |||
| int * | n0 | |||
| ) |
This function is used during the channel estimation procedure to compute subband signal strenghts from the received SCH signal. These are used by the MAC layer for feedback signaling in support of scheduling and for deriving measurement information for higher layer protocols.
| sch_index | Index of SCH on which to perform the measurement | |
| sch_type | The type of SCH on which to act (SCH,CHSCH) | |
| nb_antennas_tx | Number of antennas in the transmitter | |
| aa | Receiver antenna index | |
| n0 | Estimate of per carrier noise variances (linear) (vector of receive antennas) |
| void phy_channel_est_emos | ( | int | ref_pilot, | |
| int | from_pilot, | |||
| int | to_pilot, | |||
| int | sch_index, | |||
| int | perform_estimate, | |||
| int | ignore_prefix | |||
| ) |
This function is used by EMOS to estimate the channel from the pilots.
| ref_pilot | index of the reference pilot | |
| from_pilot | index of the first pilot | |
| to_pilot | a index of the last pilot | |
| sch_index | index of the SCH (for storage) | |
| perform_estimate | flag to indicate if channel estimation should be performed | |
| ignore_prefix | flag that indicates if prefix should be ignored |
| int phy_calc_mmse_filter | ( | int ** | channel_est_f1, | |
| int ** | channel_est_f2, | |||
| int * | channel_mmse_filter[NB_ANTENNAS_TX][NB_ANTENNAS_RX], | |||
| int * | det, | |||
| int * | idet, | |||
| int * | sigma2 | |||
| ) |
This routine calculates the MMSE filter matrix.
| channel_est_f1 | Pointer to channel estimation in frequency-domain from CH1 | |
| channel_est_f2 | Pointer to channel estimation in frequency-domain from CH2 | |
| channel_mmse_filter | Pointer to MMSE filter | |
| det | Pointer to determinant (32 bit) | |
| idet | Pointer to inverse determinant (16 bit) | |
| sigma2 | Pointer to noise estimates of both RX antennas |
| int phy_channel_interpolation | ( | int * | channel_est_f, | |
| int * | channel_est_f_interp, | |||
| int | antenna_tx | |||
| ) |
This routine performs interpolation of the channel estimates. Due to the multiplexing of the pilots over the transmit antennas, channel estimates for one particular Tx antenna are not availiable for all subcarriers. To obtain channel estimtes for the remaining subcarriers, we perform interpolation. The interpolation is done using an ifft, zero appending, and fft.
| channel_est_f | Pointer to least-squares channel estimate in frequency-domain (contains channel estimates of all tx antennas) | |
| channel_est_f_interp | Pointer to interpolated channel estimation in frequency-domain | |
| antenna_tx | Index of Tx antenna, which is interpolated |
| void phy_adjust_gain | ( | unsigned char | clear, | |
| short | coef, | |||
| unsigned char | ind | |||
| ) |
This routine performs digital automatic gain control with hysterisis. It is used only during real-time RF execution both for UE/MR and CH (in MESH topology only!). The function looks at the measured power levels of CHSCH chsch_ind in PHY_vars->PHY_measurements.
| clear | Flag to initialize the gain control loop | |
| coef | Q1.15 forgetting factor (must be positive!) | |
| ind | Index of channel estimate (in PHY_measurements structure) |
| void phy_adjust_gain_mesh | ( | unsigned char | clear, | |
| short | coef | |||
| ) |
This routine performs digital automatic gain control with hysterisis with respect to several measurements. This function looks at the measured power levels of CHSCH 0-NUMBER_OF_CHSCH_SYMBOLS_MAX in PHY_vars->PHY_measurements and adjusts the gain level to the weakest CHSCH under the condition that the strongest one does not saturate.
It is used only during real-time RF execution both for UE/MR and CH(in MESH topology only!).
| clear | Flag to initialize the gain control loop | |
| coef | Q1.15 forgetting factor (must be positive!) |
| void phy_adjust_synch | ( | unsigned char | clear, | |
| int | sch_index, | |||
| short | coef, | |||
| SCH_t | sch_type | |||
| ) |
This routine performs timing drift adjustment by tracking the peak of a channel estimate in time.
| clear | Flag to initialize the gain control loop | |
| sch_index | Index of channel estimate (in CHSCH/SCH structure) | |
| coef | Q1.15 forgetting factor (must be positive!) | |
| sch_type | Type of SCH (CHSCH or SCH) |
Let
be the channel response for RX antenna
, that is either a CHSCH_data.channel or SCH_data.channel. Define the position of the maximum modulus as
and let the TTI offset be
which would be RX_VARS.offset. The drift estimation is done adaptively every TTI as
then
else 

SYNCH_HYST then
else if
SYNCH_HYST then
| void phy_calc_timing_offset | ( | int | clear, | |
| int | sch_index, | |||
| short | coef, | |||
| SCH_t | sch_type, | |||
| int * | max_pos_fil | |||
| ) |
This routine is based on phy_adjust_sync with the difference, that it does not actually adjust the offset, but returns the peak position as a parameter. Additionally, a test is performed if a peak is actually present (the peak value has to be 10dB higher than the average).
| clear | If 0, the last value in max_pos_fil is used to filter the peak position, else no filter is applied | |
| sch_index | Index of channel estimate (in CHSCH/SCH structure) | |
| coef | Q1.15 forgetting factor (must be positive!) | |
| sch_type | Type of SCH (CHSCH or SCH) | |
| max_pos_fil | overwritten with the filtered calculated peak position |
| void phy_adjust_synch_multi_CH | ( | unsigned char | clear, | |
| short | coef, | |||
| SCH_t | sch_type | |||
| ) |
This routine performs timing drift adjustment by tracking the peaks of the channel estimates from several CHs in time.
| clear | Flag to initialize the gain control loop | |
| coef | Q1.15 forgetting factor (must be positive!) | |
| sch_type | Type of SCH (CHSCH or SCH) |
| int phy_adjust_sync_CH2 | ( | int | clear, | |
| int | sch_index, | |||
| short | coef, | |||
| SCH_t | sch_type | |||
| ) |
| int model_based_detection | ( | void | ) |
1.4.7