If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Is there a problem with this FIR filter ?
7 posts
• Page 1 of 1
Is there a problem with this FIR filter ?
A little Fir filter.
It's maybe not really good and with mistakes...
Also i don't know if Fir filter could have any advantage ?
Seams that IIR make some evolution that make them better in almost any usage ?
What i don't understand with this is the linear phase think.
The coefficient when symmetrical doesn't seams to make the phase linear ?
Or maybe i read it wrongly or not in the good context ?
It's maybe not really good and with mistakes...
Also i don't know if Fir filter could have any advantage ?
Seams that IIR make some evolution that make them better in almost any usage ?
What i don't understand with this is the linear phase think.
The coefficient when symmetrical doesn't seams to make the phase linear ?
Or maybe i read it wrongly or not in the good context ?
- Attachments
-
- Fir Filter 24tap.fsm
- (122.62 KiB) Downloaded 549 times
- Tepeix
- Posts: 361
- Joined: Sat Oct 16, 2021 3:11 pm
Re: Is there a problem with this FIR filter ?
The unwrapped phase is a linear function of frequency, which implies constant group velocity. The latter is a better term to describe the feature: all frequency components remain synchronized, the filter only boosts or attenuates certain frequency components. There is no „boing“ sound as in a spring reverb, no transient smearing.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Is there a problem with this FIR filter ?
Thanks, i think i understand it more !
If i'm right, in the first graph of this image we probably see a linear phase.
The curve could sometime do some oscillation in high, but it's only because some frequency are more attenuated,
but they have all the same latency.
The second graph is probably a non linear phase.
But depending on the curve of attenuation if we see a bandpass where the curve do like a sin it could be linear phase ?
So seeing the phase curve is not always an indication of linearity ?
If i'm right, in the first graph of this image we probably see a linear phase.
The curve could sometime do some oscillation in high, but it's only because some frequency are more attenuated,
but they have all the same latency.
The second graph is probably a non linear phase.
But depending on the curve of attenuation if we see a bandpass where the curve do like a sin it could be linear phase ?
So seeing the phase curve is not always an indication of linearity ?
- Tepeix
- Posts: 361
- Joined: Sat Oct 16, 2021 3:11 pm
Re: Is there a problem with this FIR filter ?
Linear or linearity just means from a to b in equal steps. It doesn't define a subject. It can be linear in frequency, time, phase, attenuation, etc. So you should always have a grid or readout to understand a graph. (Maybe that's not helpful?)
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Is there a problem with this FIR filter ?
It make sense thanks !
But here, maybe it's possible to see phase non linearity more with the phase and the frequency plot ?
The grid are absent, but the curve do like a "constant" exponential increase (while cycling from 1 to 0)
I suppose if the graph was not exponential we would see a line and not a curve ?
If the curve is always increasing it seams an indication of linearity.
But when the curve change direction (sort of like a sin) it could be more non linear.
If the filter is linear phase, the place where there's more attenuation (or some band pass) could also have a "sin" look, but we might see pic up or down in the same frequency place.
Like here, we have some little "sine" curve in the phase, but where they are there's a big increase of attenuation :
But here, maybe it's possible to see phase non linearity more with the phase and the frequency plot ?
The grid are absent, but the curve do like a "constant" exponential increase (while cycling from 1 to 0)
I suppose if the graph was not exponential we would see a line and not a curve ?
If the curve is always increasing it seams an indication of linearity.
But when the curve change direction (sort of like a sin) it could be more non linear.
If the filter is linear phase, the place where there's more attenuation (or some band pass) could also have a "sin" look, but we might see pic up or down in the same frequency place.
Like here, we have some little "sine" curve in the phase, but where they are there's a big increase of attenuation :
- Tepeix
- Posts: 361
- Joined: Sat Oct 16, 2021 3:11 pm
Re: Is there a problem with this FIR filter ?
Two things in the display make it difficult to see linear phase:
1. the x-axis is log-scaled. This magnifies the low frequency range and compresses the high-frequency range. If you plot the y-axis lin-scaled, you should see a sawtooth-like graph.
2. the phase is wrapped into the 360 degree interval. Therefore, you see a saw instead of a straight line. If you unwrap the phase, you will obtain a straight line.
But as I said, the phase linearity is not a particularly interesting feature - the constant group delay is.
1. the x-axis is log-scaled. This magnifies the low frequency range and compresses the high-frequency range. If you plot the y-axis lin-scaled, you should see a sawtooth-like graph.
2. the phase is wrapped into the 360 degree interval. Therefore, you see a saw instead of a straight line. If you unwrap the phase, you will obtain a straight line.
But as I said, the phase linearity is not a particularly interesting feature - the constant group delay is.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Is there a problem with this FIR filter ?
So, if i understand well ?)
Linear phase is not so much what we need, but a linear phase with FIR (if symmetric) (or maybe IIR if possible) will do the same group delay for all frequency ?
If we have to do a multiband, it's really better to have the same group delay, if it's a filter that exclude some frequency, it's not so much needed, but it will more sound like "boing", like in a spring reverb, if there's different delay by frequency ?
Meaning that the transiant will not sound the same ? (which could be desired some time ?)
FIR Filter had some advantage in the past, but do they have any now ?
Seams that using IIR with some modification to make them group delay,
we get something that is more efficient and optimized in any case ?
Like here : viewtopic.php?f=4&t=8081&p=115410&hilit=group+delay#p115410
and here : viewtopic.php?f=2&t=2822&p=15319&hilit=MultiBandSplitter#p15319
Maybe the average filter could continue to have some advantage, because it need less calculation ?
(But from what i try it's really hard or impossible to make an average filter that have real time configurable cutoff..)
I was planning to try a larger size FIR, but apart from liking to try it, seams that there's no real usage ?
(Wanted to try if this way to address the memory could be a little faster : )
Thanks for all the precision and all those treasury in the forum !
Seams that when we are not Flowstoner, understanding dsp filters is a breaking head and a crazy voyage !
Trying to understand very simple principle, we are facing incomprehensible formula where it it's only a feedback loop..
And we get fastly the best filters if we search a little on the forum !
I don't even know why i do some filter !)
Maybe it's to more understand what's happen for the signal ?
Maybe sometime i like to have some simplified one ?
(only one coefficient for all, not so much care about the curve, experimental non linear think... ...)
Linear phase is not so much what we need, but a linear phase with FIR (if symmetric) (or maybe IIR if possible) will do the same group delay for all frequency ?
If we have to do a multiband, it's really better to have the same group delay, if it's a filter that exclude some frequency, it's not so much needed, but it will more sound like "boing", like in a spring reverb, if there's different delay by frequency ?
Meaning that the transiant will not sound the same ? (which could be desired some time ?)
FIR Filter had some advantage in the past, but do they have any now ?
Seams that using IIR with some modification to make them group delay,
we get something that is more efficient and optimized in any case ?
Like here : viewtopic.php?f=4&t=8081&p=115410&hilit=group+delay#p115410
and here : viewtopic.php?f=2&t=2822&p=15319&hilit=MultiBandSplitter#p15319
Maybe the average filter could continue to have some advantage, because it need less calculation ?
(But from what i try it's really hard or impossible to make an average filter that have real time configurable cutoff..)
I was planning to try a larger size FIR, but apart from liking to try it, seams that there's no real usage ?
(Wanted to try if this way to address the memory could be a little faster : )
- Code: Select all
//4sample loop//
movaps xmm1,a;
shufps xmm0,xmm1,0;
shufps xmm0,xmm1,152;
movaps a,xmm0;
//index & write//
mov eax,x[0];
add eax,-16;
and eax,1023;
mov x[0],eax;
movaps mem[eax],xmm1;
//read//
add eax,64;
and eax,1023;
movaps xmm2,mem[eax];
add eax,64;
and eax,1023;
movaps xmm3,mem[eax];
//...etc
Thanks for all the precision and all those treasury in the forum !
Seams that when we are not Flowstoner, understanding dsp filters is a breaking head and a crazy voyage !
Trying to understand very simple principle, we are facing incomprehensible formula where it it's only a feedback loop..
And we get fastly the best filters if we search a little on the forum !
I don't even know why i do some filter !)
Maybe it's to more understand what's happen for the signal ?
Maybe sometime i like to have some simplified one ?
(only one coefficient for all, not so much care about the curve, experimental non linear think... ...)
- Tepeix
- Posts: 361
- Joined: Sat Oct 16, 2021 3:11 pm
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 70 guests