Introduction to Differential Algebraic Equations



Similar documents
8.5 UNITARY AND HERMITIAN MATRICES. The conjugate transpose of a complex matrix A, denoted by A*, is given by

BERNSTEIN POLYNOMIALS

Recurrence. 1 Definitions and main statements

This circuit than can be reduced to a planar circuit

v a 1 b 1 i, a 2 b 2 i,..., a n b n i.

PERRON FROBENIUS THEOREM

1 Example 1: Axis-aligned rectangles

n + d + q = 24 and.05n +.1d +.25q = 2 { n + d + q = 24 (3) n + 2d + 5q = 40 (2)

Luby s Alg. for Maximal Independent Sets using Pairwise Independence

Support Vector Machines

benefit is 2, paid if the policyholder dies within the year, and probability of death within the year is ).

How To Calculate The Accountng Perod Of Nequalty

Loop Parallelization

Numerical Methods 數 值 方 法 概 說. Daniel Lee. Nov. 1, 2006

NMT EE 589 & UNM ME 482/582 ROBOT ENGINEERING. Dr. Stephen Bruder NMT EE 589 & UNM ME 482/582

where the coordinates are related to those in the old frame as follows.

7.5. Present Value of an Annuity. Investigate

L10: Linear discriminants analysis

The Development of Web Log Mining Based on Improve-K-Means Clustering Analysis

Linear Circuits Analysis. Superposition, Thevenin /Norton Equivalent circuits

Module 2 LOSSLESS IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur

Logistic Regression. Lecture 4: More classifiers and classes. Logistic regression. Adaboost. Optimization. Multiple class classification

Institute of Informatics, Faculty of Business and Management, Brno University of Technology,Czech Republic

"Research Note" APPLICATION OF CHARGE SIMULATION METHOD TO ELECTRIC FIELD CALCULATION IN THE POWER CABLES *

Finite difference method

A hybrid global optimization algorithm based on parallel chaos optimization and outlook algorithm

Ring structure of splines on triangulations

Feature selection for intrusion detection. Slobodan Petrović NISlab, Gjøvik University College

Application of Quasi Monte Carlo methods and Global Sensitivity Analysis in finance

Description of the Force Method Procedure. Indeterminate Analysis Force Method 1. Force Method con t. Force Method con t

Imperial College London

Consider a 1-D stationary state diffusion-type equation, which we will call the generalized diffusion equation from now on:

THE METHOD OF LEAST SQUARES THE METHOD OF LEAST SQUARES

Series Solutions of ODEs 2 the Frobenius method. The basic idea of the Frobenius method is to look for solutions of the form 3

1. Measuring association using correlation and regression

Chapter 4 ECONOMIC DISPATCH AND UNIT COMMITMENT

Least Squares Fitting of Data

The OC Curve of Attribute Acceptance Plans

Product-Form Stationary Distributions for Deficiency Zero Chemical Reaction Networks

Efficient Project Portfolio as a tool for Enterprise Risk Management

POLYSA: A Polynomial Algorithm for Non-binary Constraint Satisfaction Problems with and

1. Fundamentals of probability theory 2. Emergence of communication traffic 3. Stochastic & Markovian Processes (SP & MP)

What is Candidate Sampling

Modern Problem Solving Techniques in Engineering with POLYMATH, Excel and MATLAB. Introduction

Production. 2. Y is closed A set is closed if it contains its boundary. We need this for the solution existence in the profit maximization problem.

An Alternative Way to Measure Private Equity Performance

Extending Probabilistic Dynamic Epistemic Logic

8 Algorithm for Binary Searching in Trees

Heuristic Static Load-Balancing Algorithm Applied to CESM

On the Solution of Indefinite Systems Arising in Nonlinear Optimization

Fuzzy Set Approach To Asymmetrical Load Balancing In Distribution Networks

Risk-based Fatigue Estimate of Deep Water Risers -- Course Project for EM388F: Fracture Mechanics, Spring 2008

GRAVITY DATA VALIDATION AND OUTLIER DETECTION USING L 1 -NORM

Logical Development Of Vogel s Approximation Method (LD-VAM): An Approach To Find Basic Feasible Solution Of Transportation Problem

The Noether Theorems: from Noether to Ševera

The Greedy Method. Introduction. 0/1 Knapsack Problem

Quantization Effects in Digital Filters

Research Article Enhanced Two-Step Method via Relaxed Order of α-satisfactory Degrees for Fuzzy Multiobjective Optimization

Matrix Multiplication I

Section 5.4 Annuities, Present Value, and Amortization

Using Series to Analyze Financial Situations: Present Value

SPEE Recommended Evaluation Practice #6 Definition of Decline Curve Parameters Background:

Faraday's Law of Induction

CHOLESTEROL REFERENCE METHOD LABORATORY NETWORK. Sample Stability Protocol

A Novel Methodology of Working Capital Management for Large. Public Constructions by Using Fuzzy S-curve Regression

Logistic Regression. Steve Kroon

Finite Math Chapter 10: Study Guide and Solution to Problems

On the Optimal Control of a Cascade of Hydro-Electric Power Stations

THE DISTRIBUTION OF LOAN PORTFOLIO VALUE * Oldrich Alfons Vasicek

Answer: A). There is a flatter IS curve in the high MPC economy. Original LM LM after increase in M. IS curve for low MPC economy

Damage detection in composite laminates using coin-tap method

How Sets of Coherent Probabilities May Serve as Models for Degrees of Incoherence

