Patent Publication Number: US-2021171024-A1

Title: Deep learning based motion control of a group of autonomous vehicles

Description:
BACKGROUND OF INVENTION 
     1. Field of the Invention 
     The present invention is related to a controller for an agent of a group of agents, in particular for a group of autonomous or semi-autonomous vehicles, and to a computer program implementing such a controller. The invention is further related to a temporal deep network for such a controller and to a method, a computer program and an apparatus for training the temporal deep network. 
     2. Description of Related Art 
     A multi-agent system refers to a group, or swarm, of autonomous systems or robots operating in a networked environment. Calculating collision-free trajectories in multi-agent autonomous vehicles is a safety-critical task. This is valid not only for cooperative robotic systems used for inspection or warehouse management, but also for self-driving cars. 
     Controlling a single robot is traditionally performed in the “sense-plan-act” paradigm. The working environment is discretized in a virtual space used by a path planner to calculate the path of the robot. The obtained path represents input to an underling motion controller of the robot. Such a system can be viewed as a modular pipeline, where the output of each component represents input to the following module. The path planner computes a least-cost path through the discretized space using A*- or Dijkstra-methods. Extensions of these well-established path planning algorithms to multi-agent systems have been proposed. For example, MA-RRT* and DMA-RRT are based on a combination of A* grid search and sampling-based rapidly exploring random trees (RRT). However, such algorithms are computationally inefficient, require simplifying assumptions, such as environment sparsity, and do not take into account the dynamics of the agents. 
     The control of multi-agent systems can be formulated as an optimization procedure. Mixed integer linear programming (MILP) is one of the first methods designed in this sense. Due to its computational costs, MILP is restricted to applications involving a small number of agents and an environment with few obstacles. 
     In recent years, deep learning (DL) has become a leading technology in many domains, enabling autonomous agents to perceive their environment and take actions accordingly. Among different deep learning techniques, deep reinforcement learning (DRL) has been established as one of the leading approaches to control autonomous systems. Deep reinforcement learning is a type of machine learning algorithm, where agents are taught actions by interacting with their environment. In such a system, a policy is a mapping from a state to a distribution over actions. The algorithm does not leverage on training data, but maximizes a cumulative reward, which is positive if the vehicle is able to maintain its direction without collisions, and negative otherwise. The reward is used as a pseudo label for training a deep neural network, which is then used to estimate an action-value function approximating the next best action to take, given the current state. Deep reinforcement learning has mainly been used in controlling single agents, such as robotic cars, or dexterous manipulation of objects. Similar to traditional path planners, the main challenge with deep reinforcement learning on physical systems is that the agent&#39;s dynamics are not taken into account. 
     SUMMARY OF THE INVENTION 
     It is an object of one aspect of the present invention to provide an improved solution for deep learning based motion control of an agent of a group of agents. 
     This object is achieved by a controller, by a computer program code, which implements this controller, by a temporal deep network, by a computer program code, which implements this temporal deep network, by a method for training the temporal deep network, by a computer program code, which implements this method, and by an apparatus for training the temporal deep network. 
     According to a first aspect, a controller for an agent of a group of agents comprises: a temporal deep network designed to calculate a desired trajectory for the agent; 
     a nonlinear model predictive controller designed to calculate commands for the agent based on the desired trajectory and desired trajectories of the other agents of the group of agents; and
 
