DSPRelated.com
Forums

AIC23 _ High Pass Filter_BIG_FUNDAMENTAL_PROBLEM

Started by Akash_DSP July 30, 2008
Hi,

I am working on C6416 DSK which has AIC23 (codec). I am facing a bizarre
problem.

I programmed the C6416 using CCS v3.3 to just collect the analog input
through the A/D, send it to the D/A and see the waveform on the
oscilloscope. But there is a big problem. The phase delay between the input
signal (Sampling Frequency =44.1 KHz) and the output signal as seen on the
oscilloscope varies periodically which is more then one sampling period.

If the tone.c program given as example is modified to generate a square
wave of 17 Hz (approx) then you can actually see the differentiation of the
signal. This means that there is a problem with the High Pass filter in the
aic23. Even after disabling it through the registers the output remains the
same i.e. the HPF still functions.

Can anyone suggest me some ways to get out of this problem and to disable
the HPF. Please reply ASAP and let me know if you need any additional
information. 



Thanks

Akash




Akash_DSP wrote:
> Hi, > > I am working on C6416 DSK which has AIC23 (codec). I am facing a bizarre > problem. > > I programmed the C6416 using CCS v3.3 to just collect the analog input > through the A/D, send it to the D/A and see the waveform on the > oscilloscope. But there is a big problem. The phase delay between the input > signal (Sampling Frequency =44.1 KHz) and the output signal as seen on the > oscilloscope varies periodically which is more then one sampling period.
"Varies periodically" means that the delay between input and output changes on a periodic (in the simplest case, sinusoidally) way. Is that what you mean?
> If the tone.c program given as example is modified to generate a square > wave of 17 Hz (approx) then you can actually see the differentiation of the > signal. This means that there is a problem with the High Pass filter in the > aic23. Even after disabling it through the registers the output remains the > same i.e. the HPF still functions.
The anti-alias filter before the A-to-D converter causes what you see. That is a low-pass filter, not high pass. Id you disable it, you will suffer aliasing, which is worse.
> Can anyone suggest me some ways to get out of this problem and to disable > the HPF. Please reply ASAP and let me know if you need any additional > information.
Re-familiarize yourself with how sampling works and what its limitations are. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
>Akash_DSP wrote: >> Hi, >> >> I am working on C6416 DSK which has AIC23 (codec). I am facing a
bizarre
>> problem. >> >> I programmed the C6416 using CCS v3.3 to just collect the analog input >> through the A/D, send it to the D/A and see the waveform on the >> oscilloscope. But there is a big problem. The phase delay between the
input
>> signal (Sampling Frequency =44.1 KHz) and the output signal as seen on
the
>> oscilloscope varies periodically which is more then one sampling
period.
> >"Varies periodically" means that the delay between input and output >changes on a periodic (in the simplest case, sinusoidally) way. Is that >what you mean? > >> If the tone.c program given as example is modified to generate a
square
>> wave of 17 Hz (approx) then you can actually see the differentiation of
the
>> signal. This means that there is a problem with the High Pass filter in
the
>> aic23. Even after disabling it through the registers the output remains
the
>> same i.e. the HPF still functions. > >The anti-alias filter before the A-to-D converter causes what you see. >That is a low-pass filter, not high pass. Id you disable it, you will >suffer aliasing, which is worse. > >> Can anyone suggest me some ways to get out of this problem and to
disable
>> the HPF. Please reply ASAP and let me know if you need any additional >> information. > >Re-familiarize yourself with how sampling works and what its limitations
>are. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >�����������������������������������������������������������������������
Hey Jerry, thanks for the reply. Yes, the periodic vairation is sinusoidal. This means that if I give an audio input with a frequenct spectrum (<20 KHz), frequencies that will have come out of the D/A will have different delays. I dont know what to do. Please help Thanks Akash
Akash_DSP wrote:

   ...

