Talk:Sampling (signal processing)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Professional sound production (Rated B-class, High-importance)
WikiProject icon This article is within the scope of WikiProject Professional sound production, a collaborative effort to improve the coverage of sound recording and reproduction on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
B-Class article B  This article has been rated as B-Class on the project's quality scale.
 High  This article has been rated as High-importance on the project's importance scale.
WikiProject Media  
WikiProject icon This article is within the scope of WikiProject Media, a collaborative effort to improve the coverage of Media on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 ???  This article has not yet received a rating on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.

Complex sampling[edit]

Do not you think it could be valuable to add information regarding the concept of "complex sampling"?, which is widely used for I-Q signals (Inphase and Quadrature). —Preceding unsigned comment added by (talk) 17:08, 28 November 2010 (UTC)

Good point. It should be treated here, or linked to if its treatment is elsewhere.
--Bob K (talk) 21:55, 28 November 2010 (UTC)
Right, as soon as I understand the theory I will try to update the article. However, if someone find any reference or a good explanation it will be interesting to cover this topic.
—Preceding unsigned comment added by (talk) 11:15, 09:05, 29 November 2010
A reasonable place to start learning is Negative_frequency#Complex_sinusoids. But a thorough treatment would go beyond sinusoids.
--Bob K (talk) 15:16, 29 November 2010 (UTC)

A complex signal behaves no differently than two real signals in parallel. Sample each according to the theorem, and you're good to go. Unless you've got special conditions like a band limit from 0 to B instead of -B to B, in which case you can get away with just sampling the real part, or just the imaginary, or perhaps half as many samples of each. Or if it's a one-sided passband, then as this book explains...
Dicklyon (talk) 05:16, 30 November 2010 (UTC)

Dick Lyon, let me ask you how could I have a bandlimit of 0 to B instead of -B to B? I understand a real signal (the signal which flies) is an even function (its module) in the frequency domain, so negative frequencies must exist. Regards. —Preceding unsigned comment added by (talk) 22:41, 1 December 2010 (UTC)

An example might help:
A complex sample-rate of 200/sec (for instance) is sufficient for signals that contain only frequencies in (-100,100) or only frequencies in [0,200). Examples (respectively):  a(t) = e^{j 2 \pi 90 t} + e^{-j 2 \pi 80 t}\,  and  b(t) = e^{j 2 \pi 90 t} + e^{+j 2 \pi 120 t}.\,   Similarly, a complex sample-rate of 100/sec is sufficient for signals that contain only frequencies in (-50,50) or only frequencies in [0,100). So if you know there are no negative frequencies (such as an analytic signal) the minimum (complex) sample rate is B, not 2B. [1]

Alternatively, when there are no negative frequencies, you can discard the imaginary part, which causes the frequency content to expand (symmetrically) to (-B,B), which requires real-valued sampling at rate 2B.


  1. ^ When sampled at 200/sec, a(t) and b(t) are indistinguishable. Only the prior knowledge that the original signal was contained in either (-100,100) or [0,200) would allow you to reconstruct the original signal unambiguously.

--Bob K (talk) 13:01, 3 December 2010 (UTC)

Digital transform[edit]

A "digital transform" is a permutation of a sequence of samples, not part of sampling itself. I removed a single-sentence paragraph about digital transforms, one equating them with sampling. I think an article should be written about digital transforms so that the concept can be made clearer. Binksternet (talk) 02:56, 20 January 2011 (UTC)

I looked, and couldn't find any consistent category of things called "digital transforms" in books. What is it you have in mind? Dicklyon (talk) 05:02, 20 January 2011 (UTC)

Dirac comb?[edit]

When I said that multiplying by a Dirac comb didn't help in the context where it had been added, I was reverted and told I was wrong, here. The trouble is that saying multiplication by a Dirac comb doesn't really explain how to the get the sample values any better than the text that was already there. The link to the article also didn't lead to anything about Dirac combs in sampling, just in reconstruction. I do understand that in multiplying by a Dirac comb one makes a signal with a periodic Fourier transform equivalent to the DTFT of the sample sequence, but I don't see otherwise why it helps to introduce it at this point. Comments? Dicklyon (talk) 05:06, 28 October 2011 (UTC)

