Search code examples
accelerometergyroscope

How to identify backhand and forehand shot using accelerometer?


An accelerometer has three values : x, y, z.

Let's imagine a racket has an accelerometer. if I put the racket face up, I know where are the directions of x, y and z. However, if I flip the racket and put it up side down. The value of x, y, z is in opposite directions.

In other word, if I hit the ball to x direction with my backhand, it is possible i can get positive or negative x value. (This is depending on whether I flip the racket or not [Racket has two faces]).

My question is How can the sensor tell me that I am hitting the ball using back hand but not forehand as I can get same accelerometer values for both forehand and backhand.

Thank you, Jimmy


Solution

  • EDIT: changed my mind about this, following @Sami's comments :)

    Imagine the X and Y axes are in the plane of the racket strings (say X is along the line of the handle, Y is up/down), and Z is in the direction of hitting the ball. Then most of the acceleration when you swing & hit will be in the Z axis (+ or - depending on which face of the racket hits the ball); there's a bit of X-axis acceleration if you're swinging in an arc, but it's always in the same direction whichever face is hit. There's a constant Y-axis acceleration upwards.

    enter image description here

    So you can look at the accelerometer's Z-value to determine which face is hit, and you can look a the Y-value to tell which way up the racket is being held. From that you can tell whether the 'front' or 'back' (relative to which way the racket is oriented) is being hit, and hence tell whether a forehand or backhand shot is being played.

    Of course, you'd also have to know whether the player was right or left handed :)

    For a given handedness, you could calculate the type of swing as follows:

    enter image description here

    For the other handedness, the results would be reversed. The '+' and '-' values are relative to which way your accelerometer is installed, so you'd need to calibrate.