# Creating a Proof of Concept for the Sensor

Post 1:

For creating the motion sensor of the shoulder, I posed three questions:

• How accurately can we sense shoulder and arm location using only 1 magnet?
• Can we still sense shoulder location when the user moves?
• How accurately can we classify shoulder motions?

Given one magnet and a magnetometer, there are infinitely many ways to get the same reading, on a magnetometer. However, there is a limited number of places that the magnet could be on the shoulder, so if we know where the magnet is placed on the shoulder, and the specific magnetometer readings that those positions give, then by the readings we would be able to identify the position of the shoulder. Another way to think about this is, if we know where the magnet could be on the shoulder based on human anatomy, and if we know where the magnet could be based on the magnetic field, we would limit the number of places where the magnet could be to be able to detect a point where the magnet is located. That will give us enough info to detect the position of the shoulder joint.

We would need to see how the earth’s magnetic field, and other surrounding magnetic fields could interfere in the detention of the magnet’s position.  For the earth’s magnetic field, we would be able to calibrate the magnetometer to ignore the magnetic field in one direction. Using this, we would test if the sensor still works when somebody is moving straight because the earth’s magnetic field would not change in these motions. Next, we would also be able to measure turning angle using the IMU, calculate the expected magnetic field produced by the earth, and remove its effects from the magnetometer readings, thus canceling out the noise produced by the earth’s magnetic field regardless of direction. A similar thing can be done for outside magnetic field noise.

I started off my project by creating a proof of concept by modeling shoulder motions, and the sensor’s readings.  To simulate an shoulder, I created a model out of foam, and placed a shimmer IMU on the back of the shoulder, and a neodymium magnet on the side of the arm. When the arm moves, the magnet would also move, changing the magnetic field and the readings on the magnetometer. By moving the model’s arm around, we would be able to track the readings of the magnetometer and visualise the magnetic field that it is recording. This would enable us to see if one magnet creates a significant change in the field to be detected by the magnetometer. A picture of the model can be seen below.

I moved the arm down, forward, up, back, and in a circular motion, repeating each motion three times. Then I graphed the magnetometer readings using python. The x-axis represents time in milliseconds, and the y-axis represents the magnetic field in microteslas of the magnetometer pointing in the x, y, and z directions. When I moved the arm down three times, and there was visible change in the z-axis. Moving the arm forward, there was also visible change in the z axis, and a slight change in the x axis. Moving the arm up, there was a significant change in the x axis, and a slight change in the z axis. For backward motion, there was a visible change in all three axes, but most significantly in the y axis. Lastly, when modeling a circular motion, we wanted to see the readings for a throw, or a serve, swinging the arm from the back to the front over the top. This was also read by the magnetometer as a visible change in all three axes.  A graph of the readings can be seen below.

This demo shows that if it turns out that there are multiple positions that are possible for a specific magnetometer reading, we could classify motions of the arm based on the readings of the magnetometer without knowing the exact position of the shoulder. Since we know that the different motions have different characteristics in the x,y, and z planes, we would be able to classify the motions based on the characteristics of the readings. Then, using those classifications, we might be able to see variations, and based on those variations, deduct a most likely position for the shoulder joint.