Hide navigation sidebar
Hide table of contents sidebar
Back to top
Toggle table of contents sidebar

# lib_ic API Definitions

group ic_defines

  Defines

  IC_INIT_MU

    Initial MU value applied on startup. MU controls the adaption rate of the IC and is normally adjusted by the adaption rate controller during operation.

  IC_INIT_EMA_ALPHA

    Alpha used for calculating y_ema_energy, x_ema_energy and error_ema_energy.

  IC_INIT_LEAKAGE_ALPHA

    Alpha used for leaking away H_hat, allowing filter to slowly forget adaption. This value is adjusted by the adaption rate controller if instability is detected.

  IC_FILTER_PHASES

    The number of filter phases supported by the IC. Each filter phase represents 15ms of filter length. Hence a 10 phase filter will allow cancellation of noise sources with up to 150ms of echo tail length. There is a tradeoff between adaption speed and maximum cancellation of the filter; increasing the number of phases will increase the maximum cancellation at the cost of increased xCORE resource usage and slower adaption times.

  IC_Y_CHANNEL_DELAY_SAMPS

    This is the delay, in samples that one of the microphone signals is delayed in order for the filter to be effective. A larger number increases the delay through the filter but may improve cancellation. The group delay through the IC filter is 32 + this number of samples.

  IC_INIT_SIGMA_XX_SHIFT

    Down scaling factor for X energy calculation used for normalisation.

  IC_INIT_GAMMA_LOG2

    Up scaling factor for X energy calculation for used for LMS normalisation.

  IC_INIT_DELTA

    Delta value used in denominator to avoid large values when calculating inverse X energy.

  IC_INIT_FAST_RATIO_THRESHOLD

    Fast ratio threshold to detect instability.

  IC_INIT_ENERGY_ALPHA

    Alpha for EMA input/output energy calculation.

  IC_INIT_HIGH_INPUT_VNR_HOLD_LEAKAGE_ALPHA

    Leakage alpha used in case vnr detects high voice probability.

  IC_INIT_INSTABILITY_RECOVERY_LEAKAGE_ALPHA

    Leakage alpha used in the case where instability is detected. This allows the filter to stabilise without completely forgetting the adaption.

  IC_INIT_ADAPT_COUNTER_LIMIT

    Limits number of frames for which mu and leakage_alpha could be adapted.

  IC_INIT_INPUT_VNR_THRESHOLD

    VNR input threshold which decides whether to hold or adapt the filter.

  IC_INIT_INPUT_VNR_THRESHOLD_HIGH

    VNR high threshold to leak the filter is the speech level is high.

  IC_INIT_INPUT_VNR_THRESHOLD_LOW

    VNR low threshold to adapt faster when the speech level is low.

  IC_INIT_VNR_PRED_ALPHA

    Alpha for EMA VNR prediction calculation.

  IC_INIT_INPUT_VNR_PRED

    Initial value for the input VNR prediction.

  IC_INIT_OUTPUT_VNR_PRED

    Initial value for the output VNR prediction.

  IC_Y_CHANNELS

    Number of Y channels input. This is fixed at 1 for the IC. The Y channel is delayed and used to generate the estimated noise signal to subtract from X. In practical terms it does not matter which microphone is X and which is Y. NOT USER MODIFIABLE.

  IC_X_CHANNELS

    Number of X channels input. This is fixed at 1 for the IC. The X channel is the microphone from which the estimated noise signal is subtracted. In practical terms it does not matter which microphone is X and which is Y. NOT USER MODIFIABLE.

  IC_FRAME_LENGTH

    Time domain samples block length used internally in the IC’s block LMS algorithm. NOT USER MODIFIABLE.

  IC_FRAME_ADVANCE

    IC new samples frame size This is the number of samples of new data that the IC works on every frame. 240 samples at 16kHz is 15msec. Every frame, the IC takes in 15msec of mic data and generates 15msec of interference cancelled output. NOT USER MODIFIABLE.

  IC_FD_FRAME_LENGTH

    Number of bins of spectrum data computed when doing a DFT of a IC_FRAME_LENGTH length time domain vector. The IC_FD_FRAME_LENGTH spectrum values represent the bins from DC to Nyquist. NOT USER MODIFIABLE.

  FFT_PADDING

    Extra 2 samples you need to allocate in time domain so that the full spectrum (DC to nyquist) can be stored after the in-place FFT. NOT USER MODIFIABLE.