Chapter 7: Answers to Questions and Problems

Section 2 Introduction to Statistical Mechanics

Numerical Analysis of the Natural Gas Combustion Products

Comparison of Control Strategies for Shunt Active Power Filter under Different Load Conditions

An efficient constraint handling methodology for multi-objective evolutionary algorithms

O(n) mass matrix inversion for serial manipulators and polypeptide chains using Lie derivatives Kiju Lee, Yunfeng Wang and Gregory S.

CHAPTER 14 MORE ABOUT REGRESSION

Causal, Explanatory Forecasting. Analysis. Regression Analysis. Simple Linear Regression. Which is Independent? Forecasting

CS 2750 Machine Learning. Lecture 3. Density estimation. CS 2750 Machine Learning. Announcements

Face Verification Problem. Face Recognition Problem. Application: Access Control. Biometric Authentication. Face Verification (1:1 matching)

Lecture 2: Single Layer Perceptrons Kevin Swingler

Availability-Based Path Selection and Network Vulnerability Assessment

A frequency decomposition time domain model of broadband frequency-dependent absorption: Model II

Solution: Let i = 10% and d = 5%. By definition, the respective forces of interest on funds A and B are. i 1 + it. S A (t) = d (1 dt) 2 1. = d 1 dt.

Study on Model of Risks Assessment of Standard Operation in Rural Power Network

HÜCKEL MOLECULAR ORBITAL THEORY

Mean Molecular Weight

Minimal Coding Network With Combinatorial Structure For Instantaneous Recovery From Edge Failures

1 What is a conservation law?

Project Networks With Mixed-Time Constraints

The Mathematical Derivation of Least Squares

Transcription:

Dr. Abebe Geletu Ilmenau Unversty of Technology Department of Smulaton and Optmal Processes (SOP) Wnter Semester 2011/12

4.1 Defnton and Propertes of DAEs A system of equatons that s of the form F (t, x, ẋ) = 0 s called a dfferental algebrac equaton (DAE) f the Jacoban matrx F ẋ s sngular (non-nvertble); where, for each t, x(t) Rn and F 1 (t, x(t), ẋ(t)) F 2 (t, x(t), ẋ(t)) F (t, x(t), ẋ(t)) =.. F n (t, x(t), ẋ(t))

4.1 Defnton and Propertes of DAEs... Example: The system x 1 ẋ 1 + 1 = 0 (1) ẋ 1 x 2 + 2 = 0 (2) s a DAE. To see ths, determne the Jacoban F ( ) x1 ẋ F (t, x, ẋ) = 1 + 1 ẋ 1 x 2 + 2 ) (ẋ1 wth ẋ =, so that F ẋ = ẋ 2 ( F1 ẋ 1 F 1 ẋ 2 F 2 ẋ 1 F 2 ẋ 2 ) = ẋ of ( ) ( ) 1 0 F, ( see that, det = 0). x 2 0 ẋ the Jacoban s a sngular matrx rrespectve of the values of x 2. Observe that: n ths example the dervatve ẋ 2 does not appear.

4.1 Defnton and Propertes of DAEs... Solvng for ẋ 1 from the frst equaton x 1 ẋ 1 + 1 = 0 we get ẋ 1 = x 1 + 1. Replace ths for ẋ 1 n the second equaton ẋ 1 x 2 + 2 = 0 to wre the DAE n equatons (23) & (23) equvalently as: ẋ 1 = x 1 + 1 (3) (x 1 + 1)x 2 + 2 = 0 (4) In ths DAE: equaton (3) s a dfferental equaton; whle equaton (4) s an algebrac equaton. There are several engneerng applcatons that have such model equatons.

4.1 Defnton and Propertes of DAEs... Suppose F (t, x, ẋ) = A(t)ẋ + B(t)x + d(t). Hence, for the system F (t, x, ẋ) = 0 the Jacoban wll be F ẋ = A(t). If A(t) s a non-sngular (an nvertble) matrx, then [A(t)] 1 (A(t)ẋ(t) + B(t)x(t) + d(t)) = [A(t)] 1 0 ẋ(t) + [A(t)] 1 B(t)x(t) + [A(t)] 1 d(t)) = 0 ẋ(t) = [A(t)] 1 B(t)x(t) [A(t)] 1 d(t)). Ths s an ordnary dfferental equaton. Remark In general, f the Jacoban matrx F ẋ s non-sngular (nvertble), then the system F (t, x, ẋ) = 0 can be transformed nto an ordnary dfferental equaton (ODE) of the form ẋ = f(t, x). Some numercal soluton methods for ODE models have been already dscussed. Therefore, the most nterestng case s when F ẋ s sngular.

4.2. Some DAE models from engneerng applcatons There are several engneerng applcatons that lead DAE model equatons. Examples: process engneerng, mechancal engneerng and mechatroncs ( multbody Systems eg. robot dynamcs, car dynamcs, etc), electrcal engneerng (eg. electrcal network systems, etc), water dstrbuton network systems, thermodynamc systems, etc. Frequently, DAEs arse from practcal applcatons as: dfferental equatons descrbng the dynamcs of the process, plus algebrac equatons descrbng: laws of conservaton of energy, mass, charge, current, etc. mass, molar, entropy balance equatons, etc. desred constrants on the dynamcs of the process.

