An Introduction to ISAT for NMPC by Civet

VIEWS: 0 PAGES: 19

									In Situ Adaptive Tabulation for
        Nonlinear MPC
             J. D. Hedengren
                T. F. Edgar
      The University of Texas at Austin



                Madison, WI
               22 Sept. 2003
                  Outline
•   Introduction to ISAT
•   ISAT Theory
•   NMPC with ISAT
•   ISAT vs. Neural Nets
•   Future Directions
In Situ Adaptive Tabulation (ISAT)
• Developed by Pope1 in 1997 for turbulent
  combustion simulations.
• ASCI C-SAFE application2 at the
  University of Utah in 2002.
• Integrated with FLUENT3, popular
  computational fluid dynamics software.
  Computational Reduction Idea
             Desired Integration          φf
                                                 Approximation
                                                 Error

                                      Αδφ0
  φ0
                                                        u 
       δφ0                              φfISAT        φ= 
                                                         x0 
  φ0ISAT         Nearby ISAT Record

In reacting flow simulations, the integration of the chemistry
model can occur >108 times. ISAT is a storage and retrieval
method for the integrations.
                 ISAT Search
• Binary Tree Architecture
  – Search times are O(log2(N)) compared with O(N) for
    a sequential search


                                 φ    v = φ 2 − φ1
            φ2
                                            φ2 + φ1 
                                      α =v T
                                                     
                                            2 
                            φ1
                 vT φ < α
            ISAT Integration
• Scenario #1: Inside the region of accuracy


                 φ
                        (φ − φ1 )
                                T
                                    M (φ − φ1 ) ≤ ε tol
            φ1
            ISAT Integration
• Scenario #2: Outside the region of accuracy but
  within the error tolerance
                φ
                     (φ − φ1 )
                             T
                                 M (φ − φ1 ) > ε tol

                     Compute Mnew so that the new
           φ1        region is a symmetric, minimum
                     volume ellipsoid that includes φ
            ISAT Integration
• Scenario #3: Outside the region of accuracy
  and outside the error tolerance
                            Define cutting plane
 φ                              v = φ − φ1
                                      φ + φ1 
                                α =v 
                                     T
                                              
                                      2 
                     φ1     Find a conservative
                            estimate for the region
                            of accuracy around φ
                         Nonlinear MPC


              -N     -N+1         -1           0        1     N-1       N

Dynamic Data Reconciliation4
                   def    −1
 min Φ ( x,η , y ) =
  x ,η
                         ∑ [C ( x
                         k =− N
                                       k   , y k ) + Ξ (η k )] + C ( x 0 , y 0 ) + Ξ (η 0 ) s.t.

  y given, u given, xk +1 = F ( xk , uk ), Gxk − η k ≤ g , η k ≥ 0
Dynamic Optimization5
 min Φ( x, u,η ) s.t.
 x ,u ,η

 x0 given, xk +1 = F ( xk , uk ), Duk ≤ d , Gxk − η k ≤ g , η k ≥ 0
                         Nonlinear MPC
                                           Given: Continuous DAE model

                                                        x = f1 ( x, u )
                                                        &
              -N     -N+1         -1   0       1     N-1       N
                                                        0 = f 2 ( x, u )
Dynamic Data Reconciliation1
                   def    −1            Need: Discrete DAE model
 min Φ ( x,η , y ) = ∑ [C ( x k , y k ) + Ξ (η k )] + C ( x 0 , y 0 ) + Ξ (η 0 ) s.t.
  x ,η
                         k =− N

  y given, u given, xk +1 = F ( xk , uk ), Gxk − η k ≤ g , η k ≥ 0
Dynamic Optimization2
 min Φ( x, u,η ) s.t.
  x ,u ,η

  x0 given, xk +1 = F ( xk , u k ), Duk ≤ d , Gxk − η k ≤ g , η k ≥ 0
          ISAT with NMPC
• ISAT replaces the DAE integrator and
  sensitivity calculator


                    u, xinitial

      Optimizer    xfinal, A      ISAT
 NMPC Example with ISAT
                                  32 state binary distillation
Inputs
               x1                 column model
States               Distillate
         x2                       MV: reflux ratio
               RR
                                  CV: distillate composition
Feed
         x17                      Simplex optimizer
                                  Soft constraint on the MV
         x31                      Control Horizon = 10 min
                      Bottoms
               x32                Prediction Horizon = 15 min
                                           Closed Loop Response
                                                                                                 70
                                                       set point                                                                   32 states/ISAT
                            0.94                       32 states/ISAT                                                              32 states
                                                                                                 60
                                                       32 states                                                                   32 states/Linear
Distillate Composition (x A )




                                                       32 states/Linear                          50
                                                                                                          0.28 sec average




                                                                               Speed-up Factor
                            0.93
                                                                                                 40

                                                                                                 30
                            0.92
                                                                                                          0.84 sec average
                                                                                                 20

                            0.91                                                                 10
                                                                                                          12.6 sec average
                                                                                                 0
                                   0   5    10        15      20          25                          1      2          3              4              5
                                             Time (min)                                                           Optimization #
        ISAT Performance
• Successful with ODE and DAE models
• Computational speedup 20 – 500 times
• Storage <100MB for 96 state DAE model
  with εtol = 10-3
                       ISAT vs. Neural Nets
Feed
                                                              6 state dual CSTR model

           V1                   V2
                                                              MV: cooling rate of CSTR 1
                                                   Reaction
       Q   T1                   T2                 A    B
           CA1                  CA2
                                                              CV: product temperature
                                        q   Product
                                                              ISAT and Neural Net used
                                                              the same training data
       7         Layer 1      Layer 2          6
                Hyperbolic    Linear           O              Compared in open loop and
       I
       n
                 tangent
                 sigmoid
                             transfer
                             function
                                               u
                                               t
                                                              closed loop simulations
       p
                 transfer                      p
       u                     6 neurons
       t
                 function                      u              Control Horizon = 0.4 min
                                               t
       s        20 neurons
                                               s
                                                              Prediction Horizon = 0.6 min
                  Open Loop (ISAT vs. Neural Net)
                  460


                  440


                  420
Temperature (K)




                                     Actual
                  400                Neural Net
                                     ISAT

                  380               ISAT Retrieval
                                    ISAT Growth
                  360               ISAT Addition


                  340
                        0   1   2       3         4       5      6   7   8   9   10
                                                      Time (min)
Closed Loop (ISAT vs. Neural Net)
                               455
                                                            set point
                                                            6 states/ISAT
  Reactor #2 Temperature (K)




                                                            6 states
                               450                          6 states/Neural Net



                               445



                               440



                               435
                                     0   0.5       1              1.5             2
                                               Time (min)
            Future Directions
• Develop ISAT in
  C++/Fortran (currently in
  MATLAB)
• Integrate ISAT with
  NMPC toolbox for
  Octave
• Control of Reactive
  Distillation
• Other applications?
• Questions?
                            References
[1] S. B. Pope, Pope, S. B. Computationally Efficient Implementation of Combustion
    Chemistry Using In Situ Adaptive Tabulation. Combustion Theory Modeling
    vol. 1, pp. 41-63, 1997.

[2] C-SAFE, Center for the Simulation of Accidental Fires and Explosions,
    URL: http://www.csafe.utah.edu/, Accessed Sept. 2003.

[3] FLUENT, Reacting Flows, URL:
    http://www.fluent.com/software/fluent/focus/reacting.htm, Accessed Sept. 2003.

[4] M. J. Liebman, T. F. Edgar, and L. S. Lasdon, Efficient data reconciliation and
    estimation for dynamic processes using nonlinear programming techniques,
    Comp. Chem. Eng., 16:963-986, 1992.

[5] M. J. Tenny, S. J. Wright, and J. B. Rawlings, Nonlinear model predictive control
    via feasibility-perturbed sequential quadratic programming, Texas-Wisconsin
    Modeling and Control Consortium, Report TWMCC-2002-02, 2002.

								
To top