Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
SECTION 7 INTEGRATOR CLASSIFICATION & CHARACTERISTICS ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 1 ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 2 COURSE OBJECTIVES • What’s in this section: – – – – – Implicit vs Explicit Integrators Integrator Classification Terminology Physical vs Numerical Stiffness Integrator Accuracy & Stability Integrator Index (I3 vs SI2) ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 3 IMPLICIT VS EXPLICIT INTEGRATORS • Forward (Explicit) Euler yn1 yn hyn • Easier to implement (explicit) • Very small CPU Time ratio Integration-Step • Less stable – is limited to take small step-sizes • Backward (Implicit) Euler yn1 yn hyn+1 • More difficult to implement (implicit) • Large CPU Time Integration-Step ratio • More stable – can take very large step sizes ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 4 where h = step size CLASSIFICATION OF INTEGRATORS • Most numerical integrators are either Taylor series based or polynomial based *. Other classifications included Major: – Explicit vs. implicit – Stiff vs. non-stiff • * Minor: – Single step vs. multi-step – Fixed step size vs. variable step size – Variable order vs. fixed order Each has advantages/disadvantages for different classes of problems! With the notable exception of the RKF integrator, most presented herein are polynomial based. The simple forward Euler integrator results from either approach. ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 5 PHYSICAL STIFFNESS • Physical Stiffness – High frequencies (Im(l) is large when mass small compared to stiffness) – High frequency oscillations; takes time to die out because little damping (c2) F(t) Mass 1 k1=10 c1=0.1 ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation Mass 2 k2=10000 c2=0.1 S7 - 6 NUMERICAL STIFFNESS • Numerical Stiffness – Damped high frequencies (Re(l) is large and negative) – High frequency vibration dies out very quickly – Only lower frequency modes are active in system – System is classified as stiff when highest overdamped eigenvalue 200 highest underdampe d eigenvalue – The ratio for non-stiff systems is less than 20 F(t) Mass 1 k1=10 c1=0.1 ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation Mass 2 k2=10000 c2=1000 S7 - 7 NUMERICAL VS PHYSICAL STIFFNESS • All methods have problems with physically stiff systems – Stability issues (for explicit integrators) – Convergence issue (for implicit integrators) • Numerically stiff systems handled well by stiff integrators (e.g., Backward Euler, BDF integrators) ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 8 INTEGRATOR ACCURACY • Does numerical solution converge as h 0 ? • Case Study: y=l y, y(0) = y0 y0 elt – True solution: – Numerical solution (Forward Euler): yn+1=yn +hyn =(1+hλ)yn =(1+hλ)2 yn-1=...=(1+hλ)n+1 y0 • As h 0 n+1 yn+1=(1+hλ) 1/hl y0 = (1+hλ) (n+1)hl y0 y0 el ( n1) h y0 elt • Control over accuracy is by means of step-size control ( h ) ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 9 INTEGRATOR STABILITIY • Does the error in the solution stay bounded? • What is the effect of step size on error growth? y =l y • Case Study: y(0) = y0 – Forward Euler: yn 1 yn hyn yn+1=(1+hλ)n+1 y0 – Backward Euler: yn+1=yn+hyn+1 =yn +hλyn+1 (1-hl )1 yn (1-hl )2 yn-1 (1-hl )( n1) y0 yn+1=yn +hyn+1 ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 10 INTEGRATOR STABILITY (CONT.) • Constraints on the value of step-size: h F.Euler – Forward Euler is stable provided 1+hλ 1 – The Backward Euler is stable provided 1-hλ 1 • What happens when l is large and negative? • The step-size h should be such that hl is in the stability region • For numerically stiff systems, staying in the region of stability is: – Easy for Backward Euler – Hard for Forward Euler ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 11 B.Euler INTEGRATOR INDEX • The index of a set of differential algebraic equations (DAE) is the number of times the equations must be differentiated to get a system of ordinary differential equations • The DAE derived for mechanical systems have index 3, which is considered high • This is because you would have to differentiate the constraint equations twice to get a set of acceleration constraint equations. You would also have to define a derivative of the Lagrange multipliers. • The general rule is that the higher the index, the more challenging the numerical solution becomes • The default solver setting is Formulation=I3 (i.e., index-3) ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 12 INTEGRATOR INDEX: INDEX-3 ISSUES • When solving the original system index-3 DAE: Mu Φ Tq λ B T F 0 u q 0 Φ0 the Jacobian matrix becomes ill-conditioned as the step size decreases (because h appears in the denominator of several terms) • Another problem is that the integration error cannot be monitored on either velocities, u, or reaction forces, l • Consequently, the corrector may fail when the Jacobian matrix becomes ill-conditioned or the predictions are not good ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 13 INTEGRATOR INDEX: MOTIVATION FOR THE SI2 FORMULATION • For some integrators there is an option that reduces the original index-3 problem to an analytically equivalent index-2 problem. While slower, it is typically more robust and accurate. This: • Improves robustness of solutions – Decreases corrector failures due to ill-conditioning of Jacobian matrix with small step sizes – Reduces spikes in accelerations • Improves accuracy of solution – More accurate velocities – More accurate accelerations ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 14 INTEGRATOR INDEX: MOTIVATION FOR THE SI2 FORMULATION (CONT.) • • However if you were to simply replace F = 0 with F = 0, you would satisfy the latter but not the former. Thus eventually one or more joint constraints would drift. • To alleviate this problem, another set of Lagrange multipliers m associated with the velocities can be created to satisfy both the F = 0 • and F = 0 equations. Thus the system becomes: Mu ΦTq λ BT F 0 u q ΦTq μ 0 (q, μ, t ) 0 Φ Φ(q, t ) 0 ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 15 INTEGRATOR INDEX: MOTIVATION FOR THE SI2 FORMULATION (CONT.) • The numerical solution to these DAE are guaranteed to satisfy both • F = 0 and F = 0, so the above equations are called a stabilized index-2 (SI2) representation • The Jacobian matrix does not become ill-conditioned with small h because all differential equations are multiplied by h (no terms of the form 1/h in the Jacobian) • The integrators can monitor error on both position and velocity (unlike I3, velocities are guaranteed to satisfy ERROR with SI2 formulation) • Can generally loosen ERROR by /10 or /100 when switching from I3 to SI2 ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 16 INTEGRATOR INDEX: MOTIVATION FOR THE SI2 FORMULATION (CONT.) • The constraint derivative equations require velocities to be tangential to the constraint surface which removes noise seen in Index-3 • A slightly different corrector is used that solves for hl and hm during corrector calculations ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 17 INTEGRATOR INDEX: THE SI2 FORMULATION • Full equations: mu ΦTp λ p Q p 0 translational motion equation T K Γ 0 ζ angular momentum definition K T Γ Φε λ ε Qε 0 ε rotational motion equation p u ΦTp μ p 0 translational velocity definition ε ζ Φ Tε μ ε 0 rotational velocity definition Φ0 constraint equation 0 Φ constraint derivative T ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 18 INTEGRATOR INDEX: SI2 VERSUS INDEX-3 FOR PENDULUM PROBLEM Index 3: Stabilized Index 2: ux u y u x x y l 1 l2 h m 1 hm 2 mu x l1 0 mu y l2 mg 0 l1 L sin l2 L cos 0 Ju 0 u x x m1 0 u y y m2 0 u m1 L sin m2 L cos 0 x L cos 0 mu x l1 0 mu y l2 mg 0 l1 L sin l2 L cos 0 Ju 0 u x x 0 u y y 0 u 0 x L cos 0 y L sin 0 y L sin 0 u x u L sin 0 u y u L cos 0 ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation u x u y u xx y l1 l2 S7 - 19 INTEGRATOR INDEX: SI2 JACOBIAN FOR PENDULUM PROBLEM M 0 0 0 Gx 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 M 0 0 0 0 0 0 1 0 0 0 1 0 0 C1 L sin L cos 0 0 J 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 L sin 0 0 0 1 0 L sin 0 0 0 0 0 0 0 1 L cos 0 0 0 0 L sin 0 0 0 u L cos 0 0 0 1 L cos 0 0 0 u L sin 0 0 0 T l1 L cos l2 L sin 0 M mh 0 0 0 0 0 1 L cos 0 0 0 0 0 h 0 Note that there is no 1/h terms in the Jacobian matrix for an SI2 formulation. This adds robustness. ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7 - 20 Useful References – Books on Numerical Methods Uri M. Ascher, Linda R. Petzold, Computer Methods for Ordinary Differential Equations and Differential-Algebraic Equations, ISBN 0-89871-412-5 – good introductory level book K.E. Brenan, S.L. Campbell, and L.R. Petzold, Numerical Solution of Initial-Value Problems in Differential-Algebraic Equations, Classics in Applied Mathematics Series, SIAM Vol.14 - good introductory level book on the subject of DAE Ernst Hairer, Syvert Paul Nørsett, and Gerhard Wanner, Numerical Methods for the solution of ODE and DAE, Springer Series in Comput. Mathematics (Second revised edition 1993) – tough book, excellent reference though Ernst Hairer, Gerhard Wanner, Solving Ordinary Differential Equations II. Stiff and Differential-Algebraic Problems. Springer Series in Comput. Mathematics, Vol. 14, Springer-Verlag (Second revised edition 1996) – tough book, excellent reference though ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7-21 S7 - 21 ADM703b, Section 7, February 2013 Copyright© 2013 MSC.Software Corporation S7-22 S7 - 22