Measuring phase response of a DAC

Hello, Gentlemen,

I recently validated the behavior of my I2s test setup with the isolators, following the advices of the wiki page related to the front panel.

My goal however is to be able to measure frequency and phase of a DAC (or DSP section). If My DUT expects a I2s input signal, and I loop-back the left channel, and receive the output of the DUT on the right channel, would that be enough to retrieve the phase response of the system?

Regards.

Hi @jp_alecrim, the problem you pose is difficult due to the unknown time delay of the DSP section. Numerically, you can get a ballpark estimate by taking the FFT of both the input and output (time domain sweeps) and then doing a complex division. That gives you the complex frequency response which contains both the magnitude and phase of the response. BUT, the phase is going to be meaningless. So, you have to correct for that. That involves doing an inverse FFT on the response so you get an impulse response. Then you center the peak of the IR, and do an FFT to get back the frequency response and phase. But this time, the phase will be relative to the peak arrival time of the IR. So, it’s still not absolute. But it won’t be wrapping like it was before you centered the IR.

I think if you are developing or evaluating DSP filters, you will really want absolute phase, and that means you will need to make a measurement where you use the right channel as the reference. So, play a chirp where your left channel is the DSP algorithm you are developing, and the right channel is an all-pass delay equal to the path delay of the left channel. and then complex div on those. From that, you get FR and meaningful absolute phase.

Absolute phase can be a real challenge…Relative phase is sometimes interesting, but not very useful.

Once you have the complex frequency response its a matter of fitting a linear slope to the phase v. frequency to find the delay.

The slope of phase(freq) graph is the (group) delay. If its a straight line its a fixed delay independent of frequency (which means the phase delay = group delay too).

This has to be done on an unwrapped version of the phases so there aren’t any discontinuities.

Then the intercept should be a multiple of pi (a multiple of 2*pi if the signal isn’t inverted), as the phase at DC is either 0 or 180 degrees!

You can probably assume that at low frequencies the group delay is pretty constant (unless there’s some high-pass action going on).

Thanks matt and Mark for the answers.

Indeed my goal is to measure the Frequency response (magnitude and phase) of a digital filter.

Particularly in this case, I feed the dsp with an I2s output from the QA403. I wonder if the I2s output is syncronous with the right channel output so the loop-back to the right channel Input would be measuring the same signal as the I2s output.

The output of the DSP is an analog signal which I would then pass to the left channel input of the QA403. From your answers I assume this would be the right approach.

Hi @jp_alecrim:

I wonder if the I2s output is syncronous with the right channel output so the loop-back to the right channel Input would be measuring the same signal as the I2s output.

Right now it’s not which complicates things a bit. At some point in the (not near) future, the QA402/QA403 DAC outputs will match the I2S outputs exactly (minus any local processing delays through internal DAC or your own hardware DAC).