Patent Publication Number: US-8538901-B2

Title: Method for approximation of optimal control for nonlinear discrete time systems

Description:
BACKGROUND OF THE INVENTION 
     I. Field of the Invention 
     The present invention relates to a method for approximating optimal control variables of a nonlinear discrete time system. 
     II. Description of Related Art 
     The use of neural networks simulated by one or more processors has enjoyed increased popularity for the control of discrete nonlinear time systems. Such neural networks are defined by a plurality of nodes having one or more inputs and one or more outputs. In recurrent neural networks, at least one of the outputs forms a feedback input to the network. 
     In order to obtain the appropriate weights for each of the nodes in the neural network, it has been previously necessary to train the neural network using conventional training techniques. These techniques include, for example, applying known or desired state variables and training the network to produce known or desired outputs. 
     One disadvantage to recurrent neural networks, however, is that, due to the feedback inherent in a recurrent neural network, training of the neural network provides feedback/parameterized solutions for the network in which the control variables are necessarily dependent on each other. This, however, oftentimes results in solutions for the neural network having local minima. Such local minima, of course, are undesirable and detract from the overall operation of the neural network. 
     SUMMARY OF THE PRESENT INVENTION 
     The present invention provides a method for the approximation of optimal control for nonlinear discrete time systems which overcomes the above-mentioned disadvantages of the previously known methods. 
     In brief, in the method of the present invention, the state variables are first obtained offline from a system model. These state variables may be either obtained directly from the system data itself or by experimentation on a high fidelity system simulator. 
     Control sequences are then iteratively generated to optimize desired control variables for subsequent training of a recurrent neural network. During this generation of control sequences, the value of each control variable is independent of the other control variables for the network. 
     After optimization of the independent control variables, the independent control variables are then mapped onto a recurrent neural network implemented by a processor using conventional training methods. 
     Since the control variables are independent of each other during the optimization step, the previously known occurrences of local minima using less than optimal control variables are eliminated. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWING 
       A better understanding of the present invention will be had upon reference to the following detailed description when read in conjunction with the accompanying drawing, wherein like reference characters refer to like parts throughout the several views, and in which: 
       The sole FIGURE is a flowchart illustrating the operation of the present invention. 
     
    
    
     DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT OF THE PRESENT INVENTION 
     With reference to the drawing, at step  10  a neural network model is first identified and the state variables, i.e., the conditions of the neural network, are obtained. The neural network model may be obtained from a system itself or by experimentation in a high fidelity system simulator. 
     The neural network (N) model obtained at step  10  has the following form:
 
 x ( n+ 1)= f ( x ( n ), u ( n ))
 
 y ( n+ 1)= h ( x ( n+ 1))  (1)
 
where both f and h are differentiable functions, and the dimensionality of the vector y (the output vector) is usually much smaller than that of the vector x (the internal state vector), e.g., dim(y)=2 and dim(x)=10. The reason for that may be understood from this observation. Suppose that the NN model does not have the output vector-function h, and some of its states are assigned to approximate the system outputs, and such outputs are termed state-outputs x o . When such NN is tasked with approximation of a complicated nonlinear system, it is usually very easy to obtain a good match between the NN state-outputs and the system outputs because the NN often “cheats” by producing x o (n+1)≈x o (n) which are just the delayed versions of x o . Such NN is usually a poor approximator of other properties of the system, e.g., Jacobians, etc. The NN is prevented from “cheating” by eliminating the state-outputs altogether and adopting the architecture (1).
 
     After identification of the neural network model and state variables at step  10 , step  10  proceeds to step  20 . At step  20 , the control variables are optimized by iteratively generating control sequences and in which each control variable is independent of the other control variables in the sequence. 
     More specifically, in order to generate the control sequences, the original algorithm uses actual equations of the system (while we employ its NN model) which is supposed to be linearized many times at different operating points along the system trajectories. The algorithm is both effective and efficient, as it will become apparent from the description below. 
     The algorithm assumes the standard quadratic performance index to be minimized over time n=1, 2, . . . , N: 
                     J   ⁡     (   n   )       =         ∑     i   =   n       N   -   1       ⁢     L   ⁡     (       x   ⁡     (   i   )       ,     u   ⁡     (   i   )       ,   i     )         +     φ   ⁡     (     x   ⁡     (   N   )       )                 (   2   )                   L   ⁡     (       x   ⁡     (   n   )       ,     u   ⁡     (   n   )       ,   n     )       )     =         1   2     ⁢   Δ   ⁢           ⁢       x   T     ⁡     (   n   )       ⁢     Q   ⁡     (   n   )       ⁢   Δ   ⁢           ⁢     x   ⁡     (   n   )         +     Δ   ⁢           ⁢       u   T     ⁡     (   n   )       ⁢     R   ⁡     (   n   )       ⁢   Δ   ⁢           ⁢     u   ⁡     (   n   )                   (   3   )               
