Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di...

29
Reaction-diffusion systems Finite element method Parameter estimation Lecture on reaction diffusion systems Dario Madeo Department of Information Engineering and Mathematics Universit` a degli studi di Siena

Transcript of Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di...

Page 1: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Lecture on reaction diffusion systems

Dario Madeo

Department of Information Engineering and MathematicsUniversita degli studi di Siena

Page 2: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Reaction-diffusion systems

Widely used in many fields, such as chemistry, physics,biology, ecology, finance, etc.

Reaction-diffusion dynamics develops itself over time, but alsoover a spatial domain.

Generally, state variable u(t, x) represents the concentration ofa specific quantity at time instant t and at the spatial point x.

The variation of the concentration u is regulated by 2phenomena:

Concentration is transformed by local reactions.Concentration diffuses toward less occupied spatial region.

Page 3: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Mathematical model for reaction-diffusion systems

Ordinary differential equations (ODE) are not enough todescribe them, since there is also the spatial dimensions!

Partial differential equations (PDE) are used!

∂u

∂t− σ∆(u) = f (u)

σ > 0 is the diffusion coefficient.

∆(u) = ∂2u∂x2 + ∂2u

∂y2 regulates the diffusion.

f (u) is the reaction term.

Page 4: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Examples

Figure: Heat equation - Time evolution of a temperature profile

Figure: Subcritical Turing bifurcation: formation of a pattern from noisy initialconditions in the reaction-diffusion system of Fitzhugh-Nagumo type.

Page 5: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Strong formulation

Find u(t, x , y) ∈ C2 such that:

u − σ∆(u) = f (u) ∀t, ∀(x , y) ∈ Ω

n′∇(u) = 0 ∀(x , y) ∈ ∂Ω Boundary condition

u(0, x , y) = v(x , y) ∀(x , y) ∈ Ω Initial condition

Closed form solutions are rare!

The space C2 is to restrictive.

We need to “relax” the problem.

Page 6: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Weak formulation

Choose a test function w ∈ H1 (Sobolev space).Multiply both LHS and RHS of the PDE by w .Integrate over all the spatial domain Ω.Use the divergence theorem with the boundary condition

Find u ∈ H1 such that:

(u,w) + σa (u,w) = (f (u),w)

∀w ∈ H1

(u(0, x , y),w) = (v(x , y),w)

where

(α, β) =∫

Ω αβdΩ.a (α, β) =

∫Ω∇(α)′∇(β)dΩ.

H1α : Ω→ R :

∫Ω

(α2 + ‖∇(α)‖2

)< +∞

.

Page 7: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Galerkin approximation

Weak formulation is still hard to solve.

Reduce the size of the solution/test functions space.

Choose N linearly independent elements of H1.

spanφiNi=1 = U ⊂ H1

Find u ∈ U such that:

(u, φi ) + σa (u, φi ) = (f (u), φi )

∀φi(u(0, x , y), φi ) = (v(x , y), φi )

Page 8: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

FEM: Mesh

Finite element method (FEM) is a numerical method basedon the Galerkin approximation

Vertex

Element

The spatial domain Ω is splitted into primitive shapes, calledelements

Page 9: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

FEM: Basis functions

φi (x , y) are piecewise polynomial

φi (xj , yj) = δi ,j , where (xj , yj) is the j-th vertex.

φi (x , y) is defined on all elements that share the i-th vertex.

On the other elements, φi (x , y) is identically null.

Solution is approximated as follows:

u(t, x , y) =N∑i=1

φi (x , y)Ui (t), u(t, x , y) =N∑i=1

φi (x , y)Ui (t)

Page 10: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

FEM: Matricial formulations (1/2)

Closed form terms

(u, φi ) =N∑j=1

(φi , φj)Ui (t) =N∑j=1

mi ,j Ui (t)

a(u, φi ) =N∑j=1

a(φi , φj)Ui (t) =N∑j=1

ki ,jUi (t)

(u(0, x , y), φi ) =N∑j=1

(φi , φj)Ui (0) =N∑j=1

mi ,jUi (0)

Other terms

(f (u), φi ) = Fi (U(t))

(v(x , y), φi ) = Vi

These terms are usually evaluated by using numericalquadrature methods.

Page 11: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

FEM: Matricial formulations (2/2)

Find U(t) ∈ RN such that:

MU(t) + σKU(t) = F (U(t))∀t > 0

MU(0) = V

where

M is the mass matrix

K is the stiffness matrix

FEM approximates a PDE problem with a set of ODE

Page 12: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

FEM: Remarks (1/3)

M is also known as Gram matrix; if all φi are linearlyindependent, then M is non singular.

Suppose that there exist cj ∈ R, such that∃k 6= i : ck 6= 0 ∧ φi =

∑j 6=i cjφj ∀(x , y) ∈ Ω.

Then, φi (xi , yi ) =∑

j 6=i cjφj(xi , yi ) = 0.But φi (xi , yi ) = 1 by definition!.⇒ φiNi=1 is a linearly independent set.

M is also a positive definite matrix.

K is a semidefinite positive matrix.

Both M and K are sparse matrix.

Page 13: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

FEM: Remarks (2/3)

Consider MU(0) = V ⇒ U(0) = M−1V

The previous result is also the solution of the followingminimization problem:

arg minU(0)

∫Ω

(u(0, x , y)− v(x , y))2 dΩ

with u(0, x , y) ∈ U .

∂Uj

∫Ω

(N∑i=1

φiUi (0)− v

)2

dΩ = 0

2

∫Ω

φj

(N∑i=1

φiUi (0)− v

)dΩ = 0

N∑i=1

(φi , φj)Ui (0) = (φj , v)

Page 14: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

FEM: Remarks (3/3)

Example:

Approximation of the functionf (x) = 1

50 (x − 0.8)(x − 2.4)(x − 5)2

Ω = [0, 3] ⊂ R,N = 4

Weirsterss therorem guarantee...

Page 15: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Polynomial reaction terms

Polynomial reaction terms are used in many models:

Chemical kinetics

Malthusian growth (f (u) = ru)

Verhulst model (f (u) = ru(1− u

k

))

...

In general:

f (u) =

Np∑p=1

θpup

Page 16: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Parameter estimation

Suppose to have a reaction-diffusion model with polynomial

reaction term f (u) =∑Np

p=1 θpup.

At certain time instants ti , we measure the whole state of thesystem in all the mesh points (Y (ti ) = U(ti )).

We want to estimate the system parameters (σ, θ1, ..., θNp)using the FEM approximation of the infinite dimensionalsystem.

MU(t) + σKU(t) = F (U(t),Θ)∀t > 0

MU(0) = V

Page 17: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Standard approach

We simulate the system on fine grain mesh using Comsol(R).In this way we obtain “real world” data Y (ti ).

We use the Levemberg - Marquardt algorithm implemented inthe Optimization Toolbox for Matlab(R) to solve the followingnonlinear least square problem:

minσ,Θ

∑i

‖Y (ti )− U(ti , σ,Θ)‖2

U(ti ) are evaluated by solving the approximated system(FEM) on a coarser mesh.

Page 18: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Remarks on the standard approach

U(t) must be evaluated on-line when the algorithm changes itguess about parameters.

The Jacobian J = ∂U(ti ,σ,Θ)∂(σ,Θ) used by the minimization

algorithm is numerically approximated on-line through finitedifferences.

We could provide to the algorithm the exact way to calculateJ, but it is not known.

Numerical quadrature methods are heavily used to evaluateU(t) and J.

Definitely, we are not using any information on theunderlying system to perform the estimation (black-boxapproach).

Page 19: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

A different approach for parameter estimation

In the next slides, a different approach for parameter estimation isshown. This method is based on the work:

C.Mocenni, D.Madeo, E.Sparacino, “Linear least squaresparameter estimation of nonlinear reaction diffusion

equations”, Mathematics and Computers in Simulation 81(2011) 2244 2257

Page 20: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Our approach (1/3)

The term (up, φi ) of the reaction term can be evaluatedwithout numerical quadrature.

p = 1⇒ F (U(t)) = D1(U(t)) = MU(t)p = 2⇒ F (U(t)) = [G1U(t) · · ·GNU(t)]U(t) =D2(U(t))U(t), where Gi = (φi , φjφk)Nj,k=1

...p = P ⇒ F (U(t)) = DP(U(t))U(t)

The approximated problem can by rewritten as follows:

MU(t) + σKU(t) =

Np∑p=1

θpDp(U(t))U(t)

∀t > 0MU(0) = V

Page 21: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Our approach (2/3)

We can approximate time derivatives with Euler formula:

Y (ti+1) =U(ti+1)− U(ti )

τi=

= M−1

−σK +

Np∑p=1

θpDp(U(ti ))

U(ti )

U(0) = M−1V

where τi = ti+1 − ti , and t0 = 0. Then, following linear relationbetween measurements and parameters holds:

Y = WΛ

where Λ = (σ,Θ), and W depends on the system equation.

Page 22: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Our approach (3/3)

Y = WΛ is suitable for a least square approach!

Λ = W#Y

where W# = (W ′W )−1W ′ is the pseudo - inverse of W .

We performed both standard and new approaches on meshesof different sizes.

In the next slides, we will show the comparison of theperformances of both methods.

Page 23: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Results (1/7)

The following reaction terms have been used:

Logistic equation:f (u) = ru

(1− u

k

)(σ = 0.01, r = 0.1, k = 10).

Aleee equation: f (u) = αu + βu2 − γu3 (σ = 0.001, α =0.01, β = 0.01, γ = 0.005).

Page 24: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Results (2/7)

Nominal Est. Value Est. Value Est. ValuePar. Value N = 81 N = 121 N = 256

σ 1e-2 1.055e-2 0.998e-2 0.967e-2r 1e-1 0.983e-1 0.989e-1 0.995e-1k 10 9.999 9.999 9.998

MSE - 2.65e-5 9.97e-6 6.4e-7

Table: Estimated parameter values for the logistic equation with differentnumber of nodal points N. Linear least squares identification.

Page 25: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Results (3/7)

Nominal Est. Value Est. Value Est. ValuePar. Value N = 81 N = 121 N = 256

σ 1e-2 1.56e-2 1.41e-2 1.22e-2r 1e-1 1.037e-1 1.019e-1 1.005e-1k 10 9.788 9.899 9.962

MSE - 8.67e-3 5.08e-3 2.19e-3

Table: Estimated parameter values for the logistic equation with differentnumber of nodal points N. Nonlinear least squares identification.

Page 26: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Results (4/7)

0 5 10 15 20 25 30 35 40 45 5010

-6

10-4

10-2

100

t

MS

E

Mesh 3x3

0 5 10 15 20 25 30 35 40 45 5010

-10

10-5

100

105

t

MS

E

Mesh 10x10

Figure: Time evolution of the spatial mean square error between thesimulation of the logistic equation with nominal parameters and estimated onesin the finer (top) and coarser (bottom) meshes. Solid line: LS algorithm;dashed line: NLS algorithm.

Page 27: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Results (5/7)

Nominal Est. Value Est. Value Est. ValuePar. Value N = 81 N = 121 N = 256

σ 1e-3 0.869e-3 0.936e-3 0.952e-3α 1e-2 1.629e-2 1.623e-2 1.609e-2β 1e-2 0.644e-2 0.647e-2 0.654e-2γ 5e-3 4.511e-3 4.514e-3 4.521e-3

MSE - 2.14e-4 1.12e-4 0.91e-4

Table: Estimated parameter values for the Allee equation with differentnumber of nodal points N. Linear least squares identification.

Page 28: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Results (6/7)

Nominal Est. Value Est. Value Est. ValuePar. Value N = 81 N = 121 N = 256

σ 1e-3 3.312e-3 2.256e-3 1.513e-3α 1e-2 0.905e-2 2.313e-2 2.051e-2β 1e-2 1.129e-2 3.818e-2 4.741e-2γ 5e-3 5.248e-3 4.352e-3 4.416e-3

MSE - 1.09e-1 0.48e-1 0.99e-2

Table: Estimated parameter values for the Allee equation with differentnumber of nodal points N. Nonlinear least squares identification.

Page 29: Lecture on reaction diffusion systems - unisi.itmocenni/lecture_rds.pdf · Lecture on reaction di usion systems ... Figure: Heat equation ... the Optimization Toolbox for Matlab(R)

Reaction-diffusion systems Finite element method Parameter estimation

Results (7/7)

0 5 10 15 20 25 30 35 40 45 5010

−5

100

105

t

MS

EMesh 3x3

0 5 10 15 20 25 30 35 40 45 5010

−5

100

105

t

MS

E

Mesh 10x10

Figure: Time evolution of the spatial mean square error between thesimulation of the Allee model with nominal parameters and estimated ones inthe finer (top) and coarser (bottom) meshes. Solid line: linear LS algorithm;dashed line: nonlinear LS algorithm.