Exploring the efficacy of neural networks for trajectory compression and the inverse problem

07/19/2021
by   Theodoros Ntakouris, et al.
0

In this document, a neural network is employed in order to estimate the solution of the initial value problem in the context of non linear trajectories. Such trajectories can be subject to gravity, thrust, drag, centrifugal force, temperature, ambient air density and pressure. First, we generate a grid of trajectory points given a specified uniform density as a design parameter and then we investigate the performance of a neural network in a compression and inverse problem task: the network is trained to predict the initial conditions of the dynamics model we used in the simulation, given a target point in space. We investigate this as a regression task, with error propagation in consideration. For target points, up to a radius of 2 kilometers, the model is able to accurately predict the initial conditions of the trajectories, with sub-meter deviation. This simulation-based training process and novel real-world evaluation method is capable of computing trajectories of arbitrary dimensions.

READ FULL TEXT VIEW PDF

page 1

page 2

page 3

page 4

12/16/2021

Predicting Shallow Water Dynamics using Echo-State Networks with Transfer Learning

In this paper we demonstrate that reservoir computing can be used to lea...
06/05/2020

TrueRMA: Learning Fast and Smooth Robot Trajectories with Recursive Midpoint Adaptations in Cartesian Space

We present TrueRMA, a data-efficient, model-free method to learn cost-op...
12/17/2019

Poisson Multi-Bernoulli Mixtures for Sets of Trajectories

For the standard point target model with Poisson birth process, the Pois...
06/01/2020

Exit Time Analysis for Approximations of Gradient Descent Trajectories Around Saddle Points

This paper considers the problem of understanding the exit time for traj...
10/23/2019

Prioritized Inverse Kinematics: Desired Task Trajectories in Nonsingular Task Spaces

