numerical optimal control with daes lecture 11 high index
play

Numerical Optimal Control with DAEs Lecture 11: High-Index DAEs S - PowerPoint PPT Presentation

Numerical Optimal Control with DAEs Lecture 11: High-Index DAEs S ebastien Gros AWESCO PhD course 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 1 / 25 Objectives of the lecture Why are DAEs not always easyto


  1. DAE - 3D pendulum � p e 3 � Model is a semi-explicit DAE with x = v O e 1 F ( x , z , u ) � ˙ � �� � e 2 u � � � p v = ˙ x = m − g e 3 − z u ˙ v m p 0 = p ⊤ p − L 2 p � �� � G ( x ) 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 7 / 25

  2. DAE - 3D pendulum � p e 3 � Model is a semi-explicit DAE with x = v O e 1 F ( x , z , u ) � ˙ � �� � e 2 u � � � p v = ˙ x = m − g e 3 − z u ˙ v m p 0 = p ⊤ p − L 2 p � �� � G ( x ) Consider the root-finding problem to be solved in ˙ x , z : � ˙ � x − F ( x , z , u ) r ( ˙ x , x , z , u ) = = 0 G ( x ) 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 7 / 25

  3. DAE - 3D pendulum � p e 3 � Model is a semi-explicit DAE with x = v O e 1 F ( x , z , u ) � ˙ � �� � e 2 u � � � p v = ˙ x = m − g e 3 − z u ˙ v m p 0 = p ⊤ p − L 2 p � �� � G ( x ) Consider the root-finding problem to be solved in ˙ x , z : � ˙ � x − F ( x , z , u ) r ( ˙ x , x , z , u ) = = 0 G ( x )   Then: I 0 0 x , z r ⊤ =  is rank-deficient. The Newton step does not exist !! ∇ ˙ 0 I p  0 0 0 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 7 / 25

  4. DAE - 3D pendulum � p e 3 � Model is a semi-explicit DAE with x = v O e 1 F ( x , z , u ) � ˙ � �� � e 2 u � � � p v = ˙ x = m − g e 3 − z u ˙ v m p 0 = p ⊤ p − L 2 p � �� � G ( x ) Note that ∂ G ( x ) = 0 !! ∂ z Consider the root-finding problem to be solved in ˙ x , z : � ˙ � x − F ( x , z , u ) r ( ˙ x , x , z , u ) = = 0 G ( x )   Then: I 0 0 x , z r ⊤ =  is rank-deficient. The Newton step does not exist !! ∇ ˙ 0 I p  0 0 0 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 7 / 25

  5. DAE - Delta Robot Lagrange model yields a semi-explicit DAE with: � p − p 1 � 2 − L 2   � p − p 2 � 2 − L 2 G ( x ) =   � p − p 3 � 2 − L 2 where     cos γ k sin γ k 0 L cos α k p k = R z k = − sin γ k cos γ k 0 0     0 0 1 L sin α k � � 0 , 2 π 3 , 4 π using γ 1 , 2 , 3 = . 3 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 8 / 25

  6. DAE - Delta Robot Lagrange model yields a semi-explicit DAE with: � p − p 1 � 2 − L 2   � p − p 2 � 2 − L 2 G ( x ) =   � p − p 3 � 2 − L 2 where     cos γ k sin γ k 0 L cos α k p k = R z k = − sin γ k cos γ k 0 0     0 0 1 L sin α k � � 0 , 2 π 3 , 4 π using γ 1 , 2 , 3 = . 3 Algebraic variables z for the forces in the arms: ∂ G ( x ) = 0 ∂ z 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 8 / 25

  7. DAE - Delta Robot Lagrange model yields a semi-explicit DAE with: � p − p 1 � 2 − L 2   � p − p 2 � 2 − L 2 G ( x ) =   � p − p 3 � 2 − L 2 where     cos γ k sin γ k 0 L cos α k p k = R z k = − sin γ k cos γ k 0 0     0 0 1 L sin α k � � 0 , 2 π 3 , 4 π using γ 1 , 2 , 3 = . 3 Algebraic variables z for the forces in the arms: ∂ G ( x ) = 0 ∂ z Such that the DAE: x = F ( x , z , u ) ˙ 0 = G ( x ) ... cannot be solved for z , because ∂ G ( x ) = 0 !! ∂ z 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 8 / 25

  8. DAE from Lagrange Mechanics Is that a general problem in Lagrange mechanics ? Pretty much ... 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 9 / 25

  9. DAE from Lagrange Mechanics Is that a general problem in Lagrange mechanics ? Pretty much ... The difficulty comes from having holonomic (aka purely position-dependent) constraints: G ( q ) = 0 which ”hold the system together”. 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 9 / 25

  10. DAE from Lagrange Mechanics Is that a general problem in Lagrange mechanics ? Pretty much ... The difficulty comes from having holonomic (aka purely position-dependent) constraints: G ( q ) = 0 which ”hold the system together”. Then the Euler-Lagrange equations: ∂ L q − ∂ L d ∂ q = 0 ∂ ˙ d deliver an explicit ODE for the accelerations ¨ q , involving the algebraic variables z . 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 9 / 25

  11. DAE from Lagrange Mechanics Is that a general problem in Lagrange mechanics ? Pretty much ... The difficulty comes from having holonomic (aka purely position-dependent) constraints: G ( q ) = 0 which ”hold the system together”. Then the Euler-Lagrange equations: ∂ L q − ∂ L d ∂ q = 0 ∂ ˙ d deliver an explicit ODE for the accelerations ¨ q , involving the algebraic variables z . But the forces generated by the algebraic variables z are not defined by the algebraic equations because: ∂ G ( q ) ∂ G ( x ) = 0 and therefore = 0 ∂ z ∂ z 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 9 / 25

  12. DAE from Lagrange Mechanics Is that a general problem in Lagrange mechanics ? Pretty much ... The difficulty comes from having holonomic (aka purely position-dependent) constraints: G ( q ) = 0 which ”hold the system together”. Then the Euler-Lagrange equations: ∂ L q − ∂ L d ∂ q = 0 ∂ ˙ d deliver an explicit ODE for the accelerations ¨ q , involving the algebraic variables z . But the forces generated by the algebraic variables z are not defined by the algebraic equations because: ∂ G ( q ) ∂ G ( x ) = 0 and therefore = 0 ∂ z ∂ z What is going on ?!? 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 9 / 25

  13. Outline ”Easy” & ”Hard” DAEs 1 Differential Index 2 Index Reduction 3 Constraints drift 4 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 10 / 25

  14. DAE - Differential Index 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 11 / 25

  15. DAE - Differential Index Definition: The DAE differential index is the minimum i such that: d i d t i F ( ˙ x , x , z , u ) = 0 is a pure ODE 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 11 / 25

  16. DAE - Differential Index Example: � x 1 − ˙ � Definition: x 1 + 1 F ( ˙ x , x ) = = 0 x 1 x 2 + 2 ˙ The DAE differential index is the minimum i such that: d i d t i F ( ˙ x , x , z , u ) = 0 is a pure ODE 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 11 / 25

  17. DAE - Differential Index Example: � x 1 − ˙ � Definition: x 1 + 1 F ( ˙ x , x ) = = 0 x 1 x 2 + 2 ˙ The DAE differential index is the minimum i Note that: such that: � − 1 � ∂ F 0 x = → this is a DAE d i 1 0 ∂ ˙ d t i F ( ˙ x , x , z , u ) = 0 is a pure ODE 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 11 / 25

  18. DAE - Differential Index Example: � x 1 − ˙ � Definition: x 1 + 1 F ( ˙ x , x ) = = 0 x 1 x 2 + 2 ˙ The DAE differential index is the minimum i Note that: such that: � − 1 � ∂ F 0 x = → this is a DAE d i 1 0 ∂ ˙ d t i F ( ˙ x , x , z , u ) = 0 For i = 1 reads as: is a pure ODE � � x 1 − ¨ ˙ x 1 ˙ F (¨ x , ˙ x , x ) = = 0 x 1 x 2 + ˙ ¨ x 1 ˙ x 2 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 11 / 25

  19. DAE - Differential Index Example: � x 1 − ˙ � Definition: x 1 + 1 F ( ˙ x , x ) = = 0 x 1 x 2 + 2 ˙ The DAE differential index is the minimum i Note that: such that: � − 1 � ∂ F 0 x = → this is a DAE d i 1 0 ∂ ˙ d t i F ( ˙ x , x , z , u ) = 0 For i = 1 reads as: is a pure ODE � � x 1 − ¨ ˙ x 1 ˙ F (¨ x , ˙ x , x ) = = 0 x 1 x 2 + ˙ ¨ x 1 ˙ x 2 Using (to write a 1 st -order ODE)     x 1 s 1 − s 3 ˙ ˙ s ≡ x 2 we have F (˙ s , s ) = s 3 − ˙ s 3     x 1 ˙ s 3 s 2 + s 3 ˙ ˙ s 2 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 11 / 25

  20. DAE - Differential Index Example: � x 1 − ˙ � Definition: x 1 + 1 F ( ˙ x , x ) = = 0 x 1 x 2 + 2 ˙ The DAE differential index is the minimum i Note that: such that: � − 1 � ∂ F 0 x = → this is a DAE d i 1 0 ∂ ˙ d t i F ( ˙ x , x , z , u ) = 0 For i = 1 reads as: is a pure ODE � � x 1 − ¨ ˙ x 1 ˙ F (¨ x , ˙ x , x ) = = 0 x 1 x 2 + ˙ ¨ x 1 ˙ x 2 Using (to write a 1 st -order ODE)     x 1 s 1 − s 3 ˙ ˙ s ≡ x 2 we have F (˙ s , s ) = s 3 − ˙ s 3     x 1 ˙ s 3 s 2 + s 3 ˙ ˙ s 2 And   1 0 0 � ∂ F � ∂ F  , s = 0 0 − 1 with det = s 3 ⇒ now we have an ODE  ∂ ˙ ∂ ˙ s 0 s 3 s 2 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 11 / 25

  21. DAE - Differential Index Example: � x 1 − ˙ � Definition: x 1 + 1 F ( ˙ x , x ) = = 0 x 1 x 2 + 2 ˙ The DAE differential index is the minimum i Note that: such that: � − 1 � ∂ F 0 x = → this is a DAE d i 1 0 ∂ ˙ d t i F ( ˙ x , x , z , u ) = 0 For i = 1 reads as: is a pure ODE � � x 1 − ¨ ˙ x 1 ˙ F (¨ x , ˙ x , x ) = = 0 x 1 x 2 + ˙ ¨ x 1 ˙ x 2 Using (to write a 1 st -order ODE)     x 1 s 1 − s 3 ˙ F is an ˙ s ≡ x 2 we have F (˙ s , s ) = s 3 − ˙ s 3     index-1 DAE x 1 ˙ s 3 s 2 + s 3 ˙ ˙ s 2 And   1 0 0 � ∂ F � ∂ F  , s = 0 0 − 1 with det = s 3 ⇒ now we have an ODE  ∂ ˙ ∂ ˙ s 0 s 3 s 2 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 11 / 25

  22. DAE - Differential Index Definition The DAE differential index is the minimum i such that: How does the differential index relate to the DAE being ”easy” to solve ?? d i d t i F ( ˙ x , x , z , u ) = 0 is a pure ODE 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 12 / 25

  23. DAE - Differential Index Definition The DAE differential index is the minimum i such that: How does the differential index relate to the DAE being ”easy” to solve ?? d i d t i F ( ˙ x , x , z , u ) = 0 is a pure ODE For an index-1 DAE : d x , x , z , u ) = ˙ d t F ( ˙ F = 0 yields a pure ODE. 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 12 / 25

  24. DAE - Differential Index Definition The DAE differential index is the minimum i such that: How does the differential index relate to the DAE being ”easy” to solve ?? d i d t i F ( ˙ x , x , z , u ) = 0 is a pure ODE For an index-1 DAE : d x , x , z , u ) = ˙ d t F ( ˙ F = 0 yields a pure ODE. Observe that: d F = ∂ F x + ∂ F x + ∂ F z + ∂ F d t F = ˙ x ¨ ∂ x ˙ ∂ z ˙ ∂ u ˙ u = 0 ∂ ˙ 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 12 / 25

  25. DAE - Differential Index Definition The DAE differential index is the minimum i such that: How does the differential index relate to the DAE being ”easy” to solve ?? d i d t i F ( ˙ x , x , z , u ) = 0 is a pure ODE For an index-1 DAE : d x , x , z , u ) = ˙ d t F ( ˙ F = 0 yields a pure ODE. Observe that: d F = ∂ F x + ∂ F x + ∂ F z + ∂ F d t F = ˙ x ¨ ∂ x ˙ ∂ z ˙ ∂ u ˙ u = 0 ∂ ˙ Then the ODE reads as (use v = ˙ x ): x = v ˙ � ˙ � � ∂ F � v x + ∂ F � � − 1 ∂ F ∂ F = − ∂ x ˙ ∂ u ˙ u ∂ ˙ z ˙ x ∂ z 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 12 / 25

  26. DAE - Differential Index Definition The DAE differential index is the minimum i such that: How does the differential index relate to the DAE being ”easy” to solve ?? d i d t i F ( ˙ x , x , z , u ) = 0 is a pure ODE For an index-1 DAE : d x , x , z , u ) = ˙ d t F ( ˙ F = 0 yields a pure ODE. Observe that: An index-1 DAE has d F = ∂ F x + ∂ F x + ∂ F z + ∂ F d t F = ˙ x ¨ ∂ x ˙ ∂ z ˙ ∂ u ˙ u = 0 � � ∂ F ∂ F ∂ ˙ ∂ ˙ x ∂ z Then the ODE reads as (use v = ˙ x ): full rank and is therefore x = v ˙ ”easy” to solve !! � ˙ � � ∂ F � v x + ∂ F � � − 1 ∂ F ∂ F = − ∂ x ˙ ∂ u ˙ u ∂ ˙ z ˙ x ∂ z 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 12 / 25

  27. Semi-explicit DAEs - Differential Index For a semi-explicit DAE the differential index is the minimum i such that: x = F ( x , z , u ) ˙ 0 = d i d t i G ( x , z , u ) is an ODE 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 13 / 25

  28. Semi-explicit DAEs - Differential Index Remark: for an index-1 semi-explicit DAE: For a semi-explicit DAE the d t G ( x , z , u ) = ∂ G d ∂ x F + ∂ G z + ∂ G differential index is the ∂ z ˙ ∂ u ˙ u = 0 minimum i such that: yields a pure ODE. x = F ( x , z , u ) ˙ 0 = d i d t i G ( x , z , u ) is an ODE 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 13 / 25

  29. Semi-explicit DAEs - Differential Index Remark: for an index-1 semi-explicit DAE: For a semi-explicit DAE the d t G ( x , z , u ) = ∂ G d ∂ x F + ∂ G z + ∂ G differential index is the ∂ z ˙ ∂ u ˙ u = 0 minimum i such that: yields a pure ODE. We have: x = F ( x , z , u ) ˙ − 1 � ∂ G � 0 = d i z = − ∂ G ∂ x F + ∂ G ˙ ∂ u ˙ u d t i G ( x , z , u ) ∂ z is an ODE such that ∂ G ∂ z is full rank !! 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 13 / 25

  30. Semi-explicit DAEs - Differential Index Remark: for an index-1 semi-explicit DAE: For a semi-explicit DAE the d t G ( x , z , u ) = ∂ G d ∂ x F + ∂ G z + ∂ G differential index is the ∂ z ˙ ∂ u ˙ u = 0 minimum i such that: yields a pure ODE. We have: x = F ( x , z , u ) ˙ − 1 � ∂ G � 0 = d i z = − ∂ G ∂ x F + ∂ G ˙ ∂ u ˙ u d t i G ( x , z , u ) ∂ z is an ODE such that ∂ G ∂ z is full rank !! Example: � ˙ � 0 � � x 1 � 0 � � � x 1 1 = + z x 2 ˙ 0 0 x 2 1 0 = 1 � � x 2 1 + x 2 2 − 1 2 � �� � G ( x ) 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 13 / 25

  31. Semi-explicit DAEs - Differential Index Remark: for an index-1 semi-explicit DAE: For a semi-explicit DAE the d t G ( x , z , u ) = ∂ G d ∂ x F + ∂ G z + ∂ G differential index is the ∂ z ˙ ∂ u ˙ u = 0 minimum i such that: yields a pure ODE. We have: x = F ( x , z , u ) ˙ − 1 � ∂ G � 0 = d i z = − ∂ G ∂ x F + ∂ G ˙ ∂ u ˙ u d t i G ( x , z , u ) ∂ z is an ODE such that ∂ G ∂ z is full rank !! Example: � ˙ � 0 � � x 1 � 0 � � � x 1 1 = + z x 2 ˙ 0 0 x 2 1 0 = 1 � � x 2 1 + x 2 2 − 1 2 � �� � G ( x ) Then d d t G = x 1 x 2 + x 2 z = 0 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 13 / 25

  32. Semi-explicit DAEs - Differential Index Remark: for an index-1 semi-explicit DAE: For a semi-explicit DAE the d t G ( x , z , u ) = ∂ G d ∂ x F + ∂ G z + ∂ G differential index is the ∂ z ˙ ∂ u ˙ u = 0 minimum i such that: yields a pure ODE. We have: x = F ( x , z , u ) ˙ − 1 � ∂ G � 0 = d i z = − ∂ G ∂ x F + ∂ G ˙ ∂ u ˙ u d t i G ( x , z , u ) ∂ z is an ODE such that ∂ G ∂ z is full rank !! Example: � ˙ � 0 � � x 1 � 0 � � � x 1 1 = + z x 2 ˙ 0 0 x 2 1 0 = 1 � � x 2 1 + x 2 2 − 1 2 � �� � G ( x ) Then d d t G = x 1 x 2 + x 2 z = 0 d 2 d t 2 G = ˙ x 1 x 2 + x 1 ˙ x 2 + ˙ x 2 z + x 2 ˙ z = 0 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 13 / 25

  33. Semi-explicit DAEs - Differential Index Remark: for an index-1 semi-explicit DAE: For a semi-explicit DAE the d t G ( x , z , u ) = ∂ G d ∂ x F + ∂ G z + ∂ G differential index is the ∂ z ˙ ∂ u ˙ u = 0 minimum i such that: yields a pure ODE. We have: x = F ( x , z , u ) ˙ − 1 � ∂ G � 0 = d i z = − ∂ G ∂ x F + ∂ G ˙ ∂ u ˙ u d t i G ( x , z , u ) ∂ z is an ODE such that ∂ G ∂ z is full rank !! Example: � ˙ � 0 � � x 1 � 0 � � � x 1 1 = + z x 2 ˙ 0 0 x 2 1 0 = 1 � � x 2 1 + x 2 2 − 1 2 � �� � G ( x ) Example is an index-2 DAE Then d d t G = x 1 x 2 + x 2 z = 0 d 2 d t 2 G = ˙ x 1 x 2 + x 1 ˙ x 2 + ˙ x 2 z + x 2 ˙ z = 0 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 13 / 25

  34. For a semi-explicit DAE Differential Index - 3D pendulum the differential index is Example: 3D pendulum the minimum i such that: m ¨ p = u − mg e 3 − z p x = F ( x , z , u ) ˙ 0 = 1 � p ⊤ p − L 2 � 0 = d i 2 d t i G ( x , z , u ) � �� � G ( x ) is an ODE e 3 O e 1 e 2 u p 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 14 / 25

  35. For a semi-explicit DAE Differential Index - 3D pendulum the differential index is Example: 3D pendulum the minimum i such that: m ¨ p = u − mg e 3 − z p x = F ( x , z , u ) ˙ 0 = 1 � p ⊤ p − L 2 � 0 = d i 2 d t i G ( x , z , u ) � �� � G ( x ) is an ODE Perform two time differentiations on G yields: e 3 � � G = 1 p ⊤ ˙ p ⊤ ˙ ¨ p ⊤ p + p ⊤ ¨ = p ⊤ ¨ ¨ p + 2 ˙ p + ˙ p = 0 p 2 O e 1 e 2 u p 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 14 / 25

  36. For a semi-explicit DAE Differential Index - 3D pendulum the differential index is Example: 3D pendulum the minimum i such that: m ¨ p = u − mg e 3 − z p x = F ( x , z , u ) ˙ 0 = 1 � p ⊤ p − L 2 � 0 = d i 2 d t i G ( x , z , u ) � �� � G ( x ) is an ODE Perform two time differentiations on G yields: e 3 � � G = 1 p ⊤ ˙ p ⊤ ˙ ¨ p ⊤ p + p ⊤ ¨ = p ⊤ ¨ ¨ p + 2 ˙ p + ˙ p = 0 p 2 O e 1 Substitute ¨ p from m ¨ p = u − mg e 3 − z p yields: e 2 u � 1 � m u − g e 3 − 1 p ⊤ ˙ p ⊤ m z p + ˙ p = 0 p 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 14 / 25

  37. For a semi-explicit DAE Differential Index - 3D pendulum the differential index is Example: 3D pendulum the minimum i such that: m ¨ p = u − mg e 3 − z p x = F ( x , z , u ) ˙ 0 = 1 � p ⊤ p − L 2 � 0 = d i 2 d t i G ( x , z , u ) � �� � G ( x ) is an ODE Perform two time differentiations on G yields: e 3 � � G = 1 p ⊤ ˙ p ⊤ ˙ ¨ p ⊤ p + p ⊤ ¨ = p ⊤ ¨ ¨ p + 2 ˙ p + ˙ p = 0 p 2 O e 1 Substitute ¨ p from m ¨ p = u − mg e 3 − z p yields: e 2 u � 1 � m u − g e 3 − 1 p ⊤ ˙ p ⊤ m z p + ˙ p = 0 p i.e. 1 � � p ⊤ ˙ p ⊤ u − mg p ⊤ e 3 + m ˙ z = p p ⊤ p 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 14 / 25

  38. For a semi-explicit DAE Differential Index - 3D pendulum the differential index is Example: 3D pendulum the minimum i such that: m ¨ p = u − mg e 3 − z p x = F ( x , z , u ) ˙ 0 = 1 � p ⊤ p − L 2 � 0 = d i 2 d t i G ( x , z , u ) � �� � G ( x ) is an ODE Perform two time differentiations on G yields: e 3 � � G = 1 p ⊤ ˙ p ⊤ ˙ ¨ p ⊤ p + p ⊤ ¨ = p ⊤ ¨ ¨ p + 2 ˙ p + ˙ p = 0 p 2 O e 1 Substitute ¨ p from m ¨ p = u − mg e 3 − z p yields: e 2 u � 1 � m u − g e 3 − 1 p ⊤ ˙ p ⊤ m z p + ˙ p = 0 p i.e. 1 � � p ⊤ ˙ p ⊤ u − mg p ⊤ e 3 + m ˙ z = p p ⊤ p A third time differentiation yields an ODE for z : � �� � z = d 1 p ⊤ ˙ p ⊤ u − mg p ⊤ e 3 + m ˙ ˙ p d t p ⊤ p 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 14 / 25

  39. For a semi-explicit DAE Differential Index - 3D pendulum the differential index is Example: 3D pendulum the minimum i such that: m ¨ p = u − mg e 3 − z p x = F ( x , z , u ) ˙ 0 = 1 � p ⊤ p − L 2 � 0 = d i 2 d t i G ( x , z , u ) � �� � G ( x ) is an ODE Perform two time differentiations on G yields: e 3 � � G = 1 p ⊤ ˙ p ⊤ ˙ ¨ p ⊤ p + p ⊤ ¨ = p ⊤ ¨ ¨ p + 2 ˙ p + ˙ p = 0 p 2 O e 1 Substitute ¨ p from m ¨ p = u − mg e 3 − z p yields: e 2 u � 1 � m u − g e 3 − 1 p ⊤ ˙ p ⊤ m z p + ˙ p = 0 p i.e. 1 � � p ⊤ ˙ p ⊤ u − mg p ⊤ e 3 + m ˙ z = p The 3D pendulum in p ⊤ p Lagrange is an index-3 A third time differentiation yields an ODE for z : DAE !! � �� � z = d 1 p ⊤ ˙ p ⊤ u − mg p ⊤ e 3 + m ˙ ˙ p d t p ⊤ p 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 14 / 25

  40. For a semi-explicit DAE Differential Index - 3D pendulum the differential index is Example: 3D pendulum the minimum i such that: m ¨ p = u − mg e 3 − z p x = F ( x , z , u ) ˙ 0 = 1 � p ⊤ p − L 2 � 0 = d i 2 d t i G ( x , z , u ) � �� � G ( x ) is an ODE Perform two time differentiations on G yields: e 3 � � G = 1 p ⊤ ˙ p ⊤ ˙ ¨ p ⊤ p + p ⊤ ¨ = p ⊤ ¨ ¨ p + 2 ˙ p + ˙ p = 0 p 2 O e 1 Assemble: e 2 u m ¨ p + z p = u − mg e 3 p ⊤ ˙ p ⊤ ¨ p = − ˙ p p 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 14 / 25

  41. For a semi-explicit DAE Differential Index - 3D pendulum the differential index is Example: 3D pendulum the minimum i such that: m ¨ p = u − mg e 3 − z p x = F ( x , z , u ) ˙ 0 = 1 � p ⊤ p − L 2 � 0 = d i 2 d t i G ( x , z , u ) � �� � G ( x ) is an ODE Perform two time differentiations on G yields: e 3 � � G = 1 p ⊤ ˙ p ⊤ ˙ ¨ p ⊤ p + p ⊤ ¨ = p ⊤ ¨ ¨ p + 2 ˙ p + ˙ p = 0 p 2 O e 1 Assemble: e 2 u m ¨ p + z p = u − mg e 3 p ⊤ ˙ p ⊤ ¨ p = − ˙ p p in matrix form yields: � mI � � ¨ � u − mg e 3 � � p p = p ⊤ ˙ p ⊤ 0 z − ˙ p 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 14 / 25

  42. For a semi-explicit DAE Differential Index - 3D pendulum the differential index is Example: 3D pendulum the minimum i such that: m ¨ p = u − mg e 3 − z p x = F ( x , z , u ) ˙ 0 = 1 � p ⊤ p − L 2 � 0 = d i 2 d t i G ( x , z , u ) � �� � G ( x ) is an ODE Perform two time differentiations on G yields: e 3 � � G = 1 p ⊤ ˙ p ⊤ ˙ ¨ p ⊤ p + p ⊤ ¨ = p ⊤ ¨ ¨ p + 2 ˙ p + ˙ p = 0 p 2 O e 1 Assemble: e 2 u m ¨ p + z p = u − mg e 3 p ⊤ ˙ p ⊤ ¨ p = − ˙ p p in matrix form yields: � mI � � ¨ � u − mg e 3 � � p p = p ⊤ ˙ p ⊤ 0 z − ˙ p This is an index-1 (i.e. ”easy”) DAE !! 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 14 / 25

  43. For a semi-explicit DAE Differential Index - 3D pendulum the differential index is Example: 3D pendulum the minimum i such that: m ¨ p = u − mg e 3 − z p x = F ( x , z , u ) ˙ 0 = 1 � p ⊤ p − L 2 � 0 = d i 2 d t i G ( x , z , u ) � �� � G ( x ) is an ODE Perform two time differentiations on G yields: e 3 � � G = 1 p ⊤ ˙ p ⊤ ˙ ¨ p ⊤ p + p ⊤ ¨ = p ⊤ ¨ ¨ p + 2 ˙ p + ˙ p = 0 p 2 O e 1 Assemble: e 2 u m ¨ p + z p = u − mg e 3 p ⊤ ˙ p ⊤ ¨ p = − ˙ p p in matrix form yields: � mI � � ¨ � u − mg e 3 � � p p We have converted the = p ⊤ ˙ p ⊤ 0 z − ˙ index-3 DAE into an p index-1 DAE !! This is an index-1 (i.e. ”easy”) DAE !! 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 14 / 25

  44. For a semi-explicit DAE Differential Index - 3D pendulum the differential index is Example: 3D pendulum the minimum i such that: m ¨ p = u − mg e 3 − z p x = F ( x , z , u ) ˙ 0 = 1 � p ⊤ p − L 2 � 0 = d i 2 d t i G ( x , z , u ) � �� � G ( x ) is an ODE Perform two time differentiations on G yields: e 3 � � G = 1 p ⊤ ˙ p ⊤ ˙ ¨ p ⊤ p + p ⊤ ¨ = p ⊤ ¨ ¨ p + 2 ˙ p + ˙ p = 0 p 2 O e 1 e 2 u Transforming a high-index DAE into an equivalent lower-index one is labelled index reduction p We have converted the index-3 DAE into an index-1 DAE !! 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 14 / 25

  45. Outline ”Easy” & ”Hard” DAEs 1 Differential Index 2 Index Reduction 3 Constraints drift 4 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 15 / 25

  46. DAEs from Lagrange Mechanics Index-3 DAE from Lagrange: d ∂ L q − ∂ L ∂ q = F g d ∂ ˙ c ( q ) = 0 q ) − V ( q ) − z ⊤ c ( q ) with L ( q , ˙ q , z ) = T ( q , ˙ 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 16 / 25

  47. DAEs from Lagrange Mechanics For most mechanical applications: Index-3 DAE from Lagrange: q ) = 1 d ∂ L q − ∂ L q ⊤ M ( q ) ˙ ∂ q = F g T ( q , ˙ 2 ˙ q d ∂ ˙ c ( q ) = 0 such that: ⊤ d ∂ L q ) − V ( q ) − z ⊤ c ( q ) with L ( q , ˙ q , z ) = T ( q , ˙ q + ˙ = M ( q )¨ M ( q , ˙ q ) ˙ q d ∂ ˙ q 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 16 / 25

  48. DAEs from Lagrange Mechanics For most mechanical applications: Index-3 DAE from Lagrange: q ) = 1 d ∂ L q − ∂ L q ⊤ M ( q ) ˙ ∂ q = F g T ( q , ˙ 2 ˙ q d ∂ ˙ c ( q ) = 0 such that: ⊤ d ∂ L q ) − V ( q ) − z ⊤ c ( q ) with L ( q , ˙ q , z ) = T ( q , ˙ q + ˙ = M ( q )¨ M ( q , ˙ q ) ˙ q d ∂ ˙ q Then the differential part of the DAE model reads as: q + ˙ M ( q )¨ M ( q , ˙ q ) ˙ q − ∇ q ( T ( q , ˙ q ) − V ( q )) + ∇ c ( q ) z = F g 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 16 / 25

  49. DAEs from Lagrange Mechanics For most mechanical applications: Index-3 DAE from Lagrange: q ) = 1 d ∂ L q − ∂ L q ⊤ M ( q ) ˙ ∂ q = F g T ( q , ˙ 2 ˙ q d ∂ ˙ c ( q ) = 0 such that: ⊤ d ∂ L q ) − V ( q ) − z ⊤ c ( q ) with L ( q , ˙ q , z ) = T ( q , ˙ q + ˙ = M ( q )¨ M ( q , ˙ q ) ˙ q d ∂ ˙ q Then the differential part of the DAE model reads as: q + ˙ M ( q )¨ M ( q , ˙ q ) ˙ q − ∇ q ( T ( q , ˙ q ) − V ( q )) + ∇ c ( q ) z = F g The 1 st and 2 nd -order time derivatives of c ( q ) read as: d d t c ( q ) = ∇ c ( q ) ⊤ ˙ q , 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 16 / 25

  50. DAEs from Lagrange Mechanics For most mechanical applications: Index-3 DAE from Lagrange: q ) = 1 d ∂ L q − ∂ L q ⊤ M ( q ) ˙ ∂ q = F g T ( q , ˙ 2 ˙ q d ∂ ˙ c ( q ) = 0 such that: ⊤ d ∂ L q ) − V ( q ) − z ⊤ c ( q ) with L ( q , ˙ q , z ) = T ( q , ˙ q + ˙ = M ( q )¨ M ( q , ˙ q ) ˙ q d ∂ ˙ q Then the differential part of the DAE model reads as: q + ˙ M ( q )¨ M ( q , ˙ q ) ˙ q − ∇ q ( T ( q , ˙ q ) − V ( q )) + ∇ c ( q ) z = F g The 1 st and 2 nd -order time derivatives of c ( q ) read as: d 2 � � ⊤ d d t c ( q ) = ∇ c ( q ) ⊤ ˙ d t 2 c ( q ) = ∇ c ( q ) ⊤ ¨ ∇ c ( q ) ⊤ ˙ q , q + ∇ q q q ˙ 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 16 / 25

  51. DAEs from Lagrange Mechanics For most mechanical applications: Index-3 DAE from Lagrange: q ) = 1 d ∂ L q − ∂ L q ⊤ M ( q ) ˙ ∂ q = F g T ( q , ˙ 2 ˙ q d ∂ ˙ c ( q ) = 0 such that: ⊤ d ∂ L q ) − V ( q ) − z ⊤ c ( q ) with L ( q , ˙ q , z ) = T ( q , ˙ q + ˙ = M ( q )¨ M ( q , ˙ q ) ˙ q d ∂ ˙ q Then the differential part of the DAE model reads as: q + ˙ M ( q )¨ M ( q , ˙ q ) ˙ q − ∇ q ( T ( q , ˙ q ) − V ( q )) + ∇ c ( q ) z = F g The 1 st and 2 nd -order time derivatives of c ( q ) read as: d 2 � � ⊤ d d t c ( q ) = ∇ c ( q ) ⊤ ˙ d t 2 c ( q ) = ∇ c ( q ) ⊤ ¨ ∇ c ( q ) ⊤ ˙ q , q + ∇ q q q ˙ Index-1 DAE model: � F g − ˙ � � ¨ � � � M ( q ) ∇ q c ( q ) M ( q , ˙ q ) ˙ q + ∇ q ( T ( q , ˙ q ) − V ( q )) q = � � ⊤ ∇ q c ( q ) ⊤ ˙ z ∇ q c ( q ) ⊤ −∇ q ˙ q q 0 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 16 / 25

  52. DAEs from Lagrange Mechanics For most mechanical applications: Index-3 DAE from Lagrange: q ) = 1 d ∂ L q − ∂ L q ⊤ M ( q ) ˙ ∂ q = F g T ( q , ˙ 2 ˙ q d ∂ ˙ c ( q ) = 0 such that: ⊤ d ∂ L q ) − V ( q ) − z ⊤ c ( q ) with L ( q , ˙ q , z ) = T ( q , ˙ q + ˙ = M ( q )¨ M ( q , ˙ q ) ˙ q d ∂ ˙ q Index-1 DAE model: � F g − ˙ � � ¨ � � � M ( q ) ∇ c ( q ) M ( q , ˙ q ) ˙ q + ∇ q ( T ( q , ˙ q ) − V ( q )) q = � � ⊤ ∇ c ( q ) ⊤ ˙ z ∇ c ( q ) ⊤ −∇ q ˙ q q 0 Models based on Lagrange mechanics typically are index-3 DAEs , making them intrinsically difficult to use. The best approach to treat them is usually to proceed with an index reduction down to index 1 for which very classical integration tools work well. 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 16 / 25

  53. Index reduction for semi-explicit DAEs - A general view High-index semi-explicit DAE x = F ( x , z , u ) ˙ 0 = G ( x , z , u ) Algorithm ( see ”Nonlinear Programming”, L.T. Biegler ) 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 17 / 25

  54. Index reduction for semi-explicit DAEs - A general view High-index semi-explicit DAE x = F ( x , z , u ) ˙ 0 = G ( x , z , u ) Algorithm ( see ”Nonlinear Programming”, L.T. Biegler ) ∂ G Check if the DAE system is index 1 (i.e. ∂ z full rank). 1 If yes, stop. Identify a subset of algebraic equations that can be 2 solved for a subset of algebraic variables. d Apply d t on the remaining algebraic equations that 3 contain the differential variables x j . Terms ˙ x j will appear in these differentiated equations. 4 Substitute the ˙ x j with F j ( x , z , u ). This leads to new 5 algebraic equations. With this new DAE system, go to step 1. 6 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 17 / 25

  55. Index reduction for semi-explicit DAEs - A general view High-index semi-explicit DAE x = F ( x , z , u ) ˙ 0 = G ( x , z , u ) Algorithm ( see ”Nonlinear Programming”, L.T. Biegler ) ∂ G Check if the DAE system is index 1 (i.e. ∂ z full rank). 1 If yes, stop. Identify a subset of algebraic equations that can be 2 solved for a subset of algebraic variables. d Apply d t on the remaining algebraic equations that 3 contain the differential variables x j . Terms ˙ x j will appear in these differentiated equations. 4 Substitute the ˙ x j with F j ( x , z , u ). This leads to new 5 algebraic equations. With this new DAE system, go to step 1. 6 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 17 / 25

  56. Index reduction for semi-explicit DAEs - A general view High-index semi-explicit DAE x = F ( x , z , u ) ˙ 0 = G ( x , z , u ) Algorithm ( see ”Nonlinear Programming”, L.T. Biegler ) ∂ G Check if the DAE system is index 1 (i.e. ∂ z full rank). 1 If yes, stop. Writing a general-purpose Identify a subset of algebraic equations that can be ”Index-reduction 2 solved for a subset of algebraic variables. algorithm” can be very tricky, as one of the steps d Apply d t on the remaining algebraic equations that 3 is not easily automated contain the differential variables x j . Terms ˙ x j will appear in these differentiated equations. 4 Substitute the ˙ x j with F j ( x , z , u ). This leads to new 5 algebraic equations. With this new DAE system, go to step 1. 6 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 17 / 25

  57. e 3 DAE Consistency - 3D pendulum O e 1 Does the index reduction really yield equivalent models ? e 2 u p Index-3 DAE Index-1 DAE � mI � u − mg e 3 � � � � ¨ p p m ¨ p = u − mg e 3 − z p = p ⊤ ˙ p ⊤ 0 z − ˙ p � p ⊤ p − L 2 � 0 = 1 2 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 18 / 25

  58. e 3 DAE Consistency - 3D pendulum O e 1 Does the index reduction really yield equivalent models ? e 2 u p Index-3 DAE Index-1 DAE � mI � u − mg e 3 � � � � ¨ p p m ¨ p = u − mg e 3 − z p = p ⊤ ˙ p ⊤ 0 z − ˙ p � p ⊤ p − L 2 � 0 = 1 2 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 18 / 25

  59. e 3 DAE Consistency - 3D pendulum O e 1 Does the index reduction really yield equivalent models ? e 2 u p Index-3 DAE Index-1 DAE � mI � u − mg e 3 � � � � ¨ p p m ¨ p = u − mg e 3 − z p = p ⊤ ˙ p ⊤ 0 z − ˙ p � p ⊤ p − L 2 � 0 = 1 2 What is going on ?? 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 18 / 25

  60. DAE Consistency - 3D pendulum Index-3 DAE m ¨ p = u − mg e 3 − z p 0 = 1 � p ⊤ p − L 2 � 2 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 19 / 25

  61. DAE Consistency - 3D pendulum Index-3 DAE m ¨ p = u − mg e 3 − z p 0 = 1 � p ⊤ p − L 2 � 2 Index reduction c = 1 � p ⊤ p − L 2 � 2 c = p ⊤ ˙ ˙ p p ⊤ ˙ c = p ⊤ ¨ ¨ p + ˙ p 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 19 / 25

  62. DAE Consistency - 3D pendulum Index-3 DAE m ¨ p = u − mg e 3 − z p 0 = 1 � p ⊤ p − L 2 � 2 Index reduction c = 1 � p ⊤ p − L 2 � 2 c = p ⊤ ˙ ˙ p p ⊤ ˙ c = p ⊤ ¨ ¨ p + ˙ p Index-1 DAE � � ¨ � mI � u − mg e 3 � � p p = p ⊤ ˙ p ⊤ 0 − ˙ z p ... is built to impose ¨ c = 0 at all time. 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 19 / 25

  63. DAE Consistency - 3D pendulum Index-3 DAE m ¨ p = u − mg e 3 − z p 0 = 1 � p ⊤ p − L 2 � 2 Index reduction c = 1 � p ⊤ p − L 2 � 2 c = p ⊤ ˙ ˙ p p ⊤ ˙ c = p ⊤ ¨ ¨ p + ˙ p Index-1 DAE � � ¨ � mI � u − mg e 3 � � p p = p ⊤ ˙ p ⊤ 0 − ˙ z p ... is built to impose ¨ c = 0 at all time. But it does not ensure c = 0 ˙ and c = 0 !! 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 19 / 25

  64. DAE Consistency - 3D pendulum Index-3 DAE m ¨ p = u − mg e 3 − z p 0 = 1 � p ⊤ p − L 2 � 2 Index reduction c = 1 � p ⊤ p − L 2 � 2 4 c = p ⊤ ˙ ˙ p 3 p ⊤ ˙ 2 c = p ⊤ ¨ c ¨ p + ˙ p 1 0 Index-1 DAE � � ¨ 0 5 10 � mI � u − mg e 3 � � p p t = p ⊤ ˙ p ⊤ 0 − ˙ z p 0.5 ... is built to impose ¨ c = 0 at all time. But it does 0 c ˙ not ensure c = 0 ˙ and c = 0 !! -0.5 0 5 10 t 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 19 / 25

  65. DAE Consistency - 3D pendulum Index-3 DAE m ¨ p = u − mg e 3 − z p 0 = 1 � p ⊤ p − L 2 � 2 Index reduction c = 1 � p ⊤ p − L 2 � 2 4 c = p ⊤ ˙ ˙ p 3 p ⊤ ˙ 2 c = p ⊤ ¨ c ¨ p + ˙ p 1 0 Index-1 DAE � � ¨ 0 5 10 � mI � u − mg e 3 � � p p t = p ⊤ ˙ p ⊤ 0 − ˙ z p 0.5 ... is built to impose ¨ c = 0 at all time. But it does 0 c ˙ not ensure c = 0 ˙ and c = 0 !! -0.5 0 5 10 t How can we address that ?? 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 19 / 25

  66. DAE Consistency - 3D pendulum Index-1 DAE � � ¨ � mI � u − mg e 3 � � p p = p ⊤ ˙ p ⊤ 0 − ˙ z p ... is built to impose ¨ c = 0 at all time. 4 3 2 c 1 0 0 5 10 t 0.5 0 c ˙ -0.5 0 5 10 t 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 20 / 25

  67. DAE Consistency - 3D pendulum Index-1 DAE � � ¨ � mI � u − mg e 3 � � p p = p ⊤ ˙ p ⊤ 0 − ˙ z p ... is built to impose ¨ c = 0 at all time. Then if c = 0 and ˙ c = 0 are satisfied at any time on 4 the trajectory, then they are satisfied at all time. 3 2 c 1 0 0 5 10 t 0.5 0 c ˙ -0.5 0 5 10 t 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 20 / 25

  68. DAE Consistency - 3D pendulum Index-1 DAE � � ¨ � mI � u − mg e 3 � � p p = p ⊤ ˙ p ⊤ 0 − ˙ z p ... is built to impose ¨ c = 0 at all time. Then if c = 0 and ˙ c = 0 are satisfied at any time on 4 the trajectory, then they are satisfied at all time. 3 2 c An index-reduced DAE must come with consistency 1 conditions . E.g. for the 3D pendulum, the index-1 0 DAE should be given as: 0 5 10 t � � ¨ � mI � u − mg e 3 � � p p 0.5 = p ⊤ ˙ p ⊤ 0 z − ˙ p 0 c ˙ -0.5 0 5 10 t 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 20 / 25

  69. DAE Consistency - 3D pendulum Index-1 DAE � � ¨ � mI � u − mg e 3 � � p p = p ⊤ ˙ p ⊤ 0 − ˙ z p ... is built to impose ¨ c = 0 at all time. Then if c = 0 and ˙ c = 0 are satisfied at any time on 4 the trajectory, then they are satisfied at all time. 3 2 c An index-reduced DAE must come with consistency 1 conditions . E.g. for the 3D pendulum, the index-1 0 DAE should be given as: 0 5 10 t � � ¨ � mI � u − mg e 3 � � p p 0.5 = p ⊤ ˙ p ⊤ 0 z − ˙ p 0 c ˙ with the consistency conditions: � p ⊤ p − L 2 � c = 1 c = p ⊤ ˙ -0.5 = 0 , ˙ p = 0 0 5 10 2 t ... to be satisfied e.g. at t 0 . 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 20 / 25

  70. DAE Consistency - 3D pendulum Index-1 DAE � � ¨ � mI � u − mg e 3 � � p p = p ⊤ ˙ p ⊤ 0 − ˙ z p ... is built to impose ¨ c = 0 at all time. Then if c = 0 and ˙ c = 0 are satisfied at any time on 4 the trajectory, then they are satisfied at all time. 3 2 c An index-reduced DAE must come with consistency 1 conditions . E.g. for the 3D pendulum, the index-1 0 DAE should be given as: 0 5 10 t � � ¨ � mI � u − mg e 3 � � p p 0.5 = p ⊤ ˙ p ⊤ 0 z − ˙ p 0 c ˙ with the consistency conditions: � p ⊤ p − L 2 � c = 1 c = p ⊤ ˙ -0.5 = 0 , ˙ p = 0 0 5 10 2 t ... to be satisfied e.g. at t 0 . 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 20 / 25

  71. Consistency of DAEs from Lagrange Mechanics Index-3 DAE from Lagrange: ∂ L q − ∂ L d ∂ q = F g For most mechanical applications: ∂ ˙ d q ) = 1 c ( q ) = 0 q ⊤ M ( q ) ˙ T ( q , ˙ 2 ˙ q q ) − V ( q ) − z ⊤ c ( q ) with L ( q , ˙ q , z ) = T ( q , ˙ Index reduction based on: d 2 � � ⊤ d d t c ( q ) = ∇ c ( q ) ⊤ ˙ d t 2 c ( q ) = ∇ c ( q ) ⊤ ¨ ∇ c ( q ) ⊤ ˙ and q + ∇ q ˙ q q q Index-1 DAE model: � F g − ˙ � � ¨ � � M ( q ) ∇ q c ( q ) � M ( q , ˙ q ) ˙ q + ∇ q ( T ( q , ˙ q ) − V ( q )) q = � � ⊤ ∇ c ( q ) ⊤ ˙ z ∇ q c ( q ) ⊤ −∇ q q q ˙ 0 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 21 / 25

  72. Consistency of DAEs from Lagrange Mechanics Index-3 DAE from Lagrange: ∂ L q − ∂ L d ∂ q = F g For most mechanical applications: ∂ ˙ d q ) = 1 c ( q ) = 0 q ⊤ M ( q ) ˙ T ( q , ˙ 2 ˙ q q ) − V ( q ) − z ⊤ c ( q ) with L ( q , ˙ q , z ) = T ( q , ˙ Index reduction based on: d 2 � � ⊤ d d t c ( q ) = ∇ c ( q ) ⊤ ˙ d t 2 c ( q ) = ∇ c ( q ) ⊤ ¨ ∇ c ( q ) ⊤ ˙ and q + ∇ q ˙ q q q Index-1 DAE model: � F g − ˙ � � ¨ � � M ( q ) ∇ q c ( q ) � M ( q , ˙ q ) ˙ q + ∇ q ( T ( q , ˙ q ) − V ( q )) q = � � ⊤ ∇ c ( q ) ⊤ ˙ z ∇ q c ( q ) ⊤ −∇ q q q ˙ 0 with the consistency conditions: d d t c ( q ) = ∇ c ( q ) ⊤ ˙ c ( q ) = 0 and q 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 21 / 25

  73. Outline ”Easy” & ”Hard” DAEs 1 Differential Index 2 Index Reduction 3 Constraints drift 4 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 22 / 25

  74. Constraints drift - 3D pendulum Index-1 DAE � mI � � ¨ � u − mg e 3 � � p p = p ⊤ ˙ p ⊤ 0 z − ˙ p ... is built to impose ¨ c = 0 at all time. Then if c = 0 and ˙ c = 0 are satisfied at any time on the trajectory, then they are satisfied at all time. 4 3 2 c 1 0 0 5 10 t 0.5 0 c ˙ -0.5 0 5 10 t 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 23 / 25

  75. Constraints drift - 3D pendulum Index-1 DAE � mI � � ¨ � u − mg e 3 � � p p = p ⊤ ˙ p ⊤ 0 z − ˙ p ... is built to impose ¨ c = 0 at all time. Then if c = 0 and ˙ c = 0 are satisfied at any time on the trajectory, then they are satisfied at all time. 4 3 Index-1 DAE : 2 c � mI � � ¨ � u − mg e 3 1 � � p p 0 = p ⊤ ˙ p ⊤ 0 z − ˙ p 0 5 10 t 0.5 0 c ˙ -0.5 0 5 10 t 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 23 / 25

  76. Constraints drift - 3D pendulum Index-1 DAE � mI � � ¨ � u − mg e 3 � � p p = p ⊤ ˙ p ⊤ 0 z − ˙ p ... is built to impose ¨ c = 0 at all time. Then if c = 0 and ˙ c = 0 are satisfied at any time on the trajectory, then they are satisfied at all time. 4 3 Index-1 DAE : 2 c � mI � � ¨ � u − mg e 3 1 � � p p 0 = p ⊤ ˙ p ⊤ 0 z − ˙ p 0 5 10 t with the consistency conditions : 0.5 c = 1 � p ⊤ p − L 2 � c = p ⊤ ˙ = 0 , ˙ p = 0 2 0 c ˙ ... imposed at e.g. t 0 . -0.5 0 5 10 t 22 nd of February, 2016 S. Gros Optimal Control with DAEs, lecture 11 23 / 25

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend