Jump to content
IGNORED

On the subject of "ringing"


semente

Recommended Posts

6 minutes ago, Shadders said:

Hi,

I checked the numerical values of the plot you responded to - they are not zero - approximately 1/100th of the peak value. The plot just does not show it.

 

I have never stated anything does not follow the principles of the fourier transform.

 

I am not sure what you mean by your last statement, no spectral content mean no pre-ringing.

 

Regards,

Shadders.

It occurs to me that your plots have a inear scale- this would all show up better on a log scale I think. 

The last statement of mine  was a typo- I mean no spectral content in the transition band of the filter.

I really don't know what is left to say. The starting point several hours ago was the point that you need spectral information in the transition band of the filter to cause ringing. 

You purported to show that this was not the case using a time limited sine wave (which you believed had no energy other than 1 Khz) but which was still affected by the filter. We have I hope now established that the spectrum of a time limited sine wave such as that actually does have a continuous and non limited spectrum. You may not have thought you were saying something which did not follow the principles of the Fourier transform but you were. 

 

Hence any ringing is caused by the presence of spectral components in the transition band of the filter. 

 

A recording with no spectral energy in the filters transition band will not cause pre-ringing. In strict terms there will be some such energy but it will be minimal. 

 

You are not a sound quality measurement device

Link to comment
25 minutes ago, adamdea said:

It occurs to me that your plots have a inear scale- this would all show up better on a log scale I think. 

The last statement of mine  was a typo- I mean no spectral content in the transition band of the filter.

I really don't know what is left to say. The starting point several hours ago was the point that you need spectral information in the transition band of the filter to cause ringing. 

You purported to show that this was not the case using a time limited sine wave (which you believed had no energy other than 1 Khz) but which was still affected by the filter. We have I hope now established that the spectrum of a time limited sine wave such as that actually does have a continuous and non limited spectrum. You may not have thought you were saying something which did not follow the principles of the Fourier transform but you were. 

 

Hence any ringing is caused by the presence of spectral components in the transition band of the filter. 

 

A recording with no spectral energy in the filters transition band will not cause pre-ringing. In strict terms there will be some such energy but it will be minimal. 

 

Hi,

I NEVER stated that the time limited sine wave had no energy other than at 1kHz. I stated that most of the energy is spread around the 1kHz signal.

 

Where is the proof that the energy in the transition band causes the ringing of the filter ?

 

The transition band is a slope, and can be 10's of hertz wide. Are you stating that any signal in this band will cause ringing ?

 

I ran a frequency sweep as above using Octave - it passed through the transition band - no ringing. Only attenuation as per the filter response. Repeated below :

image.thumb.png.558eddb052d60753f17faae52d2d37e9.png

 

Regards,

Shadders.

Link to comment
13 minutes ago, psjug said:

@Shadders  Is your input signal oversampled such that the high frequency components introduced by the zeros/wave cut-on/cutoff will show up in the FFT?

Hi psjug,

No oversampling - i calculated the sine wave using the base rate of 192kHz. To keep it simple, i used 192,000 samples for the entire signal, and calculated the 1kHz signal based on the sample rate.

Regards,

Shadders.

Link to comment
17 minutes ago, Shadders said:

Hi,

I NEVER stated that the time limited sine wave had no energy other than at 1kHz. I stated that most of the energy is spread around the 1kHz signal.

 

Regards,

Shadders.

2 hours ago, Shadders said:

The graph shows that whatever the frequency of the signal, a transient will cause ringing. Here is a quick and dirty fft - i have not bothered to modify the axes, or mirror the response to show negative and postive energy :....

As can be seen - this is a pure sine wave. There is no other energy in the signal.

 

The reason for the pre-ringing, is as stated before, the sine wave presents an abrupt change to the filter input. It is a transient, and creates a transient response from the filter in the form of pre-ringing and post-ringing.

 

Regards,

Shadders.

Look I don't want to waste time having a row but you quite plainly did say that that the time limited signal had no energy other than at 1Khz (above, quoted). That is why we went off on a wild goose chase. I am not going to follow a further wild goose chase. 

You appear to be insistent on thinking that there is such a thing as "an abrupt change" which has no correlate in the frequency domain. If you grasp that this is not possible you will then see what the spectral difference is between a continuous sine wave and a sine wave which starts. It can then be seen that the  difference in filter output must be caused by the difference in spectral input. 

 

