# Generate synthetic accelerometer data based on (x,y,z) coordinate

I would like to create a simulation model (basically a signal generator) which will allow me to generate the 3 output signals of an accelerometer based on 3 location input signals (x,y and z). I would like a more realistic model of the data produced by an accelerometer (with some noise and bias offsets).

How can I convert the series of points into a simulated accelerometer output?

Specifically:

I have a series of positions which describe a trajectory in 3D space...If an accelerometer was moving along the trajectory described by the series of positions, I am interested in knowing (simulating!) the data that the accelerometer would produce as the result of moving along the described trajectory.

I could just calculate the 2nd derivative of the trajectory, but that would probably be too ideal. I am looking for a model which is more realistic.

I assume that the three location input signals are functions of time, i.e., $x=x(t)$, $y=y(t)$, and $z=z(t)$ relative to a fixed, non-rotating reference frame. Then one could create a simple kinematics model that implements $dx/dt=v_x$, $dv_x/dt=a_x$, $da_x/dt=n_x$ where $n_x$ is a normal (Gaussian) random variable (and similarly for the $y$ and $z$ axes). The resulting state-space model has nine state variables ($a_x$, $v_x$, $x$, $a_y$, $\ldots$) and three measurements (the location input signals). A simple Kalman filter can then be designed to estimate the acceleration states given the location measurements. This will be the kinematic acceleration relative the fixed, non-rotating reference frame.

Accelerometers measure specific force, i.e., the difference between the kinematic acceleration and the acceleration due to gravity. Thus the components of the acceleration due to gravity must be subtracted from the components of the estimated kinematic acceleration to obtain estimates of what accelerometers fixed to the non-rotating reference frame would measure.

• thank you for the answer. Would you mind describing how to design and implement a simple Kalman filter to estimate the acceleration states given the location measurements ? For example in Matlab... Jul 6 '16 at 14:33
• I would add that you should be careful making assumptions about the type of noise experienced by the simulated sensor. Zero mean Gaussian noise is a good place to start, but I don't think that this assumption holds in practice. The noise distribution depends on the frequency of this input; this is mentioned in stackoverflow.com/questions/15331567/accelerometer-noise, but you can do some research to find a more rigorous source. Jul 6 '16 at 17:57
• Good answer in itself but for completeness the op asks specifically for sensor characteristics. After finding the ideal accelerations, the noise, bias and other characteristics can be added. Dec 7 '16 at 18:14

The easiest way to simulate a messy "real world" sensor from an ideal simulation is to look at what effects a sensor has to overcome.

For example:

• vibrations at multiple frequencies
• impulse noise
• dampened vibrations of the sensor itself (due to momentum of the vehicle)
• the sensor being improperly aligned to the vehicle
• gravity
• other effects from motion of the vehicle's internal movements (e.g. suspension bouncing)