This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TI TEC Echo Canceller Performance

Other Parts Discussed in Thread: TEST2

   I need some help in analyzing Echo Canceller performance. I am enclosing wave files pcm format (LINEAR/MOTOROLA 16bit format).

 

Test2_raw_rx.pcm is near_end Input

Test2_rx.pcm is Echo Canceller output. (test_rx.pcm)

Test2_tx.pcm is Far end input

Test2_raw_tx.pcm is far end output to speaker.

 

Echo canceller performance is showing a little cancellation. I am wondering in this clean situation why there is no expected echo cancellation. What configuration need to be improved?

 

Currently I got a 64msecs tail length TEC.

 

Appreciate if someone can guide me through. 1524.test_waveform_PCM_16bit_Motorola_format.rar6052.0068.test_waveform_PCM_16bit_Motorola_format.rar

  • We will get back to you as soon as possible. Thank you for your patience.
  • als.rarThanks Raja. Look forward to see your feedback.  

    I am enclosing another set of waveforms. also while the call is going on, I got status information on the TEC. 

    state = 0x0, status = 0x0, send_level = 0xFFFFFB9D (dBm0,Q4), recv_level = 0xFFFFFA52 (dBm0,Q4)
    erl_estimate = 0x1D6, erle_estimate = 0x0, ne_noise_estimate = 0xFFFFFB9B (dBm0,Q4), refl = 0xFFFF (dBm0,Q4), pcm_law = 0x1 (dBm0,Q4)
    pcm_law = 0x0, erle_estimate = 0xFFFFFB9B, ne_noise_estimate = 0xFFFF (dBm0,Q4), refl = 0x5D5A9920 (dBm0,Q4)
    controlA = 0xC, controlB = 0x0, controlC = 0x0, controlD = 0x0
    valid_bitfield = 0x8000, nlpMinActThresh = 0x0, nlpMaxActThresh = 0xB0, nlpMixDepth = 0x0
    cnSpecConfig = 0xFFFF8000, maxChannel = 0x18, maxSample = 0x12, numActiveChan = 0x18
    badPtrCount = 0x0, bgFailCount = 0x0, version = 0x3, cnMaxPower = 0xFFFFFFE2

  • ext echo.rarals echo.rar

    Above two files added where 

    ext echo.rar files removes echo 

    als echo.rar files do not remove echo. 

    Here: PCM format Linear Motorola 16bit format. 

    #define Y2X_DELAY_BULK_DELAY (58) /* No.of samples Bulk Delay */
    #define max_y2x_delay (240)

    #define ECHO_CANCELLER_TAIL_SIZE (64) /* msecs EC TAIL */

     

     

    Sin = testx_raw_rx.pcm

    Sout = test_rx.pcm

    Rin = test_tx.pcm

    Rout = test_raw_tx.pcm

     

     

  • Hi Harikrishna,

    Are these PCM samples synchronized and captured from your real system? And have you tried to run the TEC simulation program (packages\ti\mas\tec\test\ccsProjects\tecsim_int_CE66LE_LE_ELF) on an EVM with the Rin/Sin files and then compare the results?

    Regards,
    Garrett
  • Thank you. The captures are exactly Rin, sin, Rout and Sout points around the Echo canceller. These waveforms are a live capture. In my captures I can show TEC echo cancellation works properly (ext_echo.rar), and in another it does not (als_echo.rar) . I am looking help on
    a) Configuration changes that I can do. I do not see any additional configuration possible except tail length, MINERL setting, y2x_delay setting. Other than these what else can be adjusted.
    b) What can I understand from status information? I have already posted the status information here.
    c) I am in the process of enabling simulator setup, but it may take some time. I was wondering based on the status and waveforms, are there any suggestions?
  • Hi Harikrishna,

    Attached is the Sout generated by the TEC simulation program with default configuration and your Rin/Sin samples from test_waveform_PCM_16bit_Motorola_format.rar, as you can see the Sout is much cleaner than that you captured from real system.

    Looked into the samples, the echo return loss is high and tail length is less than 64ms, with NLP engaged properly, echo should be cancelled.

    You can try to match the configurations in the simulation program to see if any behavior change.

    The status variables are explained in tec.h. At which timestamp you logged the status? The "pcm_law = 0x1 (dBm0,Q4) pcm_law = 0x0" as well as erle_estimate doesn't look right. The companding mode pcm_law should be fixed.

    Are you able to disable echo canceller and inject sinewave to verify if there is any sample lost in receive in and send in path?

    How many channels are active when you run the test? Have you tried to just enable one channel?

    Regards,

    Garrett

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/sout.ula

  • Hi Garrett,

      We are using TEC version tec_c66x_obj_10_3_0_3. Our configuration can be observed from status:

    When the Call is LIVE then the status information: 


    CLI> state = 0x0, status = 0x0, send_level = 0xFFFFFB3E (dBm0,Q4), recv_level = 0xFFFFFC8A (dBm0,Q4)
    erl_estimate = 0x1B4, erle_estimate = 0x0, ne_noise_estimate = 0xFFFFFB22 (dBm0,Q4), refl = 0xFFFF (dBm0,Q4), pcm_law = 0x1 (dBm0,Q4)
    controlA = 0xC, controlB = 0x0, controlC = 0x0, controlD = 0x0
    valid_bitfield = 0x8000, nlpMinActThresh = 0x0, nlpMaxActThresh = 0xB0, nlpMixDepth = 0x0
    cnSpecConfig = 0xFFFF8000, maxChannel = 0x18, maxSample = 0x12, numActiveChan = 0x18
    badPtrCount = 0x0, bgFailCount = 0x0, version = 0x3, cnMaxPower = 0xFFFFFFE2

    NLP is disabled for now. 

    24 channels run  one engine. Not sure if we can separate to single channel? 

    tecRun(tecEngInst);

    /****************** Initialization ********************

    const ecomemBuffer_t *sizeBufs;
    ecomemBuffer_t engBufs[tec_MAX_ECOBUF];
    tecEngSizeConfig_t scfg;
    tint nbufs;
    tecEngNewConfig_t engcfg;
    tecEngConfig_t cfg;
    tecEngInitConfig_t icfg;


    memset(tec_chan_info,0,sizeof(tec_chan_info));

    scfg.max_channel=TEC_ENGINE_CFG_MAX_CHAN;
    scfg.stack_len=TEC_ENGINE_CFG_STACK_LEN;

    if (tec_status=tecEngGetSizes ( &nbufs, &sizeBufs,&scfg )!=tec_OK){
    crashNow();
    }

    /* now let's check and allocate buffer*/
    if (nbufs>NUM_BUF_FOR_TEC_ENGINE){
    crashNow();
    };
    memcpy(&engBufs,sizeBufs,sizeof(engBufs));

    VALIDATE_TEC_ENGINE_BUF(0);
    VALIDATE_TEC_ENGINE_BUF(1);
    VALIDATE_TEC_ENGINE_BUF(2);
    VALIDATE_TEC_ENGINE_BUF(3);

    engcfg.ID = TEC_ENGINE_ID;
    engcfg.max_channel=TEC_ENGINE_CFG_MAX_CHAN;
    engcfg.max_sample=TEC_ENGINE_CFG_MAX_SAMPLE;
    engcfg.stack_len=TEC_ENGINE_CFG_STACK_LEN;
    engcfg.pcm_format=tec_PCM_FORMAT_ONE_SB ;

    if(tec_status=tecEngNew (&tecEngInst, nbufs, engBufs, &engcfg)!=tec_OK){
    crashNow();
    }

    memset(&cfg,0,sizeof(cfg));
    cfg.valid_bitfield = 0;
    if(tecEngConfig (tecEngInst, &cfg)!=tec_OK){
    crashNow();
    }

    memset(&icfg,0,sizeof(icfg));
    icfg.timer_offset=0;
    if(tec_status=tecEngInit (tecEngInst, &icfg)!=tec_OK){
    crashNow();
    }

    memset(&defaultTecCtrl,0,sizeof(tecControl_t));
    defaultTecCtrl.controlA= tec_CTRLA_BYPASS | tec_cnv_tail2bits(BAKER_ECHO_CANCELLER_TAIL_SIZE) /* | tec_CTRLA_NLP_CNG */ ;
    defaultTecCtrl.controlB=0;
    defaultTecCtrl.controlC=0;
    defaultTecCtrl.controlD=0;

    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    If I disable I get copy of Sin as Sout. I can see this happening. 

    It is not that TEC is not working at all, but echo cancellation is very poor. 

    //////////////////////////////////////////////////////////////////////////////

  • Hi Garrett,

      We are using TEC version tec_c66x_obj_10_3_0_3. Our configuration can be observed from status:

    When the Call is LIVE then the status information: 


    CLI> state = 0x0, status = 0x0, send_level = 0xFFFFFB3E (dBm0,Q4), recv_level = 0xFFFFFC8A (dBm0,Q4)
    erl_estimate = 0x1B4, erle_estimate = 0x0, ne_noise_estimate = 0xFFFFFB22 (dBm0,Q4), refl = 0xFFFF (dBm0,Q4), pcm_law = 0x1 (dBm0,Q4)
    controlA = 0xC, controlB = 0x0, controlC = 0x0, controlD = 0x0
    valid_bitfield = 0x8000, nlpMinActThresh = 0x0, nlpMaxActThresh = 0xB0, nlpMixDepth = 0x0
    cnSpecConfig = 0xFFFF8000, maxChannel = 0x18, maxSample = 0x12, numActiveChan = 0x18
    badPtrCount = 0x0, bgFailCount = 0x0, version = 0x3, cnMaxPower = 0xFFFFFFE2

    NLP is disabled for now. 

    24 channels run  one engine. Not sure if we can separate to single channel? 

    tecRun(tecEngInst);

    /****************** Initialization ********************

    const ecomemBuffer_t *sizeBufs;
    ecomemBuffer_t engBufs[tec_MAX_ECOBUF];
    tecEngSizeConfig_t scfg;
    tint nbufs;
    tecEngNewConfig_t engcfg;
    tecEngConfig_t cfg;
    tecEngInitConfig_t icfg;


    memset(tec_chan_info,0,sizeof(tec_chan_info));

    scfg.max_channel=TEC_ENGINE_CFG_MAX_CHAN;
    scfg.stack_len=TEC_ENGINE_CFG_STACK_LEN;

    if (tec_status=tecEngGetSizes ( &nbufs, &sizeBufs,&scfg )!=tec_OK){
    crashNow();
    }

    /* now let's check and allocate buffer*/
    if (nbufs>NUM_BUF_FOR_TEC_ENGINE){
    crashNow();
    };
    memcpy(&engBufs,sizeBufs,sizeof(engBufs));

    VALIDATE_TEC_ENGINE_BUF(0);
    VALIDATE_TEC_ENGINE_BUF(1);
    VALIDATE_TEC_ENGINE_BUF(2);
    VALIDATE_TEC_ENGINE_BUF(3);

    engcfg.ID = TEC_ENGINE_ID;
    engcfg.max_channel=TEC_ENGINE_CFG_MAX_CHAN;
    engcfg.max_sample=TEC_ENGINE_CFG_MAX_SAMPLE;
    engcfg.stack_len=TEC_ENGINE_CFG_STACK_LEN;
    engcfg.pcm_format=tec_PCM_FORMAT_ONE_SB ;

    if(tec_status=tecEngNew (&tecEngInst, nbufs, engBufs, &engcfg)!=tec_OK){
    crashNow();
    }

    memset(&cfg,0,sizeof(cfg));
    cfg.valid_bitfield = 0;
    if(tecEngConfig (tecEngInst, &cfg)!=tec_OK){
    crashNow();
    }

    memset(&icfg,0,sizeof(icfg));
    icfg.timer_offset=0;
    if(tec_status=tecEngInit (tecEngInst, &icfg)!=tec_OK){
    crashNow();
    }

    memset(&defaultTecCtrl,0,sizeof(tecControl_t));
    defaultTecCtrl.controlA= tec_CTRLA_BYPASS | tec_cnv_tail2bits(BAKER_ECHO_CANCELLER_TAIL_SIZE) /* | tec_CTRLA_NLP_CNG */ ;
    defaultTecCtrl.controlB=0;
    defaultTecCtrl.controlC=0;
    defaultTecCtrl.controlD=0;

    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    If I disable I get copy of Sin as Sout. I can see this happening. 

    It is not that TEC is not working at all, but echo cancellation is very poor. 

    //////////////////////////////////////////////////////////////////////////////

  • Hi Harikrishna,

    >>NLP is disabled for now.

    Is NLP enabled in the field? The Sout (test2_rx.pcm from test_waveform_PCM_16bit_Motorola_format.rar) doesn't seem indicate NLP is engaged. I also analyzed the echo path and plot the cofficients (attached), TEC with 64ms tail length configuration should remove majority echoes, and if NLP is enabled, the residual echo should get removed.

    "Y2X_DELAY_BULK_DELAY (58)", do you really have the system delay between Rout and Sin? Can you try to reduce the sample number?

    To active only one channel is to verify there is no issue on PCM interface driver. Has the system been in the field for a long while? Anything new/update that may cause the problem recently?

    Regards,

    Garrett