I have never been saying that the change in output was not caused by the abrupt change in input, merely that this is all in line with the spectral analysis.  If the signal really has no spectral content in the transition band or above then by definition  the filter can't affect it. 

You are not a sound quality measurement device

Link to comment
6 minutes ago, adamdea said:

Look I don't want to waste time having a row but you quite plainly did say that that the time limited signal had no energy other than at 1Khz (above, quoted). That is why we went off on a wild goose chase. I am not going to follow a further wild goose chase. 

You appear to be insistent on thinking that there is such a thing as "an abrupt change" which has no correlate in the frequency domain. If you grasp that this is not possible you will then see what the spectral difference is between a continuous sine wave and a sine wave which starts. It can then be seen that the  difference in filter output must be caused by the difference in spectral input. 

 

I have never been saying that the change in output was not caused by the abrupt change in input, merely that this is all in line with the spectral analysis.  If the signal really has no spectral content in the transition band or above then by definition  the filter can't affect it. 

Hi,

That was without the zeros added. I added the zeros to clarify. Sorry for the confusion.

I never stated that the abrupt change had no correlation to the frequency domain. What i am saying is that any energy in the transition band does not immediately cause ringing. Else the steady state energy in the transition band would cause permanent ringing.

Regards,

Shadders.

Link to comment
2 minutes ago, adamdea said:

Shadders. I seriously hope you are deliberately winding me up by the barry from Watford impression, because that would at least mean that one of us was having a good time. 

If so I salute you. 

Hi,

Not a wind up. I agree i should clarify the fft plot of the pure sine wave with no zeros added. Even with zeros added - the energy in the transition band is negligible, but we see significant ringing.

 

Again, where is the proof that the energy in the transition band causes ringing ?

 

Regards,

Shadders.

Link to comment

 

I'm sorry but your arguments based on your own reading of ffts is not helping anyone,. The spectral content outside the main lobe may not look much but you are using a linear scale. Your belief that the energy i the pre-ringing is greater than that in the transition band is just a hunch and I'm afraid not a convincing one. 

 

I cannot offer you any proof beyond the following. Consider the definition of the filter's frequency and phase response.  It cannot affect anything at a frequency below the transition band because if it did, then the transition band would include that frequency.

Remember we are not talking about real world approximations/implementations necessarily. Pre ringing is a property of the perfect sinc function. Nothing is affected below the transition band (and that includes phase) and everything above is removed.  Since this is a linear system (having additive linearity) it seems to me that that must mean that the same signal with nothing below the transition band would have to be completely unaffected. And if it is completely unaffected in frequency and phase it would have to be completely unaffected in the time domain. What does that leave us? Only the energy in the transition band which is allowed to be changed. 

 

Perhaps go back and re -read Fokus' posts. There are plenty of other people who understand all this better than me. 

 

if you are really interested in the answer than you will find it.

You are not a sound quality measurement device

Link to comment

I don't have any audio tools here, so this is quick and dirty.  Here are two FFTs.  Top is 5 sine components like you describe.  Bottom has some zero points added.  You can see that this adds some extra small peaks that extend higher than the highest frequency component, and in the case of your input signal there is surely significant out of band energy.  It's a lot more subtle looking on a FFT than I expected (of course it would be worse if I had more cut-ons and cut-offs of the sine wave components), but your experiment shows that matters a lot for reconstructing the input.

 

 

image.thumb.png.9534b74d31f80a36a60bc2194dd07df7.png

image.thumb.png.90a32b9aebe7f2414e413facae8982b6.png

Link to comment
3 minutes ago, psjug said:

I don't have any audio tools here, so this is quick and dirty.  Here are two FFTs.  Top is 5 sine components like you describe.  Bottom has some zero points added.  You can see that this adds some extra small peaks that extend higher than the highest frequency component, and in the case of your input signal there is surely significant out of band energy.  It's a lot more subtle looking on a FFT than I expected (of course it would be worse if I had more cut-ons and cut-offs of the sine wave components), but your experiment shows that matters a lot for reconstructing the input.

 

 

image.thumb.png.9534b74d31f80a36a60bc2194dd07df7.png