My view is that the dirac comb has to be mentioned in the article since it's notable in this context and central to sampling theory, and I was surprised when you took it out, and I'm even more surprised that you've raised it on the talk page.Teapeat (talk) 05:17, 28 October 2011 (UTC)
I think that's what the talk page is for. I don't mind it being mentioned, but where you put it raises more questions than it answers. Not sure why you see it as "central" to sampling theory. Did Shannon use it in his theorem, or his proof of it? Not that I recall, but I'd have to review it. Dicklyon (talk) 05:28, 28 October 2011 (UTC)
Here's a book that explains sampling by multiplying by a train of impulse functions. It includes the important step, missing from your description, that "the areas of the impulse functions are equal to the samples". And compared to such explanations in books, there are about an order of magnitude more books that explain sampling without this artifice. And it doesn't explain why they do it this way, or what advantage they get beyond just saying take the values at times nT as the samples. I think you need to convince us there's some value, and construct a meaningful explanation, before we can include it. Dicklyon (talk) 05:39, 28 October 2011 (UTC)
I would ask you to convince us that there's some value from removing it from the theory section given that you've just explained that it's a common and important way to approach the theory.Teapeat (talk) 16:45, 28 October 2011 (UTC)
I have argued that it's neither common nor important, since it doesn't show up in 90% of the sources. But it can be included if done carefully. Dicklyon (talk) 22:03, 28 October 2011 (UTC)
I don't agree with Teapeats changes, but with the intention. It is a bad idea to define the sampling process via a tempered distribution. However, in analyzing the sampling process via Fourier transforms, it can be convenient, but not necessary, to represent the sampling operation via the Dirac comb. If I remember correctly, this is now the main approach in representing the proof of the sampling theorem.--LutzL (talk) 12:39, 28 October 2011 (UTC)
This is a section called 'theory', and we're supposed to be summarising the theory behind it. If it really is the main approach (and it is), then we should be summarising it in the most broad way, mention the comb and then leave the mathematical heavy lifting off in other articles. At the moment the 'theory' section has essentially no theory in it.Teapeat (talk) 16:45, 28 October 2011 (UTC)
Even if it's the main approach to proving the sampling theorem, it is not the main approach to explaining sampling. If we make those things more clear, I'm sure we can find a place for it. Dicklyon (talk) 22:03, 28 October 2011 (UTC)
Frankly, I estimate that the article is about 30% too short and 90% unreferenced. I'm surprised that anybody is taking anything out at this stage.Teapeat (talk) 16:45, 28 October 2011 (UTC)
I'm sort of a deletionist. When an article is in need of improvement, I generally don't believe that more unsourced stuff, badly integrated, is helpful. Dicklyon (talk) 22:03, 28 October 2011 (UTC)
That works well for very good articles, but otherwise that's not really the way Wikipedia works; otherwise articles cannot get off the ground. Sorry, I have a rule about this. The fact that you were able to reference the material you removed to a reliable source gives me good reason to be offended. When people that know better repeatedly remove true material from an article that I've added, I lose trust in the people that do that, and I walk away from that article and don't come back. I don't mind collaborating with people, but I won't collaborate with people that revert me like that.Teapeat (talk) 00:24, 29 October 2011 (UTC)
That's fair. Dicklyon (talk) 03:22, 29 October 2011 (UTC)

not about FFT[edit]

I didn't understand the point of this edit and the summary didn't help, as there's nothing there about FFTs. Your new version used Nyquist frequency without defining it, and the condition " band-limited to the Nyquist frequency" is pure jargon. If you'd like a more concise version, we can work on that. Dicklyon (talk) 21:47, 27 December 2011 (UTC)

Sorry, the bit I removed discussed Fourier transform. I think that losing it improves readability. This section is supported by a {{See also}} to Nyquist–Shannon sampling theorem so doesn't need to cover all the gory details. Approaching sampling theory from the frequency domain is arguably not the most accessible route. I agree that "band-limited to the Nyquist frequency" is jargon and don't mind if we spell this out a bit better. In my defense, I think it is an accurate description and any reader confused by the terminology is a click away from definitions of the terms. I have restored my edits because I believe it is an improvement over "A sufficient condition is that the non-zero portion of its Fourier transform, S(f), be contained within a known frequency region of length fs. When that interval is [-fs/2, fs/2], the applicable reconstruction formula is the Whittaker–Shannon interpolation formula." --Kvng (talk) 22:35, 27 December 2011 (UTC)
Yes, the Fourier transform is critical to the concept of perfect reconstuction from sampling; the FFT, on the other hand, is completely irrelevant, as it's just a fast algorithm for evaluating a Discrete Fourier transform, which is in no way helpful here. As for readability, that's served best when you don't introduce and use novel terms without definition. The gory details are really fairly straightforward, and it was kind of nice that they were even correct here. A better solution would probably just be to omit the sentence about reconstruction. Dicklyon (talk) 22:47, 27 December 2011 (UTC)

Article wrong according to hatcravat[edit]

I don't know where to start, this is not my domain. --Ysangkok (talk) 15:57, 21 April 2013 (UTC)

I would just leave it alone. This article is factual enough, there are no glaring errors that I can see. There are some analog holdover folks that think that any digitization compromises quality. I think that they are as correct as the monster cable advocates. I dunno. (talk) 16:11, 21 April 2013 (UTC)
Are you sure you read the post by hatcravat? I only linked iso8859-1's post so that you'd see the context. --Ysangkok (talk) 18:16, 22 April 2013 (UTC)

