Talk:Sampling (signal processing)
From Wikipedia, the free encyclopedia
Contents |
[edit] Suggested merge from Sampling (information theory)
If you don't agree that the two articles cover the same subject, please comment. -- Ravn 10:48, 23 February 2006 (UTC)
- I think that they cover the same topic. —The preceding unsigned comment was added by 82.26.182.120 (talk • contribs) .
[edit] Suggested merge from Digital sampling
It seems there is a consensus about merging with sampling (information theory). I propose also merging with digital sampling. All deal with the same topic, though digital sampling is more audio-oriented. If there are no objections, I will merge all three articles some time in the near future. I envision the audio-related stuff as a section in sampling (signal processing), which may some day grow into a separate article audio sampling (which currently is simply a redirect to digital sampling). --Zvika 17:38, 12 May 2006 (UTC)
[edit] Digital sampling is a special form of sampling
I don't agree that these two headings meant the same thing. Sampling, as I thought I went to some trouble to explain in the article, produces a set of analog samples. There is nothing inherently digital about the process of sampling. The samples are commonly represented digitally in modern electronics, but they don't have to be, and when they are a whole new set of artifacts is generated which should be analysed separately from basic sampling theory. Pulse width modulation, pulse duration modulation and pulse position modulation are all used as well as pulse amplitude modulation, all of which are non-digital in the sense that they do not use finite step increments. --Lindosland 20:15, 23 May 2006 (UTC)
- I agree absolutely. Sampling in itself is not digital. If I understand correctly, the "artifacts" you speak of are a result of quantization (signal processing), a separate stage which, in modern devices, usually follows sampling. It's too bad we didn't have this discussion before I performed the merge, but nevertheless, here are my reasons for merging:
- There are already articles on sampling and on quantization, and it is redundant to have an additional article discussing both of them together.
- I went through the links to digital sampling. There were around 30, and almost all (maybe 90%) referred to sampling in the sense of sampling (music). These were clearly incorrect links, but they demonstrated the fact that this term is often used to mean something other than what you intended. Thus, the current redirection from digital sampling to the disambig page sampling is much more appropriate. (After the merge, I fixed all links to digital sampling.)
- Finally, I'd just like to say that I think your article was good, and I did my best to move all of the material in it either to sampling (signal processing) or to quantization (sound processing), as appropriate. --Zvika 19:49, 25 May 2006 (UTC)
[edit] way more than 48khz is needed for digital audio
The article says: "The recent trend towards higher sampling rates, at two or four times this basic requirement, has not been justified theoretically, or shown to make any audible difference, even under the most critical listening conditions."
The guy fails to understand that the heaviest analog filters (chevychev) need at least one entire octave or more to prevent aliasing achieving 70db/80db attenuation which is the minimum aceptable.Not to mention if we want a flatter passband a butterworth is needed, thus needing even higher samplerate. So if we hear 20khz at max, the analog antialiasing filter will have the signal more or less clean from 40khz onwards. For a 40khz nyquist frequency a sample rate of 80khz is needed. 96khz is great sample rate because it allows a good transition for the antialising filter and would make resample from 48khz easy. Although conversion from 44.1khz is not that easy. (Stupid thing consumer music and professional audio have different sample rates and a difficult ratio to deal with)
- This argument has been going on for years without conclusive evidence. It really boils down to whether it is easier to just double the sample rate or build extremely steep analog filters, with the ever decreasing cost of low cost storage and high frequency digital electronics winning over the more expensive filters in systems that try to appeal to 'golden ears.' True double blind testing between 48k systems with the best filters and 96k systems does not reveal statistically detectable differences, thus disproving the theory that accurate reproduction above 20kHz is necessary. Charlie Richmond 17:35, 15 November 2006 (UTC)
Ok, Charlie, in the first place "extremely steep analog filters" simply don't exist, an eight order chevychev is already a heavy lowpass filter. Download filterlab at http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010007 and then design yourself one of those steep analog filters.And there is no need of "true double blind testing" or any scientific test since this can be solved purely with mathematics. If your analog signal doesn't contain ultrasonics then there is no need of antialiasing filter at all, thus you can sample at 40000hz.If the analog signal has some ultrasonics then a weak filter and 44100/48000 will do. But if the signal is rich in ultrasonics a proper filter is needed and a higher samplerate.(vynil records may exhibit strong ultrasonics, because needle friction, dirt, scratches, etc...). Of course you can record at 96000hz and then resample at 48000hz leaving upto 20khz audio intact because digital filters vastly outperform analog filters.But resampling itself isn't 100% loseless,and these days more and more info can be stored in modern media, so why downsample?.And anyway oversampling to higher samplerate to prevent the DAC hold effect is usually performed. (Gus, 24 jan 2007)
[edit] No contest
There's really no point in arguing here. All we have to do is to cite reliable sources on both sides of the argument, summarizing their points. No unsourced statements need to tolerated. Dicklyon 06:06, 25 January 2007 (UTC)
- OK Dicklyon, you asked for it, the source is "The Scientist and Engineer's Guide to Digital Signal Processing" by Steven W. Smith.
This book is free and can be downloaded at http://www.dspguide.com Chapter 3 - ADC and DAC:
"Unfortunately, even an 8 pole Chebyshev isn't as good as you would like for an antialias filter. For example, imagine a 12 bit system sampling at 10,000 samples per second. The sampling theorem dictates that any frequency above 5 kHz will be aliased, something you want to avoid. With a little guess work,you decide that all frequencies above 5 kHz must be reduced in amplitude by a factor of 100, insuring that any aliased frequencies will have an amplitude of less than one percent. Looking at Fig. 3-11c, you find that an 8 pole Chebyshev filter, with a cutoff frequency of 1 hertz, doesn't reach an attenuation (signal reduction) of 100 until about 1.35 hertz. Scaling this to the example, the filter's cutoff frequency must be set to 3.7 kHz so that everything above 5 kHz will have the required attenuation. This results in the frequency band between 3.7 kHz and 5 kHz being wasted on the inadequate roll-off of the analog filter. A subtle point: the attenuation factor of 100 in this example is probably sufficient even though there are 4096 steps in 12 bits. From Fig. 3-4, 5100 hertz will alias to 4900 hertz, 6000 hertz will alias to 4000 hertz, etc. You don't care what the amplitudes of the signals between 5000 and 6300 hertz are,because they alias into the unusable region between 3700 hertz and 5000 hertz.In order for a frequency to alias into the filter's passband (0 to 3.7 kHz), it must be greater than 6300 hertz, or 1.7 times the filter's cutoff frequency of 3700 hertz. As shown in Fig. 3-11c, the attenuation provided by an 8 pole Chebyshev filter at 1.7 times the cutoff frequency is about 1300, much more adequate than the 100 we started the analysis with. The moral to this story: In most systems, the frequency band between about 0.4 and 0.5 of the sampling frequency is an unusable wasteland of filter roll-off and aliased signals. This is a direct result of the limitations of analog filters."
Note that even with the trick of intentional aliasing between last usable frequecy and nyquist frequency, he only achieves factor 1300. That's about 62db of 96db dinamic range of 16bit compact disc. 5000/3700=1,351 so 24000 / 1,351=17760. (24000=48000/2) I admit a cutoff frequency of 17760 is not that bad for quality audio,I admit my poor ears won't reconize the difference,but these weren't the goals,it was supossed to leave the frequency response flat up to 19khz or 20khz.62db of noise at 17760hz is probably unhearable too,but all of this and the filter ripple leave the signal somewhat dirty at the limit of aceptability.If each stage of audio leaves the signal like that, at the end it will be heard, Gus, 25jan 2007
- Do I care? No. Just summarize the point with a reference in the article. And don't complain when someone also represents the alternate point of view with a reference. Dicklyon 16:06, 25 January 2007 (UTC)
-
- Gus, you seem to be one of those audiophile guys that spends $100 on 24-carat gold plated audio connectors because some geek website told you that it will make it sound better. While it's obvious that you have some knowledge relating to digital audio and audio filtering, your common sense and practicality are lacking. Have you ever tried listening to an 18kHz tone? I'm not even 30 years old yet, and I cannot hear an 18kHz tone unless it is pumped up about 20dB higher than a 1kHz tone. The audio that you are so desperately trying to faithfully reproduce is, for all practical purposes, completely inaudible. That is why a previous comment on this page referenced a double blind study. If the majority of normal people cannot perceive a difference between 48kHz and 96kHz, then what is the point? I'm certainly not going to pay an extra few hundred bucks so that the audio coming out of my speakers is "mathematically correct", despite the fact that I can't perceive the difference.
-
- Even your own explanation points out the futility: you say that your 8th order Chebyshev filter effectively would limit the frequency response to 17760 Hz. You say that aliasing noise would be 62dB down at 17760Hz. SIXTY-TWO DECIBELS!!! That's the limit of acceptability? Not even taking into account the fact that the normal human ear response is already at least 20dB down at 17760Hz (according to ITU-R 468). Have you ever heard of masking? Let's say a CD is playing music that is generally between -10dBFS and 0dBFS (typical for moderately compressed modern music). Are you honestly telling me that a human being can perceive a -62dBFS aliasing noise that is included with that -10 to 0dBFS music? Superman cannot even perceive that. In fact, the aliasing noise could easily be at -30dBFS and you still wouldn't perceive it.
-
- I understand your points and agree that a 96kHz sampling rate would more faithfully reproduce the full audible range of the recorded material than a 48 or 44.1 sampling rate. However, the difference in the perceived increase of quality is so minuscule (if not totally imperceptible), that it is hardly worth the additional cost. And it's definitely not worth listening to you screaming that "way more than 48khz is needed for digital audio," and then trying to dazzle us with long-winded descriptions of complicated filters.
Snottywong 19:51, 27 March 2007 (UTC)
- per Wikipedia:Civility#Removing uncivil comments I have made minor edits to Snottywong's comments, toning down the incivility without altering the meaning. Snottywong, I would suggest you edit it to tone it down even more, since this sort of tone seldom helps us get to consensus. Anyway, Gus's comment is ancient and didn't affect anything, so ignoring it might have been wiser. Dicklyon 03:00, 28 March 2007 (UTC)
[edit] Merge from Sample (signal)
This stub should be merged here. There is no reason for two separate pages both of which are on the sample disambiguation page. --Selket Talk 19:10, 6 April 2007 (UTC)
- Support – I agree, there's no need for a separate small article on sample. Dicklyon 22:05, 6 April 2007 (UTC)
- Support; I agree completely. -- Avenue 01:15, 17 April 2007 (UTC)
- OK, I did the trivial merge. Feel free to tune it up. Dicklyon 03:15, 17 April 2007 (UTC)
[edit] Sampling rate for bandpass signals
I think some hints about how the relation for fs was obtained are needed in section IF/RF (bandpass) sampling. Also, the plot entitled "Plot of allowed sample rates (gray areas) versus the upper edge frequency for a band of width W = 1. The darker gray areas correspond to the condition with n = 0 in the equations of this section." does not have a title or comments on its axis. It is difficult to understand what does it represent. —Preceding unsigned comment added by 193.252.48.40 (talk) 21:23, 6 January 2008 (UTC)
- I made that plot after the verifying the equations, but I'm not sure where they came from. I just modified the caption to help make it more clear. Here is a source with some simpler looking formulae; maybe we should use those instead. See if they explain it. Dicklyon (talk) 23:30, 6 January 2008 (UTC)
- Looks like I moved the math there from Nyquist–Shannon sampling theorem on 21 Aug 2006; it had been added there and modified a lot during Oct/Nov 2005, by LutzL and others. He mentioned in an edit summary that the source was in a link, so I chased it down to here. Too bad he didn't make it a ref, and it got lost; its equations look like those in the book I linked above. In this diff, LutzL morphed it into something like the present form, with the new n as well as the N that stood for the n in the refs. His edit summary said "hopefully simplified the section on undersampling", but I don't think so; it did give us the n that I used to make the dark-gray regions which are the lowest allowable sampling rates, but I think it's more complicated, and we'd be better off going back to something closer to the way the sources do it. Anyone want to work on this? Dicklyon (talk) 01:35, 7 January 2008 (UTC)
- The first source you give only cites the inequality and does not show it's origin. I also cannot understand quite clearly the sketches on that page, even as I know what to look for. On the other hand, one should "streamline" this paragraph, so W should be replaced in favor of fs. Both in the book and in this paragraph the source of the problem is not much highlighted: That for real-valued signals, a frequency intervall [L,H] implies a second part [-H,-L], and that shifts of both intervals by integer multiples of 2fs may not overlap. The general theorem that covers this and a lot of other cases is Kluvánek's sampling theorem on LCA groups (by Igor Kluvánek) (LCA=locally compact abelian groups and discrete lattices therein).--LutzL (talk) 12:16, 7 January 2008 (UTC)
-
- Thanks for that info. You're right that the sketches in that book are all screwed up. I'll work up an explanation and simplification based on your suggestions. If you have a ref or copy of something by Igor K. that I can talk about, let me know (e.g a copy of the 5 stories article mentioned on his page). Dicklyon (talk) 16:29, 7 January 2008 (UTC)
-
-
- You did a very good work on that. Unfortunately I only have a paper copy of Higgins paper... Correction: Found an e-version at project euclid, apparently it is "open access". Some hints to the nature of Kluvanek's theorem are in Poisson summation formula in "Generalizations". Raromir S. Stankovic: SOME HISTORIC REMARKS ON SAMPLING THEOREM[PDF] has the statement, but no nontrivial examples, --LutzL (talk) 12:16, 8 January 2008 (UTC)
-