I'm trying to understand some results of playing around with sampling around a signal's Nyquist sampling rate. For my example, I'm sampling a $B=5\mathrm{Hz}$ wave over a 1 second period.
- In the first image, I use a very high sampling rate of 1000Hz to emulate the exact signal (at least for graphing), $\sin(2 \pi 5 t)$. This sampling is subsequently used in the next graphs as a reference.
- In the next, I use a rate just below Nyquist's, 9Hz. The resulting wave looks like a sine wave, but doesn't represent the highs and lows of the wave. I'm still tracking with why hitting the Nyquist rate is important from this image.
- Next, I get confused with Nyquist: I sample at exactly $2B=10\mathrm{Hz}$, the lower bound. This produces nearly zeros in the data:
(I'm not even sure if these are floating point errors or not). Yes, there is some oscillation, but it is very minor. It seems like we need to further increase the sample rate... Is the rate of $2B$ exclusive?[ 0.00000000e+00 1.22464680e-16 -2.44929360e-16 -1.40896280e-15 -4.89858720e-16 6.12323400e-16 2.81792560e-15 -2.69546092e-15 -9.79717439e-16 1.10218212e-15]
- In the fourth image, I sample above at 11Hz, which above the Nyquist rate. However, this sampling looks very much like image #2 flipped about the x axis. Again, there is some oscillation, but I don't see how we could reconstruct a 5 Hz wave from this, especially when it has nearly the same qualities as image #2.
- Finally, I sample at $4B=10\mathrm{Hz}$ and at last, I can see the 5Hz wave I expect. Why did it take 4x to get here when the theory only states 2x?
I feel like the conclusions I've made above are incorrect (in probably a variety of ways). Would someone please help me explain where I'm wrong?
Jupyter Notebook available here: https://gist.github.com/t-mart/8a46e87938904c7f6a5a102ad6a2ef0e