0
$\begingroup$

I need help on configuring a neural network. I would like to pass in accelerometer values (x,y,z) from two different sensors, and have the network compute the corresponding angle. I am providing close to 80,000 training data points for which I provide the accelerometer values and the corresponding angles. When I developed a neural network with only 1 sensor, the network performed and computed the desired angles quite well. However, the issue I am having with using two sensors is that the x,y,z values of the first sensor are all related (or belong to one class), and the x,y,z values of the second sensor are all related. How can I tell the neural network to consider the first set or combination of x,y,z accelerometer values together, and then the second set of x,y,z accelerometer values together, then somehow use these two sets of data together to evaluate the angle. Just a note, the accelerometer values essentially indicate the orientation of the sensor. So I need to consider the orientation of the two sensors in order to find my desired angle.

Any suggestions are much appreciated. I am using the neural network toolbox in Matlab, but am open to using other methods for analysis.

$\endgroup$

2 Answers 2

1
$\begingroup$

It might not be necessary to do this. You could simply feed all values into the network and let it learn the function. But, if you think you could get better performance by explicitly imposing the constraint...

One way would be to constrain the connectivity of the network. For example, say the input layer contains values from the first accelerometer, followed by the second accelerometer: $[x_1, y_1, z_1, x_2, y_2, z_2]$. Split the first hidden layer into two halves. The first half only receives connections from the first three input units (corresponding to the first accelerometer). The second half only receives connections from the last three input units (corresponding to the second accelerometer. This is equivalent to having all-to-all connectivity, but forcing the weight matrix to be zero for 'non-connected' units. It's also equivalent to having separate, parallel input and hidden layers. Then, let the split hidden layer feed into a 'merged' hidden layer that receives all-to-all connections from the split layer. The network from here on out has standard architecture. You can stack up as many split hidden layers and full hidden layers as you want. Or, you could skip the full hidden layers and feed directly from a split hidden layer to the output.

Another option is to use two separate networks to predict the angle for each accelerometer, as Newstein suggested (possibly copies of the same network). If you know how to compute the final angle from these two separate angles, then you're done. Otherwise, feed these angles into a third network that predicts the final angle.

$\endgroup$
0
$\begingroup$

Assuming you have a trained model to predict the angle, you can just evaluate the angle specified by the two sensors individually and then use them to determine the desired angle.

$\endgroup$
2
  • $\begingroup$ this may be harder to do in practice as I am trying to determine the angle between the upper arm and forearm. The angle of the forearm must be measured RELATIVE to the position of the upper arm. That is why I am hoping use a neural network to perform this evaluation for me. $\endgroup$
    – cyrusbehr
    Jun 30, 2016 at 19:33
  • $\begingroup$ If both angles are measured relative to the same reference,then the relative angle between them is just the difference of the measured angles $\endgroup$
    – Newstein
    Jun 30, 2016 at 20:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.