1
\$\begingroup\$

I'm working on a project which deals with filtering audio signals with a Low Pass Filter and amplifying the output. Currently, we are solving this using the TLV320AIC3111 audio codec by Texas Instruments, controlled by an STM32L476RG.

Using TI's proprietary software PurePath Studio, I've coded this filter below.

Low Pass Filter designed

Our test setup is described below

Function Generator -> External Class D Amp -> External Speaker -> Microphone(codec input) -> Codec -> Speaker(codec output) -> External Microphone -> Oscilloscope

Using basic python code, we plotted the frequency response graph as below.

Frequency response with setup

However, when we directly connect the frequency generator to the codec and the speaker output to the oscilloscope, we get a much better response as below.

Direct frequency response

When I connect the external speaker to the external microphone directly, (with no codec in between) we get a response as below.

System frequency response

Due to the similarity between images 2 and 3, I think the setup is not appropriate as external speaker and microphone are interfering with response.

However, when we use the same setup with an active analog filter with op-amps and similar filter specifications we get a proper response with none of the spikes observed in either of the aforementioned images.

I am having trouble figuring out why there would be such a difference between analog filter and codec filter. Can anyone guide me on this matter?

\$\endgroup\$
3
  • \$\begingroup\$ The one thing that stares me in the face with your writing here is that you assume that a digital filter and an analog filter are somehow fundamentally the same thing. They are most decidedly not the same. I'm heading off and don't have time right now, but look up s-space vs z-space for starters. (I can't speak to the software you are using. I just want to make sure you understand what happens when you sample.) \$\endgroup\$
    – jonk
    Commented Nov 4, 2019 at 6:45
  • \$\begingroup\$ I'm not assuming them to be the same thing. I'm just wondering why there is such a huge difference in the output, with the same setup. \$\endgroup\$ Commented Nov 4, 2019 at 9:17
  • \$\begingroup\$ The spikes (lobes) you see are inherent for a discrete time sampled filter (which would be clearer if amplitude was plotted in dB). There are lots of available resources for such things. \$\endgroup\$ Commented Nov 4, 2019 at 11:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.