I have an IOT device sending the following information every second from a car that is being driven:
-Timestamp
-GPS co-ordinates (latitude/longitude)>
-GPS bearing or Azimuth
-Vehicle speed from GPS
-Accelerometer readings on X, Y and Z axis.
From this information I have to identify the below driving events:
-Braking
-Acceleration
-Left turn
-Right turn
I am trying to achieve this using neural-network from the ENCOG .net library and am trying to find answers to the below questions:
1. How can I format the input so that it can be fed to the neural network? What I have is a matrix of information with 8 columns and a variable number of rows:
Eg:- A Right turn could be a matrix like below
Timestamp Lattitude Longitude Azimuth Speed Xacc Yacc Zacc
4:57:08 PM 39.937185 -74.9530667 305.3293762 0 -0.904202607 0.33408456 0.105773433
4:57:09 PM 39.93719 -74.95307 303.1105042 0 -0.89096231 0.37406743 0.091855986
4:57:10 PM 39.9372067 -74.9530783 299.4731445 9 -0.880157497 0.395575262 0.058842602
Similarly a left turn could be
Timestamp Lattitude Longitude Azimuth Speed Xacc Yacc Zacc
4:57:26 PM 39.9377 -74.954015 257.7362976 18 -0.932709113 0.267096326 -0.024819622
4:57:27 PM 39.937715 -74.9540733 247.346344 18 -0.94067372 0.271379559 -0.054581382
4:57:28 PM 39.937715 -74.9541317 225.6322174 17 -0.923718111 0.293954308 -0.081829668
4:57:29 PM 39.937695 -74.9541917 213.6928406 20 -0.911598183 0.317324907 -0.128199049
4:57:30 PM 39.93766 -74.9542433 208.975174 24 -0.90052994 0.351010895 -0.121179532
4:57:31 PM 39.9376017 -74.9542833 205.9306641 28 -0.891561502 0.373537211 -0.078259489
4:57:32 PM 39.9375367 -74.9543267 206.532135 31 -0.891412538 0.389423688 -0.047274249
2. What neural-network patterns and typologies could be applied to solve it?
3. What kind of training algorithm(s) could be used?
I would appreciate it if someone could throw light on an approach to this problem.
What I have tried:
Here is how I am attempting to solve this.
Reduce the input matrix to contain only information that is relevant to identify the events. So the following columns are discarded from the input
-Timestamp
-Latitude
-Longitude and
-Speed
2.The reduced input would look like
Az Xacc Yacc
257.736 -0.93270911 0.267096326
247.346 -0.94067372 0.271379559
225.632 -0.92371811 0.293954308
213.693 -0.91159818 0.317324907
208.975 -0.90052994 0.351010895
205.931 -0.8915615 0.373537211
3.Interpolate/extrapolate the input to have at least 10 instances (rows)
4.Flatten the 10 rows to a vector containing 30 values as below
Az1 Xacc1 Yacc1 Az2 Xacc2 Yacc2 Az.. Xacc.. Yacc.. Az10 Xacc10 Yacc10 Target
257.736 -0.93270911 0.267096326 247.346 -0.94067372 0.271379559 .. .. .. 206.532 -0.89141254 0.389423688 Left
5.Use a Feedforward pattern like Multilayer perceptron with
-30 input neurons
-2 hidden layers
-4 output neurons
-Activation function: Hyperbolic tangent
6.Train using Resilient propagation
Please feel free to let me know your thoughts on this solution.