A prioritized inverse kinematics (PIK) solution can be considered as a (...
08/04/2021

A generalization of the root function

We consider the interpretation and the numerical construction of the inv...
05/30/2020

TrueAdapt: Learning Smooth Online Trajectory Adaptation with Bounded Jerk, Acceleration and Velocity in Joint Space

We present TrueAdapt, a model-free method to learn online adaptations of...

1 Introduction

The problem of estimating the initial conditions of a trajectory, given a dynamics model of a solid body of arbitrary shape or projectile, is an actively researched topic. Applications of such models include but are not limited to: probabilistic robotics and path planning, catapult systems for UAVs, guidance systems and other control and navigation problems. The broad range of systems that can benefit from such problems require robust models that produce accurate estimates both in terms of short and long distance scenarios, as well as different motion models and environment conditions (e.g. wind, temperature and pressure).

During the age of antiquity, archers developed empirical methods for inclination angle and wind compensation (Figure b). Empirical methods and simplistic mathematical models such as the Rifleman’s Rule have also been applied by modern external ballistic practises. Problems that vary between ten and hundred kilometer ranges, systems without active guidance and thrusting capabilities are impossible to develop: estimations on the initial values of the trajectory such as speed and direction are trivial to compute (Figure a). However, small errors propagate rapidly, resulting in great distance deviations in the final region of a system’s effective range. Hence, models designed for smaller ranges are usually computed repeatedly, multiple times per second, predicting a system’s behaviour for a few time steps ahead of time, as part of larger control systems surveyrlplanning skydiopaper.

(a) a
(b) b
Figure 1:

A simple and effective approach to this problem is to pre-compute a dense grid of trajectory points and perform a binary search variant for each trajectory, selecting the trajectory segment that is closer to the target point in space. Once the simulations are performed and all the data are loaded into memory, the algorithm runs within a few milliseconds. Of course, the final distance deviation is bounded by the density of the trajectory segment grid. The dynamics of some problems allow for an interpolation between the closest baked initial value combinations, to further reduce the error. Other approaches can use either simplistic non-linear trajectory path equations with closed-form approximations of the initial value problem, or complex numerical computations. Iterative methods are also included, which are robust enough to be used even in non cartesian coordinate systems, such as other geographic coordinate systems

planningtrajectories.

This report’s approach generates trajectory segment data given a dense grid of initial conditions through simulation. Then, a neural network is trained to predict the initial values, given a trajectory segment. To the best of our knowledge, there are no similar neural network applications to those problems. 111

Specifically in the autonomous navigation and control situations, reinforcement learning algorithms are being actively developed, conditionally seeing great success purely from simulation data, applied directly to the real world, with few or no extra training data.

freeman2021brax The solution is inspired from CocoNet coconet, which overfits a network such that it is able to reconstruct an image: given the x and y coordinates of each pixel. By sweeping through all the grid of pixels, the network is able to reconstruct the image, while fewer parameters are stored, compared to widely adopted image compression techniques.

2 Experiment setup

2.1 Problem description

Given a target point in space , a dynamics model , ambient environment conditions and projectile characteristics

, the magnitude and the orientation of the velocity vector is sought, which, if applied to the projectile positioned at the origin, its trajectory will orbit near the target point with a distance less than a design threshold parameter.

2.2 Simulations

For the experiment’s dynamics model , a projectile of mass is used, whose drag coefficient is equal to , it’s reference area is and muzzle velocity is approximatedrag. The environment ambient conditions consist of gravitational acceleration of and air density of . This arrangement approximates a bullet fired from a modern rifle. For the experiments, points are uniformly sampled, spanning the elevation angle linear space (on the right half plane - see Figure 2).

Figure 2: Angular density

By only using forces parallel to the 2D plane that the discrete angle space spans (e.g. not centrifugal and not arbitrary wind forces), the current approach generalizes in the 3D space. To achieve that, the 3D target point is mapped to a 2D one, by using the magnitude of the XY projection and the Z component of the 3D point, as 2D components. One could also re-project back to the 3D space with regards to the initial azimuth angle of the target point.

A trajectory is formulated as a list of points in space , indexed from up to , where is the total number of points that the trajectory contains.

(1)

Starting from the origin, trajectories are simulated. The motion model is essentially a first order approximation of the projectile’s movement, taking into account the initial velocity, gravity, and drag. A step time of is used, which is the smallest time step that executes in a reasonable time, while yielding per point errors less than , compared to a step time of . For the neural network training, there are no constraints on the way simulations are performed or other methods of dynamics models, such as higher-level approximations of motion models and iterative solvers. Simulations are performed for up to radii away from the origin. Note that each generated trajectory contains a different number of points.

2.3 Spatial density considerations

Each simulation produces a list of trajectory segments. For each consecutive pair of trajectories ordered by the value of their initial elevation angle, the mean and variance of the euclidean distances between the last points (

Figure 5) is calculated. For each experiment, the mean is much greater than the variance of those distances. Specifically, the mean is at least 3 orders of magnitude greater than the variance.

Angular Density Euclidean Distance Mean (m)
2000 3.14
4000 1.57
6000 1.04
8000 0.62
Table 1:

As a second preprocessing step, each trajectory segment is going to be subsampled with the minimum frequency so that the maximum intra-point distance (Figure 5) inside the trajectories is less than the mean of the corresponding angular density. The subsampled trajectories provide uniform space coverage with a grid of points whose density is not uniform, but is bounded by this mean value.

Figure 3: Last point and intra-point distances

2.4 Training Data

The dataset input space consists of the following 6 features:

  • The X and Y coordinates of target point, normalized by the maximum simulation range.

  • The norm of the target point, normalized by the maximum simulation range.

  • The X and Y coordinates of the target point, normalized with regards to the norm of the vector.

  • The angle between the target point and the origin, scaled between 0 and 1.

Angular Density Dataset Samples #
2000 1268049
4000 5210660
6000 11722547
8000 20838733
Table 2:

3 Training

3.1 Architecture and configuration

A stack of fully connected layers with the swish activation function is used, independently of the task at hand. Out of LayerNorm

layernorm and BatchNorm batchnorm, the latter yielded significantly better approach in a pre-norm configuration (before the fully connected layer). Experiments with dropout have no positive impact on any of the experimental runs, thus it is omitted. The layer dimensions are as follows:

. If the angular density is greater than 4096 (the size of the last fully connected layer), another layer with dimensions of 8192 is appended to the list. Apart from the first layer, all the layer blocks (batch normalization, fully connected, dropout) are repeated 6 times (

Figure 4

). Between the last 2 layers, no normalization or dropout is performed. Mean squared error is the loss function for the regression task.

A series of experiments are performed on a TPUv3-8 tpupaper, with a batch size of 8192. Callbacks are used for early stopping and learning rate reducing on plateaus with a minimum delta of

. Stochastic gradient descent is used as an optimizer, with a learning rate of

and a momentum coefficient valued at adamsgd. Each network is trained until convergence.

Figure 4: Neural Network Architecture

3.2 Results

With the compression and lookup task, the objective for the deep neural networks would be to fully memorize the training set, similarly to an autoencoder, or CocoNet. This way, by sweeping the space (in

or , depending where the model is trained), one could reconstruct an approximation of the trajectory segments used to train the system, while maintaining a uniform coverage with error less than the one specified at Table 1.

The table below (Table 4) includes two means of evaluating the network’s performance. Metrics such as mean squared error are sufficient for most problems, but in this case, the errors are also projected back to the granularity of the initial angular grid that is used. Different densities correspond to different pairwise distances between each angle value. Thus, for the regression task, equal loss values for different angular densities (Table 3) do not imply similar performance. Dense grids require less predicted angular error than sparse grids (Table 4). For the densities used, the distances of each consecutive angle value are as follows:

Angular Density Pairwise Error (Uniform)
2000
4000
6000
8000
Table 3:

For the uniform grid - density pairwise error , "Percentage Angular Error" is defined as:

(2)
Figure 5: Percentage Angular Error components
Angular Density Task MSE Pct. Angular Error #
2000 Regression 9.81
4000 Regression 10.33
6000 Regression 26.7
8000 Regression 36.7
Table 4:

The percentage of angular error has less than 50% value, which signifies that the network has indeed learned to classify target points effectively. By quantizing this continuous output angle value back to the discrete angle linear space, one is able to precisely infer the initial orientation at the origin, which led to each trajectory segment.

4 Conclusions

All in all, not all problems are suitable for empirical machine learning methods such as neural network training. For systems with error tolerance similar to the performed experiments - which is a few meters at most, the non-linear nature of neural networks and deep learning can be used to perform segmentation of this inverse problem of target points in 2D and 3D space. A simple dataset construction scheme is presented, accompanied by a training and evaluation framework which is easy to extend in other dimensions, ambient conditions, dynamics models, and forces.

References