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

Donwsampling and Upsampling ADAU1467

SigmaDSP & SigmaStudio Electroacoustic Mar 13, 2024 00:00 2 replies Original on forum ↗
Subscribe
Electroacoustic Question
Mar 13, 2024 00:00

Hello all,

I am trying to do a simple factor 4 downsample and upsample in sigma studio. I have made the FIR butterword filter for the antialiasing. however, in the output I am encountering aliasing in high frequency. Attached is a diagram of how I am doing it. I don't know if I am doing something wrong.

I'll appreciate your help.

Adau1647

Audio Signal Processors

Audio Products

software

adau1467

sigma studio 4.7

adau1467z

SigmaDSP Audio Processors

downsampling

Show More

pastedimage1710341727831v2.png
pastedimage1710341727831v2.png
DaveThib Reply
Mar 13, 2024 00:00

Hello Electroacoustic,

I think you missed a little detail. That said, I actually tried to use the same filter you are using and ran into an issue but I replicated this another way to show you what I think is happening.

First, you can use the Stimulus and Probe feature to look at the filter response. You did not mention the sampling rate you are starting with and you did not attach a project. You really should attach a project with your posts. It saves us a lot of time. Often I delay answering a post because I do not have the time to replicate a project.

Assumption: You are starting with a 48kHz fs sampling rate.

So the downsampled rate will be 12kHz.

This means the Nyquist is 6kHz. Therefore the filter response needs to be way down by the time it gets to 6kHz. I like to see -90dB but it needs to be at least -60dB.

This is what I found when I replicated a 6th order Butterworth LPF set to 5kHz corner frequency.

As you see by the Probe graph it is only down -20dB at 6kHz. This is why you are seeing some aliasing. You either need to use a higher order or a lower corner frequency.

I did seem to find a bug with the High Order filter block. It would not work with the Stimulus and probe feature and I am rather certain it should.

I will investigate this. But the filter should function fine in the program. I think this is a SigmaStudio tool issue.

So I used a 2nd order filter and cascaded three of them to get a 6th order filter.

Dave T

Update: Mar 14, 2024

I restarted my computer and restarted SigmaStudio and now the Stimulus and Probe feature is working fine with the Nth Order Filter.

Here are the results I found. The filter is only down by -12dB at 6kHz. So this will not prevent aliasing very much.

If I go to the max 20th order filter it is only down ~-35dB at 6kHz with a 5kHz corner frequency.

Going to 20th order at 4500Hz corner frequency it is down around -55dB at 6kHz

With the 20th order I got it down to around -80dB with a 4kHz corner frequency.

If I go back to a 6th order filter I would have to place the corner frequency at around 1200Hz to get the pass band down by -90dB at 6kHz.

This is why the early digital devices used 13 pole brick wall filters before oversampling was invented. If I select a 14th order filter the audio is around -90dB with a corner frequency of 3kHz.

This is the dilemma early digital designers faced and it is an analog problem. You might want to change the filter from an IIR filter to an FIR filter. The General FIR Filter in the library will produce a good result f you are fine with the extra group delay.

This was a 128 order produces -90dB at 6kHz with a 4kHz corner frequency.

Going to 64th order (tap) filter gives a decent response. It is around -70dB at 6kHz.

So I suggest you experiment with the General FIR Filter.

Dave T

pastedimage1710350272030v1.png
pastedimage1710350272030v1.png
pastedimage1710435759144v1.png
pastedimage1710435759144v1.png
pastedimage1710436773115v2.png
pastedimage1710436773115v2.png
pastedimage1710436959676v3.png
pastedimage1710436959676v3.png
Electroacoustic Reply
Mar 18, 2024 00:00

Thanks a lot for your help. Your advice was effective. I experimented with different filters and changed the cut-off frequency, which resulted in perfect performance without any aliasing at the end. I apologize for my delayed response and will ensure to upload files promptly in the future.