image.thumb.png.90a32b9aebe7f2414e413facae8982b6.png

Hi psjug,

Yes - in the later post i added the zeros and saw the energy spread about the 1kH signal. I am not in disagreement here. The energy in the remaining bandwidth, especially in the transition bandwidth is negligible.

 

What is being said (not by you from what i have read) is that energy in the transition band causes ringing. I have not seen the proof.

 

Regards,

Shadders.

 

Link to comment
5 minutes ago, Shadders said:

Hi psjug,

Yes - in the later post i added the zeros and saw the energy spread about the 1kH signal. I am not in disagreement here. The energy in the remaining bandwidth, especially in the transition bandwidth is negligible.

 

What is being said (not by you from what i have read) is that energy in the transition band causes ringing. I have not seen the proof.

 

Regards,

Shadders.

 

For me it helps a lot not to think of it as of as ringing.  Think of it as the only representation the filter can do when it expects a band limited signal.

Link to comment
47 minutes ago, adamdea said:

 

I'm sorry but your arguments based on your own reading of ffts is not helping anyone,. The spectral content outside the main lobe may not look much but you are using a linear scale. Your belief that the energy i the pre-ringing is greater than that in the transition band is just a hunch and I'm afraid not a convincing one. 

 

I cannot offer you any proof beyond the following. Consider the definition of the filter's frequency and phase response.  It cannot affect anything at a frequency below the transition band because if it did, then the transition band would include that frequency.

Remember we are not talking about real world approximations/implementations necessarily. Pre ringing is a property of the perfect sinc function. Nothing is affected below the transition band (and that includes phase) and everything above is removed.  Since this is a linear system (having additive linearity) it seems to me that that must mean that the same signal with nothing below the transition band would have to be completely unaffected. And if it is completely unaffected in frequency and phase it would have to be completely unaffected in the time domain. What does that leave us? Only the energy in the transition band which is allowed to be changed. 

 

Perhaps go back and re -read Fokus' posts. There are plenty of other people who understand all this better than me. 

 

if you are really interested in the answer than you will find it.

Hi,

Ok- i get what you are saying.

 

The ringing is the energy in the transition band, and that if the signal did not contain energy in the transition band then there would be no ringing ?.

 

Is the above correct ?. Thanks.

 

Filters are not perfect - inband ripple, phase changes - just that linear phase means that all frequencies undergo the relevant time delay - that is constant group delay.

 

A few questions - a signal at the transition frequency - a pure sine wave - why is this not distorted by the ringing ?

 

Is it because the transient response has disappeared and the filter is operating in the steady state ?

 

If one were to create a signal that had energy in the 50kHz region, as well as 1kHz, 10kHz, 20kHz, 40kHz and 60kHz - the isolated sine waves - where some of the energy appears at 50kHz. If we band stop this signal from 45kHz to 55kHz, and then pass this signal through a low pass filter with the transition band at 50kHz, since no energy is in the transition band, we should see no ringing. Do you agree ?

 

Regards,

Shadders.

Link to comment
27 minutes ago, Shadders said:

Hi,

Ok- i get what you are saying.

 

The ringing is the energy in the transition band, and that if the signal did not contain energy in the transition band then there would be no ringing ?.

 

Is the above correct ?. Thanks.

 

Yes.

27 minutes ago, Shadders said:

 

A few questions - a signal at the transition frequency - a pure sine wave - why is this not distorted by the ringing ?

 

Is it because the transient response has disappeared and the filter is operating in the steady state ?

.

This transient response/steady state thing is not what I am talking about, but it may produce the same result.

The effect of the filter in the transition band is that energy is distributed a bit in time. I don't know how you could tell this when you have a continuous tone. That's the problem. It only seems to show up when you can see that there isn't supposed to be any/much  energy before time t (ie becasue there is a transient) .  in crude terms if the energy at time t goes back to t-1 and the energy at t+1 goes to time t then what do you get? 

It seems to me that there is no reason for there to be any "distortion" except on the leading edge or the tail edge

27 minutes ago, Shadders said:

If one were to create a signal that had energy in the 50kHz region, as well as 1kHz, 10kHz, 20kHz, 40kHz and 60kHz - the isolated sine waves - where some of the energy appears at 50kHz. If we band stop this signal from 45kHz to 55kHz, and then pass this signal through a low filter with the transition band at 50kHz, since no energy is in the transition band, we should see no ringing. Do you agree ?

 

