# Capturing the sampling rate from a basketball being dribbled

I'm taking an online image and signals class and the structure is absolutely horrible.

I'm wondering if you can provide me hints, or tips to solving the below question. I'm not looking for an answer, because I'd actually like to learn something! The structure of the class is just not conducive to learning as they just point us to online resources without any real "teaching."

Consider a basketball being dribbled. If the height of the basketball can be described by a sine wave of maximum height 2h, average height h and minimum height 0, and the ball hits the ground once per second, how fast would a video camera have to sample the dribbling to extract its frequency? What happens to the frequency estimate if the sampling rate is too low?

So just thinking out loud... the ball is bouncing at a rate of $1\frac{bounce}{sec}$, which from my reading tells me the frequency is just the inverse of this, so $1\frac{sec}{bounce}$.

I don't understand, though, how to extract how fast a video camera would need to sample this to extract its frequency as it seems like I already have the frequency.

The information you are given is $f_\textrm{bounce} = 1\,\textrm{Hz}$ - all the technical details about the sine wave and its amplitude is irrelevant. Please note that frequency is always measured in something happening per second, i.e. the unit is always $\frac{1}{\textrm{s}}$.

Since you do not want to have an answer, I try to give you a hint:

• Imagine you had a camera that would capture an image once a second. Assume that the moment the image is taken is always when the basketball exactly in the middle between the floor and the player's hand. What can you say about the motion of the basketball after having watched this video?

• Imagine your camera would capture the scene every $0.5\,\textrm{s}$, i.e. the frame rate would be $2f_\textrm{bounce} = 2\,\textrm{Hz}$, again exactly when the basketball is between the player's hand and the floor. What would be the difference between this video and the first video? What would you learn about the motion of the basketball by watching this video?

If you want to get more information, you could search for the Nyquist–Shannon sampling theorem.

• The last paragraph is the main key. I hope by now that the OP's course has introduced the concept of the sampling theorem. It seems that the question presented is structured to test understanding of the theorem. – Jason R Mar 20 '16 at 14:27
• This is a great answer, I can actually visualize what I'm supposed to be doing now, and why choosing the correct number sampling rate is important. – hax0r_n_code Mar 20 '16 at 14:58
• Am I correct in saying that you did sorta give me the answer in your answer haha? I just got finished reading about the Nyquist-Shannon sampling theorem and understand that $f_s > 2f_{max}$, which means the answer to part one is simply $f_s > 2\left(1\right)$Hz since maximum frequency is $1$ Hz? – hax0r_n_code Mar 20 '16 at 15:40
• Well, both examples would give you the same information about the basketball's motion: None, since you would always see only one position (middle between hand and floor). I just tried to show you, that the sampling frequency must be higher than the frequency you want to observe, and that it is not sufficient to sample exactly at twice that frequency. You must sample at more than twice the frequency you would like to measure. – M529 Mar 20 '16 at 16:24
• Oh, I totally understand what you mean by needing to sample more than twice the frequency. I'm just confused as to how I should answer the question? Since I must sample at more than twice the frequency, I suspect my answer should be that I need to sample at a rate greater than $2$ Hz to ensure correct reproduction of the signal – hax0r_n_code Mar 20 '16 at 17:57

I find the exercice a bit confusing, let me share why, and provide some hints. First, when thinking about a basketball bouncing, the approximation I have in mind is a rectified sine ($|\sin x|$): since it looks more natural: The problem is that it is not bandlimited, so traditional sampling is unlikely to work. Plus, the average height of the rectified sine is not half the maximum height.

So, consider the bouncing is actually a sine wave. The period is $1$ s, which gives you a $f_0=1$ Hz sine, which is $h\sin (2 \pi f_0 t)+h$, which satistifies the other parameters. This signal is band-limited, and can be sampled "perfectly' using the Nyquist-Shannon formula, baased on the maximum frequency of your signal.

For the second question, a visual hint is: • Your answer definitely helps me out a lot! I understand question two and why under sampling is bad (because it doesn't correctly reproduce the sine wave). I'm a bit confused on the math in using the Nyquist-Shannon formula. Is it $\frac{f_s}{2}$ – hax0r_n_code Mar 20 '16 at 14:56
• Understand. So the video camera would have to sample at a rate of $2\, X\, f_{max}$ or $4 Hz$ to correctly sample the dribble? – hax0r_n_code Mar 20 '16 at 15:06