and the terminal condition
 
                     φ   ⁡     (     x   ⁡     (   N   )       )       =       1   2     ⁢       Δ   T     ⁡     (   N   )       ⁢     Q   ⁡     (   N   )       ⁢   Δ   ⁢           ⁢     x   ⁡     (   N   )                 (   4   )               
where the weighting matrices Q(n)&gt;0, R(n)&gt;0, the difference vectors Δx(n)=x(n)−x d (n), Δu(n)=u(n)−u d (n), and x d (n), u d (n) are target state and control sequences (if specified; often they are all zero with the exception of x d (N)).
 
     The constraint on the index minimization is specified as
 
 x ( n+ 1)= f ( x ( n ), u ( n ))  (5)
 
where fεC 1 . Note that this system does not have the output function h as in (1), but this demonstrates the essence of the approach without the complication of the output function.
 
     The control theoretic approach to this problem is based on solving first order (necessary) optimality conditions by employing the Riccati equation. For completeness, the derivation for the optimal control sequence is shown below.
 
 x ( n+ 1)= A ( n ) x ( n )+ B ( n ) u ( n )  (6)
 
λ T ( n )=Δ x   T ( n ) Q ( n )+λ T ( n+ 1) A ( n )  (7)
 
δ J ( n )/δ u ( n )=Δ u   T ( n ) R ( n )+λ T ( n+ 1) B ( n )=0  (8)
 
where A(n)=f x (x(n), u(n)) is the state Jacobian of f, B(n)=f u (x(n), u(n)) is the control Jacobian of f, and λ T (n)=δJ(n)/δx(n) is the adjoint state vector.
 
     The dynamics (6) runs forward in time with initial condition x(0), whereas the adjoint dynamics (7) runs backward in time with final condition λ T (N)=Δx T (N)Q(N). From (8) we obtain
 
 u ( n )= u   d ( n )− R   −1 ( n ) B   T ( n )λ( n+ 1)  (9)
 
The classic two-point boundary value problem is obtained below by substituting (9) into (6) and (7):
 
 x ( n+ 1)= A ( n ) x ( n )− B ( n ) R   −1 ( n ) B   T ( n )λ( n+ 1)+ B ( n ) u   d ( n )  (10)
 
λ T ( n )= Q ( n ) x ( n )+ A   T ( n )λ( n+ 1)− Q ( n ) x   d ( n )  (11)
 
The system above is usually solved by the sweep method [1] based on the assumed form for the adjoint vector:
 
λ( n )= P ( n ) x ( n )+ s ( n )  (12)
 
where P(n) and s(n) are determined from the process below. First, the final values of P and s are set: P(N)=Q(N) and s(N)=−Q(N)x d (N). Substituting (12) in (10) yields
 
 x ( n+ 1)= M ( n ) A ( n ) x ( n )+ v ( n )  (13)
 
where
 
 M ( n )=( I+B ( n ) R   −1 ( n ) B   T ( n ) P ( n+ 1)) −1   (14)
 
 v ( n )= M ( n ) B ( n )( u   d ( n )− R   −1 ( n ) B   T ( n ) s ( n+ 1))  (15)
 