Regards,

Shadders.

There should be no ringing from the second filter but remember that there could be an effect from your first "band stop" filter creating ringing. This is analagous to the problem with dacs and adcs. There is a lot to be said for the view that it is the adc which creates the ringing because, once the signal is properly band limited an appropriate  linear phase filter should do no harm.. 

I think Fokus showed an example the other day of a band limited transient event being unaffected by a filter. But the problem is in creating the band limited signal in the first place. 

You are not a sound quality measurement device

Link to comment
3 minutes ago, adamdea said:

Yes.

This transient response/steady state thing is not what I am talking about, but it may produce the same result.

The effect of the filter in the transition band is that energy is distributed a bit in time. I don't know how you could tell this when you have a continuous tone. That's the problem. It only seems to show up when you can see that there isn't supposed to be any/much  energy before time t (ie becasue there is a transient) .  in crude terms if the energy at time t goes back to t-1 and the energy at t+1 goes to time t then what do you get? 

It seems to me that there is no reason for there to be any "distortion" except on the leading edge or the tail edge

There should be no ringing from the second filter but remember that there could be an effect from your first "band stop" filter creating ringing. This is analagous to the problem with dacs and adcs. There is a lot to be said for the view that it is the adc which creates the ringing because, once the signal is properly band limited an appropriate  linear phase filter should do no harm.. 

I thinking Fokus showed an example the other day of a band limited transient event being unaffected by a filter. But the problem is in creating the band limited signal in the first place. 

Hi,

OK - so is the ringing of the filter a set of frequencies from the start of the transition bandwidth to the end of the transition bandwidth ?

 

If the sweep frequency is not distorted when it passes through the transition band, then it suggests that the ringing is in fact all frequencies of the transition band. Such that a very narrow transition band means a very small number of frequencies make up the ringing.

 

Seems odd that ringing is caused by the frequencies in the transition band, and yet the frequencies in the transition band are not affected by the ringing. Not sure how one could examine this in detail to prove it either way.

 

Regards,

Shadders.

Link to comment
3 minutes ago, Shadders said:

Hi,

OK - so is the ringing of the filter a set of frequencies from the start of the transition bandwidth to the end of the transition bandwidth ?

 

If the sweep frequency is not distorted when it passes through the transition band, then it suggests that the ringing is in fact all frequencies of the transition band. Such that a very narrow transition band means a very small number of frequencies make up the ringing.

 

Seems odd that ringing is caused by the frequencies in the transition band, and yet the frequencies in the transition band are not affected by the ringing. Not sure how one could examine this in detail to prove it either way.

 

Regards,

Shadders.

Yes. It has occurred to me that in the case of a perfect sinc function, although the ringing goes on forever it can only be at very low amplitude because there could only be an infinitely small amount of energy in the transition band (because its infinitely narrow). 

As I understand it the ringing is at all frequencies in the transition band.

I don't know why you say that the frequencies are not affected by the ringing. My understanding is that they are slightly redistributed in time. That is the effect.  Across the signal as a whole the only effect is that they are slightly attenuated. But looking at various time sections of the signal it may be possible to detect a little smearing. For your steady state signals the smearing would make not difference as it would just be a case of passing the frequencies down the line til you get to a "gap". Then you would see it.

As I write this I have a feeling that those who understand this better than I do are cringeing at my solecisms. 

You are not a sound quality measurement device

Link to comment
28 minutes ago, adamdea said:

Yes. It has occurred to me that in the case of a perfect sinc function, although the ringing goes on forever it can only be at very low amplitude because there could only be an infinitely small amount of energy in the transition band (because its infinitely narrow). 

As I understand it the ringing is at all frequencies in the transition band.

I don't know why you say that the frequencies are not affected by the ringing. My understanding is that they are slightly redistributed in time. That is the effect.  Across the signal as a whole the only effect is that they are slightly attenuated. But looking at various time sections of the signal it may be possible to detect a little smearing. For your steady state signals the smearing would make not difference as it would just be a case of passing the frequencies down the line til you get to a "gap". Then you would see it.

As I write this I have a feeling that those who understand this better than I do are cringeing at my solecisms. 

