Nonsmooth Differential- Algebraic Equations Paul I. Barton Process Systems Engineering Laboratory Massachusetts Institute of Technology
Dynamic Modeling Frameworks in PSE ◆ Trade-off: applicability vs. ease of modeling & solving Hybrid (Discrete/ Continuous) Models Smooth Models Nonsmooth Models (near) Universal Limited Broad applicability applicability applicability Easy to model and Easy to model Often challenging to solve and solve model and solve Generalized Derivative Limited derivative derivative information information information Strong existence Pathological (recently) Strong & uniqueness behaviors existence & theory (hard to exclude uniqueness a priori) theory Complementarity systems Smooth approximation models 2
Hybrid Automaton Framework ◆ Simple const. P flash process: T out ( ) P ( ) = U T out − T t ( ) ! H t M ( ) + M V t ( ) V M = M L t ( ) ( ) = Mh ( ) − M L t ( ) Δ h vap T t ( ) H t V t ( ) ( ) = Cp T t ( ) − T 0 M h V t L ( ) = A - B / T t ( ) ( ) ( ) + C log P sat t ! Q " Ø DAE embedded in hybrid automaton M = = sat ( ) 0 P P T L Mode 3 Mode 1 Mode 2 = > > = M 0 , M 0 > M 0 , M 0 M , M 0 V L V L V L ≥ sat = ≤ sat ( ) sat P P ( T ) P P T P P ( T ) M = 0 = sat ( ) P P T V 3
Hybrid vs. Nonsmooth ◆ Hybrid automaton formulation M = = sat ( ) 0 P P T L Mode 3 Mode 1 Mode 2 = > > = M 0 , M 0 > M 0 , M 0 M , M 0 V L V L V L ≥ sat = ≤ sat P P ( T ) sat ( ) P P T P P ( T ) M = 0 = sat ( ) P P T V ◆ “Continuous” disjunction: ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ M V ( t ) = 0 M V ( t ) > 0 M V ( t ) > 0 ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ M L ( t ) > 0 ⊗ M L ( t ) > 0 ⊗ M L ( t ) = 0 ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ P ≥ P sat ( T ( t )) P = P sat ( T ( t )) P ≤ P sat ( T ( t )) ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦ 4
Hybrid vs. Nonsmooth ◆ “Continuous” disjunction: ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ M V ( t ) = 0 M V ( t ) > 0 M V ( t ) > 0 ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ M L ( t ) > 0 ⊗ M L ( t ) > 0 ⊗ M L ( t ) = 0 ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ P ≥ P sat ( T ( t )) P = P sat ( T ( t )) P ≤ P sat ( T ( t )) ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦ ◆ Nonsmooth equation: ( ) 0 = mid M V ( t ), P − P sat ( T ( t )), − M L ( t ) 5
Nonsmooth Models: Applications ◆ Intensive properties with flow reversals ◆ Flow transitions (laminar, turbulent, choked) ◆ Thermodynamic phase changes ◆ Crystallization kinetics: growth vs. dissolution ◆ Flow control devices, diodes ◆ Irregularities in vessel geometry ◆ Dynamic flux balance analysis (DFBA) systems Ø e.g., aerobic to anaerobic switch ◆ Various “elements” of controllers ◆ Protecting domains of functions (abs) ◆ Piecewise properties ◆ etc., etc. 6
Flow Reversal: Intensive Properties Vessel A ( ) A ( ) x i ( ) x i dM i ( ) ,0 A + min F in ( ) ,0 A t B t dt ( t ) = − max F out B B A dM i dt ( t ) = − dM i ( ) = F in ( ) A t B t dt ( t ); F out Vessel B ( ) Δ h t ( ) − h B t ( ) + Δ h t ( ) h A t ( ) = c A t F out ( ) − h A t ( ) + Δ h t ( ) + ε h A t 7
Multi-component Dynamic VLE Thermodynamic phase equilibrium: ( ) = k i t ( ) x i t ( ) y i t ( ) ( ) ⎛ ⎞ M V t n C n C M V t ( ) ( ) ∑ ∑ 0 = mid − − 1 , x i t y i t , ⎜ ( ) + M L t ( ) ( ) + M L t ( ) ⎟ M V t M V t ⎝ ⎠ i = 1 i = 1 Mass and energy balances: Flow control: ⎛ ⎞ dM i ( ) = F in t ( ) z i t ( ) − F L t ( ) x i t ( ) − F ( ) y i t ( ) P ( t ) − P ( ) max 0, ( ) = c v min V V ( ) t V t ⎜ ⎟ min , V V t F V t 0 dt ⎜ ⎟ P ( t ) − P 0 + ε ⎝ ⎠ dU ( ) = F in t ( ) h in t ( ) − F L t ( ) h L t ( ) − F ( ) h ( ) + Q t ( ) t V t V t ⎛ ⎞ ( ) dt K L t ( ) max 0, ( ) = c l min V L ( ) ⎜ ⎟ ( ) = M L t ( ) x i t ( ) + M V t ( ) y i t ( ) min , V L t F L t M i t ( ) + ε ⎜ ⎟ K L t ⎝ ⎠ n C ( ) = ( ) + M V t ( ) ∑ ( ) ( ) − P M i t M L t ( ) = g V L t + P t 0 K L t ( ) i = 1 ρ L t ( ) = M L t ( ) h L t ( ) + M V t ( ) h ( ) A H t V t ( ) = U ( t ) + P ( t ) V H t 8
Multi-component Phase Change M L = 0 n ( ) C ∑ x i t ≤ 1 i = 1 M V = 0 n ( ) C ∑ y i t ≤ 1 i = 1 Sahlodin, Watson, Barton, AIChE J. 62 (2016): 3334-3351 9
Crystallization Kinetics With the development of continuous crystallization processes, ◆ dissolution has to be considered in dynamic models of crystal size distribution: ( ) ( ) ∂ Vn ( t , z ) + K ( t ) ∂ Vn ( t , z ) = Q in ( t ) n in ( t , z ) − Q out ( t ) n ( t , z ) ∂ t ∂ z ( ) ( ) / x i n D − 1 , k G S ( t ) n G S ( t ) = x i ( t ) − x i sat sat , K ( t ) = min k D S ( t ) S ( t ) With finite volume discretization of the size coordinate: ◆ dN ( ) 1 ( ) ( ) j + − + − = − = − ( ) t G t ( ) N t ( ) N ( ) t D t ( ) N ( ) t N t ( ) Q ( ) t n ( ) t Q ( ) t n t ( ), j 2,..., m 1 − + Δ j j 1 j 1 j in j in , out j dt z ( ) − n 1 = G t ( ) max 0, k S t S t ( ) ( ) G N ≡ Vn , G j j ( ) ( ) n − density of crystals of size j - 1 Δ L < L < j L Δ − n 1 = D t ( ) min k S t S t ( ) ( ) ,0 D j D 10
Crystallization Kinetics Switching between regimes of positive and negative super-saturation: ◆ S(t)-super-saturation ε (t)-volume fraction of solid T1<T2 ( ) = − + − + T t ( ) mid 30,0, 40 80 8 t T1 T2 11
Regularization of Nonsmooth DAEs ◆ Nonsmooth DAEs: x ( t , p ) = f ( t , p , x ( t , p ), y ( t , p )) ! 0 = g ( t , p , x ( t , p ), y ( t , p )) x ( t 0 , p ) = f 0 ( p ) t f p , x , y Ø is piecewise continuous w.r.t. and continuous w.r.t. g Ø is locally Lipschitz continuous Ø “Index 1” Nonsmooth DAEs: generalized differentiation index one Ø Existence, uniqueness, continuous/Lipschitz dependence on parameters, etc. Stechlinski and Barton, Journal Diff. Eqns. 262 (2017): 2254–2285 12
Generalized Differentiation Index f : ! n → ! m ◆ Given locally Lipschitz continuous : Ø Clarke’s Generalized Jacobian { } ∂ f ( x ): = conv H : Jf ( x ( j ) ) → H , x ( j ) → x , x ( j ) ∈ X ! Z f f ( x ) = x Ø Example: ∂ f ( x ) = {1} ∂ f ( x ) = { − 1} ∂ = − f (0) [ 1,1] x Ø “Index-1” Nonsmooth DAE: ∃ ∈∂ { M : [ N M ] g ( , , ( t p x t , ) p y , ( t , ) p )} No singular matrix in the set » If g is C 1 : ⎧ ⎫ ∂ g ( , , ( , ), t p x t p y ( , )) t p ⎨ ⎬ ∂ y ⎩ ⎭ Clarke, Optimization and Nonsmooth Analysis, SIAM, 1990. 13 Stechlinski and Barton, Journal Diff. Eqns. 262 (2017): 2254–2285
The “Red-line” Novartis-MIT Center Mascia et al. “End-to-End Continuous Manufacturing of Pharmaceuticals: Integrated Synthesis, Purification, and Final Dosage Formation”, Angew. Chem. Int. Ed. 2013, 52, 12359 –12363 14
Dynamic Optimization in PSE ◆ Campaign continuous manufacturing: Ø Maximize production, minimize off-spec. Ø “Discrete” phenomena: start-up/shut-down, phase changes, crystal growth/dissolution, etc., etc. Sahlodin and Barton, Ind. Eng. Chem. Res. 54 (2015):11344-11359. 15
Dynamic Optimization of DAEs ◆ In the smooth case: ∂ p , ∂ y ∂ x x ( t , p 0 ), y ( t , p 0 ) ∂ p Ø Semi-explicit index-1 DAE IVP x ( t , p ) = f ( t , p , x ( t , p ), y ( t , p )) ! 0 = g ( t , p , x ( t , p ), y ( t , p )) t t x ( t 0 , p ) = f 0 ( p ) Ø Sensitivity DAEs ∂ p = ∂ f ∂ ! ∂ p + ∂ f ∂ p + ∂ f ∂ x ∂ y x Update p via optimization ∂ x ∂ y ∂ p φ 0 = ∂ g ∂ p + ∂ g ∂ p + ∂ g ∂ x ∂ y ∂ x ∂ y ∂ p ∂ x ∂ p ( t 0 ) = Jf 0 ( p 0 ) p p 0 16
Dynamic Optimization of DAEs ◆ In the nonsmooth case: ∂ x ∂ p , ∂ y x ( t , p 0 ), y ( t , p 0 ) ∂ p Ø Semi-explicit “index-1” DAE IVP ??? x ( t , p ) = f ( t , p , x ( t , p ), y ( t , p )) ! 0 = g ( t , p , x ( t , p ), y ( t , p )) x ( t 0 , p ) = f 0 ( p ) Ø Nonsmooth sensitivity DAEs Update p via optimization φ ??? p p 0 17
Sensitivities of Hybrid Automata x ( k ) = f ( k ) ( t , p , x ( k ) ), S ( k ) ≡ ∂ x ( k ) ∂ g ( k ) ! x ( k ) ≠ 0 Transversality : ∂ x ( k ) ! ∂ p ∂ t ) − S ( ) = − f ) − f ( ( ( ) ⎡ ⎤ k + 1 k + 1 k k S ⎣ ⎦ ∂ p II II ΙΙ I II I I I Galan, Feehery, Barton, App. Num. Math. 31 (1999): 17-47 18
Nonsmooth DAE Sensitivities: Generalized Derivatives ◆ Want generalized derivative elements ∂ x t f ( p 0 ), ∂ y t f ( p 0 ) ∂ x ∂ p ( t f , p 0 ), ∂ y Ø Nonsmooth analog of ∂ p ( t f , p 0 ) Ø Difficult to evaluate in general (lack of sharp calculus rules, etc.) ◆ New tool: lexicographic directional (LD-)derivatives Ø Nonsmooth analog to classical directional derivative Ø Applicable to a wide class of functions (C 1 , PC 1 , convex, arbitrary compositions of such, etc.) Ø Satisfies strict calculus rules (e.g. chain rule) Ø Accurate, automatable and computationally cheap method Khan and Barton, Opt. Meth. & Soft. 30 (2015): 1185-1212 19
Recommend
More recommend