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

SigmaStudio probe : FIR phase error ? (ADAU1452)

SigmaDSP & SigmaStudio maxidcx Jan 20, 2014 00:00 6 replies Original on forum ↗
Subscribe
maxidcx Question
Jan 20, 2014 00:00

Hello,

I m preparing a crossover with FIR filter for ADAU1452 and when simulating the result with the probe, I have good magnitude response, but the phase looks completely out.

to design the FIR, I have used "rephase" which is a well known freeware solution often used with MiniDSP products.

the FIR design window is like this

the text file generated is included below.

When importing the impulse file in another freeware tools called HolmImpulse we get almost the same figures:

but when uploading the table in sigma studio 3.10.2 and launching the probe, we get this window:

where the phase looks cahotic.

can you please confirm that this might be a bug in Studio and that the ADAU1452 algortihm is not impacted ?

thank you

fabriceo

Audio Signal Processors

adau1452

SigmaDSP Audio Processors

8b48dfcbb309f2bd54c12f26fc983f18.jpg
8b48dfcbb309f2bd54c12f26fc983f18.jpg
8b48dfcbb309f2bd54c12f26fc983f18.jpg-450x297.jpg
8b48dfcbb309f2bd54c12f26fc983f18.jpg-450x297.jpg
34271a571ccb11170fb83645f8209ede.jpg
34271a571ccb11170fb83645f8209ede.jpg
34271a571ccb11170fb83645f8209ede.jpg-450x342.jpg
34271a571ccb11170fb83645f8209ede.jpg-450x342.jpg
078e3dcd26f0fd278c69f9bad4de4cf0.jpg
078e3dcd26f0fd278c69f9bad4de4cf0.jpg
078e3dcd26f0fd278c69f9bad4de4cf0.jpg-450x381.jpg
078e3dcd26f0fd278c69f9bad4de4cf0.jpg-450x381.jpg
maxidcx Reply
Jan 20, 2014 00:00

oops, forgot to mention that the compiler output seems not to reflect the exact workload of the CPU core, as it should need around 250+ int cycles, right ?

da9b508b9829a983dff24e4625c809c7.jpg
da9b508b9829a983dff24e4625c809c7.jpg
da9b508b9829a983dff24e4625c809c7.jpg-416x192.jpg
da9b508b9829a983dff24e4625c809c7.jpg-416x192.jpg
maxidcx Reply
Jan 20, 2014 00:00

can you please also confirm if the FIR coeficient are converted from real to 8_24, then we might have interrest to normalize above 1 to use the full 32 bits capabilities of the ALU

KJBob Reply
Jan 22, 2014 00:00

Hello maxidcx,

To investigate the phase issue I built a FIR filter with a known response and plotted it:

This FIR kernel has all zero coefficients except a "1" in the middle. Thus it's no surprise that it has unity gain, flat frequency response and a constantly increasing phase lag. It's functionally identical to the delay just below it, and the two have identical gain and phase plots:

Knowing the expected phase response, I can see two issues with the Stimulus-Probe phase plot in SigmaStudio:

The phase axis is shown as "radians" but its actually in degrees. The filter has a 500-sample group delay, which works out to 10.4 mS at a 48K sample rate. This produces a frequency-dependent phase shift -- for example, at 1000 Hz, the delay amounts to 10.4 complete cycles of phase shift, equivalent to 3750 degrees or 65 radians. The graph shows about 3750, so it must be in degrees. That's about 58 times higher than the radian figure.

Once the phase lag exceeds 6018 degrees, something overflows and you get the cyclic results shown. The actual phase shift, on the other hand, just keeps increasing.

So apparently something is wrong with the phase display in this case. I don't suspect it affects the actual FIR performance, because the coefficients you worked out go into the DSP while the Stimulus-Probe response is figured separately. Neither hardware nor compiling is needed to use Stimulus-Probe. Also, I tried the same experiment above with a ADAU1452 and a AD1940, and received the same results even though the chips use different compilers.

Best regards,

Bob