an augmented memory designed to integrate historic system states of the group of agents for the temporal deep network.
 
     Accordingly, a computer program code comprises instructions, which, when executed by at least one processor, cause the at least one processor to implement a controller according to the invention. 
     The term computer has to be understood broadly. In particular, it also includes electronic control units, embedded devices, and other processor-based data processing devices. 
     The computer program code can, for example, be made available for electronic retrieval or stored on a computer-readable storage medium. 
     According to one aspect, a temporal deep network for a controller for an agent of a group of agents is designed to calculate a desired trajectory for the agent based on historic observations of the agent, a reference trajectory for the agent, and historic states of all agents. 
     Accordingly, a computer program code comprises instructions, which, when executed by at least one processor, cause the at least one processor to implement a temporal deep network according to one aspect of the invention. 
     The term computer has to be understood broadly. In particular, it also includes electronic control units, embedded devices, and other processor-based data processing devices. 
     The computer program code can, for example, be made available for electronic retrieval or stored on a computer-readable storage medium. 
     A novel approach for planning safe trajectories for a group of agents is described, entitled multi-agent deep learning-based nonlinear model predictive control. The agents are represented as single-track kinematic systems, equipped with state estimators and underlying motion controllers. The environment is modeled as a dynamic system observed by the agents and influenced by their movements. The approach is based on temporal deep neural networks, which estimate optimal desired state trajectories for the agents. The predicted desired trajectories of the agents are fed to respective nonlinear model predictive controllers of the agents, which together can be considered to constitute a distributed nonlinear model predictive controller. The nonlinear model predictive controller of each agent then computes optimal commands transmitted to the underlying motion controller of the agent, subject to motion and actuator constraints. 
     Model predictive control is a control strategy that computes control actions by solving an optimization problem. It has the ability to handle complex nonlinear systems with state and input constraints. A central idea behind model predictive control is to calculate control actions at each sampling time by minimizing a cost function over a short time horizon, while taking into account observations, input-output constraints and the dynamics of the system given by a process model. Model predictive control has been proven as a reliable control technique for self-driving cars, autonomous mobile robots and unmanned aerial vehicles. 
     In an advantageous embodiment, the historic system states of the group of agents comprise historic states and observations of the agents. Based on these data the temporal deep network of an agent is able to estimate the desired future trajectory of the agent. 
     In an advantageous embodiment, the temporal deep network comprises a long short-term memory recurrent neural network. Different from traditional recurrent neural networks, long short-term memories solve recurrent estimation by incorporating three gates, which control the input, output and memory state. They are particularly good in predicting time sequences. 
     In an advantageous embodiment, the nonlinear model predictive controller is configured to take into account a collision avoidance constraint for each agent. In order for the agents to safely traverse the environment, a collision avoidance constraint is added for each agent, which is preferably modeled as a collision boundary. The boundary can, for example, be represented as a multidimensional agent centered circle. 
     In an advantageous embodiment, the controller is configured to share the desired trajectory of the agent and observations of the agent with the other agents of the group of agents. This ensures that all agents of the groups of agents are in possession of the data necessary for modeling the environment as a dynamic system observed by the agents and influenced by their movements. 
     According to yet another aspect, a method for training a temporal deep network according to the invention comprises training the temporal deep network using inverse reinforcement learning based on trajectories acquired from manually driving agents in a test environment. 
     Similarly, a computer program code comprises instructions, which, when executed by at least one processor, cause the at least one processor to train a temporal deep network according to the invention using inverse reinforcement learning based on trajectories acquired from manually driving agents in a test environment. 
     Again, the term computer has to be understood broadly. In particular, it also includes workstations, distributed systems and other processor-based data processing devices. 
     The computer program code can, for example, be made available for electronic retrieval or stored on a computer-readable storage medium. 
     Accordingly, an apparatus for training a temporal deep network according to the invention comprises a processor configured to train the temporal deep network using inverse reinforcement learning based on trajectories acquired from manually driving agents in a test environment. 
     The temporal deep neural network is preferably trained in an inverse reinforcement learning setup, with historic data composed of observations and agents&#39; states acquired from manually driving the agents. In this way, demonstrated trajectories are encoded within the layers of the network. 
     In an advantageous embodiment, parameters of the temporal deep network are learned by minimizing a loss function in a maximum likelihood estimation setup. Advantageously, the training procedure minimizes a custom loss function, which incorporates collision avoidance constraints. The loss function estimates how well the temporal deep network mimics given manual recorded trajectories, while penalizing the collision avoidance constraint. 
     Advantageously, an autonomous or semi-autonomous vehicle comprises a controller according to the invention. In this way, an improved autonomous driving behavior in different driving scenarios is achieved. 
     Further features of the present invention will become apparent from the following description and the appended claims in conjunction with the figures. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  schematically illustrates the kinematics of the single track model; 
         FIG. 2  is a schematic of multi-agent deep learning-based nonlinear model predictive control; 
         FIG. 3  schematically illustrates a recurrent neural network; 
         FIG. 4  schematically illustrates use of a temporal deep neural network for prediction of desired trajectories; 
         FIG. 5  schematically illustrates a method for training a temporal deep network according to the invention; 
         FIG. 6  schematically illustrates a first embodiment of an apparatus for training a temporal deep network according to the invention; and 
         FIG. 7  schematically illustrates a second embodiment of an apparatus for training a temporal deep network according to the invention. 
     
    
    
     DETAILED DESCRIPTION OF THE PRESENTLY PREFERRED EMBODIMENTS 
     The present description illustrates the principles of the present disclosure. It will thus be appreciated that those skilled in the art will be able to devise various arrangements that, although not explicitly described or shown herein, embody the principles of the disclosure. 
     All examples and conditional language recited herein are intended for educational purposes to aid the reader in understanding the principles of the disclosure and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions. 
     Moreover, all statements herein reciting principles, aspects, and embodiments of the disclosure, as well as specific examples thereof, are intended to encompass both structural and functional equivalents thereof. Additionally, it is intended that such equivalents include both currently known equivalents as well as equivalents developed in the future, i.e., any elements developed that perform the same function, regardless of structure. 
     Thus, for example, it will be appreciated by those skilled in the art that the diagrams presented herein represent conceptual views of illustrative circuitry embodying the principles of the disclosure. 
     The functions of the various elements shown in the figures may be provided through the use of dedicated hardware as well as hardware capable of executing software in association with appropriate software. When provided by a processor, the functions may be provided by a single dedicated processor, by a single shared processor, or by a plurality of individual processors, some of which may be shared. Moreover, explicit use of the term “processor” or “controller” should not be construed to refer exclusively to hardware capable of executing software, and may implicitly include, without limitation, digital signal processor (DSP) hardware, read only memory (ROM) for storing software, random access memory (RAM), and nonvolatile storage. 
     Other hardware, conventional and/or custom, may also be included. Similarly, any switches shown in the figures are conceptual only. Their function may be carried out through the operation of program logic, through dedicated logic, through the interaction of program control and dedicated logic, or even manually, the particular technique being selectable by the implementer as more specifically understood from the context. 
     In the claims hereof, any element expressed as a means for performing a specified function is intended to encompass any way of performing that function including, for example, a combination of circuit elements that performs that function or software in any form, including, therefore, firmware, microcode or the like, combined with appropriate circuitry for executing that software to perform the function. The disclosure as defined by such claims resides in the fact that the functionalities provided by the various recited means are combined and brought together in the manner which the claims call for. It is thus regarded that any means that can provide those functionalities are equivalent to those shown herein. 
     An objective of multi-agent deep learning-based nonlinear model predictive control is to generate collision free trajectories that drive n agents from their current positions to target locations, subject to state and actator constraints. 
     The agents are modeled based on a single-track kinematic model in    2 , which is shown in  FIG. 1 . p i   &lt;t&gt; =(x i   &lt;t&gt; ,y i   &lt;t&gt; ) is the center of mass of agent i in the XY ground plane. v i   &lt;t&gt; =(v xi   &lt;t&gt; ,v yi   &lt;t&gt; ) represents the velocities of agent i along the XY ground plane at discrete time step t. α i   &lt;t&gt;  and δ i   &lt;t&gt;  are the heading and steering angles, respectively. The kinematic equations are given as the following non-holonomic constraints: 
     
       
         
           
             
               
                 
                   
                     
                       p 
                       i 
                       
                         &lt; 
                         
                           t 
                           + 
                           1 
                         
                         &gt; 
                       
                     
                     = 
                     
                       
                         p 
                         i 
                         
                           &lt; 
                           t 
                           &gt; 
                         
                       
                       + 
                       
                         Δ 
                          
                         
                             
                         
                          
                         
                           t 
                           · 
                           
                             [ 
                             
                               
                                 
                                   
                                     cos 
                                      
                                     
                                         
                                     
                                      
                                     
                                       α 
                                       i 
                                       
                                         &lt; 
                                         t 
                                         &gt; 
                                       
                                     
                                   
                                 
                               
                               
                                 
                                   
                                     sin 
                                      
                                     
                                         
                                     
                                      
                                     
                                       α 
                                       i 
                                       
                                         &lt; 
                                         t 
                                         &gt; 
                                       
                                     
                                   
                                 
                               
                             
                             ] 
                           
                           · 
                           
                             v 
                             i 
                             
                               &lt; 
                               t 
                               &gt; 
                             
                           
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       α 
                       i 
                       
                         &lt; 
                         
                           t 
                           + 
                           1 
                         
                         &gt; 
                       
                     
                     = 
                     
                       
                         α 
                         i 
                         
                           &lt; 
                           t 
                           &gt; 
                         
                       
                       + 
                       
                         
                           
                             v 
                             i 
                             
                               &lt; 
                               t 
                               &gt; 
                             
                           
                           l 
                         
                          
                         tan 
                          
                         
                             
                         
                          
                         
                           
                             δ 
                             i 
                             
                               &lt; 
                               t 
                               &gt; 
                             
                           
                           · 
                           Δ 
                         
                          
                         
                             
                         
                          
                         t 
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       v 
                       i 
                       
                         &lt; 
                         
                           x 
                           + 
                           1 
                         
                         &gt; 
                       
                     
                     = 
                     
                       
                         v 
                         i 
                         
                           &lt; 
                           t 
                           &gt; 
                         
                       
                       + 
                       
                         
                           
                             a 
                             i 
                             
                               &lt; 
                               t 
                               &gt; 
                             
                           
                           · 
                           Δ 
                         
                          
                         
                             
                         
                          
                         t 
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
     where velocities and steering angles are the control inputs and a i   &lt;t&gt;  is the acceleration of agent i. Each agent is equipped with an underlying motion controller. Δt and l are the sampling time and distance between the front and rear wheel, respectively. All agents are considered as identical models, having the same baseline distance  1 . 
     Using the kinematic equations (1) to (3), a nonlinear model to express the states of the agents over a future horizon of fixed length τ o  can be defined. The kinematic model of agent i can be considered as: 
     
       
         
           
             
               
                 
                   
                     z 
                     i 
                     
                       &lt; 
                       
                         t 
                         + 
                         1 
                       
                       &gt; 
                     
                   
                   = 
                   
                     f 
                      
                     
                       ( 
                       
                         
                           z 
                           i 
                           
                             &lt; 
                             t 
                             &gt; 
                           
                         
                         , 
                         
                           u 
                           i 
                           
                             &lt; 
                             t 
                             &gt; 
                           
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
             
               
                 
                   where 
                    
                   
                     : 
                   
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     
                       z 
                       i 
                       
                         &lt; 
                         
                           t 
                           + 
                           1 
                         
                         &gt; 
                       
                     
                     = 
                     
                       
                         z 
                         i 
                         
                           &lt; 
                           t 
                           &gt; 
                         
                       
                       + 
                       
                         Δ 
                          
                         
                             
                         
                          
                         
                           t 
                           · 
                           
                             [ 
                             
                               
                                 
                                   
                                     cos 
                                      
                                     
                                         
                                     
                                      
                                     
                                       α 
                                       i 
                                       
                                         &lt; 
                                         t 
                                         &gt; 
                                       
                                     
                                   
                                 
                                 
                                   0 
                                 
                               
                               
                                 
                                   
                                     sin 
                                      
                                     
                                         
                                     
                                      
                                     
                                       α 
                                       i 
                                       
                                         &lt; 
                                         t 
                                         &gt; 
                                       
                                     
                                   
                                 
                                 
                                   0 
                                 
                               
                               
                                 
                                   0 
                                 
                                 
                                   1 
                                 
                               
                             
                             ] 
                           
                           · 
                           
                             u 
                             i 
                             
                               &lt; 
                               t 
                               &gt; 
                             
                           
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
     where z i   &lt;t&gt; ∈   N  and u i   &lt;t&gt; ∈   M . N is the number of state variables, which in the present case is three: position and velocity. M is the number of control inputs, which in the present case is two: velocity command and steering command. The motion of the agents is constrained to limited velocity actuation u i   &lt;t&gt;  and steering angle actuation δ i   &lt;t&gt; : 
         u   min   ≤u   i   &lt;t&gt;   ≤u   max ,  (6)
 
       δ min ≤δ i   &lt;t&gt; ≤δ max .  (7)
 
     In order for the agents to safely traverse the environment, a collision avoidance constraint is added for each agent, modeled as a collision boundary. The boundary is represented as a multidimensional agent centered circle. The collision constraint between agents t and j is defined based on a scaling matrix Λ: 
       ∥Λ −1   ·D   ij   &lt;t&gt; ∥ d=2   ≥r   min ,  (8)
 
     where d is the degree of freedom of the circle, r min  is the minimum distance between the agents in the XY plane and D &lt;t&gt;  is a distance matrix: 
         D   &lt;t&gt;   =∥p   i   &lt;t&gt;   −p   j   &lt;t&gt; ∥ 1,2 ,  (9)
 
     In the present implementation, the minimum distance r min  is defined based on the unit circle, thus making the scaling matrix Λ equal to the identity matrix, Λ=I Δ . L2 is the Euclidean norm. 
     The above problem can be formalized as a model predictive control optimization problem. When dealing with a single agent, a central idea behind model predictive control is to calculate control actions over a short time horizon by minimizing a cost function, while taking into account observations, input-output constraints and the agent&#39;s dynamics given by a process model. The first control action is applied to the agent, after which the resulting state is measured and considered as input to the next optimization iteration. 
     The schematic of multi-agent deep learning-based nonlinear model predictive control is shown in  FIG. 2 . In the figure, two agents A n  with their respective controllers  1  are depicted. The dynamic state of the system is represented as a collection of variables describing the environment and the state of each agent A n : 
     
       
         
           
             
               
                 
                   
                     
                       s 
                       
                         &lt; 
                         t 
                         &gt; 
                       
                     
                     = 
                     
                       
                         [ 
                         
                           
                             ( 
                             
                               
                                 I 
                                 1 
                                 
                                   &lt; 
                                   t 
                                   &gt; 
                                 
                               
                               , 
                               
                                 z 
                                 1 
                                 
                                   &lt; 
                                   t 
                                   &gt; 
                                 
                               
                             
                             ) 
                           
                           , 
                           … 
                            
                           
                               
                           
                           , 
                           
                             ( 
                             
                               
                                 I 
                                 n 
                                 
                                   &lt; 
                                   t 
                                   &gt; 
                                 
                               
                               , 
                               
                                 z 
                                 n 
                                 
                                   &lt; 
                                   t 
                                   &gt; 
                                 
                               
                             
                             ) 
                           
                         
                         ] 
                       
                       = 
                       
                         ( 
                         
                           
                             I 
                             
                               1 
                               , 
                               … 
                                
                               
                                   
                               
                               , 
                               n 
                             
                             
                               &lt; 
                               t 
                               &gt; 
                             
                           
                           , 
                           
                             z 
                             
                               1 
                               , 
                               … 
                                
                               
                                   
                               
                               , 
                               n 
                             
                             
                               &lt; 
                               t 
                               &gt; 
                             
                           
                         
                         ) 
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   10 
                   ) 
                 
               
             
           
         
       
     
     where n is the number of agents A n , I i   &lt;t&gt;  denotes the observations of agent i and z i   &lt;t&gt;  is the state of agent i, given by its position, heading and velocity at sampling time t: 
         z   i   &lt;t&gt; =( p   i   &lt;t&gt; ,α i   &lt;t&gt;   ,v   i   &lt;t&gt; ).  (11)
 
     The present approach is based on a distributed nonlinear model predictive control, where the agents A n  share their previous observations I 1 . . . n   &lt;t−τ     p     ,t&gt;  and estimated states z 1 . . . n   &lt;t−τ     p     ,t&gt; , which are provided by respective state estimators  6 , before simultaneously solving the next optimization problem. The output of multi-agent deep learning-based nonlinear model predictive control is a set of sequences u 1 . . . n   &lt;t+1,t+τ     f     &gt; , where u i   &lt;t+1,t+τ     f     &gt;  represents the optimal control actions for agent i over a time horizon τ f . τ p  and τ f  are past and future temporal horizons, which are not necessarily equal. 
     The historic states s &lt;t−τ     p     ,t&gt;  are integrated along time interval [t−τ p , t] by a so-called augmented memory component  4 . s &lt;t−τ     p     ,t&gt;  and a set of reference trajectories z ref     1 . . . n     &lt;t−∞,t+∞&gt;  are used to train a set of temporal deep networks  2 . The deep networks  2  act as nonlinear function approximators for the automatic estimation of the desired future states z d     1 . . . n     &lt;t+1, τ+τ     f     &gt;  of all agents. The reference trajectories can be calculated off-line, based on a static map of the environment. Since z ref   &lt;.&gt;  describes an agent&#39;s trajectory from start to destination, it can hypothetically be considered to vary in time interval [−∞,+∞]. Multi-agent deep learning-based nonlinear model predictive control provides the means to adapt the motion dynamics of the agents A n  based on the constraints given in equation (8). 
     The future desired states z 1 . . . n   &lt;t+1,t+τ     f     &gt; , are required as input by the nonlinear model predictive controllers  3  for calculating future control actions. The output of an optimization iteration within multi-agent deep learning-based nonlinear model predictive control is a sequence of control actions for all agents A n : u 1 . . . n   &lt;t+1,t+τ     f     &gt; , out of which only [u 1   &lt;t+1&gt; , . . . , u n   &lt;t+1&gt; ] will be applied to the underlying motion controllers  5  of the agents A n  at the next time step, respectively. 
     Over the course of the last couple of years, deep learning has been established as the main technology behind many innovations, showing significant improvements in computer vision, robotics and natural language processing. Among the deep learning techniques, recurrent neural networks are especially good in processing temporal sequence data, such as text or video streams. Different from conventional neural networks, a recurrent neural network contains a time dependent feedback loop in its memory cell. Given a time dependent input sequence [s &lt;t+τ     p     &gt; , . . . , s &lt;t&gt; ] and an output sequence [z &lt;t+1&gt; , . . . , s &lt;t+τ     f     &gt; ], a recurrent neural network can be unfolded τ p +τ f  times to generate a loop-less network architecture matching the input length, as illustrated in  FIG. 3 . In the figure,  FIG. 3 a   ) shows a folded recurrent neural network, whereas  FIG. 3 b   ) shows the corresponding unfolded recurrent neural network. t represents a temporal index, while τ p  and τ f  are the lengths of the input and output sequences, respectively. Over time t, both the input s &lt;t−τ     p     ,t&gt;  and output z &lt;t+1,t+τ     f     &gt;  sequences share the same weights w &lt;.&gt; . An unfolded network thus has τ p +τ f +1 identical layers, i.e. each layer shares the same learned weights w &lt;.&gt; . Once unfolded, a recurrent neural network can be trained using the backpropagation through time algorithm. When compared to a conventional neural network, the only difference is that the learned weights in each unfolded copy of the network are averaged, thus enabling the network to share the same weights over time. 
     In the present implementation, a set of long short-term memory networks is used as non-linear function approximators for estimating temporal dependencies in dynamic system states sequences. As opposed to traditional recurrent neural networks, long short-term memories solve recurrent estimation by incorporating three gates, which control the input, output and memory state. 
     A long short-term memory network Q is parametrized by Θ=[W i ,U i ,b i ], where W i  represents the weights of the network&#39;s gates and memory cells multiplied with the input state, U i  are the weights governing the activations, and b i  denotes the set of neuron bias values. 
     In a supervised learning setup, given a set of training sequences 
         =[( s   i   &lt;t−τ     p     ,t&gt;   ,z   1   &lt;t+1,τ+τ     f     &gt; ), . . . ,( s   q   &lt;t−τ     p     ,t&gt;   ,z   q   &lt;t+1,τ+τ     f     &gt; )].  (12)
 
     where q is the number of independent pairs of observed sequences with assignments z &lt;t,t+τ     f     &gt; , one can train the response of a long short-term memory network Q(⋅; Θ) using maximum likelihood estimation: 
     
       
         
           
             
               
                 
                   
                     θ 
                     ^ 
                   
                   = 
                   
                     
                       
                         argmax 
                         Θ 
                       
                        
                       
                         ℒ 
                          
                         
                           ( 
                           
                             Θ 
                             ; 
                              
                           
                           ) 
                         
                       
                     
                     = 
                     
                       
                         
                           argmin 
                           Θ 
                         
                          
                         
                           
                             ∑ 
                             
                               i 
                               = 
                               1 
                             
                             m 
                           
                            
                           
                             
                               l 
                               i 
                             
                              
                             
                               ( 
                               
                                 
                                   Q 
                                    
                                   
                                     ( 
                                     
                                       
                                         s 
                                         i 
                                         
                                           
                                             &lt; 
                                             
                                               t 
                                               - 
                                               
                                                 τ 
                                                 p 
                                               
                                             
                                           
                                           , 
                                           
                                             t 
                                             &gt; 
                                           
                                         
                                       
                                       ; 
                                       Θ 
                                     
                                     ) 
                                   
                                 
                                 , 
                                 
                                   z 
                                   i 
                                   
                                     
                                       &lt; 
                                       
                                         t 
                                         + 
                                         1 
                                       
                                     
                                     , 
                                     
                                       
                                         t 
                                         + 
                                         
                                           τ 
                                           f 
                                         
                                       
                                       &gt; 
                                     
                                   
                                 
                               
                               ) 
                             
                           
                         
                       
                       = 
                       
                         
                           argmin 
                           Θ 
                         
                          
                         
                           
                             ∑ 
                             
                               i 
                               = 
                               1 
                             
                             m 
                           
                            
                           
                             
                               ∑ 
                               
                                 t 
                                 = 
                                 1 
                               
                               
                                 τ 
                                 f 
                               
                             
                              
                             
                               
                                 
                                   l 
                                   i 
                                   
                                     &lt; 
                                     t 
                                     &gt; 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     
                                       
                                         Q 
                                         
                                           &lt; 
                                           t 
                                           &gt; 
                                         
                                       
                                        
                                       
                                         ( 
                                         
                                           
                                             s 
                                             i 
                                             
                                               
                                                 &lt; 
                                                 
                                                   t 
                                                   - 
                                                   
                                                     τ 
                                                     p 
                                                   
                                                 
                                               
                                               , 
                                               
                                                 t 
                                                 &gt; 
                                               
                                             
                                           
                                           ; 
                                           Θ 
                                         
                                         ) 
                                       
                                     
                                     , 
                                     
                                       z 
                                       i 
                                       
                                         &lt; 
                                         t 
                                         &gt; 
                                       
                                     
                                   
                                   ) 
                                 
                               
                               . 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
           
         
       
     
     where an input sequence of observations s &lt;t−τ     p     ,t&gt; =[s &lt;t−τ     p     ,t&gt; , . . . , s &lt;t−&gt; ,s &lt;t&gt; ] is composed of t consecutive data samples, l (⋅,⋅) is the logistic regression loss function, and t represents a temporal index. In the present document, a network output sequence is defined as a desired sate trajectory: 
         z   d   &lt;t+1,t+τ     f     &gt; =[ z   d   &lt;t+1&gt;   ,z   d   &lt;t+2&gt;   , . . . ,z   d   &lt;t+τ     f     &gt; ].  J(14)
 
     where z d   &lt;t+1&gt;  is a predicted trajectory set-point at time t+1. 
     In recurrent neural networks terminology, the optimization procedure in equation (13) is typically used for training “many-to-many” recurrent neural network architectures, where the input and output states are represented by temporal sequences of τ p  and τ f  data instances, respectively. This optimization problem is commonly solved using gradient based methods, like stochastic gradient descent (SGD), together with the backpropagation through time algorithm for calculating the network&#39;s gradients. 
     Given a set of agents, a sequence of temporal dynamic environment states s &lt;t−τ     p     ,t&gt; , and a set of reference trajectories z ref     1 . . . n     &lt;t−∞,t+∞&gt; , the task is to learn a set of desired trajectory policies for all agents for navigating from state s &lt;t&gt;  to the destination state s dest   &lt;t+τ     f     &gt; . 
     The trajectory policy of agent is encoded within the layers of the temporal deep network  2  of  FIG. 4 . The network receives as input RGB images I I     RGB     &lt;t−τ     p     ,t&gt;  from a camera of the agent, ultrasonic san data I I     scan     &lt;t−τ     p     ,t&gt;  and the historic states of all agents z 1 . . . n   &lt;t−τ     p     ,t&gt;  from the augmented memory  4 , as well as the reference trajectory z ref     i     &lt;τ−τ     p     , t+τ     f     &gt; , bounded to the past and future time horizon interval [t−τ p , t+τ f ]. 
     The RGB data is firstly processed by a set of convolutional filters, before its concatenation on top of the ultrasonic scan and trajectory state information. The predicted desired trajectory z d     i     &lt;t+1,t+τ     f     &gt;  of agent i is calculated by a long short-term memory recurrent neural network  8  and fed to a nonlinear model predictive controller  3  via an output layer  7  for calculating the optimal commands of the vehicle. 
     The deep network  2  is trained based on the inverse reinforcement learning (IRL) principle. In classical reinforcement learning, an agent is taught actions through a cumulative reward, which describes how well the agent did performed its task, based on environment observations and its past actions. The goal here is to maximize the cumulative reward function. In inverse reinforcement learning the direction is reversed, meaning that the agent does not explicitly receive a reward for its actions. Instead, it tries to learn the reward function from expert demonstrations. 
     In the present work, trajectories acquired from manually driving the agents in the test environment are used as training examples. Within the layers of a temporal deep neural network an optimal action-value function Q i *(⋅,⋅) is encoded, which estimates the maximal future discounted reward for agent i when starting in state s &lt;t&gt;  and performing the distributed nonlinear model predictive control actions u 1 . . . n   &lt;t+1,t+τ     f     &gt; , given a set of estimated desired trajectories z d     1 . . . n     &lt;t+1, τ+τ     f     &gt; : 
     
       
         
           
             
               
                 
                   
                       
                   
                    
                   
                     
                       
                         ? 
                       
                        
                       
                         ( 
                         
                           s 
                           , 
                           
                             z 
                             d 
                           
                         
                         ) 
                       
                     
                     = 
                     
                       
                         max 
                         π 
                       
                        
                       
                         
                            
                            
                           
                             [ 
                             
                               
                                 
                                   
                                     R 
                                     
                                       &lt; 
                                       t 
                                       &gt; 
                                     
                                   
                                   | 
                                   
                                     s 
                                     
                                       &lt; 
                                       t 
                                       &gt; 
                                     
                                   
                                 
                                 = 
                                 s 
                               
                               , 
                               
                                 
                                   ? 
                                 
                                 = 
                                 
                                   z 
                                   d 
                                 
                               
                               , 
                               π 
                             
                             ] 
                           
                         
                         . 
                       
                     
                   
                 
               
               
                 
                   ( 
                   15 
                   ) 
                 
               
             
             
               
                 
                   
                     ? 
                   
                    
                   
                     indicates text missing or illegible when filed 
                   
                 
               
               
                 
                     
                 
               
             
           
         
       
     
     where R &lt;.&gt;  is the predicted future reward. π denotes the trajectories policy, which is a probability density function over a set of possible actions that can take place in a given state. The optimal action-value function Q i *(⋅,⋅) maps a given state to the optimal behavior policy of agent i in any state: 
     In the context of equation 15, a loss function is defined, which estimates how well the temporal deep network mimics given manual recorded trajectories, while penalizing the collision avoidance constraint in equation 9: 
         l ( Q ( S,z   d   ,Θ,z   d )=( z   d   −Q ( s,z   d ;Θ)) 2   +D   T   AD,   (16)
 
     where A is a positive semidefinite diagonal matrix, which weights the inter-agents distance penalty. 
     The deep network&#39;s parameters are learned by minimizing the loss function of equation (16) in the maximum likelihood estimation setup of equation (13): 
     
       
         
           
             
               
                 
                   
                       
                   
                    
                   
                     
                       ? 
                     
                     = 
                     
                       
                         argmin 
                         Θ 
                       
                        
                       
                         
                           l 
                           ( 
                           
                             
                               Q 
                               ( 
                               
                                 s 
                                 , 
                                 
                                   
                                     z 
                                     d 
                                   
                                   ; 
                                   Θ 
                                 
                               
                               ) 
                             
                             , 
                             
                               z 
                               d 
                             
                           
                           ) 
                         
                         . 
                       
                     
                   
                 
               
               
                 
                   ( 
                   17 
                   ) 
                 
               
             
             
               
                 
                   
                     ? 
                   
                    
                   
                     indicates text missing or illegible when filed 
                   
                 
               
               
                 
                     
                 
               
             
           
         
       
     
     The deep network of  FIG. 4  is trained only once and then applied for all agents. 
     On top of the temporal deep networks&#39; predictions of future desired states, the cost function is defined to be optimized by the distributed nonlinear model predictive control in the discrete time interval [t+1,t+τ s ] as: 
         J   i ( z   i   ,u   i )=( z   d     i     −z   i ) T   Q ( z   d     i     −z   i )+ u   i   T   Ru   i ,  (18)
 
     where i represents the t-th agent, Q∈   τ     f     N×τ     f     N  vis positive semi-definite, R∈   τ     f     M×τ     f     M  is positive definite, z d     i   = d     i     &lt;t+1,t+τ     f     &gt; =[z d     i     &lt;t+1&gt; , . . . , z d     i     &lt;t+τ     f     &gt; ] is a sequence of desired states estimated by the deep network, z i =z i   &lt;t+1,t+τ     f     &gt; =[z i   &lt;t+1&gt; , . . . , z i   &lt;t+τ     f     &gt; ] is the sequence of predicted states, and u i   &lt;t,t+τ     f     −1&gt; =[u u   &lt;t&gt; , . . . , u u   &lt;t+τ     f     −1&gt; ] is the control input sequence. R weights the penalty on the control effort. 
     The objective of distributed nonlinear model predictive control is to find a set of control actions which optimize the agent&#39;s behavior over a given time horizon τ f , while satisfying a set of hard and/or soft constraints: 
     
       
         
           
             
               
                 
                   
                     
                       ( 
                       
                         
                           z 
                           
                             opt 
                             i 
                           
                           
                             &lt; 
                             
                               t 
                               + 
                               1 
                             
                             &gt; 
                           
                         
                         , 
                         
                           u 
                           
                             opt 
                             i 
                           
                           
                             &lt; 
                             
                               t 
                               + 
                               1 
                             
                             &gt; 
                           
                         
                       
                       ) 
                     
                     = 
                     
                       
                         
                           
                             argmin 
                              
                             J 
                           
                           
                             
                               z 
                               i 
                             
                             , 
                             
                               u 
                               i 
                             
                           
                         
                          
                         
                           ( 
                           
                             
                               ? 
                             
                             , 
                             
                               ? 
                             
                           
                           ) 
                         
                       
                       = 
                       
                         
                           such 
                            
                           
                               
                           
                            
                           
                             tha 
                              
                             t 
                           
                            
                           
                             
                                 
                             
                              
                             
                                 
                             
                           
                            
                           
                             z 
                             i 
                             
                               &lt; 
                               0 
                               &gt; 
                             
                           
                         
                         = 
                         
                           
                             z 
                             i 
                             
                               &lt; 
                               t 
                               &gt; 
                             
                           
                           = 
                           
                             
                               z 
                               i 
                               
                                 &lt; 
                                 
                                   t 
                                   + 
                                   k 
                                   + 
                                   1 
                                 
                                 &gt; 
                               
                             
                             = 
                             
                               f 
                                
                               
                                 ( 
                                 
                                   
                                     z 
                                     i 
                                     
                                       &lt; 
                                       t 
                                       &gt; 
                                     
                                   
                                   , 
                                   
                                     u 
                                     i 
                                     
                                       &lt; 
                                       t 
                                       &gt; 
                                     
                                   
                                 
                                 ) 
                               
                             
                           
                         
                       
                     
                   
                   , 
                   
                     = 
                     
                       
                         e 
                         min 
                         
                           &lt; 
                           
                             t 
                             + 
                             k 
                           
                           &gt; 
                         
                       
                       ≤ 
                       
                         e 
                         i 
                         
                           &lt; 
                           
                             t 
                             + 
                             k 
                           
                           &gt; 
                         
                       
                       ≤ 
                       
                         e 
                         max 
                         
                           &lt; 
                           
                             t 
                             + 
                             k 
                           
                           &gt; 
                         
                       
                     
                   
                   , 
                   
                     = 
                     
                       
                         u 
                         min 
                         
                           &lt; 
                           
                             t 
                             + 
                             k 
                           
                           &gt; 
                         
                       
                       ≤ 
                       
                         u 
                         i 
                         
                           &lt; 
                           
                             t 
                             + 
                             k 
                           
                           &gt; 
                         
                       
                       ≤ 
                       
                         u 
                         max 
                         
                           &lt; 
                           
                             t 
                             + 
                             k 
                           
                           &gt; 
                         
                       
                     
                   
                   , 
                   
                     = 
                     
                       
                         
                           u 
                           . 
                         
                         min 
                         
                           &lt; 
                           
                             t 
                             + 
                             k 
                           
                           &gt; 
                         
                       
                       ≤ 
                       
                         
                           
                             
                               u 
                               . 
                             
                             i 
                             
                               &lt; 
                               
                                 t 
                                 + 
                                 k 
                               
                               &gt; 
                             
                           
                           - 
                           
                             
                               u 
                               . 
                             
                             i 
                             
                               &lt; 
                               
                                 t 
                                 + 
                                 k 
                                 - 
                                 1 
                               
                               &gt; 
                             
                           
                         
                         
                           Δ 
                            
                           
                               
                           
                            
                           t 
                         
                       
                       ≤ 
                       
                         
                           u 
                           . 
                         
                         max 
                         
                           &lt; 
                           
                             t 
                             + 
                             k 
                             - 
                             1 
                           
                           &gt; 
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   19 
                   ) 
                 
               
             
             
               
                 
                   
                     ? 
                   
                    
                   
                     indicates text missing or illegible when filed 
                   
                 
               
               
                 
                     
                 
               
             
           
         
       
     
     where k=0,1, . . . , τ f , z &lt;0&gt;  is the initial state and Δt is the sampling time of the controller. e i   &lt;t+k&gt; =z d     i     &lt;t+k&gt; −z i   &lt;t+1&gt;  is the cross-track error, e min   &lt;t+k&gt;  and e min   &lt;t+k&gt;  are the lower and upper tracking bounds, respectively. Additionally, u min   &lt;t+k&gt; , {dot over (u)} min   &lt;t+k&gt;  and u max   &lt;t+k&gt; , {dot over (u)} max   &lt;t+k&gt;  are considered as lower and upper constraint bounds for the actuator and actuator rate of change, respectively. The multi-agent deep learning-based nonlinear model predictive controller implements 
         u   &lt;t&gt;   =u   opt   &lt;t+1&gt;   (20)
 
     at each iteration t. 
     Use is made of the quadratic cost function of equation (18) and the nonlinear optimization problem described above is solved using the Broyden-Fletcher-Goldfarb-Shanno algorithm. The quadratic form allows applying the quasi-Newton optimization method, without the need to specify the Hessian matrix. 
       FIG. 5  schematically illustrates a method for training a temporal deep network according to the invention. In a first step, trajectories are acquired  10  from manually driving agents in a test environment. The temporal deep network is then trained  11  using inverse reinforcement learning based on the acquired trajectories. During training, parameters of the temporal deep network are preferably learned by minimizing a loss function in a maximum likelihood estimation setup. 
       FIG. 6  schematically illustrates a block diagram of a first embodiment of an apparatus  20  for training a temporal deep network according to the invention. The apparatus  20  has an input  21  for receiving data, in particular trajectories acquired from manually driving agents in a test environment. The apparatus  20  further has a processor  22 , which is configured to train the temporal deep network using inverse reinforcement learning based on the acquired trajectories. During training, parameters of the temporal deep network are preferably learned by minimizing a loss function in a maximum likelihood estimation setup. Data generated by the processor  22  may be provided for further processing via an output  25 . A local storage unit  24  is provided, e.g. for storing data during processing. The output  25  may also be combined with the input  21  into a single bidirectional interface. 
     The processor  22  may be controlled by a controller  23 . A user interface  26  may be provided for enabling a user to modify settings of the processor  22  or the controller  23 . The processor  22  and the controller  23  can be embodied as dedicated hardware units. Of course, they may likewise be fully or partially combined into a single unit or implemented as software running on a processor, e.g. a CPU or a GPU. 
     A block diagram of a second embodiment of an apparatus  30  for training a temporal deep network according to one aspect of the invention is illustrated in  FIG. 7 . The apparatus  30  comprises a processing device  31  and a memory device  32 . For example, the apparatus  30  may be a computer, a workstation or a distributed system. The memory device  32  has stored instructions that, when executed by the processing device  31 , cause the apparatus  30  to perform steps according to one of the described methods. The instructions stored in the memory device  32  thus tangibly embody a program of instructions executable by the processing device  31  to perform program steps as described herein according to the present principles. The apparatus  30  has an input  33  for receiving data. Data generated by the processing device  31  are made available via an output  34 . In addition, such data may be stored in the memory device  32 . The input  33  and the output  34  may be combined into a single bidirectional interface. 
     The processing device  31  as used herein may include one or more processing units, such as microprocessors, digital signal processors, or a combination thereof. 
     The local storage unit  24  and the memory device  32  may include volatile and/or non-volatile memory regions and storage devices such as hard disk drives, optical drives, and/or solid-state memories. 
     Thus, while there have shown and described and pointed out fundamental novel features of the invention as applied to a preferred embodiment thereof it will be understood that various omissions and substitutions and changes in the form and details of the devices illustrated, and in their operation, may be made by those skilled in the art without departing from the spirit of the invention. For example, it is expressly intended that all combinations of those elements and/or method steps which perform substantially the same function in substantially the same way to achieve the same results are within the scope of the invention. Moreover, it should be recognized that structures and/or elements and/or method steps shown and/or described in connection with any disclosed form or embodiment of the invention may be incorporated in any other disclosed or described or suggested form or embodiment as a general matter of design choice. It is the intention, therefore, to be limited only as indicated by the scope of the claims appended hereto.