I'm working on implementing an active noise control algorithm. I am currently working on an ADSP-221489 EZKIT LITE, because we had one lying around. I am quite new to these things, but I am beginning to suspect that this board and the AD1939 codec on it are not quite suited to my application. I got the algorithm to work, but I feel the system is not working as well as it could be, mainly due to latency issues. I am wondering which hardware would be better for me. I hope you can help. Below I have listed some information about my application:
- Active noise control system with adaptive controller and adaptive plant model.
- Preferred sample frequency: 8 kHz.
- 2 ADCs/input ports.
- 2 DACs/output ports.
- Low latency (currently multiple ms's)
If you need more specific details to answer my question, please let me know.
Yes, the AD1939 has too much latency. I think it is in the order of hundreds of milliseconds, if I remember right.
If you want to use just a codec then use the ADAU1372. It is a very low-latency codec, around the order is 140us on the ADC side when you read the data at 48kHz. Then another 150us on the DAC side.
So you want to run at 8kHz fs, the issue with this slower rate is that it takes a long time for the data to be transferred via I2S. That is the most significant delay of the 140us is to serialize the data and transmit it.
This Codec operates a little differently from most codecs. The ADC and DAC sampling rates default to 192kHz and then there are ASRCs to convert the internal sampling rate to the serial port rates. So it will convert the internal sampling rate to 8kHz fs, but, as I said you will be adding significant delay with the serial transfer.
Another part you should loo into is the ADAU1772. It is the same low-latency converter as the 1372 but with a small DSP. It is designed more as a filter engine then a general purpose DSP. So it is designed to do noise cancelling. With that part the processing is all at 192kHz so it can convert from analog, process the audio through the core and then convert back to analog in about 38us total latency. If you need to do some adaptive filtering then you can calculate new coefficients using an external processor and then change the filters in the 1772 dynamically. There are two banks for filter coefficients so it can be done all at one time avoiding filter instabilities when updating coefficients.
So have a look and see if this might work for you.
thank you very much for your response. The AD1939 has about 1.5ms latency at 48 kHz, using the ASRCs on the ADSP-21489 to run the part at 8 kHz increases the latency by another 10ms. So it's not in the order of hunderds of ms's, but it is still much higher than I would like.
I think both ADAU1372 and ADAU1772 could be good options to improve my system. However, I am wondering what I would need if I wanted to test if they actually perform better and by how much. I am guessing it is not possible to use these parts with the ADSP-21489 EZKIT LITE I already have?
Sorry, I was answering too quickly and going from memory. The AD1939 group delay for the DAC is 521us (not ms) and the ADC is 479us so add to that another 20us (roughly) to transmit the data in one clock period and another 20us to transmit back to the DAC and you are around 1.04ms. So adding to that any processing you are doing and I can see you would get around 1.5ms total latency.
So back to your questions. The slower sample rate is good for less processing but the problem is that it takes 125us just to transmit the data in one direction. So using a slower sampling rate may be creating more problems then it is solving. This is obviously your design decisions, I am just pointing it out and I do not see the big picture.
Regarding trying out the ADAU1772. You can purchase an eval board. It is a relatively low cost board. Then you can jumper between the I2S headers on both eval boards. Since the 1772 uses ASRCs you can use the MCLK on the eval board to drive the 1772 so you do not have to supply the MCLK. I am not that familiar with the EZkit but I am fairly certain that the SPORTS come up to headers to allow you to interface to an external board.
I have experienced the issues caused by using a slow sample rate. I agree running at a higher sample frequency is better, however I am slightly limited by the necessary filter lengths.
Anyway, I have looked at the documentation of the evaluation boards and especially for the 21489 EZLITE board I am having trouble finding evidence of a header that would allow me to connect it to the 1772.
I assume you do not want to use the on-board codec. So those signals are available on SW1 and SW2. I think this is the easiest way to do this. I do not have this eval board since I do not support the ADSP-21489 so I am only looking at the schematic in the user guide. So I think you will have to solder on some wires and I would say the best place is on the pins of the dip switches. This will be a mechanically strong place for them and easy for you to get to. Then you can use the dip switches to shut off the connection to the on-board codec. So connect the wires to the DSP side of the dip switches.
Here are the signals from the codec and what they do:
ASDATA1, this is the ADC data that is going from the ADCs to the DSP.
ASDATA2, this is the second data line. The codec has four ADCs like the 1772 does.
Note: on the 1772 these two signals are labeled ADC_DATA0 and ADC_DATA1.
ABCLK, this is the bit clock connection for the ADC side of the codec.
ALRCLK, this is the left right clock for the ADC side of the codec.
DSDATA1-4, This is the serial data going to the DACs. This codec has 8 channels so the 1772 only has one of these SDATA lines since it only had two DACs.
DBCLK, This is the bit clock connection to the DAC side of the codec
DLRCLK, This is the Left Right clock connection to the DAC side of the codec.
Note, that the codec used on this evaluation board can operate the ADCs and the DACs on two different clocks. The 1772 only needs one set of BCLK and LRCLK to operate both the ADC and DAC serial ports.
I was looking at Sheet 4 of the EZ-Board schematics and it is page 90 of the PDF that I have on my computer. This is the ADSP-21489 EZ-BoardTM Evaluation System Manual.
I hope this helps.