ΣSigmaStudio Ask AI Русский Log in

About ADAU1761' I2S and Sigmastudio Module Algorithm

SigmaDSP & SigmaStudio zhuangqiong Jan 15, 2017 00:00 4 replies Original on forum ↗
Subscribe
zhuangqiong Question
Jan 15, 2017 00:00

Hi all,

I use the ADAU1761 evaluation board to receive serial data (I2S format) from SERIAL DATA INPUT/OUTPUT PORTS, and use some modules in SigmaStudio to process the input data, and then the data output from the analog side. In this process I encountered a few questions, and hope to get your answers.

question 1 When I use the I2S input, in addition to the data, I also need three clocks : ①MCLK=256*fs,②LRCLK=fs,③BCLK=2*sample_length*fs. The sampling rate of the input data is 32kHz, but the default sampling rate of ADAU1761 is 48kHz. Which sampling rate should I use to calculate the clock? I have used 32kHz to calculate the clock, and I have confirmed the received data is correct, but some problems will appear after I add certain module in sigmastudio. Please help me to check whether the sampling rate of the register settings are correct. The following is a screen shot of the register settings of sampling rate and clock.

In the ADAU1761 chip manual mentioned “It is recommended that the sampling rates for the converters, serial ports, and DSP be set to the same value” . However, after I set the DSP sampling rate of 32kHz, something is wrong: When I used a notch filter to remove the 3kHz signal, the 2 kHz signal is filtered out instead of 3kHz. After I set the DSP sampling rate of serial input data rate(as shown above), This problem does not exist.

question 2 I set all sample rates to 16kHz. I used 500Hz signal source and white noise , and then add noise reduction algorithm to reduce white noise(As shown below). However, I observed the output signal is 250Hz from the oscilloscope, even I have not enabled noise reduction algorithm. Why ??

before adding noise reduction algorithm=500Hz after adding noise reduction algorithm=250Hz

I do not know whether I use this module correctly. However, When it eliminates noise, the useful signal is also reduced a lot.

question 3 I want to use the FIR Filter in sigmastudio to design a band-pass filter (300Hz to 3400Hz). The filter coefficients are generated using FDATool in MATLAB. The filter spectrum after the coefficients are imported is shown in the following figure, which is right. When I input 200Hz/500Hz/1000Hz/2000Hz/3000Hz/4000Hz/5000Hz/6000Hz/7000Hz signal, the output signal is not what I want(As shown below). This is why???

filter spectrum

Input signal spectrum(No FIR)

Output signal spectrum(with FIR)

To prevent the picture is not clear, I have uploaded the document about these problems

to the attachment.

Best Regards,

Qiongzhuang

Audio Signal Processors

sigmastudio

SigmaDSP Audio Processors

adau1761

ed23beb939e7b1f56ae9967f63f4c700.png
ed23beb939e7b1f56ae9967f63f4c700.png
ed23beb939e7b1f56ae9967f63f4c700.png-136x155.png
ed23beb939e7b1f56ae9967f63f4c700.png-136x155.png
0efaa5a90d5829ca6054bcd3ae4f8372.png
0efaa5a90d5829ca6054bcd3ae4f8372.png
0efaa5a90d5829ca6054bcd3ae4f8372.png-400x225.png
0efaa5a90d5829ca6054bcd3ae4f8372.png-400x225.png
2b3191fdc08a9e16bf009155a5109a62.png
2b3191fdc08a9e16bf009155a5109a62.png
2b3191fdc08a9e16bf009155a5109a62.png-445x415.png
2b3191fdc08a9e16bf009155a5109a62.png-445x415.png
0ac8e2e531acaad853b2c1ab3e5bc845.png
0ac8e2e531acaad853b2c1ab3e5bc845.png
0ac8e2e531acaad853b2c1ab3e5bc845.png-199x113.png
0ac8e2e531acaad853b2c1ab3e5bc845.png-199x113.png
a74f911d52221418e5ec4d82dbcf2b71.png
a74f911d52221418e5ec4d82dbcf2b71.png
a74f911d52221418e5ec4d82dbcf2b71.png-272x123.png
a74f911d52221418e5ec4d82dbcf2b71.png-272x123.png
eefe22775453def5e8afe6dfe5602c44.png
eefe22775453def5e8afe6dfe5602c44.png
eefe22775453def5e8afe6dfe5602c44.png-223x168.png
eefe22775453def5e8afe6dfe5602c44.png-223x168.png
f7b398cfee84639e6b4120a9bb615733.png
f7b398cfee84639e6b4120a9bb615733.png
f7b398cfee84639e6b4120a9bb615733.png-224x169.png
f7b398cfee84639e6b4120a9bb615733.png-224x169.png
3a8e1846154b749d501ce783f433fef5.png
3a8e1846154b749d501ce783f433fef5.png
3a8e1846154b749d501ce783f433fef5.png-332x266.png
3a8e1846154b749d501ce783f433fef5.png-332x266.png
cd51507a6d4bf66fc1f7c2e4d6409236.png
cd51507a6d4bf66fc1f7c2e4d6409236.png
cd51507a6d4bf66fc1f7c2e4d6409236.png-386x290.png
cd51507a6d4bf66fc1f7c2e4d6409236.png-386x290.png
757e52b3c32e6d830e333153c97956a2.png
757e52b3c32e6d830e333153c97956a2.png
757e52b3c32e6d830e333153c97956a2.png-392x296.png
757e52b3c32e6d830e333153c97956a2.png-392x296.png
DaveThib Reply
Jan 20, 2017 00:00

