# Confused over Stopband attenuation and stopband ripple

I have designed this bandstop filter to a desired specification:

$$\text{Stopband attenuation} = 40\,\text{dB}$$ $$\text{Passband ripple} = 2\,\text{dB}$$ etc ...

I understand that the stopband ripple can be given by the following:

$$\text{Stopband ripple} = −20\log_{10}(\delta_s)$$ $$\Leftrightarrow 40 = −20\log_{10}(\delta_s)$$ $$\Leftrightarrow \delta_s=0.01$$

Where I am confused is how this value can be converted into $$\text{dB}$$ so that it can be compared to the stop-band ripple seen in the MATLAB simulation (which is in $$\text{dB}$$). $$40\,\text{dB}$$ is the stopband attenuation, not the stopband ripple (or is it?). the simulation is showing a stopband ripple of around $$32\,\text{dB}$$.... are the stopband attenuation and ripple with same ? What am I missing ?

• For most filters you specify the Stopband attenuation, and the Passband Ripple - not the ripple in the Stopband. Are you sure you're not getting mixed up between the two? Commented May 17, 2018 at 18:18
• thats exactly what I am explaining, I am confused with regards to the stopband ripple. what is the expected stopband ripple size? Commented May 17, 2018 at 18:20