Collocation method: Difference between revisions

From HandWiki
NBrush (talk | contribs)
add
 
JMinHep (talk | contribs)
change
 
Line 5: Line 5:


Suppose that the [[Ordinary differential equation|ordinary differential equation]]
Suppose that the [[Ordinary differential equation|ordinary differential equation]]
:<math> y'(t) = f(t,y(t)), \quad y(t_0)=y_0, </math>
<math display="block"> y'(t) = f(t,y(t)), \quad y(t_0)=y_0, </math>
is to be solved over the interval <math> [t_0,t_0+h]</math>. Choose <math>c_k</math> from 0 ≤ ''c''<sub>1</sub>< ''c''<sub>2</sub>< ... < ''c''<sub>''n''</sub> ≤ 1.
is to be solved over the interval <math> [t_0,t_0+h]</math>. Choose <math>c_k</math> from 0 ≤ ''c''<sub>1</sub>< ''c''<sub>2</sub>< ... < ''c''<sub>''n''</sub> ≤ 1.


Line 17: Line 17:
Pick, as an example, the two collocation points ''c''<sub>1</sub> = 0 and ''c''<sub>2</sub> = 1 (so ''n'' = 2). The collocation conditions are
Pick, as an example, the two collocation points ''c''<sub>1</sub> = 0 and ''c''<sub>2</sub> = 1 (so ''n'' = 2). The collocation conditions are


:<math> p(t_0) = y_0, \, </math>
<math display="block">\begin{align}
:<math> p'(t_0) = f(t_0, p(t_0)), \, </math>
p(t_0) &= y_0, \\
:<math> p'(t_0+h) = f(t_0+h, p(t_0+h)). \, </math>
p'(t_0) &= f(t_0, p(t_0)), \\
p'(t_0{+}h) &= f(t_0{+}h, p(t_0{+}h)).
\end{align} </math>


There are three conditions, so ''p'' should be a polynomial of degree 2. Write ''p'' in the form
There are three conditions, so ''p'' should be a polynomial of degree 2. Write ''p'' in the form


:<math> p(t) = \alpha (t-t_0)^2 + \beta (t-t_0) + \gamma \, </math>
<math display="block"> p(t) = \alpha (t-t_0)^2 + \beta (t-t_0) + \gamma \, </math>


to simplify the computations. Then the collocation conditions can be solved to give the coefficients
to simplify the computations. Then the collocation conditions can be solved to give the coefficients


:<math>  
<math display="block"> \begin{align}
  \begin{align}
   \alpha &= \frac{1}{2h} \Big( f(t_0{+}h, p(t_0{+}h)) - f(t_0, p(t_0)) \Big), \\
   \alpha &= \frac{1}{2h} \Big( f(t_0+h, p(t_0+h)) - f(t_0, p(t_0)) \Big), \\
   \beta &= f(t_0, p(t_0)), \\
   \beta &= f(t_0, p(t_0)), \\
   \gamma &= y_0.  
   \gamma &= y_0.
  \end{align}  
\end{align}</math>
</math>


The collocation method is now given (implicitly) by
The collocation method is now given (implicitly) by


:<math> y_1 = p(t_0 + h) = y_0 + \frac12h \Big (f(t_0+h, y_1) + f(t_0,y_0) \Big), \, </math>
<math display="block"> y_1 = p(t_0 + h) = y_0 + \frac{1}{2} h \Big (f(t_0{+}h, y_1) + f(t_0,y_0) \Big), \, </math>


where ''y''<sub>1</sub> = ''p''(''t''<sub>0</sub>&nbsp;+&nbsp;''h'') is the approximate solution at ''t'' = ''t''<sub>1</sub> = ''t''<sub>0</sub>&nbsp;+&nbsp;''h''.
where ''y''<sub>1</sub> = ''p''(''t''<sub>0</sub>&nbsp;+&nbsp;''h'') is the approximate solution at ''t'' = ''t''<sub>1</sub> = ''t''<sub>0</sub>&nbsp;+&nbsp;''h''.
Line 43: Line 43:
This method is known as the "[[Trapezoidal rule (differential equations)|trapezoidal rule]]" for differential equations. Indeed, this method can also be derived by rewriting the differential equation as
This method is known as the "[[Trapezoidal rule (differential equations)|trapezoidal rule]]" for differential equations. Indeed, this method can also be derived by rewriting the differential equation as