I don't see anything in that discussion that even suggests the article is wrong. Where hatcravat says "This is wrong." he is referring to the original complainer. He's right that he's wrong. Dicklyon (talk) 04:23, 23 April 2013 (UTC)

Theory: no Hz. f_s alsready contains the unit[edit]

Two recent edit labels, both attempting to justify the same change:

  • Theory: no Hz. f_s already contains the unit (User:Kondephy)
  • Neither T nor f_s are dimensionless numbers. And they *may* be expressed with units other than seconds or Hz

are saying two very different things.

The first one touches on a minor issue that is real, but usually glossed over in the textbooks. However the edit label incorrectly identifies that issue, and the "fix" is inadequate. The second one is of course true, but entirely misses the point.

The issue is that the June 5 version of the article makes these statements:

  • let s(t) be a continuous function (or "signal") to be sampled, and let sampling be performed by measuring the value of the continuous function every T seconds
  • The sampling frequency or sampling rate, fs, is defined as the number of samples obtained in one second (samples per second), thus fs = 1/T.
  • That fidelity is reduced when s(t) contains frequency components higher than fs/2 Hz, which is known as the Nyquist frequency of the sampler.

The problem is that the quantity "1" in "1/T" obviously has units of samples, and the quantity "1/2" in fs/2 has units of cycles/sample. Those statements are what's lacking from the article (as they are from most texts). One remedy is to simply insert them without any reason given, but that's like magic. This article is not a proper place for the whole story, so ideally it would WikiLink to an article that is. And ideally that would be Nyquist frequency, but it suffers from the same deficiency. The closest thing we seem have at the moment is Nyquist–Shannon_sampling_theorem#Aliasing, and this formula in particular:

X_s(f)\ \stackrel{\mathrm{def}}{=} \sum_{k=-\infty}^{\infty} X\left(f - k f_s\right) = \sum_{n=-\infty}^{\infty} \underbrace{T\cdot x(nT)}_{x[n]}\ e^{-i 2\pi n T f},

where the units of f and f_s are again in Hz and samples/sec, and so the integer k must have units of cycles/sample. The Nyquist frequency corresponds to k=½, because that is the midpoint between the k=0 image and its first alias.

It seems like too much information for this article, which is why I haven't done it. But in my edit label I invited User:Kondephy to take it on, in case he/she feels strongly about it.

--Bob K (talk) 12:06, 13 June 2014 (UTC)

No, Bob. You made it worse. You seem to think (or you seem to want everyone else to think) that seconds and Hz are the only possible units to express time and frequency in. They're not. fs can be expressed in many other units, like kHz or MHz. Maybe even someday, we'll express it in GHz. But it doesn't matter. fs is not a dimensionless quantity, it is a dimensional physical quantity. Now normally we may want T and f to have reciprocal units (like ms and kHz), but they need not be. You can still have T in ms and f in Hz and their product is still a dimensionless value and it's the same dimensionless number despite the choice of units (as long as the choice of units fall within the same dimension of quantity).
As you have many times before, you made the page worse, but you are more tenacious than I so your confusing and incorrect edit will survive until someone else comes along.
There is so much wrong with nearly every point you make. E.g. cycles/sample doesn't have units. It's dimensionless. Just a number.
And statements like "The problem is that the quantity "1" in "1/T" obviously has units of samples, and the quantity "1/2" in fs/2 has units of cycles/sample" are so asinine that they deserves no other comment.
Have you ever published in the literature? A textbook or a technical paper that was refereed and edited by someone else? Have you ever written a decently mathematical rigorous treatment of something in, say, electrical engineering? No one can tell (but we might guess the answer is no) by your edits here at Wikipedia, and I have seen your edits screw up pages here for better than 6 years.
I'm 58 years old myself, I imagine that you're even older and stuck in your ways, but it's a shame that fallacious notions misunderstood and doggedly held by old engineers whose ways are atrophied and cannot change, that such confuses other people. Bob, you need to clear your own ignorance and misconceptions before you have hope of doing that for others.
Sheesh. (talk) 17:44, 13 June 2014 (UTC)

I'm sorry you feel that way. I don't know where this discussion will go over time, but I don't expect it will be time well spent. So all I will say for now is that your whole premise, which is: "You seem to think (or you seem to want everyone else to think) that seconds and Hz are the only possible units to express time and frequency in." is incorrect. The article chooses those units to illustrate its points. I quote:

For functions that vary with time, let s(t) be a continuous function (or "signal") to be sampled, and let sampling be performed by measuring the value of the continuous function every T seconds,

It is certainly possible to rewrite the article in more generalized terms, but that is not what you did. You kept the definition of T and then just ignored it.
--Bob K (talk) 02:05, 14 June 2014 (UTC)