Talk:Sinc filter

From Wikipedia, the free encyclopedia
Jump to: navigation, search

I originally wrote this article, and if you check in the history, you will notice that the original version was much more cogent and error-free than the piece of crap that it currently is.

In a minute, I will be fixing it.

Loisel 22:36, 19 December 2005 (UTC)

Merge proposal[edit]

Someone added tags to merge in brick-wall filter; I support that, even though the brick-wall filter is a bit more general, as it can be a bandpass or highpass; but it's still nothing but a difference of sinc filters in the most complex case, and doesn't really need a separate small article. Dicklyon (talk) 15:42, 30 July 2009 (UTC)

Merges work best when articles are synonymous with what they merge into, but these aren't synonymous. You would have to merge into electronic filter or something. On balance I think they're better separate.- (User) Wolfkeeper (Talk) 16:39, 30 July 2009 (UTC)
Agreed. Sticking to simplest case semantics, it's better that the two topics are separate. Most people will be looking for them as separate articles. Of course, including a note (or just a see also) in both pointing to the other one is a good idea. —TedPavlic (talk/contrib/@) 16:57, 30 July 2009 (UTC)
Well, I disagree. Merges are good when concepts are so closely related that one article makes a more coherent presentation than two. I think that would be the case here, if brick-wall bandpass and highpass filters were treated in a section of sinc filter. Merging brick-wall filter into electronic filter seems like a bad idea, as it's merging a mathematical abstraction into a very concrete non-ideal topic. Dicklyon (talk) 17:15, 30 July 2009 (UTC)
Thing is, sinc filter is a particular case of brick wall filter; so that should be the primary article topic. But I sense that this wouldn't be good either. I think on balance you're better leaving it as is. And I agree about the mathematic abstraction thing as well.- (User) Wolfkeeper (Talk) 01:19, 31 July 2009 (UTC)
I'll write a section on brick-wall filters, and we can see if we like it. Dicklyon (talk) 03:36, 31 July 2009 (UTC)
Done. Don't you think that's better than a separate article? Dicklyon (talk) 04:08, 31 July 2009 (UTC)

Mathematical Language[edit]

In explaining that the brick-wall filter is not physically realizable: "(i.e., its compact support in the Fourier transform forces its time response to be ever lasting)" I changed it to: "(i.e., its compact support in the frequency domain forces its time response not to have compact support meaning that it is ever-lasting)"

It seems intuitive but a reference to why this is necessarily true would be nice.

--Intellec7 (talk) 08:20, 9 October 2010 (UTC)

It is related to the relationship between the Fourier transform and the Uncertainty principle. See Mathematics of the Discrete Fourier Transform, Appendix C for instance. SpinningSpark 15:59, 9 October 2010 (UTC)

Problem with this filter[edit]

The filter shown in here is 2*CutoffFreq*sin(2*pi*CutoffFreq*t)/2*pi*CutoffFreq*t

So I tried to implement this in Visual Basic. I calculated t = m/SR (where SR is the samplerate of 8000 samples/second, and m is the sample number for the filter, and n is the sample number is the waveform to be processed).

My code is:
dim wave() as single
dim wave2() as single
const Pi as single = 3.14159
const SR as long = 8000
const CutoffFreq as single = 1000 'this is 1000 Hz
dim n as long
dim m as long
dim t as single

redim wave(SR-1) 'waveform lasts one second, and since the lower bound is zero, the upper bound is SR-1
redim wave2(SR-1)

for n = 0 to SR-1
next n

for n = 20 to SR-1-20
for m = -20 to 20
if m=0 then
t=(m+0.0001)/SR 'this is needed to prevent a divide by zero error.
end if
wave2(n)=wave2(n) + wave(n+m) * 2*CutoffFreq*sin(2*pi*CutoffFreq*t)/(2*pi*CutoffFreq*t) 'same arrangement shown in the Wikipedia article here, so it should work
next m
next n

'additional code down here saves the array wave2() to a file in raw (uncompressed) form for viewing waveform and audio playback in other software, but is not shown here as it is unimportant to the filter being discussed.

Ok, so that was my code, but there's a problem. The filter should only be able to reduce the signal's total strength (by cutting off some of its frequencies. It should not be able to strengthen the signal's intensity, at least not if it is properly implemented. Well the implementation I used is DIRECTLY FROM this Wikipedia article. And in this implementation I find that the signal output is 10s of decibels stronger than the input!!!!! This should not be happening. It seems that something is really wrong with the formula shown here on Wikipedia for a sinc lowpass filter. Can someone please figure out where the error is, and correct it. Benhut1 (talk) 01:16, 17 January 2014 (UTC)