4.2. Some DAE models from engneerng applcatons... CSTR An sothermal CSTR A B C. Model equaton: V = F a F (5) Ċ A = F a V (C A 0 C A ) R 1 (6) Ċ B = F a V C B + R 1 R 2 (7) Ċ C = F a V C C + R 2 (8) 0 = C A C B K eq (9) 0 = R 2 k 2 C B (10)

4.2. Some DAE models from practcal applcatons...a CSTR... F a -feed flow rate of A C A0 -feed concentraton of A R 1, R 2 - rates of reactons F - product wthdrawal rate C A, C B, C C - concentraton of speces A, B and C, resp., n the mxture. Defnnng x = (V, C A, C B, C C ) z = (R 1, R 2 ) the CSTR model equaton can be wrtten n the form ẋ = f(x, z) 0 = g(x, z).

Some DAE models from practcal applcatons...a smple pendulum Newton s Law: mẍ = F l x mÿ = mg F l y Conservaton of mechancal energy: x 2 + y 2 = l 2 (DAE) ẋ 1 = x 3 ẋ 2 = x 4 ẋ 3 = F m l x 1 ẋ 4 = g F l x 2 0 = x 2 + y 2 l 2.

Some DAE models from practcal applcatons...an RLC crcut Krchhoff s voltage and current laws yeld: conservaton of current: E = R, R = C, C = L conservaton of energy: V R + V L + V C + V E = 0 Ohm s Laws: C V C = C, L V L = L, V R = R R

Some DAE models from practcal applcatons...an RLC crcut... After replacng R wth E and C wth L we get a reduced DAE: Defne x(t) = (V C, V L, V R, L, E ) V C = 1 C L (11) V L = 1 L L (12) 0 = V R + R E (13) 0 = V E + V R + V C + V L (14) 0 = L E (15) (16)

Some DAE models from practcal applcatons...an RLC crcut... The RLC system can be wrtten as: 1 C 0 0 0 0 1 0 L ẋ = 0 0 0 0 0 0 0 0 0 0 0 0 0 x (17) 0 0 0 0 0 0 0 1 0 R 0 0 = 1 1 1 0 0 x + 1 V E (18) 0 0 0 1 1 0 whch s of the form ẋ = Ax (19) 0 = Bx + Dz. (20)

4.3. Classfcaton of DAEs Frequently, DAEs posses mathematcal structure that are specfc to a gven applcaton area. As a result we have non-lnear DAEs, lnear DAEs, etc. In fact, a knowledge on the mathematcal structure of a DAE facltates the selecton of model-specfc algorthms and approprate software. Nonlnear DAEs: In the DAE F (t, x, ẋ) = 0 f the functon F s nonlnear w.r.t. any one of t, x or ẋ, then t s sad to be a nonlnear DAE. Lnear DAEs: A DAE of the form A(t)ẋ(t) + B(t)x(t) = c(t), where A(t) and B(t) are n n matrces, s lnear. If A(t) A and B(t) B, then we have tme-nvarant lnear DAE.

4.3. Classfcaton of DAEs... Sem-explct DAEs: A DAE gven n the form ẋ = f(t, x, z) (21) 0 = g(t, x, z) (22) Note that the dervatve of the varable z doesn t appear n the DAE. Such a varable z s called an algebrac varable; whle x s called a dfferental varable. The equaton 0 = g(t, x, z) called algebrac equaton or a constrant. Examples: The DAE model gven for the RLC crcut, the CSTR and the smple pendulum are all sem-explct form.

4.3. Classfcaton of DAEs... A fully-mplct DAEs: The DAE F (t, x, ẋ) = 0 s n fully-mplct form. Examples: () F (t, x, ẋ) = Aẋ + Bx + b(t) s a fully-mplct DAE. () The equaton (see equatons (23) & (23) ) s a fully-mplct DAE. x 1 ẋ 1 + 1 = 0 ẋ 1 x 2 + 2 = 0 Any fully-mplct DAE can be always transformed nto a sem-explct DAEs.

4.3. Classfcaton of DAEs... Example (transformaton of a fully-mplct DAE nto a sem-explct DAE): Consder the lnear tme-nvarant DAE Aẋ + Bx + b(t) = 0, where λa + B s nonsngular, for some scalar λ. Then there are non-sngular n n matrces G and H such that: [ ] [ Im O J O GAH = and GBH = O N O I n m ] (23) where I m the m m dentty matrx (here m n), N s an (n m) (n m) nlpotent matrx;.e., there s a postve nteger p such that N p = 0, J R m m and I n m s the (n m) (n m) dentty matrx. Now, we can wrte Aẋ + Bx + b(t) = 0 equvalently as (GAH) (H 1 )ẋ + (GBH) (H 1 )x + Gb(t) = 0. (24)

4.3. Classfcaton of DAEs... Use the block decomposng gven n equaton (23) to wrte [ ] [ ] Im O (H 1 J O )ẋ + (H 1 )x + Gb(t) = 0. (25) O N O I n m Use the varable transformaton w(t) = H 1 x(t) to wrte [ ] [ ] Im O J O ẇ + w + Gb(t) = 0. (26) O N O I n m [ ] w1 (t) Decompose the vector w(t) as w(t) =, wth w w 2 (t) 1 (t) R m [ ] and w 2 (t) R n m b1 (t) and correspondngly the vector Gb(t) = so b 2 (t) that: ẇ 1 (t) + Jw 1 (t) + b 1 (t) = 0 (27) Nw 1 (t) + w 2 (t) + b 2 (t) = 0. (28)

4.3. Classfcaton of DAEs... Use now the nlpotent property of the matrx N;.e., multply the second set of equaton by N p 1 to get ẇ 1 (t) + Jw 1 (t) + b 1 (t) = 0 (29) N p w 1 (t) + N p 1 w 2 (t) + N p 1 b 2 (t) = 0. (30) From ths t follows that (snce N p w 1 (t) = 0) ẇ 1 (t) = Jw 1 (t) b 1 (t) (31) 0 = N p 1 w 2 (t) N p 1 b 2 (t). (32) Therefore, we have transformed the fully-mplct DAE Aẋ + Bx + b(t) = 0 nto a sem-explct form. Smlarly, usng mathematcan manpulatons, any nonlnear fully-mplct DAE can be transformed nto a sem-explct DAE.

4.4. Index of a DAE DAEs are usually very complex and hard to be solved analytcally. DAEs are commonly solved by usng numercal methods. Queston: Is t possble to use numercal methods of ODEs for the soluton of DAEs? Idea: Attempt to transform the DAE nto an ODE. Ths can be cheved through repeated dervatons of the algebrac equatons g(t, x, z) = 0 wth respect to tme t. Defnton The mnmum number of dfferentaton steps requred to transform a DAE nto an ODE s known as the (dfferental) ndex of the DAE.

4.4. Index of a DAE... Example: (DAE) ẋ 1 = x 1 + 1 (x 1 + 1)x 2 + 2 = 0. Here x 2 the algebrac varable (.e. z = x 2 ). Dfferentate g(x 1, x 2 ) = 0 to fnd a descrpton for the tme-dervatve ẋ 2 of the algebrac varable. So d dt [g(x 1, x 2 )] = d dt [0] d dt [(x 1 + 1)x 2 + 2] = 0 ẋ 1 x 2 + (x 1 + 1)ẋ 2 = 0. ẋ 2 = ẋ1x 2 (x 1 + 1) = (x 1 + 1)x 2 (x 1 + 1) = x 2 Only one dfferentaton step s requred to descrbe ẋ 2. So, the DAE s of ndex 1.

4.4. Index of a DAE... The CSTR model s of ndex 2. The DAE model for the smple penudulum s of ndex 3. DAEs wth ndex greater than 1 are commonly known as hgher ndex DAEs. The hgher the ndex, the more dffcult wll be the DAE to solve. Transformaton of a hgher ndex DAE nto a lower ndex DAE (or to an ODE) s commonly known as ndex reducton. In general, ndex reducton for hgher ndex DAE smplfes computatonal complextes. Two serous ssues to consder when solvng DAEs The solutons of the lower ndex DAE may not be a soluton of the orgnal DAE. Ths s known as a drft off effect. Fndng ntal condtons that satsfy both the dfferental and algebrac parts of a DAE may not be trval, known as consstency of ntal condtons.

4.4. Index of a DAE... Therefore, computatonal algorthms for a DAE should: be cable of dentfyng consstent ntal condtons to the DAE; as well as, provde automatc ndex reducton mechansms to smplfy the DAE. Modern software lke Sundals, Modelca, use strateges for ndex-reducton coupled wth methods of consstent ntalzaton. In the followng we consder only ndex 1 sem-explct DAEs: Snce g (DAE) ẋ = f(t, x, z) (33) t + g dx x dt + g dz [ z dt g ndex 1 ff [ dfferental equaton: dz dt = g z 0 = g(t, x, z). (34) = 0. Hence, a sem-explct DAE s of ] 1 z exsts. That s, one dfferentaton step yelds the ] 1 [ ] [ ] 1 g x (f(t, x, z)) g g z t.

4.5. An overvew of numercal Methods for DAEs Usng mathematcal prncples and transformaton of varables, fully-mplct DAEs can be transformed to sem-explct DAEs. Note that, n the sem-explct DAE ẋ = f(t, x, z) (35) 0 = g(t, x, z). (36) [ ] f Jacoban matrx g z sngular (non-nvertble), then the DAE s of hgher ndex. Snce many applcatons have model equatons as sem-explct DAEs, the dscusson next s restrcted to ths form. In the DAE above, f both f and g do not explctly depend on tme t;.e. f(t, x, z) = f(x, z) and g(t, x, z) = g(x, z), then the model s an autonomous DAE.

4.5. An overvew of numercal Methods for DAEs... BDF and collocaton methods are two most wdely used methods for numercal soluton of DAEs. (I) BDF for DAEs: Consder the ntal value DAE ẋ = f(t, x, z), x(t 0 ) = x 0 (37) 0 = g(t, x, z). (38) Ideas of BDF: Select a tme step h so that t +1 = t + h, = 0, 1, 2,... Gven x = x(t ) and z = z(t ), determne the value x +1 = x(t +1 ) by usng (extrapolatng) values x, x 1,..., x m+1 of the current and earler tme nstants of x(t). Smultaneously compute z +1 = z(t +1 ).

4.5. An overvew of numercal Methods for DAEs...BDF There s a unque m-th degree polynomal P that nterpolates the m + 1 ponts (t +1, x +1 ), (t, x ), (t 1, x 1 ),..., (t +1 m, x +1 m ). Ths nterpolatng polynomals P can be wrtten as m P (t) = x +1 j L j (t) j=0 wth the Lagrange polynomal m [ ] t t +1 l L j (t) =, j = 0, 1,..., m. t +1 j t +1 l l = 0 l j

4.5....BDF for DAEs... Observe that P (t +1 j ) = x +1 j, j = 0, 1,..., m. In partcular P (t +1 ) = x +1. Thus, replace ẋ +1 by P (t +1 ) to obtan But P (t +1 ) = P (t +1 ) = f(t +1, x +1 ). ( ) m x +1 j Lj (t +1 ) = x +1 L0 (t +1 ) + j=0 m x +1 j Lj (t) j=1 Puttng ths nto (*) we get: m Lj (t +1 ) x +1 = x +1 j L 0 (t +1 ) + 1 L 0 (t +1 ) f(t +1, x +1 ) j=1

4.5....BDF for DAEs... Defne a j = L j (t +1 ) L 0 (t +1 ), b m = 1 h L 0 (t +1 ). The values a j, j = 1,..., m and b m can be read from lookup tables. An m-step BDF Algorthm (BDF m) for a DAE: Gven a 1,..., a m,b m x +1 = m a j x +1 j + b m hf(t +1, x +1, z +1 ) (39) j=1 0 = g(t +1, x +1, z +1 ). (40) Each teraton of the BDF requres a Newton algorthm for the soluton a system of nonlnear equatons. Hence, the Jacoban g w needs to be well-condtoned, where w = (t, x, z).

4.5....BDF for DAEs... Gven x 0 = x(t 0 ), BDF requres consstent ntal condtons to be obtaned by solvng g(t 0, x 0, z 0 ) = 0. to determne z 0 = z(t 0 ). The m-step BDF algorthm converges f m 6;.e. x x(t ) O(h m ), z z(t ) O(h m ) for consstent ntal condtons. BDF s commonly used to solve DAEs of ndex 1 or 2 Software based on BDF for DAEs: Matlab: ode15 Open source: DASSL ; CVODE, CVODES, and IDA (under Sundals); ODEPACK solvers, etc.

Orthogonal Collocaton To collocate a functon x(t) through another functon p(t) = to captur the propertes of x(t) by usng p(t). In general, we use a smpler functon p(t) to collocate x(t); eg., p(t) can be a polynomal, a trgonometrc functon, etc. polynomal and trgonometrc functons are usually smpler to work wth. (The dscusson here s restrcted to polynomlas) Werstraß Theorem If x(t) s a contnuous functon on [a, b], then for any gven ε > 0, there s a polynomal p(t) such that max x(t) p(t) < ε a t b Hence, we use the polynomal p(t) nstead of x(t). However, Werstraß theorem doese not specfye how to construct the approxmatng polynomal p(t).

Suppose p(t) = a 0 + a 1 t +... + a m t m s the approxmatng polynomal to x(t) on [a, b]. Note: If the coeffcents a 0, a 1,..., a m are gven, then the approxmatng polynomal s exactly known. Queston: How to determne a 0, a 1,..., a m? Queston: How to construct the apprxmatng polynomal? There are several ways to construct p(t) to approxmates x(t) accordng to Werstraß theorem. Here we requre p(t) to satsfy the followng property: p(t ) = x(t ) =: x, = 1,..., N. for some selected tme nstants t 1, t 2,..., t N from the nterval [a, b]. Ths property relates p(t) and x(t) and s known as nterpolatory property. Unqueness of an nterpolatng polynamal There s a unque nterpolatory polynomal p(t) for the N data ponts (t 1, x 1 ),(t 2, x 2 ),...,(t N, x N ) wth degree deg(p) = m = N 1.

In the followng we use N = m + 1. Fgure

Accordng to the nterpolatory property, we have x 1 = p(t 1 ) = a 0 + a 1 t 1 +... + a m t m 1 (41) x 2 = p(t 2 ) = a 0 + a 1 t 2 +... + a m t m 2 (42). (43) x m+1 = p(t m+1 ) = a 0 + a 1 t m+1 +... + a m t m m+1. (44) x 1 x 2. x m+1 1 t 1 t 2 1... t m 1 a 0 = 1 t 2 t 2 2... t m 2 a 1........ 1 t m+1 t 2 m+1... t m m+1 a m Thus, f we known x 1, x 2,..., x m+1 then we can compute a 0, a 1,..., a m and vce-versa. But, snce x(t) s not yet known, x 1, x 2,..., x m+1 are unknown.

Hence, both x 1 x 2. x m+1 a 0 a 1 a m and are unkowns.. To avod workng wth two unknown vectors, we can defne the polynamal p(t) n a better way as: p(t) = m+1 =1 where L (t) are Lagrange polynomals gven by L (t) = = m+1 j = 1 j t t j t t j x L (t) (45) (t t 1 ) (t t 2 )... (t t 1 ) (t t +1 )... (t t m+1 ) (t t 1 ) (t t 2 )... (t t 1 ) (t t +1 )... (t t m+1 ).

Propertes: L (t j ) = 1, f = j 0, f j (satsfacton of the nterpolatory property) p(t ) = x, = 1, 2,..., m + 1. (approxmaton of x(t) by p(t)) The polynomal p(t) n equaton (45) can be made to satsfy the Werstraß theorem by takng suffcently large number of tme nstants t 1, t 2,..., t m+1 from [a, b]. Queston: What s the best choce for t 1, t 2,..., t m+1?

Determnaton of collocaton Ponts An dea to determne collocaton ponts: Select values τ 1, τ 2,..., τ N from the nterval [0, 1] and defne the t s as follows: t = a + τ (b a), = 1,..., N. Ths s a good dea, snce the same values τ 1, τ 2,..., τ N from [0, 1] can be used to generate collocaton ponts on varous ntervals [a, b]. Example: () If [a, b] = [2, 10], then t = 2 + τ (10 2), = 1,..., N; () If [a, b] = [0, 50], then t = 0 + τ (50 0), = 1,..., N; etc. Queston: What s the best way to select the values τ 1, τ 2,..., τ N from [0, 1]?

Determnaton of collocaton Ponts... Recall that: soluton of a dfferental equaton (or DAEs) s an ntegraton process. Numercal methods for one-dmensonal ntegrals can gve us nformaton on how to select τ 1, τ 2,..., τ N. Gauss quadrature rules are one of the best numercal ntegraton methods. To approxmate the ntegral I[f] = 1 0 f(τ)dτ, by the (terpolatory) quadrature rule Q N [f] = N k=1 w kf(τ k ), where: the ntegraton nodes τ 1, τ 2,..., τ N [0, 1] weghts w 1, w 2,..., w N are constructed based on the nterval [0, 1].

Determnaton of collocaton ponts... Thus we would lke to obtan the approxmaton 1 N I[f] = f(τ)dτ Q N [f] = w f(τ ). 0 Once a quadrature rule Q N [ ] s constructed t can be used to approxmate ntegrals of varous functons. Queston: How to determne the 2N unknowns τ 1, τ 2,..., τ N, w 1, w 2,..., w N? =1 We requre the quadrature rule to satsfy the equalty: b a W (τ)p(τ)dτ = N w p(τ ) =1 for all polynomals p wth degree deg(p) 2N.

That s, Q N [ ] should ntegrate each of the polynomals exactly. Ths mples p(t) = 1, τ, τ 2,..., τ 2N 1 0 1 0 1 1 0 0 1dτ = =1 w (46) τdτ = =1 w τ (47) τ 2 dτ = =1 w τ 2 (48) τ 2N dτ = =1. (49) w τ 2N. (50)

We need to solve the system of 2N nonlnear equatons: 1 = w 1 + w 2 +... + w N (51) 1 2 = w 1 τ 1 + w 2 τ 2 +... + w N τ N (52) (53) 1 3 = w 1 τ1 2 + w 2 τ2 2 +... + w N τn 2 (54). (55) 1 2N = w 1τ1 2N + w 2 τ2 2N +... + w N τn 2N. (56) From the equaton 1 = w 1 + w 2 +... + w N we can solve for w 1 and replace for t n the remanng equatons. It remans to determne the 2N 1 unknowns τ 2,..., τ N and w 1, w 2,..., w N from the reduced set of 2N 1 equatons. Unfortunately, ths system of equatons s dffcult to solve.

Orthogonal polynomals There s a smpler way f we use orthogonal polynomals. The concept of orthogonalty requres a defnton of scalar product. The scalar product of functons h and g wth respect on the nterval [0, 1] s h, g = 1 0 h(τ)g(τ)dτ. Two functons h and g are orthogonal on the nterval [0, 1] f h, g = 1 0 h(τ)g(τ)dτ = 0. In ths lecture, we are only nterested n set of polynomals that are orthogonal to each other.

Orthogonal polynomals... Orthogonal polynomals on [0, 1] (as defned above) are known as shfted Legendre polynomals. Theorem (Three-term recurrence relaton) Suppose {p 0, p 1,...} the set of shfted Legendre orthogonal polynomals on [0, 1] wth deg(p n ) = n and leadng coeffcent equal to 1. The shfted Legendre polynomals are generated by the relaton p n+1 (τ) = (τ a n )p n (τ) b n p n 1 (τ) wth p 0 (τ) = 1 and p 1 (τ) = 0, where the recurrence coeffcents are gven as a n = 1 2, n = 0, 1, 2,... n b n = 2, n = 0, 1, 2,... 4(4n 2 1)

Orthogonal polynomals... The frst four shfted Legendre orthogonal polynomals are p 0 (τ) = 1, p 1 (τ) = 2τ 1, p 2 (τ) = 6τ 2 6τ + 1, p 3 (τ) = 20τ 3 30τ 2 + 12τ 1. Further mportant propertes of orthogonal polynomals: Gven any set of orthogonal polynomals {p 0, p 1, p 2,...} the followng hold true: Any fnte set of orthogonal polynomals {p 0, p 1,..., p N 1 } s lnearly ndependent. The polynomal P N s orthogonal to each of p 0, p 1,..., p N 1. Any non-zero polynomal q wth degree deg(q) N 1 can be wrtten as a lnear combnaton: q(τ) = c 0 p 0 (τ) + c 1 p 1 (τ) +..., c N 1 p N 1 (τ) where at least one of the scalars c 0, c 1,..., c N 1 s non-zero.

Orthogonal polynomals... We demand the quadrature rule s exact for polynomals up to degree 2N 1. Let P (τ) be any polynomal of degree 2N 1. Hence, I[P ] = Q N [P ] 1 0 P (τ)dτ = N w P (τ ). Gven the N-th degree orthogonal polynomal p N, the polynomal P can be wrtten as P (τ) = p N (τ)q(τ) + r(τ) where q(τ) and r(τ) are polynomals such that 0 < deg(r) N 1 and deg(q) = N 1, snce =1 2N 1 = deg(p ) = deg(p N ) + deg(q) = N + deg(q).

