[HN Gopher] Towards Nyquist Learners
___________________________________________________________________
Towards Nyquist Learners
Author : sleepingreset
Score : 28 points
Date : 2024-11-17 08:15 UTC (1 days ago)
(HTM) web link (gwern.net)
(TXT) w3m dump (gwern.net)
| gwbas1c wrote:
| > In particular, this minimal frequency is twice the bandwitdh of
| the function.
|
| Careful, this is misleading.
|
| If the peaks of the frequency align with your samples, you'll get
| the full bandwidth.
|
| If the 0-crossings align with your samples, you'll miss the
| frequency.
|
| These are why people swear by things like HD audio, SACD/DSD,
| even though "you can't hear over 20khz"
| 01HNNWZ0MV43FF wrote:
| How bad is it around the frequencies I can hear as a
| 30-something?
| luma wrote:
| You've misunderstood something about Nyquist. A sample rate of,
| say, 44KHz, will capture ALL information below 22KHz and
| recreate it perfectly.
|
| There are of course implementation details to consider, for
| example you probably want to have a steep filter so you don't
| wind up with aliasing artifacts from content above 22KHz.
| However it's important to understand: Nyquist isn't an
| approximation. If your signal is below one half the sample
| rate, it will be recreated with no signal lost.
| StrangeDoctor wrote:
| I was just about to post something saying similar. If I had
| to guess,
|
| >If the 0-crossings align with your samples, you'll miss the
| frequency.
|
| This is where the issue is. This isn't possible with more
| than double the sampling rate.
| kevin_thibedeau wrote:
| It can only happen with a source exactly at N/2 and
| correlated with your sampling clock. That doesn't happen in
| the real world for audio.
| marcosdumay wrote:
| Yep, that's why people do things like 44kHz sampling
| instead of 40kHz.
| Sesse__ wrote:
| No, 44 kHz is because you want to reconstruct the (20
| kHz) bandlimited signal and it's (much) easier to realize
| such a filter if you have a bit of a transition band.
| mlyle wrote:
| Anything _close_ to N /2 is going to have varying
| magnitude that requires filtering and likely oversampling
| to remove.
|
| How close to the Nyquist bandwidth you can get depends
| upon the quality of your filtering.
|
| 44.1KHz is a reasonable compromise for a 20KHz passband.
| 48KHz is arguably better now that bits are cheap-- get a
| sliver more than 20KHz _and_ be less demanding on your
| filter. Garbage has to be way up above 28KHz before it
| starts to fold over into the audible region, too.
| Sesse__ wrote:
| > Garbage has to be way up above 28KHz before it starts
| to fold over into the audible region, too.
|
| You brick-wall everything at 20 kHz (with an analogue
| filter) before you sample it; that's part of the CD
| standard, and generally also what all other digital CD-
| quality audio assumes. This ensures there simply is no 28
| kHz garbage to fold. The stuff between 20 and 28 in your
| reconstructed signal then is a known-silent guard band,
| where your filter is free to do whatever it wants--which
| in turn means that you can design it only for maximum
| flatness (and ideally, zero phase) below 20 kHz and
| maximum dampening above 28 kHz (where you will be seeing
| the start of your signal's mirror image after digital-to-
| audio conversion), not worrying about the 20-28 kHz
| region.
| mlyle wrote:
| Your comment is mutually contradictory-- what is it, a
| brick wall (impossible) analog filter or a more gentle
| rolloff as things fold over?
|
| What you really do, these days, is you sample at a higher
| frequency; you can have an exceptionally gentle analog
| filter (which will help you make it linear, too). E.g. if
| you sample at 96KHz, you just need to roll to near zero
| by 75KHz. Then you can digitally downsample/decimate to
| 44.1KHz or 48KHz.
|
| Also note for CD audio, it's more like 24KHz where you
| get worried, not 28KHz.
| Sesse__ wrote:
| You're mixing up the two filters. The pre-sample filter
| (before ADC) is defined to be a brickwall (of course
| impossible in practice, so in reality, it will have to
| start going off a bit before 20 kHz); the reconstruction
| filter (after DAC) has a roll-off.
| ImageXav wrote:
| I think it is you who have misunderstood the Nyquist-Shannon
| theorem. Aliasing and noise are real concerns. Tim Wescott
| explains it very well [0] (Figures 3, 10 and 11). If your
| signal is below one half the sample rate but the noise isn't,
| you'll lose information about the signal. If your signal
| phase is shifted wrt. the sampling, you'll lose information.
| If your sampling period isn't representative, you'll lose
| information. These are not implementation details.
|
| [0]
| https://www.wescottdesign.com/articles/Sampling/sampling.pdf
| GlenTheMachine wrote:
| Nyquist is a mathematical statement. As such, it has two
| commonly overlooked requirements:
|
| - the signal being sampled has to be stationary
|
| - you have an infinite number of samples
|
| In that case, a sampling frequency of 2N+epsilon will
| perfectly reproduce the signal. Otherwise there can be
| issues.
| puttycat wrote:
| Off topic, this thesis has one of the most concise and
| straightforward acknowledgments section I saw.
| ks2048 wrote:
| Title has a misleading domain name (gwern.net). Link is to a PhD
| thesis titled "Scaling Laws for Deep Learning" by Jonathan
| Rosenfeld. Not sure why wasn't linked more directly,
|
| https://arxiv.org/abs/2108.07686
|
| https://arxiv.org/pdf/2108.07686#page=85
| jll29 wrote:
| Generally, if you google a person's name as follows:
| "Jonathan S. Rosenfeld" +DBLP
|
| you will get their computer science publication list.
|
| From that, you can gather that the two main papers that form
| the core of Rosenfeld's thesis are these:
|
| https://openreview.net/pdf?id=ryenvpEKDr
|
| https://proceedings.mlr.press/v139/rosenfeld21a.html
|
| (if you prefer to read the gist in fewer pages.)
| svantana wrote:
| I think the basic premise of this paper is wrong. Very few
| natural signals are bandlimited - if images were, they would be
| no need to store in high resolution, you could just upsample.
| Natural spectra tend to be pink (decaying ~3dB/octave), which can
| be explained by the fractal nature of our world (zoom in on
| details and you find more detail).
| wbl wrote:
| JPEG allocates very few bits to the higher frequency elements
| of the blocks, especially in chroma. https://vicente-gonzalez-
| ruiz.github.io/JPEG/#lossy-jpeg
___________________________________________________________________
(page generated 2024-11-18 23:00 UTC)