6cb315f056cc68b1d02eb56ec1026d4c.jpg
6cb315f056cc68b1d02eb56ec1026d4c.jpg
6cb315f056cc68b1d02eb56ec1026d4c.jpg-450x149.jpg
6cb315f056cc68b1d02eb56ec1026d4c.jpg-450x149.jpg
d3ac5a7271721a7cd73f0acf1fb488b4.jpg
d3ac5a7271721a7cd73f0acf1fb488b4.jpg
d3ac5a7271721a7cd73f0acf1fb488b4.jpg-450x317.jpg
d3ac5a7271721a7cd73f0acf1fb488b4.jpg-450x317.jpg
KJBob Reply
Jan 23, 2014 00:00

Hi maxidcx,

Within a FIR filter, SigmaDSPs can handle the result of multiplying two full-scale numbers. This was demonstrated for a ADAU1701 at https://ez.analog.com/thread/36478, it also works for the ADAU1452. Below the slow, full scale (127.9 peak) sine wave drives a FIR differentiator with two maximum value, opposite polarity taps. This produces numbers approaching +/- 16384 that nearly cancel out, leaving a small clean sine wave as the FIR output.

Thus theoretically, you can go larger on your FIR coefficients. ADI put all that headroom in for a reason, however. Audio has a way of reaching unexpected peaks. The fixed-point SigmaDSP handles this simply by leaving lots of headroom. With 24 bits after the binary point, there's hardly any reason to encroach upon those bits before.

Best regards.

Bob

6175.7891d8cb2e426479032160fc5763c422.jpg
6175.7891d8cb2e426479032160fc5763c422.jpg
6175.7891d8cb2e426479032160fc5763c422.jpg-250x176.jpg
6175.7891d8cb2e426479032160fc5763c422.jpg-250x176.jpg
7041.88399e76f9a4f44cb3542b4812917fd1.jpg
7041.88399e76f9a4f44cb3542b4812917fd1.jpg
7041.88399e76f9a4f44cb3542b4812917fd1.jpg-334x143.jpg
7041.88399e76f9a4f44cb3542b4812917fd1.jpg-334x143.jpg
JCB Reply
Apr 14, 2014 00:00

Hi, maxidcx.

I'm using chip ADAU 1701, fs=48000.

Sorry, I am a newbie in filter designing.

I would like to design an IIR Notch filter at 1kHz. I used "Fixed-Point Table Generator" to get the coefficients.

Then, I feed that IIR output into another FIR filter to correct the phase shift. I'm using 'rephase' to design the FIR filter and get 128 taps of impulse response and then fill in the FIR filter in SigmaStudio.

Below is capture screen scope IIR:

IIR filter generates some phase shift around 1kHz. (Q=1, Butterworth, cutoff at 1kHz, fs_1=850, fs_2=1150).

But I could not get the expected result in Simulation Probe. I guess the output should be a linear line 0 degree.

This is the screen of phase display:

Am I using wrong method to get the FIR coeff? Or the phase display is incorrect?

Hope to hear from you soon.

Thanks alot,

JCB

a86ef1046319a4aaa9aa7851110130e5.jpg
a86ef1046319a4aaa9aa7851110130e5.jpg
a86ef1046319a4aaa9aa7851110130e5.jpg-450x300.jpg
a86ef1046319a4aaa9aa7851110130e5.jpg-450x300.jpg
013a1255c56838154cdbbe6baacb62c3.jpg
013a1255c56838154cdbbe6baacb62c3.jpg
013a1255c56838154cdbbe6baacb62c3.jpg-450x300.jpg
013a1255c56838154cdbbe6baacb62c3.jpg-450x300.jpg
1a5f7e65d3f85d51c6d7458e50b2a9f6.jpg
1a5f7e65d3f85d51c6d7458e50b2a9f6.jpg
1a5f7e65d3f85d51c6d7458e50b2a9f6.jpg-450x300.jpg
1a5f7e65d3f85d51c6d7458e50b2a9f6.jpg-450x300.jpg
EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin