22
Optimal control of vehicles via adaptive finite element methods K. Kraft 1 S. Larsson 1 M. Lidberg 2 1 Department of Mathematical Sciences Chalmers University of Technology and Göteborg University 2 Department of Applied Mechanics Chalmers University of Technology GMMC scientific advisory board meeting, January 2008

Optimal control of vehicles via adaptive finite element

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Optimal control of vehicles via adaptive finite element

Optimal control of vehicles via adaptive finiteelement methods

K. Kraft1 S. Larsson1 M. Lidberg2

1Department of Mathematical SciencesChalmers University of Technology and Göteborg University

2Department of Applied MechanicsChalmers University of Technology

GMMC scientific advisory board meeting, January 2008

Page 2: Optimal control of vehicles via adaptive finite element

Background

• Optimal control of the dynamics of heavy vehicles.

• Relevant for electronic stability control (ESC) (closed loop).

• Adaptive finite element methods.

Page 3: Optimal control of vehicles via adaptive finite element

Optimal Control of ODEs

Find states y(t) ∈ Rd1 and controls u(t) ∈ R

d2 which fulfill

minimize J (y ,u) = l(y(0), y(T )) +

∫ T

0L(y(t),u(t)) dt

subject to y(t) = f (y(t),u(t)),

I0y(0) = y0, IT y(T ) = yT .

I0,IT are diagonal matrices with zeroes or ones on thediagonals.

Page 4: Optimal control of vehicles via adaptive finite element

Solution strategies

• Direct approach: discretize the equations and solve theoptimization problem.

• Indirect approach: derive the necessary conditions foroptimality, discretize and solve.

• We use the indirect approach.

Page 5: Optimal control of vehicles via adaptive finite element

Solution strategies

• Direct approach: discretize the equations and solve theoptimization problem.

• Indirect approach: derive the necessary conditions foroptimality, discretize and solve.

• We use the indirect approach.

Page 6: Optimal control of vehicles via adaptive finite element

Solution strategies

• Direct approach: discretize the equations and solve theoptimization problem.

• Indirect approach: derive the necessary conditions foroptimality, discretize and solve.

• We use the indirect approach.

Page 7: Optimal control of vehicles via adaptive finite element

Necessary Conditions for an OptimumVariational Calculus

Hamiltonian: H(y , λ,u) = L(y ,u) + λTf (y ,u)The optimal y and u satisfy

y =∂H∂λ

= f (y ,u),

λ = −∂H∂y

=∂L∂y

−( ∂f∂y

)T

λ,

0 =∂H∂u

=∂L∂u

+ λT ∂f∂u,

I0y(0) = y0, IT y(T ) = yT ,

(I − I0)λ(0) = λ0, (I − IT )λ(T ) = λT .

This is a Boundary Value Problem for a system of DAE.

Page 8: Optimal control of vehicles via adaptive finite element

Numerical Methods

• Shooting methods.

• Collocation methods.

• We use the Finite Element Method.

• The finite element method is based on a variationalformulation and piecewise polynomials.

• The finite element method is well suited for mathematicalanalysis.

• Admits error control and adaptive mesh generation basedon a posteriori error estimates.

Page 9: Optimal control of vehicles via adaptive finite element

Numerical Methods

• Shooting methods.

• Collocation methods.

• We use the Finite Element Method.

• The finite element method is based on a variationalformulation and piecewise polynomials.

• The finite element method is well suited for mathematicalanalysis.

• Admits error control and adaptive mesh generation basedon a posteriori error estimates.

Page 10: Optimal control of vehicles via adaptive finite element

Numerical Methods

• Shooting methods.

• Collocation methods.

• We use the Finite Element Method.

• The finite element method is based on a variationalformulation and piecewise polynomials.

• The finite element method is well suited for mathematicalanalysis.

• Admits error control and adaptive mesh generation basedon a posteriori error estimates.

Page 11: Optimal control of vehicles via adaptive finite element

Numerical Methods

• Shooting methods.

• Collocation methods.

• We use the Finite Element Method.

• The finite element method is based on a variationalformulation and piecewise polynomials.

• The finite element method is well suited for mathematicalanalysis.

• Admits error control and adaptive mesh generation basedon a posteriori error estimates.

Page 12: Optimal control of vehicles via adaptive finite element

Numerical Methods

• Shooting methods.

• Collocation methods.

• We use the Finite Element Method.

• The finite element method is based on a variationalformulation and piecewise polynomials.

• The finite element method is well suited for mathematicalanalysis.

• Admits error control and adaptive mesh generation basedon a posteriori error estimates.

Page 13: Optimal control of vehicles via adaptive finite element

2007Results so far

• Using an adaptive FEM to determine the optimal control ofa vehicle during a collision avoidance manoeuvre,Proceedings of SIMS2007

• Application of a standard adaptive finite element method toan optimal control problem from vehicle dynamics.

• Combine x = (y , λ), eliminate u. ODE: x = g(x)

• A posteriori error estimate for an arbitrary linear functional:

|G(x − xh)| ≤N

n=1

Rnωn

Page 14: Optimal control of vehicles via adaptive finite element

2007Results so far

• The dual weighted residuals approach to optimal control ofordinary differential equations, Preprint 2008:2.

• The Dual Weighted Residuals methodology: keep y , λ,u.

• Take advantage of the variational structure of theequations.

• A posteriori error estimate for the cost functional

|J (y ,u) − J (yh,uh)| ≤

N∑

n=1

Rynω

λ

n + Rλ

nωyn + Ru

nωun

Page 15: Optimal control of vehicles via adaptive finite element

2007Results so far

• Implemented the above algorithms in Matlab.

• The implementation is not completely general.

Page 16: Optimal control of vehicles via adaptive finite element

Future Work 1Extend the theory

• Efficient solution of the resulting linear/nonlinear algebraicequations.

• Constraints on controls and states (Pontryagin maxprinciple or slack variables).

• A priori error estimates.

Page 17: Optimal control of vehicles via adaptive finite element

Future Work 2Implementation

• Non-linear problems

• Constraints on controls and states

• More advanced models from vehicle dynamics

Page 18: Optimal control of vehicles via adaptive finite element

Midterm evaluation

• The present 2 publications: licentiate thesis of Karin Kraft.

• One more publication: realistic models from vehicledynamics.

• I hope that we will have demonstrated that adaptive FEM isuseful for optimal control of vehicles.

• (Karin Kraft, PhD 2009, expected.)

Page 19: Optimal control of vehicles via adaptive finite element

Questions, discussion

• Choice of programming language (Matlab, C++, Fortran orother)

• Include constraints on controls and states

• More interaction with GMMC

• Parameter estimation

• Stochastic control

Page 20: Optimal control of vehicles via adaptive finite element

y =

y1

y2

y3

y4

y5

y6

=

vx

vy

XY

,

y =

VX

VY

XY

=

a11

a21Vy + a22r + bf1δf + br1δr

a31Vy + a32r + bf2δf + br2δr + rbrake

rVx

Vy

Page 21: Optimal control of vehicles via adaptive finite element

I0y(0) =

2500000

,

J(y ,u) =

∫ T

0

(

Y 2 + r2 + ψ2 + δ2f

)

dt =

∫ T

0

(

‖y‖2Q + ‖u‖2

R

)

dt .

Page 22: Optimal control of vehicles via adaptive finite element

14 6 NUMERICAL EXAMPLES

Lr Lf

FyrFxr vr

αr

δr

Fyf

Fxf

vfαf δf

Ψ

vy

vx

y

x

v

β

Figure 3: The bicycle model, which is used to derive a model of the dynamics of a vehicle. Therectangles represent the wheels of the bicycle, and the dot marks the center of gravity aroundwhich the angular velocity is computed.

0 0.5 110

15

20

25

x−ve

loci

ty [m

/s]

Time [s]0 0.5 1

−0.02

0

0.02

0.04

y−ve

loci

ty [m

/s]

Time [s]

0 0.5 1−0.08

−0.06

−0.04

−0.02

0

angu

lar v

eloc

ity [r

ad/s

]

Time [s]0 5 10 15 20

0

0.005

0.01

0.015

0.02

x−position [m]

y−po

sitio

n [m

]

Figure 4: The optimal states. The last picture shows the optimal track.