> Hey Jerry, > > thanks for the reply. > > Yes, the periodic vairation is sinusoidal. This means that if I give an > audio input with a frequenct spectrum (<20 KHz), frequencies that will have > come out of the D/A will have different delays.
Different delays for different frequencies, of different delays for the same frequency at different times? ... Jerry -- Engineering is the art of making what you want from things you can get.
>Akash_DSP wrote: > > ... > >> Hey Jerry, >> >> thanks for the reply. >> >> Yes, the periodic vairation is sinusoidal. This means that if I give
an
>> audio input with a frequenct spectrum (<20 KHz), frequencies that will
have
>> come out of the D/A will have different delays. > >Different delays for different frequencies, of different delays for the >same frequency at different times? > > ... > >Jerry >-- >Engineering is the art of making what you want from things you can get.
Hey Jerry, it is different delays for different frequencies at the same time. Akash
Akash_DSP wrote:
>> Akash_DSP wrote: >> >> ... >> >>> Hey Jerry, >>> >>> thanks for the reply. >>> >>> Yes, the periodic vairation is sinusoidal. This means that if I give > an >>> audio input with a frequenct spectrum (<20 KHz), frequencies that will > have >>> come out of the D/A will have different delays. >> Different delays for different frequencies, of different delays for the >> same frequency at different times? >> >> ... >> >> Jerry >> -- >> Engineering is the art of making what you want from things you can get. > > Hey Jerry, > > it is different delays for different frequencies at the same time.
It seems that you have discovered the dispersion of the anti-alias filter. That is normal. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
>Akash_DSP wrote: >>> Akash_DSP wrote: >>> >>> ... >>> >>>> Hey Jerry, >>>> >>>> thanks for the reply. >>>> >>>> Yes, the periodic vairation is sinusoidal. This means that if I give >> an >>>> audio input with a frequenct spectrum (<20 KHz), frequencies that
will
>> have >>>> come out of the D/A will have different delays. >>> Different delays for different frequencies, of different delays for
the
>>> same frequency at different times? >>> >>> ... >>> >>> Jerry >>> -- >>> Engineering is the art of making what you want from things you can
get.
>> >> Hey Jerry, >> >> it is different delays for different frequencies at the same time. > >It seems that you have discovered the dispersion of the anti-alias >filter. That is normal. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533; >
Hey Jerry, you mean to say that if I give an audio input and observe at the output that each frequency comes out with a different delay. That is normal? If you program your C6416 or c6713 do you see similar behaviour? Akash
Akash_DSP wrote:
>> Akash_DSP wrote: >>>> Akash_DSP wrote: >>>> >>>> ... >>>> >>>>> Hey Jerry, >>>>> >>>>> thanks for the reply. >>>>> >>>>> Yes, the periodic vairation is sinusoidal. This means that if I give >>> an >>>>> audio input with a frequenct spectrum (<20 KHz), frequencies that > will >>> have >>>>> come out of the D/A will have different delays. >>>> Different delays for different frequencies, of different delays for > the >>>> same frequency at different times? >>>> >>>> ... >>>> >>>> Jerry >>>> -- >>>> Engineering is the art of making what you want from things you can > get. >>> Hey Jerry, >>> >>> it is different delays for different frequencies at the same time. >> It seems that you have discovered the dispersion of the anti-alias >> filter. That is normal. >> >> Jerry >> -- >> Engineering is the art of making what you want from things you can get. >> > > Hey Jerry, > > you mean to say that if I give an audio input and observe at the output > that each frequency comes out with a different delay. That is normal? > > If you program your C6416 or c6713 do you see similar behaviour?
In order to sample successfully, there must be no components of the sampled signal as high as half the sampling frequency. The use of an anti-alias low-pass filter in the signal path before the sampler is so nearly universal that many codecs have a filter built in. Being analog, the a-a filter will affect the phase. The designer is responsible for correcting any phase distortion that interferes with proper the function of his design. Examining the data sheet should show you how much phase shift to expect. Once you plot the filter's phase/frequency characteristic, you will know if what you see is normal. Oversampling is an effective way to minimize phase shift in the band of actual interest. After sampling, the signal can be further filtered digitally, then decimated. All real design requires balancing competing objectives; that is an art. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
>Akash_DSP wrote: >>> Akash_DSP wrote: >>>>> Akash_DSP wrote: >>>>> >>>>> ... >>>>> >>>>>> Hey Jerry, >>>>>> >>>>>> thanks for the reply. >>>>>> >>>>>> Yes, the periodic vairation is sinusoidal. This means that if I
give
>>>> an >>>>>> audio input with a frequenct spectrum (<20 KHz), frequencies that >> will >>>> have >>>>>> come out of the D/A will have different delays. >>>>> Different delays for different frequencies, of different delays for >> the >>>>> same frequency at different times? >>>>> >>>>> ... >>>>> >>>>> Jerry >>>>> -- >>>>> Engineering is the art of making what you want from things you can >> get. >>>> Hey Jerry, >>>> >>>> it is different delays for different frequencies at the same time. >>> It seems that you have discovered the dispersion of the anti-alias >>> filter. That is normal. >>> >>> Jerry >>> -- >>> Engineering is the art of making what you want from things you can
get.
>>> >> >> Hey Jerry, >> >> you mean to say that if I give an audio input and observe at the
output
>> that each frequency comes out with a different delay. That is normal? >> >> If you program your C6416 or c6713 do you see similar behaviour? > >In order to sample successfully, there must be no components of the >sampled signal as high as half the sampling frequency. The use of an >anti-alias low-pass filter in the signal path before the sampler is so >nearly universal that many codecs have a filter built in. Being analog, >the a-a filter will affect the phase. The designer is responsible for >correcting any phase distortion that interferes with proper the function
>of his design. > >Examining the data sheet should show you how much phase shift to expect.
>Once you plot the filter's phase/frequency characteristic, you will know
>if what you see is normal. > >Oversampling is an effective way to minimize phase shift in the band of >actual interest. After sampling, the signal can be further filtered >digitally, then decimated. > >All real design requires balancing competing objectives; that is an art. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >???????????????????????????????????????????????????????????????????????
Hey Jerry, thanks for the descriptive mail. I really appreciate it. I understand aliasing thats why in the first message I wrote that my sampling frequeny is 44.1KHz and I am looking at frequency spectrum 0 -20Khz (Following the Nyquist Criteria). I also understand the use of anti aliasing filter. But I am seeing phase delay just moving +- 1ooHz . e.g. there is a big phase difference b/w the input frequencies 16.0 KHz and 16.10 Khz. 16.0 Khz and 17.7Khz will then have the same delay. As it is periodic delay. I am unable to find the reason for this as this is what we normally dont see in a DSP chip. Thanks Akash
Jerry Avins wrote:

> ... The designer is responsible for > correcting any phase distortion that interferes with proper the function > of his design. > > Examining the data sheet should show you how much phase shift to expect. > Once you plot the filter's phase/frequency characteristic, you will know > if what you see is normal. ...
There is another filter in the path: the reconstruction filter at the output. Sometimes it also flattens the sinc response that arises from the DAC's first-order hold, sometimes it doesn't. The data sheet will tell you. There is therefore phase shift also in the analog output. Jerry -- Engineering is the art of making what you want from things you can get.