Hi,

Your explanations are ok, don't worry about it.

 

So, is the ringing the impulse response - or at the start of a signal the pre-ringing, is one half of the impulse response, and at the end of a signal, the post-ringing is the latter half of the impulse response ? Or could be the input signal modified impulse response ?

 

This indicates that we can then extract this from the filter output, put the two together, and then take the fft, and voila, we have the frequency response of the filter.

 

Would this then indicate that the ringing is not the frequencies in the transition band ?

 

UPDATE - what i am going to do is to examine the ringing and see what the frequency content is. I will compare with the impulse response - to see if there is any correlation. Ringing is still the transient response - but which specific conditions that cause it - not seen the proof.

 

Regads,

Shadders.

Link to comment
25 minutes ago, Shadders said:

Hi,

Your explanations are ok, don't worry about it.

 

So, is the ringing the impulse response - or at the start of a signal the pre-ringing, is one half of the impulse response, and at the end of a signal, the post-ringing is the latter half of the impulse response ? Or could be the input signal modified impulse response ?

 

This indicates that we can then extract this from the filter output, put the two together, and then take the fft, and voila, we have the frequency response of the filter.

 

Would this then indicate that the ringing is not the frequencies in the transition band ?

 

Regads,

Shadders.

I'm not following you. The frequency response of the filter is by definition the Fourier transform of the impulse response. 

The rest I just don't understand. In principle if you look at the spectrum of the impulse reponse in time you should see that the ringing is at the transition band frequencies. 

here is an example (taken from a post on Hydorgen audio)

zim2ya.png

https://hydrogenaud.io/index.php/topic,107124.msg881802.html#msg881802

Must dash I hope this helps

You are not a sound quality measurement device

Link to comment
1 minute ago, adamdea said:

I'm not following you. The frequency response of the filter is by definition the Fourier transform of the impulse response. 

The rest I just don't understand. In principle if you look at the spectrum of the impulse reponse in time you should see that the ringing is at the transition band frequencies. 

here is an example (taken from a post on Hydorgen audio)

zim2ya.png

https://hydrogenaud.io/index.php/topic,107124.msg881802.html#msg881802

Must dash I hope this helps

Hi,

OK- thanks. I was discussing the possibility that if the ringing is in fact the impulse response, albeit split up then this would be the filter frequency response. In hindsight - will be a modified impulse response given that the 25 samples for a 50 tap filter are modified by the first 25 samples of that start of a sine wave.

 

I get the issue that if you energise a filter or system with a wideband signal, then it will resonate at its natural frequency - which is being stated as the transition band frequency bandwidth.

 

But, given that the filter transition bandwidth frequencies have no effect on signals at the transition frequencies apart from attenuating them, then this is at odds with the ringing. If you excite a system with its natural frequency, it will oscillate - but here, the filter does not oscillate, but attenuates.

 

This is why i question that in fact, it is energy at the transition band frequency that causes ringing.

 

Regards,

Shadders.

Link to comment
28 minutes ago, Shadders said:

Hi,

OK- thanks. I was discussing the possibility that if the ringing is in fact the impulse response, albeit split up then this would be the filter frequency response. In hindsight - will be a modified impulse response given that the 25 samples for a 50 tap filter are modified by the first 25 samples of that start of a sine wave.

 

I get the issue that if you energise a filter or system with a wideband signal, then it will resonate at its natural frequency - which is being stated as the transition band frequency bandwidth.

 

But, given that the filter transition bandwidth frequencies have no effect on signals at the transition frequencies apart from attenuating them, then this is at odds with the ringing. If you excite a system with its natural frequency, it will oscillate - but here, the filter does not oscillate, but attenuates.

 

This is why i question that in fact, it is energy at the transition band frequency that causes ringing.

 

Regards,

Shadders.

It seems to me that you are trying to make sense of this as though it were an analogue filter. It isn’t. Oscillation does not come into it. 

 

The only effect of the filter is to attenuate when integrated over a certain time window (the width of the whole impulse response). 

But over a narrower time window there is a redistribution. 

Can’t you see this from the time/ spectrum picture I posted above. Remember that the spectrum changes depending on the window you analyse over. 

 

Now I really am going 

You are not a sound quality measurement device