Hello Qiongzhuang,

SigmaStudio does not directly know what the sampling rate that is actually running in the DSP. It depends on the clocks supplied to the DSP and of course the register settings. So you need to "tell" sigmaStudio what sampling rate you are running in the DSP so it can properly scale the code when needed.

For instance, if SigmaStudio thinks the sample rate is 48kHz but the DSP is actually running at 96kHz then setting an oscillator for 1KHz will yield a 2kHz output.

So look at the top of SigmaStudio:

There is a sample rate selection that you will need to change to 32kHz. When you do so you will see a pop-up window like you see in the picture. Click "Yes" and then all blocks will be set to 32kHz for cells that use a sampling rate internally.

Another way to do this is with cells that are sources. Look at this example:

You right click on a source and you will see a selection for setting the sample rate.

This will change the rate for all cells following (connected) to this cell.

As far as register settings, you must set the serial port, the converters and the DSP sampling rate all to 32kHz.

I think your problems will all go away once the system and SigmaStudio software are all set the same.

Thanks,

Dave T

79bb8b04593f2cff86a51c23b314b213.jpg
79bb8b04593f2cff86a51c23b314b213.jpg
79bb8b04593f2cff86a51c23b314b213.jpg-527x301.jpg
79bb8b04593f2cff86a51c23b314b213.jpg-527x301.jpg
b9735f13d6ec19fb465233f2fe8199a2.jpg
b9735f13d6ec19fb465233f2fe8199a2.jpg
b9735f13d6ec19fb465233f2fe8199a2.jpg-289x361.jpg
b9735f13d6ec19fb465233f2fe8199a2.jpg-289x361.jpg
zhuangqiong Reply
Feb 22, 2017 00:00

Thank you so much for your help.

I have another question that I hope to get answers. I have used sigmastudio to design the project and have exported the project file. But I do not understand what is the difference between the project file which have been exported and the ADAU1761 drive?

Should I write these generated files to the driver first and then use the MCU to control it? Or these generated files and the driver do not matter?

Another problem, I use the notch filter in sigmastudio to filter out some of the frequency components in the speech signal. The parameters of the notch filter are shown below.

As can be seen from the spectrum of this notch filter, its attenuation is about 30dB. When we deal with the voice signal, 30dB enough? Or do I need to rejoin several notch filters to make its attenuation more?

Best Regards,

Qiongzhuang

8133e6b654b9828554eabdd6a26b0d15.png
8133e6b654b9828554eabdd6a26b0d15.png
8133e6b654b9828554eabdd6a26b0d15.png-168x219.png
8133e6b654b9828554eabdd6a26b0d15.png-168x219.png
fb1ade06201d5e59807e881d5d745783.png
fb1ade06201d5e59807e881d5d745783.png
fb1ade06201d5e59807e881d5d745783.png-398x253.png
fb1ade06201d5e59807e881d5d745783.png-398x253.png
DaveThib Reply
Feb 23, 2017 00:00

Hello zhuangqiong,

Yes, you can "Grow" the filter to add more sections of the filter and obtain more attenuation. I do not know how much would be good for your application. The "Q" control also will give you more attenuation with a lower Q number but you will widen the notch which is usually not desired. So cascade two in series by growing the cell. Do not drop another in the design, it is less efficient.

There are some posts about microcontroller control that may be helpful. Here are some:

This is the best one:

https://ez.analog.com/docs/DOC-1806

There is also this one:

https://ez.analog.com/thread/8218

Dave T

zhuangqiong Reply
Feb 28, 2017 00:00

Thank you so much and your advice is very helpful to me.

I have used sigmastudio to design the project and have exported the project file. Now I want to use the MCU to control parameters of the notch filter which is shown below. For example, I hope that in real time control I can change the frequency of the trap to any value, 1000Hz,1500Hz,3500Hz,4530Hz, etc. Or I want to change the "Q" or "Gain" to any value in real time control.

I tried to change the parameter value to find a certain law, but I failed.

How can I know the corresponding parameter value when I want to filter out a frequency??

Best Regards,

Qiongzhuang

7f268c4bf7b269e5bcaa1b906ddec6c6.png
7f268c4bf7b269e5bcaa1b906ddec6c6.png
7f268c4bf7b269e5bcaa1b906ddec6c6.png-187x255.png
7f268c4bf7b269e5bcaa1b906ddec6c6.png-187x255.png
db4ab48472139e657139fabee4df0e24.png
db4ab48472139e657139fabee4df0e24.png
db4ab48472139e657139fabee4df0e24.png-633x300.png
db4ab48472139e657139fabee4df0e24.png-633x300.png