More substitutions and algebra result in the following Riccati difference equation:
 
                           ⁢       P   ⁡     (   n   )       =       Q   ⁡     (   n   )       +         A   T     ⁡     (   n   )       ⁢     P   ⁡     (     n   +   1     )       ⁢     M   ⁡     (   n   )       ⁢     A   ⁡     (   n   )                     (   16   )                 s   ⁡     (   n   )       =           A   T     ⁡     (   n   )       ⁢     (     I   -       P   ⁡     (     n   +   1     )       ⁢     M   ⁡     (   n   )       ⁢     B   ⁡     (   n   )       ⁢       R     -   1       ⁡     (   n   )       ⁢       B   T     ⁡     (   n   )           )     ×     s   ⁡     (     n   +   1     )         +         A   T     ⁡     (   n   )       ⁢     P   ⁡     (     n   +   1     )       ⁢     M   ⁡     (   n   )       ⁢     B   ⁡     (   n   )       ⁢       u   d     ⁡     (   n   )         -       Q   ⁡     (   n   )       ⁢       x   d     ⁡     (   n   )                   (   17   )               
The equations (16) and (17) are solved together backward in time ((17) is unnecessary if x d (n) and u d (n) are zero), resulting in the sequences of P(n) and s(n) used for forward computations of optimal control and state trajectories.
 
     According to the algorithm, the optimal control sequence is determined iteratively. The control sequence at iteration k+1 is determined on the basis of the control sequence at stage k, U k =[u T (0) u T (1) . . . u T (N−1)], and the corresponding state sequence X k =[X T (1) X T (2) . . . X T (N)]. The system (5) is linearized around the trajectory of U k  and X k , as in (6). The Riccati difference equation (16) and equation (17) are then solved to refine the control sequence based on (9) which defines Ū k =[ū T (0) ū T (1) . . . ū T (N−1)], each ū denoting the left-hand side of (9). Thus, the control sequence at iteration k+1 is determined as
 
 U   k+1   =U   k +γ k   Ū   k   (18)
 
where γ k &gt;0 is a stepsize determined on the basis of line search (small constant stepsize almost always suffices).
 
     The key point of this optimization algorithm is its iterations with gradually refined controls. The iterative nature is due to pointwise linearization of the nonlinear system (5). 
     Though the original algorithm assumes unconstrained state and control variables, the algorithm also applies to constrained problems as well. At least, control constraint handling can be done naturally, in the spirit of interior point optimization methods, e.g., by changing (18) to
 
 U   k+1   =U   k +diag{Γ k   }Ū   k   (19)
 
where Γ k  is an N×N diagonal matrix, its diagonal diag {Γ k } with components set to zero for those control vectors u which are about to violate the control constraints.
 
     During this iterative optimization of the control variables, the control variables remain fixed during each forward iteration in time while the state variables vary. Conversely, during the next iteration, i.e. backwards in time, the state variables remain fixed in time while the control variables change in value. Thus, by iteratively repeating the sequence, an overall sequence of the optimal control values is obtained. 
     Following the optimization of the control variables at step  20 , step  20  then proceeds to step  30  where the optimized control sequences with the optimized control variables are then mapped to a recurrent neural network. This is accomplished using conventional training of the neural network. 
     From the foregoing, it can be seen that the present invention provides a “hybrid” method for the optimal control of a nonlinear discrete time system. More specifically, rather than simply use a neural network with conventional training techniques in order to attempt optimization of the system, in the present invention the control variables are calculated by using iterative computations and in which the control variables are independent of each other. In doing so, the final optimized control values, after mapping to the recurrent neural network, mitigate the previously known disadvantages of local minima for the subsequently trained recurrent neural network. 
     Having described my invention, however, many modifications thereto will become apparent to those skilled in the art to which it pertains without deviation from the spirit of the invention as defined by the scope of the appended claims.