Link to comment
11 minutes ago, adamdea said:

It seems to me that you are trying to make sense of this as though it were an analogue filter. It isn’t. Oscillation does not come into it. 

 

The only effect of the filter is to attenuate when integrated over a certain time window (the width of the whole impulse response). 

But over a narrower time window there is a redistribution. 

Can’t you see this from the time/ spectrum picture I posted above. Remember that the spectrum changes depending on the window you analyse over. 

 

Now I really am going 

Hi,

Thanks - yes - i am examining this from both a DSP perspective and analogue filter operation also. The DSP books have the same nomenclature as the analogue engineering books with regards to system operation.

 

Not seen those plots before - i assume that energy is the horizontal axis and frequency the Y axis, and the lower filter shows more energy at the cut off frequency of the filter ???. I use audacity - but not for audio or DSP work.

 

When you state integration over the entire impulse response - i assume you are referring to the convolution integral. Not sure why you referenced this. If i examine the ringing frequency, it should confirm that it is indeed the transition band frequency/frequencies.

 

If as per our last sentence, you are referring to the issue that the more data you have, then the more accurate the fft and reduces leakage, for example. Or that depending on the windows applied to the data before the fft is taken, then this has an effect of the fft output.

 

Thanks for your time.

 

Regards,

Shadders.

Link to comment
20 minutes ago, Shadders said:

 

Not seen those plots before - i assume that energy is the horizontal axis and frequency the Y axis, and the lower filter shows more energy at the cut off frequency of the filter ???. I use audacity - but not for audio or DSP work.

 

When you state integration over the entire impulse response - i assume you are referring to the convolution integral. Not sure why you referenced this. If i examine the ringing frequency, it should confirm that it is indeed the transition band frequency/frequencies.

 

Thanks for your time.

 

Regards,

Shadders.

Time is on the x axis and colour denotes amplitude. And it clearly shows the ringing as the horizontal bar of the t shape and the ringing frequency and yes,  if you examined it you would see that!

You are not a sound quality measurement device

Link to comment

Hi,

I have implemented the following for analysis.

 

Filter length 500 taps, cut off frequency 0.25, which for 192kHz sampling rate is 24kHz. I have run the isolated sine waves, as per previous where they are 1kHz, 10kHz, 20kHz, 40kHz, and 60kHz.

 

For this analysis I have extracted the pre ringing and post ringing samples from the 1kHz signal and taken the FFT of these signals.

 

The FFT plots of the ringing is shown below, one with dB scale for amplitude and the other with the a standard linear scale. You can see the peak at the expected cut off frequency.

image.thumb.png.99305ecc681c057d4c81a61d680913af.png  image.thumb.png.035c5e1713f4c7b805a2b31d9e8ee542.png

The filter response using freqz is as below :

image.thumb.png.771e010996d64b984c7c0e50265959b1.png

When zooming on the frequency response, the transition band was calculated to be 100Hz. As such, this has been used for the calculation of the energy distribution. That is, the total energy from 0Hz to the start of the transition frequency, and the energy from the end of the transition frequency to 96kHz has been calculated. The total energy in the transition band has also been calculated.

 

It has been indicated that it is the transition bandwidth frequency energy that causes the ringing. The total energy in the transition bandwidth is 7.2123. The total energy which is outside the transition bandwidth is 1510.2. This means that 99.5% of the ringing energy is NOT in the transition bandwidth, despite the peak in the spectrum at the transition bandwidth.

 

If you examine the spectrum, the energy across the bandwidth excluding the transition bandwidth is reasonably level up to 96kHz. Given that the energy in the transition bandwidth is ONLY 0.5%, then it is unlikely that this small amount of energy is the cause of the ringing.

 

Regards,

Shadders.

 

Link to comment

Why don't you do the FFT for the whole series with all 5 component frequencies, and including the zeros.  Anyway, I don't think the way you are trying to use energy distribution to determine the cause is valid.  The problem is that your input signal is not band limited and this causes the filter to try to fit the samples in strange ways.  The filter is doing the right thing; if you feed it something invalid that's not on the filter.

 

Did you do this? ... make a much longer file with the 5 tones, with some zeros at the beginning.  Is the output OK after getting over the transient disturbance from your shocking it with the instantaneous cut-on?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...