# Is it possible to obtain an Inertial Measurement Unit (IMU) (accelerometer+gyroscope) placement inside a black box through experiment?

So if I only have physical access to the exterior of a black box containing an Inertial Measurement Unit (IMU) sensor with 6DOF (3-axis gyroscope, 3-axis accelerometer) rigidly fixed to an unknown mount point internally(can safely assume they are orthogonal).

Using the readings from the IMU and external manipulation of the black box is there any physical experiment I could perform to obtain a reasonable estimate of the internal coordinates of the IMU mount point?

Background for the question is I'm working on computer vision software to be run on Android devices and utilizing both the camera and IMU, but the algorithm requires a transform between the IMU and camera origins... For the phones I am using to develop on this isn't to big a hurdle as I can simply open up the devices and take the required physical measurements with calipers - this however would be a problem for most end users! [Oh and anything requiring an x-ray machine or similar is probably not going to fly either]

The one possible solution I have thought about so far is having the phone owner stand the device on end, then tap it so it falls down flat and deriving from the acceleration measurements and some trigonometry how high relative to the top of the phone the measurement came from [my assumption here is that if you balance a 1m ruler the 1m marker needs to accelerate faster to cover the 90 degree arc distance while the ruler is falling as does the 10cm marker covering it's shorter arc in the same time... or am I making up my own laws of physics in my mind?].

======================== EDIT======================

So just realized as I stepped away after submitting that the two points on the ruler accelerate at the same rate to cover the two different distances at the same time, so I got no useful idea but hopefully one of you readers do.

======================= Update ====================

Estimating internal location of IMU inside mobile device

For the benefit of anyone stumbling on this question through Google with similar problem I have found I can get reasonable results by running plotting software on the mobile device to view accelerometer values and then placing it in the center of a lazy Susan (rotating table) and rotating back and fourth by a couple of degrees to test for the displacement of the IMU from the center of rotation (called lever arm error in some literature).

The IMU can be pin pointed by systematically testing points along two orthogonal edges of the device, the response of one axis will vary and drop to zero once center of rotation is aligned with IMU location. With both axis aligned there will be no response (bar from vibration) from the accelerometer to rotational motion [that's what a gyroscope is for].

• Jun 1, 2021 at 10:59

Theoretically, yes. During rotation, only elements along the axis will experience zero acceleration. All elements away from the axis must accelerate in order to move along the arc. If you could find one location that has no change in acceleration magnitude when different axes through it spin, it must be in that location.

Practically, I'm not sure how well that would work in a cell phone, since the closer you are to the axis, the less of a signal you'll get. Also, while the magnitude of the acceleration should be zero along the axis, the direction is changing. I'm not sure how well the physical sensors cope with that.

• Nice call! So I just kludged together an experiment - drilled holes in back cover at 10mm intervals along the X and Y centered behind accelerometer of old phone - stuck a pin in desk to center on as I turned the phone by hand. While the plots were noisy, the X and Y both appeared to average to zero, while moving 10mm along one or the other axis kept one average on zero while the other was offset - will need to setup a drive wheel to test further and get some actual numbers and see if there is some math that would allow finding the IMU from spinning the phone around a random point. Feb 20, 2021 at 2:45
• Turns out the problem of calibrating offset between the IMU and mounting body is a well known problem in aerospace called 'lever arm estimation' Feb 21, 2021 at 0:38

I concur with BowlOfRed. Theoretically it can be done, in the sense that the laws of motion do allow such a scenario.

Success will be dependent on the end user following the instructions. (Obviously that's subject to Murphy's law)

Let me call the long axis of the phone the y-axis, and the short axis the x-axis.

For simplicity let me describe the phone as a flat rectangle with length y and width x.

The rectangle can be set up in a vertical orientation in 4 ways: balancing on the 1) bottom edge, 2) top edge 3) left edge, 4) right edge.

In general, when a rectangle tips over from vertical orientation and the edge that is in contact with the surface doesn't have enough friction the bottom will kick out. Then you don't get clean data.

To have the rectangle tip over consistently I suppose the end user must place something adjacent to the upright rectangle to prevent the rectangle from kicking out as it tips over. I assume something like a book will do.

Let's say the IMU is positioned close to the top of the phone. Set the phone upright, bottom edge on the surface, and allow it to tip over and fall flat. Repeat with the top edge in contact with the surface. If the IMU is located close to the top of the phone you expect larger values for the acceleration data when tipping over with bottom edge in contact with the surface. Conversely, if the IMU is located halfway then you expect that both falls will result in the roughly the same value for the resulting acceleration.

(Of course, to make sure the phone isn't damaged the surface should be something like a mattress, or a towel folded several times.)

The first steps will be to see if a calibration procedure along lines like that can be consistent enough that the inferred position of the IMU is reliable.

Then you will have to develop a way of detecting whether the end user is following the instructions, since not following the instructions would result in a wrong inferred IMU location.

• This is what I first thought about doing but then assumed my logic was flawed... I just tried it now experimentally and it failed: Taped two phones to a 1m plank of wood, the 1st with the top of the phone (where IMU located) 10cm from top of plank, the 2nd in middle of plank. Then (over carpet) raised one end of the board to around 30 degrees and dropped it several times to both ends of the board... The acceleration plots in the Z direction (dropping face up) were virtually carbon copies when dropped from either end [as were the X, while the Y was just flipped]. Feb 20, 2021 at 9:52
• @user263399 Oh dear. That doesn't bode well. I assume you used a 1meter length to magnify the effect. I just downloaded an accelerometer app from the google play store to my Android tablet. I allow the tablet to hinge drop onto a soft surface, multiple directions. I see similar height spikes on all three axes. So I guess the data that you are looking for are swamped by noisy data. It appears: any IMU location finding would need a rig that moves the phone in a very repeatable way. It would appear that is too complicated for your intended purpose. Feb 20, 2021 at 10:25