calcmogul / controls-engineering-in-frc

Controls Engineering in the FIRST Robotics Competition: Graduate-level control theory for high schoolers.
BSD 3-Clause "New" or "Revised" License
283 stars 25 forks source link

Nyquist Frequency #16

Closed GordonWalsh closed 3 years ago

GordonWalsh commented 3 years ago

The information presented section 6.2.3, Nyquist frequency, has some obvious errors, as well as some inconsistencies with the presentation of Nyquist and sampling frequencies from my undergrad signals class. I will show I perceive to be errors in the original text, as well as what I believe the correct information is.

The maximum frequency a typical human can hear is about 20 kHz, so the Nyquist frequency is 40 kHz.

In order to properly capture all signals less than 20 kHz, the Nyquist frequency must be at least 20 kHz, which forces a sampling rate of at least 2*20 kHz = 40 kHz

Figure 6.4: The samples of two sine waves can be identical when at least one of them is at a frequency above half the sample rate. In this case, the 2 Hz sine wave is above the Nyquist frequency 1.5 Hz.

The dashed function has a period of 2 [seconds], so it has a frequency of 0.5 Hz, not 2 Hz. There are three sampling intervals over that 2 sec period for a sampling rate of 3/2 Hz = 1.5 Hz. This gives a Nyquist frequency of 0.75 Hz. The dashed signal with frequency 0.5 Hz < 0.75 Hz will be captured correctly, while the solid signal with frequency 1 Hz > 0.75 Hz will be interpreted as a lower frequency. This lower frequency can be thought of as 0.75 Hz - (1 Hz - 0.75 Hz) = 0.5 Hz or as 1 Hz - 1.5 Hz = -0.5 Hz, which both have the same physical meaning. Importantly, however, the frequency 1 Hz - 0.75 Hz = 0.25 Hz is not recovered from the sampled data, which I think may not be clear given the current state of the figure and footnote 3.

Additionally, the units in this section, which appear to only be Hz and kHz, appear strange. My understanding is that units should be in roman (non-italic) font, as demonstrated in https://physics.nist.gov/cuu/Units/checklist.html, whereas the letters currently look like concatenated variables in an equation.

Thank you for constructing this resource for the community.

calcmogul commented 3 years ago

You're right. I just pushed some modifications to the Nyquist stuff (https://github.com/calcmogul/controls-engineering-in-frc/commits/main). Let me know if it's missing some info or nuance that should be included.

I also scrubbed through the .tex files and fixed the unit italicization. Thanks for pointing that out.