:<math> y(t) = y(t_0) + \int_{t_0}^t f(\tau, y(\tau)) \,\textrm{d}\tau, \, </math>
<math display="block"> y(t) = y(t_0) + \int_{t_0}^t f(\tau, y(\tau)) \, d\tau, \, </math>


and approximating the integral on the right-hand side by the [[Trapezoidal rule|trapezoidal rule]] for integrals.
and approximating the integral on the right-hand side by the [[Trapezoidal rule|trapezoidal rule]] for integrals.
Line 67: Line 67:


== References ==
== References ==
{{refbegin}}
* {{Citation | last1=Ascher | first1=Uri M. | last2=Petzold | first2=Linda R. | title=Computer Methods for Ordinary Differential Equations and Differential-Algebraic Equations | publisher=Society for Industrial and Applied Mathematics | location=Philadelphia | isbn=978-0-89871-412-8 | year=1998}}.
* {{Citation | last1=Ascher | first1=Uri M. | last2=Petzold | first2=Linda R. | title=Computer Methods for Ordinary Differential Equations and Differential-Algebraic Equations | publisher=Society for Industrial and Applied Mathematics | location=Philadelphia | isbn=978-0-89871-412-8 | year=1998}}.
* {{Citation | last1=Hairer | first1=Ernst | last2=Nørsett | first2=Syvert Paul | last3=Wanner | first3=Gerhard | title=Solving ordinary differential equations I: Nonstiff problems | publisher=[[Physics:Springer-Verlag|Springer-Verlag]] | location=Berlin, New York | isbn=978-3-540-56670-0 | year=1993}}.
* {{Citation | last1=Hairer | first1=Ernst | last2=Nørsett | first2=Syvert Paul | last3=Wanner | first3=Gerhard | title=Solving ordinary differential equations I: Nonstiff problems | publisher=[[Physics:Springer-Verlag|Springer-Verlag]] | location=Berlin, New York | isbn=978-3-540-56670-0 | year=1993}}.
* {{Citation | last1=Iserles | first1=Arieh |  title=A First Course in the Numerical Analysis of Differential Equations | publisher=Cambridge University Press | isbn=978-0-521-55655-2 | year=1996| bibcode=1996fcna.book.....I |url=https://books.google.com/books?id=7Zofw3SFTWIC&q=%22Collocation+method%22}}.
* {{Citation | last1=Iserles | first1=Arieh |  title=A First Course in the Numerical Analysis of Differential Equations | publisher=Cambridge University Press | isbn=978-0-521-55655-2 | year=1996| bibcode=1996fcna.book.....I |url=https://books.google.com/books?id=7Zofw3SFTWIC&q=%22Collocation+method%22}}.
* {{Citation | last1=Wang | first1=Yingwei | last2=Chen|first2=Suqin|last3=Wu|first3=Xionghua| title=A rational spectral collocation method for solving a class of parameterized singular perturbation problems|date=2009|journal=  Journal of Computational and Applied Mathematics|volume=233|issue=10|pages=2652&ndash;2660|doi=10.1016/j.cam.2009.11.011|doi-access=free}}.
* {{Citation | last1=Wang | first1=Yingwei | last2=Chen|first2=Suqin|last3=Wu|first3=Xionghua| title=A rational spectral collocation method for solving a class of parameterized singular perturbation problems|date=2009|journal=  Journal of Computational and Applied Mathematics|volume=233|issue=10|pages=2652&ndash;2660|doi=10.1016/j.cam.2009.11.011|doi-access=free}}.
 
{{refend}}





Latest revision as of 03:40, 12 March 2026

Short description: Mathematical method for approximating solutions to differential and integral equations

In mathematics, a collocation method is a method for the numerical solution of ordinary differential equations, partial differential equations and integral equations. The idea is to choose a finite-dimensional space of candidate solutions (usually polynomials up to a certain degree) and a number of points in the domain (called collocation points), and to select that solution which satisfies the given equation at the collocation points.

Ordinary differential equations

Suppose that the ordinary differential equation y(t)=f(t,y(t)),y(t0)=y0, is to be solved over the interval [t0,t0+h]. Choose ck from 0 ≤ c1< c2< ... < cn ≤ 1.

The corresponding (polynomial) collocation method approximates the solution y by the polynomial p of degree n which satisfies the initial condition p(t0)=y0, and the differential equation p(tk)=f(tk,p(tk)) at all collocation points tk=t0+ckh for k=1,,n. This gives n + 1 conditions, which matches the n + 1 parameters needed to specify a polynomial of degree n.

All these collocation methods are in fact implicit Runge–Kutta methods. The coefficients ck in the Butcher tableau of a Runge–Kutta method are the collocation points. However, not all implicit Runge–Kutta methods are collocation methods. [1]

Example: The trapezoidal rule

Pick, as an example, the two collocation points c1 = 0 and c2 = 1 (so n = 2). The collocation conditions are

p(t0)=y0,p(t0)=f(t0,p(t0)),p(t0+h)=f(t0+h,p(t0+h)).

There are three conditions, so p should be a polynomial of degree 2. Write p in the form

p(t)=α(tt0)2+β(tt0)+γ

to simplify the computations. Then the collocation conditions can be solved to give the coefficients

α=12h(f(t0+h,p(t0+h))f(t0,p(t0))),β=f(t0,p(t0)),γ=y0.

The collocation method is now given (implicitly) by

y1=p(t0+h)=y0+12h(f(t0+h,y1)+f(t0,y0)),

where y1 = p(t0 + h) is the approximate solution at t = t1 = t0 + h.

This method is known as the "trapezoidal rule" for differential equations. Indeed, this method can also be derived by rewriting the differential equation as

y(t)=y(t0)+t0tf(τ,y(τ))dτ,

and approximating the integral on the right-hand side by the trapezoidal rule for integrals.

Other examples

The Gauss–Legendre methods use the points of Gauss–Legendre quadrature as collocation points. The Gauss–Legendre method based on s points has order 2s.[2] All Gauss–Legendre methods are A-stable.[3]

In fact, one can show that the order of a collocation method corresponds to the order of the quadrature rule that one would get using the collocation points as weights.

Orthogonal collocation method

In direct collocation method, we are essentially performing variational calculus with the finite-dimensional subspace of piecewise linear functions (as in trapezoidal rule), or cubic functions, or other piecewise polynomial functions. In orthogonal collocation method, we instead use the finite-dimensional subspace spanned by the first N vectors in some orthogonal polynomial basis, such as the Legendre polynomials.

Applications

Motorsport

Top F1 teams began switching from Quasi-Static simulation to collocation methods in 2010s to simulate the time it takes for a car to go around a circuit. It is thought that Sauber were one of the first teams to make this transition. Traditional Quasi-Static simulation involves the construction of a gLat-gLong-vCar performance envelope for the car, then starting at each apex (minimum car speed) and accelerating forwards, and backwards through the braking zone using this envelope to stitch a lap together. It is a gross simplification of the problem because the envelope is steady state so ignores any of the dynamics that occur, for example, the car can switch instantaneously between understeer and oversteer.

The switch to collocation methods in simulation involved casting the entire lap as an optimisation problem, broken down by distance steps around the lap which describe the car physics at each point. The objective is to minimise laptime and error in the physics at each point. Once the optimisation is complete, the collocation method finds the minimum laptime for a particular car setup around a circuit by varying brake/throttle and steering wheel angle while obeying the physics at every point. Additional constraints can be added to the objective function alongside minimisation of laptime, such as energy constraints (fuel, electrical, tyre sliding, brakes), and temperature constraints (tyres, battery temperature), and additional controls, such as multiple throttle pedals controlling power to all four wheels can be added to the physics. This allows for extremely complex problems to be solved optimally.

Notes

References