Orthogonal polynomals... Now, from the equaton 1 0 P (τ)dτ = N b b a (p N (τ)q(τ) + r(τ)) dτ = b k=1 w kp (τ k ) t follows that N w (p N (τ )q(τ k ) + r(τ )). N N p N (τ)q(τ)dτ + r(τ)dτ = w p N (τ )q(τ ) + w r(τ ). a } {{ } a =1 =1 =0 Observe the followng: Usng polynomal exactness: b a r(τ)dτ = N =1 w r(τ ). Orthogonalty mples < p N, p k >= 0, k = 1,..., N 1. Thus, b a p N(τ)q(τ) = b a N 1 p N (τ) =1 c k p k (τ)dτ = =1 N 1 k=1 b c k p N (τ)p k (τ)dτ = 0. a } {{ } =0

Orthogonal polynomals... It follows that N k=1 w kp N (τ k )q(τ k ) = 0. ( ) Theorem If the quadrature nodes τ 1, τ 2,..., τ N are zeros of the N th degree shfted Legendre polynomal p N (τ), then all the roots τ 1, τ 2,..., τ N le nsde (0, 1); the quadrature weghts are determned from w = 1 0 L (τ)dτ, where L (τ), = 1,..., N s the Lagrange functon defned usng τ 1, τ 2,..., τ N and w > 0, = 1,..., N. The quadrature rule Q N [ ] ntegrates polynomals degree up to 2N 1 exactly. Hence, equaton ( ) holds true f p 1 (τ 1 ) = p N (τ 2 ) =..., p(τ N ) = 0.

Orthogonal polynomals... Therefore, the quadrature nodes τ 1, τ 2,..., τ N are chosen as the zeros of the N-th degree shfted Legendre orthogonal polynomal. Queston: Is there a smple way to compute the zeros τ 1, τ 2,..., τ N of an orthogonal polynomal p N and the quadrature weghts w 1, w 2,..., w N? The answer s gve by a Theorem of Welsch & Glub (see next slde).

Orthogonal polynomals... Theorem (Welsch & Glub 1969 ) The quadrature nodes τ 1, τ 2,..., τ N and weghts w 1, w 2,..., w N can be computed from the spectral factorzaton of J N = V ΛV ; Λ = dag(λ 1, λ 2,..., λ N ), V V = I N ; of the symmetrc tr-dagonal Jacob matrx a 0 b1 b1 a 1 b2.... J N = b2..... an 2 bn 1 bn 1 a N 1 where a 0, a n, b n, n = 1,..., N 1 are the known coeffcents from the recurrence relaton. In partcular...

Theorem... τ k = λ k, k = 1,..., N; (57) ( ) 2 w k = e V e k, k = 1,..., N, (58) where e 1, e k are the 1st and the k the unt vectors of length N. A Matlab program: n = 5; format short beta =.5./sqrt(1-(2*(1:n-1)).^(-2)); % recurr. coeffs J = dag(beta,1) + dag(beta,-1) % Jacob matrx [V,D] = eg(j); % Spectral decomp. tau = dag(d); [tau,] = sort(tau); % Quad. nodes w = 2*V(1,).^2; % Quad. weghts

There are standardsed lookup tables for the ntegraton nodes τ 1, τ 2,..., τ N and correspondng weghts w 1, w 2,..., w N. The collocaton ponts t 1, t 2,..., t N [a, b] can be determned by usng the quadrature ponts τ 1, τ 2,..., τ N [0, 1] through the relaton: t = a + τ (b a). Example: Suppose we would lke to collocate x(t) on [a, b] = [0, 10] usng a polynomal ˆx(t) wth deg(ˆx) = m = 3. Requred number of collocaton ponts = N = m + 1 = 3 + 1 = 4. Frst, determne the zeros of the 4-th degree shfted Legendre polynomal p 4 (τ);.e., fnd τ 1, τ 2, τ 3, τ 4. These value can be determned to be: τ 1 = 0.0694318442, τ 2 = 0.3300094783, τ 3 = 0.6699905218, τ 4 = 0.9305681558.

Next, determne the collocaton ponts : t 1 = 0 + (10 0) τ 1 = 0.694318442, t 2 = 0 + (10 0) τ 2 = 3.300094783, t 3 = 0 + (10 0) τ 3 = 6.699905218, t 4 = 0 + (10 0) τ 4 = 9.305681558.

The collocaton polynomal s p(t) = 4 x L (t). where L 1 (t) = L 2 (t) = L 3 (t) = L 4 (t) = (t t 2 )(t t 3 )(t t 4 ) (t 1 t 2 )(t 1 t 3 )(t 1 t 4 ) (59) (t t 1 )(t t 3 )(t t 4 ) (t 2 t 1 )(t 2 t 3 )(t 2 t 4 ) (60) (t t 1 )(t t 2 )(t t 4 ) (t 3 t 1 )(t 3 t 2 )(t 3 t 4 ) (61) (t t 1 )(t t 2 )(t t 3 ) (t 4 t 1 )(t 4 t 2 )(t 4 t 3 ). (62) Hence, we approxmate x(t) usng the thrd degree polynomal p(t) = x(t) = x 1 L 1 (t) + x 2 L 2 (t) + x 3 L 3 (t) + x 4 L 4 (t) It remans to determne the coeffcents x 1, x 2, x 3, x 4.

Dscretzaton of DAEs usng orthogonal collocaton Gven the DAE: ẋ = f(t, x, z), t 0 t t f (63) 0 = g(t, x, z) (64) where x(t) = (x 1 (t), x 2 (t),..., x n (t)) and z(t) = (z 1 (t), z 2 (t),..., z m (t)). Determne the a set of collocaton ponts t 1, t 2,..., t N. correspondng to each dfferental and algebrac varable defne collocaton polynomals: x k (t) p (k) (t) = z j (t) p (j) (t) = N =1 N =1 x (k) L (t), k = 1,..., n; (65) z (j) L (t), j = 1,..., m. (66)

... orthogonal collocaton of DAEs In the DAE, replace x k (t) and z j (t) by q (k) (t) and p (j) (t) so that ( ṗ (1) (t) = f 1 (t, p (1) (t), p (2) (t),..., p (n) (t) ( ṗ (2) (t) = f 2 (t, p (1) (t), p (2) (t),..., p (n) (t) ) ) (, q (1) (t), q (2) (t),..., q (m) ( (, q (1) (t), q (2) (t),..., q (m) (. ( ) ( ṗ (n) (t) = f 1 (t, p (1) (t), p (2) (t),..., p (n) (t), q (1) (t), q (2) (t),..., q (m) ( ( ) ( 0 = g 1 (t, p (1) (t), p (2) (t),..., p (n) (t), q (1) (t), q (2) (t),..., q (m) ( ( ) ( 0 = g 2 (t, p (1) (t), p (2) (t),..., p (n) (t), q (1) (t), q (2) (t),..., q (m) (. 0 = g m (t, ( ) ( p (1) (t), p (2) (t),..., p (n) (t), q (1) (t), q (2) (t),..., q (m)

... orthogonal collocaton of DAEs Next dscretze the system above usng t 1, t 2,..., t N to obtan: ( ) ( )) ṗ (1) (t ) = f 1 (t, x (1), x (2),..., x (n), z (1), z (2),..., z (m) ( ) ( )) ṗ (2) (t ) = f 2 (t, x (1), x (2),..., x (n), z (1), z (2),..., z (m). ( ) ( )) ṗ (n) (t ) = f n (t, x (1), x (2),..., x (n), z (1), z (2),..., z (m) ( ) ( )) 0 = g 1 (t, x (1), x (2),..., x (n), z (1), z (2),..., z (m) ( ) ( )) 0 = g 2 (t, x (1), x (2),..., x (n), z (1), z (2),..., z (m). 0 = g m (t, ( x (1), x (2) = 1, 2,..., N. ) (,..., x (n), z (1), z (2) )),..., z (m),

... orthogonal collocaton of DAEs Solve the system of (n + m) N equatons to determne the (n + m) N unknwons x (k), k = 1,..., n, = 1,..., N and z (j), j = 1,..., m, = 1,..., N. Example: Use a four pont orthogonal collocaton to solve the DAE ẋ 1 = x 1 + 1, 0 t 1. 0 = (x 1 + 1)x 2 + 2. Soluton: we use the collocaton polynomals p (1) (t) = 4 =1 x (1) (t)l (t) and p (2) (t) = 4 =1 x (2) (t)l (t) to collocate x 1 (t) and x 2 (t), respectvely.

Advantages and dsadvantages collocaton methods can be used for hgher ndex DAEs. effcent for both ntal value as well as boundary values DAEs. more accurate Dsadvantages: Can be computatonally expensve The approxmatng polynomals may dsplay oscllatory propertes, mpactng accuracy computatonal expenses become hgh f t 1, t 2,..., t N 1 are consdered varables.

Resources - Lterature References: U. M. Ascher, L. R. Petzold : Computer Methods for Ordnary Dfferental Equatons and Dfferental-Algebrac Equatons. SIAM 1998. K. E. Brenan, S. L. Campbell, and L.R. Petzold: (1996). Numercal Soluton of Intal-Value Problems n Dfferental-Algebrac Equatons., SIAM, 1996. Campbell, S. and Grepentrog, E., Solvablty of General Dfferental Algebrac Equatons, SIAM J. Sc. Comput. 16(2) pp. 257-270, 1995. M. S. Erk and G. Sderlnd: Index Reducton n Dfferental-Algebrac Equatons Usng Dummy Dervatves. SIAM Journal on Scentfc Computng, vol. 14, pp. 677-692, 1993. C. W. Gear : Dfferental-algebrac ndex transformaton. SIAM J. Sc. Stat. Comp. Vol. 9, pp. 39 47, 1988. Walter Gautsch: Orthogonal polynomals (n Matlab). Journal of Computatonal and Appled Mathematcs 178 (2005) 215 234 Lloyd N. Trefethen: Is Gauss Quadrature Better than Clenshaw.Curts? SIAM REVIEW, Vol. 50, No. 1, pp. 67 87, 2008.

Resources - Lterature.. Software Panteldes Costas. (1988) The consstent ntalzaton of dfferental algebrac systems. SIAM Journal on Scentfc and Statstcal Computng, vol. 9: 2, pp. 213 231, 1988. L. Petzold: Dfferental/Algebrac Equatons Are Not ODEs, SIAM J. Sc. Stat. Comput. 3(3) pp. 367-384, 1982. Open source software: DASSL - - FORTRAN 77: http://www.cs.ucsb.edu/ cse/software.html DASSL Matlab nterface: http://www.mathworks.com/matlabcentral/fleexchange/16917-dasslmex-fle-complaton-to-matlab-5-3-and-6-5 Sundals - https://computaton.llnl.gov/casc/sundals/man.html Modelca - https://modelca.org/ Odepack - http://www.cs.berkeley.edu/ kdatta/classes/lsode.html Sccos- http://www.sccos.org/