numerical methods and software for non smooth dynamical...

119
Numerical methods and software for Non Smooth Dynamical Systems. The Siconos Platform Vincent Acary INRIA Rhˆ one–Alpes, Grenoble, France Introduction Outline NSDS modeling NSDS simulation. NSDS simulation. Time–Stepping NSDS simulation. Event–driven The Siconos Platform References Numerical methods and software for Non Smooth Dynamical Systems. The Siconos Platform Vincent Acary INRIA Rhˆ one–Alpes, Grenoble, France 5th international school “Topics in nonlinear Dynamics”, Piecewise smooth Dynamical systems, Naples, 18–20 September 2006

Upload: others

Post on 06-Jun-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Numerical methods and software forNon Smooth Dynamical Systems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes, Grenoble, France

5th international school “Topics in nonlinear Dynamics”,Piecewise smooth Dynamical systems,

Naples, 18–20 September 2006

Page 2: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

What is a Non Smooth Dynamical System (NSDS) ?

A Non Smooth Dynamical System (NSDS) might be characterized by twocorrelated features:

a non smooth formulation of the dynamics, for instancea non smooth vector field with respect to the state x ,(only C0 or even discontinuous)a set of non smooth laws (generalized equations) between the state x anda set of output or Lagrange multipliers λ(complementarity conditions, inclusions, projection, . . . )

a non smooth evolution with the respect to time, for instance:Jumps in the state and/or in its derivatives w.r.t. timeGeneralized solutions (distributions)

Page 3: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

A large number of Non Smooth Dynamical systems . . .

Unilateral dynamics

Dynamical complementarity systems

Differential inclusions

Piecewise smooth systems

Evolution variational inequalities

Differential variational inequalities

Time varying systems

Switched systems

Hybrid systems

Impulsive differential equations

. . .

Page 4: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

. . . for a large number of applications

Mechanical systems with unilateral constraints, impact and frictionMultibody dynamics and RoboticsGranular materials

Electrical circuits with ideal devices.Diodes, transistors, Relay, . . .Piecewise smooth devices

Control engineeringOptimal control with state constraintsSliding mode control

And many others in Physics, Biology, Economics, . . .

Page 5: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Some Applications

Simulation, modeling and control of electrical networks with idealizedcomponents (diodes, transistors, switch, ...)

DC-DC Boost Converter with Sliding mode control

Page 6: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Some Applications

Simulation, modeling and control of electrical networks with idealizedcomponents (diodes, transistors, switch, ...)

Simulation, modeling and control of mechanical systems

Simulation of Circuit breakers(INRIA/Schneider Electric)

Page 7: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Some Applications

Simulation, modeling and control of electrical networks with idealizedcomponents (diodes, transistors, switch, ...)

Simulation, modeling and control of mechanical systems BipedalRobot INRIA BIPOP

Page 8: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Some Applications

Simulation, modeling and control of electrical networks with idealizedcomponents (diodes, transistors, switch, ...)

Simulation, modeling and control of mechanical systems

Granular flow in a siloLMGC Montpellier

Granular SegregationLMGC Montpellier

Page 9: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Some Applications

Simulation, modeling and control of electrical networks with idealizedcomponents (diodes, transistors, switch, ...)

Simulation, modeling and control of mechanical systems

There are also applications in biology, macro-economics, ..

Page 10: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Non Smooth modeling vs. Hybrid Modeling

NSDS are a special class of Hybrid Systems with a strong mathematicalstructureÜ The NSDS modeling is used to take profit of this mathematicalframework for efficient simulation and well-posedness

Use of Mathematical programming formulations and techniques(LCP, QP)

Better than enumerative algorithm for conditional statement (diodecharacteristics)polynomial complexity for well-posed physical systems.

Use of specific time-stepping schemes without explicit event handlingprocedure.

Better than Event-Driven strategies for a huge number of discrete events.Ability to handle functions of bounded variations (finite accumulations ofdiscontinuities.)Definition of global solutions in the space of distributions.

But all hybrid systems can not be cast into the nonsmooth dynamicalframework . . .

Page 11: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

1 Introduction

2 Non Smooth Dynamical Systems modelingLagrangian dynamical systemsDynamical complementarity systemsPiece-Wise affine (PWA) and piece-wise continuous (PWC) systems

3 Non Smooth Dynamical Systems simulation.Main approachesComparison

4 Non Smooth Dynamical Systems simulation. Time–steppingPrincipleTime stepping scheme for Linear Complementarity Systems (LCS)Time Discretization of the Lagrangian non smooth dynamicsSummary

5 Non Smooth Dynamical Systems simulation. Event-DrivenEvent-Driven scheme. PrincipleThe Event-driven scheme for Lagrangian Dynamical systemsComments and extensions

6 The Siconos PlatformIntroductionSiconos Kernel DesignExamplesDocumentation and Distribution

Page 12: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

The smooth multibody dynamics

Definition (Smooth multibody dynamics)8<:M(q)dv

dt+ F (t, q, v) = 0,

v = q(1)

where

F (t, q, v) = N(q, v) + Fint(t, q, v)− Fext(t)

Definition (Boundary conditions)

Initial Value Problem (IVP):

t0 ∈ R, q(t0) = q0 ∈ Rn, v(t0) = v0 ∈ Rn, (2)

Boundary Value Problem (BVP):

(t0, T ) ∈ R× R, Γ(q(t0), v(t0), q(T ), v(T )) = 0 (3)

Page 13: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Perfect unilateral constraints

Unilateral constraints

Finite set of ν unilateral constraints on the generalized coordinates :

g(q, t) = [gα(q, t) > 0, α ∈ {1 . . . ν}]T . (4)

Admissible set C(t)

C(t) = {q ∈M(t), gα(q, t) > 0, α ∈ {1 . . . ν}} . (5)

Normal cone to C(t)

NC(t)(q(t)) =

(y ∈ Rn, y = −

λα∇gα(q, t), λα > 0, λαgα(q, t) = 0

)(6)

Page 14: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Unilateral constraints as an inclusion

Definition (Perfect unilateral constraints on the smooth dynamics)

Introduction of the multipliers µ ∈ Rm8>><>>:M(q)

dv

dt+ F (t, q, v) = r

−r ∈ NC(t)(q(t))

(7)

where r = ∇Tq g(q, t) λ are the generalized forces or generalized reactions

due to the constraints.

Remark

The unilateral constraints are said to be perfect due to the normalitycondition.

Notion of normal cones can be extended to more general sets. see(Clarke, 1975, 1983 ; Mordukhovich, 1994)

The right hand side is neither bounded (and then nor compact).

The inclusion and the constraints concern the second order timederivative of q.

Ü Standard Analysis of DI does no longer apply.

Page 15: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Non Smooth Lagrangian Dynamics

Fundamental assumptions.

The velocity v = q is of Bounded Variations (B.V)Ü The equation are written in terms of a right continuous B.V.(R.C.B.V.) function, v+ such that

v+ = q+ (8)

q is related to this velocity by

q(t) = q(t0) +

Z t

t0

v+(t) dt (9)

The acceleration, ( q in the usual sense) is hence a differentialmeasure dv associated with v such that

dv(]a, b]) =

Z]a,b]

dv = v+(b)− v+(a) (10)

Page 16: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Non Smooth Lagrangian Dynamics

Definition (Non Smooth Lagrangian Dynamics)

8><>:M(q)dv + F (t, q, v+)dt = dr

v+ = q+

(11)

where dr is the reaction measure and dt is the Lebesgue measure.

Remarks

The non smooth Dynamics contains the impact equations and thesmooth evolution in a single equation.

The formulation allows one to take into account very complexbehaviors, especially, finite accumulation (Zeno-state).

This formulation is sound from a mathematical Analysis point of view.

References

(Schatzman, 1973, 1978 ; Moreau, 1983, 1988)

Page 17: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Non Smooth Lagrangian Dynamics

Decomposition of measuredv = γ dt+ (v+ − v−) dν+ dvs

dr = f dt+ p dν+ drs(12)

where

γ = q is the acceleration defined in the usual sense.

f is the Lebesgue measurable force,

v+ − v− is the difference between the right continuous and the leftcontinuous functions associated with the B.V. function v = q,

dν is a purely atomic measure concentrated at the time ti ofdiscontinuities of v , i.e. where (v+ − v−) 6= 0,i.e. dν =

Pi δti

p is the purely atomic impact percussions such that pdν =P

i piδti

dvS and drS are singular measures with the respect to dt + dη.

Page 18: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Impact equations and Smooth Lagrangian dynamics

Substituting the decomposition of measures into the non smoothLagrangian Dynamics, one obtains

Definition (Impact equations)

M(q)(v+ − v−)dν = pdν, (13)

orM(q(ti ))(v

+(ti )− v−(ti )) = pi , (14)

Definition (Smooth Dynamics between impacts)

M(q)γdt + F (t, q, v)dt = fdt (15)

or

M(q)γ+ + F (t, q, v+) = f + [dt − a.e.] (16)

Page 19: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

The Moreau’s sweeping process of second order

Definition (Moreau (1983, 1988))

A key stone of this formulation is the inclusion in terms of velocity.Indeed, the inclusion (7) is “replaced” by the following inclusion8>>>>><>>>>>:

M(q)dv + F (t, q, v+)dt = dr

v+ = q+

−dr ∈ NTC (q)(v+)

(17)

Comments

This formulation provides a common framework for the non smoothdynamics containing inelastic impacts without decomposition.Ü Foundation for the time–stepping approaches.

Page 20: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

The Moreau’s sweeping process of second order

Comments

The inclusion concerns measures. Therefore, it is necessary to definewhat is the inclusion of a measure into a cone.

The inclusion in terms of velocity v+ rather than of the coordinates q.

Interpretation

Inclusion of measure, −dr ∈ KCase dr = r ′dt = fdt.

−f ∈ K (18)

Case dr = piδi .−pi ∈ K (19)

Inclusion in terms of the velocity. Viability LemmaIf q(t0) ∈ C(t0), then

v+ ∈ TC (q), t > t0 ⇒ q(t) ∈ C(t), t > t0

Ü The unilateral constraints on q are satisfied. The equivalenceneeds at least an impact inelastic rule.

Page 21: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

The Moreau’s sweeping process of second order

The case of C is finitely represented

C = {q ∈M(t), gα(q) > 0, α ∈ {1 . . . ν}} . (20)

Decomposition of dr and v+ onto the tangent and the normal cone.

dr =Xα

∇Tq gα(q) dλα (21)

U+α = ∇qgα(q) v+, α ∈ {1 . . . ν} (22)

Complementarity formulation (under constraints qualification condition)

− dλα ∈ NTIR+(gα)(U

+α ) ⇔ if gα(q) 6 0, then 0 6 U+

α ⊥ dλα > 0

(23)

The case of C is IR+

− dr ∈ NC (q) ⇔ 0 6 q ⊥ dr > 0 (24)

is replaced by

− dr ∈ NTC (q)(v+) ⇔ if q 6 0, then 0 6 v+ ⊥ dr > 0 (25)

Page 22: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Lagrangian systems with Contact and Coulomb’s Friction

Local frame at contact (n, t)y = ynn+yt, y = ynn+yt

λ = λnn + λt,

Page 23: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Lagrangian systems with Contact and Coulomb’s Friction

Local frame at contact (n, t)y = ynn+yt, y = ynn+yt

λ = λnn + λt,

Unilateral contact

0 6 yn ⊥ λn > 0 ⇐⇒ −λn ∈ ∂ΨIR+ (yn)

ifyn 6 0, 0 6 yn ⊥ λn > 0

Page 24: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Lagrangian systems with Contact and Coulomb’s Friction

Local frame at contact (n, t)y = ynn+yt, y = ynn+yt

λ = λnn + λt,

Unilateral contact

0 6 yn ⊥ λn > 0 ⇐⇒ −λn ∈ ∂ΨIR+ (yn)

ifyn 6 0, 0 6 yn ⊥ λn > 0

Coulomb’s Frictionµ Coefficient of friction,C(µλn) = {λt, ‖λt‖ 6 µλn} Coulomb’s cone(

yt = 0, ‖λt‖ 6 µλn

yt 6= 0, λt = −µλnsign(yt)

⇐⇒ yt ∈ ∂ΨC(µλn)(−λt) ⇐⇒ −λt ∈ ∂Ψ∗C(µλn)(yt)

Page 25: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Lagrangian systems with Contact and Coulomb’s Friction

Local frame at contact (n, t)y = ynn+yt, y = ynn+yt

λ = λnn + λt,

Unilateral contact

0 6 yn ⊥ λn > 0 ⇐⇒ −λn ∈ ∂ΨIR+ (yn)

ifyn 6 0, 0 6 yn ⊥ λn > 0

Coulomb’s Frictionµ Coefficient of friction,C(µλn) = {λt, ‖λt‖ 6 µλn} Coulomb’s cone(

yt = 0, ‖λt‖ 6 µλn

yt 6= 0, λt = −µλnsign(yt)

⇐⇒ yt ∈ ∂ΨC(µλn)(−λt) ⇐⇒ −λt ∈ ∂Ψ∗C(µλn)(yt)

(Newton) Impact law, if necessary, e coefficient of restitution

yn(t+) = −eyn(t

−)

Page 26: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Dynamical Complementarity systems

Definition (Generalized Dynamical Complementarity Systems (GDCS)(semi-explicit form))

A generalized Dynamical Complementarity System (DCS) in asemi-explicit form is defined by8><>:

x = f (x , t, λ)

y = h(x , λ)

C∗ 3 y ⊥ λ ∈ C

(26)

where C and C∗ are a pair of dual closed convex cones (C∗ = −C◦).

Definition (Dynamical Complementarity Systems (DCS) )

A Dynamical Complementarity System (DCS) in a explicit form is definedby 8><>:

x = f (x , t, λ)

y = h(x , λ)

0 6 y ⊥ λ > 0

(27)

Page 27: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Dynamical Complementarity systems

Definition (Linear Complementarity Systems (LCS))

A Linear Complementarity System (LCS) is defined by8><>:x = Ax + Bλ

y = Cx + Dλ

0 6 y ⊥ λ > 0

(26)

Page 28: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Dynamical Complementarity systems

Definition (Non Linear complementarity systems (NLCS))

A Non Linear Complementarity System usually (NLCS) is defined by thefollowing system: 8><>:

x = f (x , t) + g(x)T λ

y = h(x , λ)

0 6 y ⊥ λ > 0

(26)

Definition (Gradient Type Complementarity Problem (GTCS))

A Gradient Type Complementarity Problem (GTCS) is defined by thefollowing system: 8><>:

x(t) + f (x(t)) = ∇Tx g(x)λ

y = g(x(t))

0 6 y ⊥ λ > 0

(27)

Page 29: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

The notion of relative degree. Well-posedness

Definition (Relative degree in the SISO case)

Let us consider a linear system in state representation given by thequadruplet (A, B, C , D) ∈ IRn×n × IRn×m × IRm×n × IRm×m:(

x = Ax + Bλ

y = Cx + Dλ(28)

In the Single Input/ Single Output (SISO) case (m = 1), the relativedegree is defined by the first non zero Markov parameters :

D, CB, CAB, CA2B, . . . , CAr−1B, . . . (29)

In the multiple input/multiple output (MIMO) case (m > 1), anuniform relative degree is defined as follows. If D is non singular, therelative degree is equal to 0. Otherwise, it is assumed to be the firstpositive integer r such that

CAiB = 0, i = 0 . . . q − 2 (30)

whileCAr−1B is non singular. (31)

Page 30: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

The notion of relative degree. Well-posedness

Interpretation

The Markov parameters arise naturally when we derive with respect totime the output y ,

y = Cx + Dλ

y = CAx + CBλ, if D = 0

y = CA2x + CABλ, if D = 0, CB = 0

. . .

y (r) = CArx + CAr−1Bλ, if D = 0, CB = 0, CAr−2B = 0, r = 1 . . . r − 2

. . .

and the first non zero Markov parameter allows us to define the output ydirectly in terms of the input λ.

Page 31: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

The notion of relative degree. Well-posedness

Example

Third relative degree LCS Let us consider the following LCS:8><>:...x (t) = λ, x(0) = x0 > 0

y(t) = x(t)

0 6 y ⊥ λ > 0

(28)

The function x : [0, T ] → IR is usually assumed to be an absolutelycontinuous function of time.

If y = x > 0 becomes active, i.e., x = 0,If x > 0, the system will instantaneously leaves the constraints.If x < 0, x > 0, the velocity needs to jump to respect the constraint int+. (B.V. function ?)If x < 0, x < 0, the velocity and the acceleration need to jump to respectthe constraint in t+. (Dirac + B.V. function )

Ü x < 0 and therefore λ may be derivative of Dirac distribution.

Problem: From the mathematical point of view, a constraint of the typeλ > 0 has no mathematical meaning !!

Restrictions

Ü In this lecture, we will focus on LCS of relative degree r 6 1.

Page 32: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

The passive LCS.

Relative degree 0

Let us consider a LCS of relative degree 0 i.e. with D which is nonsingular. 8><>:

x = Ax + Bλ, x(0) = x0

y = Cx + Dλ

0 6 y ⊥ λ > 0

(29)

Mathematical properties

D is non singular Ü poor interest

Existence and Uniqueness.”B.SOL(Cx, D) is a singleton”:B.SOL(Cx0, D) is a singleton is equivalent to stating that the LCS (33)

has a unique C 1 solution defined at all t > 0.Denoting by Λ(x) = B.SOL(Cx, D), the LCS can be viewed as a standardODE with a Lipschitz r.h.s :

x = Ax + Λ(x) = Ax + B.SOL(Cx, D) (30)

Special important case: D is a P-matrix, (LCP(q, M) has a uniquesolution for all q ∈ IRn if M is a P-matrix.) The Lipschitz property of theLCP solution with the respect to x is shown in Cottle et al. (1992).

Stability theory (Camlibel et al., 2006) and for the numericalintegration, the problem is a little more tricky because Λ(x) is onlyB-differentiable.

Page 33: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

The passive LCS.

Example

To complete this section, a example of non existence and non uniquenessof solutions is provided for a LCS of relative degree 0. This example istaken from Heemels & Brogliato (2003). Let us consider the followingLCS 8><>:

x = −x + λ

y = x − λ

0 6 y ⊥ λ > 0

(31)

This system is strictly equivalent to

x =

(−x , if x > 0

0, if x > 0(32)

which leads to non existence of solutions for x(0) < 0 and to nonuniqueness for for x(0) > 0.

Page 34: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

The passive LCS.

Relative degree 1

Let us consider a LCS of relative degree 1 i.e. with CB which is nonsingular. 8><>:

x = Ax + Bλ, x(0) = x0

y = Cx

0 6 y ⊥ λ > 0

(33)

Mathematical properties

The Rational Complementarity problem Heemels (1999) ;Camlibel (2001) ; Camlibel et al. (2002). The P-matrix propertyplays henceforth a fundamental role and provides the existence ofglobal solution of the LCS in the sense of Caratheodory.

Special case B = CT uses some EVI results for the well-posednessand the stability of such a systems (Goeleven & Brogliato, 2004).

Page 35: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

The passive LCS.

Comments

The passive linear systems are a class for which a “stored energy” in thesystem is only decreasing (see for more details, (Camlibel, 2001 ;Heemels & Brogliato, 2003)). The passive linear systems are ofrelative degree > 1.

Page 36: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

The passive LCS.

Example (The RLC circuit with a diode)

A LC oscillator supplying a load resistor through a half-wave rectifier (seefigure 1).

iR

R

CiD

vD

vR

vL

iL

L

vC

iC

v2

v1

Figure: Electrical oscillator with half-wave rectifier

Page 37: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

The passive LCS.

Example (The RLC circuit with a diode)

Kirchhoff laws :vL = vC

vR + vD = vC

iC + iL + iR = 0iR = iD

Branch constitutive equations for linear devices are :

iC = CvC

vL = LiLvR = RiR

”branch constitutive equation” of the ideal diode

0 6 iD ⊥ −vD > 0

Page 38: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

The passive LCS.

Example (The RLC circuit with a diode)

The following LCS is obtained :„vL

iL

«=

„0 −1

C1L

0

«·

„vL

iL

«+

„ −1C0

«· iD

together with a state variable x and one of the complementary variables λ:

x =

„vL

iL

«y =

`−vD

´and

λ = iD

0 6 y ⊥ λ > 0

Page 39: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Piece-Wise affine (PWA) and piece-wise continuous (PWC)systems

Definition (Piece-Wise affine (PWA) systems)

A Piece-Wise affine (PWA) system can be defined by systems of the form

x(t) = Aix(t) + ai , x(t) ∈ Xi (34)

where

{Xi}i∈I ⊂ IRn, partition of the state space in closed (possiblyunbounded) polyhedral cells with disjoint interior,

the matrix Ai ∈ IRn×n and the vector ai ∈ IRn defines an affinesystem on each cell.

Page 40: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Piece-Wise affine (PWA) and piece-wise continuous (PWC)systems

Nature of solution (Johansson & Rantzer, 1998)

Solution: a continuous piecewise C1 function x(t) ∈ ∪i∈I Xi on the timeinterval [0, T ] with for every t ∈ [0, T ] such the derivative x(t) is defined,the equation x(t) = Aix(t) + ai , holds for all i with x(t) ∈ Xi ..

Remarks

The definition is relatively rough, but can suffice to understand what typeof solutions are sought. Indeed, If some discontinuity of the r.h.s isallowed, the canonical problem with the sign function can be cast intosuch a formalism. We know that the existence of solution is notguaranteed for such a r.h.s. . The authors Johansson & Rantzer(1998) circumvent this problem excluding arbitrarily such cases. A properdefinition of solution could be given by the Filippov (1988) or Utkin(1977) solutions of the system:

x(t) = convj∈J{Aix(t) + ai} with J = {j, x(t) ∈ Xj} (34)

Page 41: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Piece-Wise Continuous (PWC) systems

Definition (Piece-Wise Continuous (PWC) systems)

A Piece-Wise Continuous (PWC) systems can be defined by

x(t) = fi (x , t), x(t) ∈ Xi (35)

where the continuous fi : IRn × [0, T ] → IRn defines an continuous systemon each cell.

Comments

In a general way, it is difficult to understand what is the interest in PWAand PWC systems without referring to one of the following formalisms

ODE with Lipschitz r.h.s

Filippov DI

Higher order relative degree systems

Page 42: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

Lagrangian dynamicalsystems

Dynamical complementaritysystems

Piece-Wise affine (PWA)and piece-wise continuous(PWC) systems

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

1 Introduction

2 Non Smooth Dynamical Systems modelingLagrangian dynamical systemsDynamical complementarity systemsPiece-Wise affine (PWA) and piece-wise continuous (PWC) systems

3 Non Smooth Dynamical Systems simulation.Main approachesComparison

4 Non Smooth Dynamical Systems simulation. Time–steppingPrincipleTime stepping scheme for Linear Complementarity Systems (LCS)Time Discretization of the Lagrangian non smooth dynamicsSummary

5 Non Smooth Dynamical Systems simulation. Event-DrivenEvent-Driven scheme. PrincipleThe Event-driven scheme for Lagrangian Dynamical systemsComments and extensions

6 The Siconos PlatformIntroductionSiconos Kernel DesignExamplesDocumentation and Distribution

Page 43: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

Main approaches

Comparison

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Difficulties and Approaches

Two major difficulties :

Time integration of non smooth evolutions

Solving a optimization problem together with a dynamical equilibriumconstraint

Two major approaches :

Hybrid Approach or Event–Driven ApproachHybrid multi-modal dynamical systemNeed to perform a decomposition of the evolutionEnumerative or algorithmic resolution of the mode transition process

Time-stepping approachGlobal approach with a single formulationNeed to define a global formulation of the NSDS

Page 44: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

Main approaches

Comparison

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Advantages and disadvantages. Event-Driven

Advantages

Seems easy to handle from the computational point of viewIn each modes, smooth integration between two events (ODE/DAE).At event, a optimization problem is solved without time evolution.

Disadvantages :

Scability and complexity of the algorithms

Need an accurate event detection

Accumulation of events

No existence or uniqueness results

Sensitivity to accuracy thresholds. Tuning the “ε” is a hard task.

Lead to numerical schemes suitable

Small systems with a small number of events

High accuracy in each modes

Page 45: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

Main approaches

Comparison

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

Advantages and disadvantages. Time-stepping

Advantages

Compact formulation which allow existence and uniqueness results

Dissipativity and monotonicity properties

Disadvantages :

More difficult mathematical framework

Low order accuracy

Lead to Time–stepping integration schemes (without event-handling)suitable :

Large systems with a large number of events

Accumulation of events in finite time

Convergence results and Existence proofs

Page 46: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

Main approaches

Comparison

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

1 Introduction

2 Non Smooth Dynamical Systems modelingLagrangian dynamical systemsDynamical complementarity systemsPiece-Wise affine (PWA) and piece-wise continuous (PWC) systems

3 Non Smooth Dynamical Systems simulation.Main approachesComparison

4 Non Smooth Dynamical Systems simulation. Time–steppingPrincipleTime stepping scheme for Linear Complementarity Systems (LCS)Time Discretization of the Lagrangian non smooth dynamicsSummary

5 Non Smooth Dynamical Systems simulation. Event-DrivenEvent-Driven scheme. PrincipleThe Event-driven scheme for Lagrangian Dynamical systemsComments and extensions

6 The Siconos PlatformIntroductionSiconos Kernel DesignExamplesDocumentation and Distribution

Page 47: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

Principle

Time stepping scheme forLinear ComplementaritySystems (LCS)

Time Discretization of theLagrangian non smoothdynamics

Summary

NSDS simulation.Event–driven

The Siconos Platform

References

Principle of Time–stepping schemes

1 A unique formulation of the dynamics is considered. For instance, forthe Lagrangian systems, a dynamics in terms of measures.8><>:

M(q)dv + F (t, q, v+)dt = dr

v+ = q+

(36)

2 The time-integration is based on a consistent approximation of theequations in terms of measures. For instance,Z

]tk ,tk+1]dv =

Z]tk ,tk+1]

dv = (v+(tk+1)− v+(tk )) ≈ (vk+1 − vk )(37)

3 Consistent approximation of measure inclusion.

−dr ∈ NTC (q(t))(v+(t))

(38)Ü

8>>><>>>:pk+1 ≈

Z]tk ,tk+1]

dr

pk+1 ∈ NTC (qk )(vk+1)

(39)

Page 48: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

Principle

Time stepping scheme forLinear ComplementaritySystems (LCS)

Time Discretization of theLagrangian non smoothdynamics

Summary

NSDS simulation.Event–driven

The Siconos Platform

References

Time stepping scheme for Linear Complementarity Systems(LCS)

Backward Euler scheme

Starting from the LCS 8><>:x = Ax + Bλ

y = Cx + Dλ

0 6 y ⊥ λ > 0

(40)

Camlibel et al. (2002) apply a backward Euler scheme to evaluate thetime derivative x leading to the following scheme:8>>>>><>>>>>:

xk+1 − xk

h= Axk+1 + Bλk+1

yk+1 = Cxk+1 + Dλk+1

0 6 λk+1 ⊥ yk+1 > 0

(41)

which can be reduced to a LCP by a straightforward substitution:

0 6 λk+1 ⊥ C(I − hA)−1xk + (hC(I − hA)−1B + D)λk+1 > 0 (42)

Page 49: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

Principle

Time stepping scheme forLinear ComplementaritySystems (LCS)

Time Discretization of theLagrangian non smoothdynamics

Summary

NSDS simulation.Event–driven

The Siconos Platform

References

Time stepping scheme for Linear Complementarity Systems(LCS)

Convergence results

If D is nonnegative definite or that the triplet (A, B, C) is observable andcontrollable and (A, B, C , D) is positive real, they exhibit that somesubsequences of {yk}, {λk}, {xk} converge weakly to a solution y , λ, x ofthe LCS. Camlibel et al. (2002)Such assumptions imply that the relative degree r is less or equal to 1.

Remarks

In the case of the relative degree 0, the LCS is equivalent to astandard system of ODE with a Lipschitz-continuous r.h.s field. Theresult of convergence is then similar to the standard result ofconvergence for the Euler backward scheme.

In the case of a relative degree equal to 1, the initial condition mustsatisfy the unilateral constraints y0 = Cx0 > 0. Otherwise, the

approximationxk+1 − xk

hhas non chance to converge if the state

possesses a jump. This situation is precluded in the result ofconvergence in (Camlibel et al., 2002).

Page 50: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

Principle

Time stepping scheme forLinear ComplementaritySystems (LCS)

Time Discretization of theLagrangian non smoothdynamics

Summary

NSDS simulation.Event–driven

The Siconos Platform

References

Time stepping scheme for Linear Complementarity Systems(LCS)

Remark

Following the remark ??, we can note some similarities with thecatching–up algorithm. Two main differences have however to be noted:

the first one is that the sweeping process can be equivalent to a LCSunder the condition C = BT . In this way, the previous time-steppingscheme extend the catching–up algorithm to more general systems.

The second major discrepancy is a s follows. The catching–upalgorithm does not approximate directly the time-derivative x as

x(t) ≈x(t + h)− x(t)

h(43)

but directly the measure of the time interval by

dx(]t, t + h]) = x+(t + h)− x+(t) (44)

This difference leads to a consistent time-stepping scheme if the statepossesses an initial jump. A direct consequence is that the primaryvariable µk+1 in the catching up algorithm is homogeneous to ameasure of the time-interval.

Page 51: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

Principle

Time stepping scheme forLinear ComplementaritySystems (LCS)

Time Discretization of theLagrangian non smoothdynamics

Summary

NSDS simulation.Event–driven

The Siconos Platform

References

Time stepping scheme for Linear Complementarity Systems(LCS)

θ–method

In the case of a relative degree 0, the following scheme based on aθ−method (θ ∈ [0, 1]) should work also8>>>>><>>>>>:

xk+1 − xk

h= A(θxk+1 + (1− θ)xk ) + B(θλk+1 + (1− θ)λk )

yk+1 = Cxk+1 + Dλk+1

0 6 λk+1 ⊥ wk+1 > 0

(45)

because a C1 trajectory is expected.

We have successfully tested it on electrical circuit of degree 0 in thesemi-implicit case θ ∈ [1/2, 1].

An interesting feature of such θ−method is the energy conservingproperty that they exhibit for θ = 1/2. We will see in the followingsection that the scheme can be viewed as a special case of thetime-stepping scheme proposed by Pang (2006).

Page 52: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

Principle

Time stepping scheme forLinear ComplementaritySystems (LCS)

Time Discretization of theLagrangian non smoothdynamics

Summary

NSDS simulation.Event–driven

The Siconos Platform

References

Time Discretization of the Lagrangian non smooth dynamics

For sake of simplicity, the linear time invariant case is only considered.(Mdv + (Kq + Cv+) dt = Fext dt + dr .

v+ = q+(46)

Integrating both sides of this equation over a time step ]tk , tk+1] of lengthh,8>>>>><>>>>>:

Z]tk ,tk+1]

Mdv +

Z tk+1

tk

Cv+ + Kq dt =

Z tk+1

tk

Fext dt +

Z]tk ,tk+1]

dr ,

q(tk+1) = q(tk ) +

Z tk+1

tk

v+ dt .

(47)

By definition of the differential measure dv ,Z]tk ,tk+1]

M dv = M

Z]tk ,tk+1]

dv = M (v+(tk+1)− v+(tk )) . (48)

Note that the right velocities are involved in this formulation.

Page 53: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

Principle

Time stepping scheme forLinear ComplementaritySystems (LCS)

Time Discretization of theLagrangian non smoothdynamics

Summary

NSDS simulation.Event–driven

The Siconos Platform

References

Time Discretization of the Lagrangian non smooth dynamics

The equation of the non smooth motion can be written under an integralform as:8>>>>><>>>>>:

M (v(tk+1)− v(tk )) =

Z tk+1

tk

−Cv+ − Kq + Fext dt +

Z]tk ,tk+1]

dr ,

q(tk+1) = q(tk ) +

Z tk+1

tk

v+ dt .

(49)

The following notations will be used:

qk ≈ q(tk ) and qk+1 ≈ q(tk+1),

vk ≈ v+(tk ) and vk+1 ≈ v+(tk+1),

Impulse as primary unknown

The impulsion

Z]tk ,tk+1]

dr of the reaction on the time interval ]tk , tk+1]

emerges as a natural unknown. we denote

pk+1 ≈Z

]tk ,tk+1]dr

Page 54: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

Principle

Time stepping scheme forLinear ComplementaritySystems (LCS)

Time Discretization of theLagrangian non smoothdynamics

Summary

NSDS simulation.Event–driven

The Siconos Platform

References

Time Discretization of the Lagrangian non smooth dynamics

Interpretation

The measure dr may be decomposed as follows :

dr = f dt + pdν

where f dt is the abs. continuous part of the measure dr and pdν theatomic part.

Impulse at tk + 1 : If f = 0 and pdν = pδtk+1 then pk+1 = p

Continuous multiplier : If dr = fdt and p = 0 thenpi+1 =

R tk+1tk

f (t) dt

Remark

Since discontinuities of the derivative v are to be expected if some shocksare occuring, i.e. dr has some Dirac atoms within the interval ]tk , tk+1], itis not relevant to use high order approximations integration schemes fordr . It may be shown on some examples that, on the contrary, such highorder schemes may generate artefact numerical oscillations.

Page 55: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

Principle

Time stepping scheme forLinear ComplementaritySystems (LCS)

Time Discretization of theLagrangian non smoothdynamics

Summary

NSDS simulation.Event–driven

The Siconos Platform

References

Time Discretization of the Lagrangian non smooth dynamics

Discretization of smooth terms

θ-method is used for the term supposed to be sufficiently smooth,Z tk+1

tk

Cv + Kq dt ≈ h [θ(Cvk+1 + Kqk+1) + (1− θ)(Cvk + Kqk )]Z tk+1

tk

Fext(t) dt ≈ h [θ(Fext)k+1 + (1− θ)(Fext)k ]

The displacement, assumed to be absolutely continuous is approximatedby:

qk+1 = qk + h [θvk+1 + (1− θ)vk ] .

Page 56: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

Principle

Time stepping scheme forLinear ComplementaritySystems (LCS)

Time Discretization of theLagrangian non smoothdynamics

Summary

NSDS simulation.Event–driven

The Siconos Platform

References

Time Discretization of the Lagrangian non smooth dynamics

Finally, introducing the expression of qk+1 in the first equation of (??),one obtains:ˆ

M + hθC + h2θ2K˜(vk+1 − vk ) = −hCvk − hKqk − h2θKvk

+h [θ(Fext)k+1) + (1− θ)(Fext)k ] + pk+1 , (50)

which can be written :

vk+1 = vfree + bM−1pk+1 (51)

where,

the matrix bM =ˆM + hθC + h2θ2K

˜is usually called the iteration

matrix and,

The vector

vfree = vk+ bM−1ˆ−hCvk − hKqk − h2θKvk + h [θ(Fext)k+1) + (1− θ)(Fext)k ]

˜is the so-called “free” velocity, i.e. the velocity of the system whenreaction forces are null.

Page 57: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

Principle

Time stepping scheme forLinear ComplementaritySystems (LCS)

Time Discretization of theLagrangian non smoothdynamics

Summary

NSDS simulation.Event–driven

The Siconos Platform

References

Time Discretization of the kinematics relations

According to the implicit mind, the discretization of kinematic laws isproposed as follows.For a constraint α,

Uαk+1 = Hα T (qk+1) vk+1 ,

pαk+1 = Hα(qk+1) Pα

k+1 , pk+1 =Xα

pαk+1 ,

where

Pαk+1 ≈

Z]tk ,tk+1]

dRα

.For the unilateral constraints, it is proposed

gαk+1 = gα

k + hhθUα

k+1 + (1− θ)Uαk

i.

Page 58: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

Principle

Time stepping scheme forLinear ComplementaritySystems (LCS)

Time Discretization of theLagrangian non smoothdynamics

Summary

NSDS simulation.Event–driven

The Siconos Platform

References

Discretization of the unilateral constraints

Recall that the unilateral constraint is expressed in terms of velocity as

−dRα ∈ NT+IR(gα)(U

α,+) (52)

The time discretization is performed by

−Pαk+1 ∈ NTIR+ (gα

p )(Uαk+1) (53)

where gαp is a predisction of the unilateral constraints, for instance,

gαp = gα

k +h

2Uα

k

In the complementarity formalism, we obtain

if gαp 6 0, then 0 6 Uα

k+1 ⊥ Pαk+1 > 0

Page 59: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

Principle

Time stepping scheme forLinear ComplementaritySystems (LCS)

Time Discretization of theLagrangian non smoothdynamics

Summary

NSDS simulation.Event–driven

The Siconos Platform

References

Summary of the time discretized equations

One step linear problem

(vk+1 = vfree + bM−1pk+1

qk+1 = qk + h [θvk+1 + (1− θ)vk ]

Relations

(Uα

k+1 = Hα T (qk+1) vk+1

pαk+1 = Hα(qk+1) Pα

k+1

Non Smooth Law

(if gα

p 6 0, then

0 6 Uαk+1 ⊥ Pα

k+1 > 0

One step Quasi-LCP

Uk+1 = HT (qk+1)vfree + HT (qk+1) bM−1H(qk+1) Pk+1

if gαp 6 0, then 0 6 Uα

k+1 ⊥ Pαk+1 > 0

Page 60: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

Principle

Time stepping scheme forLinear ComplementaritySystems (LCS)

Time Discretization of theLagrangian non smoothdynamics

Summary

NSDS simulation.Event–driven

The Siconos Platform

References

1 Introduction

2 Non Smooth Dynamical Systems modelingLagrangian dynamical systemsDynamical complementarity systemsPiece-Wise affine (PWA) and piece-wise continuous (PWC) systems

3 Non Smooth Dynamical Systems simulation.Main approachesComparison

4 Non Smooth Dynamical Systems simulation. Time–steppingPrincipleTime stepping scheme for Linear Complementarity Systems (LCS)Time Discretization of the Lagrangian non smooth dynamicsSummary

5 Non Smooth Dynamical Systems simulation. Event-DrivenEvent-Driven scheme. PrincipleThe Event-driven scheme for Lagrangian Dynamical systemsComments and extensions

6 The Siconos PlatformIntroductionSiconos Kernel DesignExamplesDocumentation and Distribution

Page 61: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

Event-Driven scheme.Principle

The Event-driven scheme forLagrangian Dynamicalsystems

Comments and extensions

The Siconos Platform

References

Principle

Time-decomposition of the dynamics in

modes, time-intervals in which the dynamics is smooth,

discrete events, times where the dynamics is nonsmooth.

The following assumptions guarantee the existence and the consistency ofsuch a decomposition

The definition and the localization of the discrete events. The set ofevents is negligible with the respect to Lebesgue measure.

The definition of time-intervals of non-zero lengths. the events are offinite number and ”well-separated” in time. Problems with finiteaccumulations of impacts, or Zeno-state

Comments

On the numerical point of view, we need

detect events with for instance root-finding procedure.Dichotomy and interval arithmeticNewton procedure for C 2 function and polynomials

solve the non smooth dynamics at events with a reinitialization ruleof the state,

integrate the smooth dynamics between two events with any ODEsolvers.

Page 62: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

Event-Driven scheme.Principle

The Event-driven scheme forLagrangian Dynamicalsystems

Comments and extensions

The Siconos Platform

References

Reformulations of the unilateral constraints on Differentkinematics levels

Comments

Solving the smooth dynamics requires that the complementarity condition0 6 g ⊥ F+(t) > 0 must be written now at different kinematic level, i.e.in terms of right velocity U+

N and in terms of accelerations Γ+N .

Differentiation of the constraints w.r.t time

The constraints g = g(q(t)) can de differentiate with respect to time asfollows in the Lagrangian setting:(

g+ = U+N = ∇qg(q)v+

g+ = U+N = ΓN = ∇qg(q)γ+ + ˙∇qg(q)v+

(54)

Page 63: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

Event-Driven scheme.Principle

The Event-driven scheme forLagrangian Dynamicalsystems

Comments and extensions

The Siconos Platform

References

Reformulations of the unilateral constraints on Differentkinematics levels

At the velocity level

Assuming that U+N is right-continuous by definition of the right limit of a

B.V. function, the complementarity condition implies, in terms of velocity,the following relation,

− F+ ∈

8><>:0 if g > 0

0 if g = 0, U+N > 0

]−∞, 0] if g = 0, U+N = 0

. (55)

A rigorous proof of this assertion can be found in Glocker (2001).

Page 64: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

Event-Driven scheme.Principle

The Event-driven scheme forLagrangian Dynamicalsystems

Comments and extensions

The Siconos Platform

References

Reformulations of the unilateral constraints on Differentkinematics levels

Equivalent formulations

Inclusion into NIR+ (U+N )

− F+ ∈(

0 if g > 0

NIR+ (U+N ) if g = 0

(55)

Inclusion into NTIR+(g)(U+

N )

− F+ ∈ NTIR+(g)(U+

N ) (56)

In a complementarity formalism

if g = 0 0 6 U+N ⊥ F+ > 0

if g > 0 F+ = 0(57)

Page 65: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

Event-Driven scheme.Principle

The Event-driven scheme forLagrangian Dynamicalsystems

Comments and extensions

The Siconos Platform

References

Reformulations of the unilateral constraints on Differentkinematics levels

At the acceleration level

In the same way, the complementarity condition can be written at theacceleration level as follows.

− F+ ∈

8>>><>>>:0 if g > 0

0 if g = 0, U+N > 0

0 if g = 0, U+N = 0, ΓN > 0

]−∞, 0] if g = 0, U+N = 0, ΓN = 0

(58)

A rigorous proof of this assertion can be found in Glocker (2001).

Page 66: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

Event-Driven scheme.Principle

The Event-driven scheme forLagrangian Dynamicalsystems

Comments and extensions

The Siconos Platform

References

Reformulations of the unilateral constraints on Differentkinematics levels

Equivalent formulations

Inclusion into a cone NIR+ (ΓN)

− F+ ∈

8><>:0 if g > 0

0 if g = 0, U+N > 0

NIR+ (ΓN)

(58)

Inclusion into NTTIR+ (g)(U+N

)(Γn)

− F+ ∈ NTTIR+ (g)(U+N

)(Γn) (59)

In the complementarity formalism,

if g = 0, U+N = 0 0 6 Γ+

N ⊥ F+ > 0otherwise F+ = 0

(60)

Page 67: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

Event-Driven scheme.Principle

The Event-driven scheme forLagrangian Dynamicalsystems

Comments and extensions

The Siconos Platform

References

Reformulations of the smooth dynamics at accelerationlevel.

The smooth dynamics as an inclusion

8>>>>>>>>>>><>>>>>>>>>>>:

M(q(t))γ+(t) + F (t, q, v+) = f +(t)

ΓN = ∇qg(q)γ+ + ˙∇qg(q)v+

f +(t) = ∇qg(q(t))T F+(t)

−F+ ∈ NTTIR+ (g)(U+N

)(Γn)

(61)

Page 68: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

Event-Driven scheme.Principle

The Event-driven scheme forLagrangian Dynamicalsystems

Comments and extensions

The Siconos Platform

References

Reformulations of the smooth dynamics at accelerationlevel.

The smooth dynamics as a LCP

When the condition, g = 0, U+N = 0 is satisfied, we obtain the following

LCP 8>>>>><>>>>>:

M(q(t))γ+(t) + F (t, q, v+) = ∇qg(q(t))T F+(t)

Γ+N = ∇qg(q)γ+ + ˙∇qg(q)v+

0 6 Γ+N ⊥ F+ > 0

(62)

which can be reduced on variable Γ+N and F+, if M(q(t)) is invertible,8>>><>>>:

Γ+N = ∇qg(q)M−1(q(t))(−F (t, q, v+)) + ˙∇qg(q)v+

+∇qg(q)M−1∇qg(q(t))T F+(t)

0 6 Γ+N ⊥ F+ > 0

(63)

Page 69: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

Event-Driven scheme.Principle

The Event-driven scheme forLagrangian Dynamicalsystems

Comments and extensions

The Siconos Platform

References

The multi-contact case and the index-sets

Index sets

The index set I is the set of all unilateral constraints in the system

I = {1 . . . ν} ⊂ IN (64)

The index-set Ic is the set of all active constraints of the system,

Ic = {α ∈ I , gα = 0} ⊂ I (65)

and the index-set Is is the set of all active constraints of the system with arelative velocity equal to zero,

Is = {α ∈ Ic , UαN = 0} ⊂ Ic (66)

Page 70: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

Event-Driven scheme.Principle

The Event-driven scheme forLagrangian Dynamicalsystems

Comments and extensions

The Siconos Platform

References

The multi-contact case and the index-sets

Impact equations8>>>>>>>>>>>>><>>>>>>>>>>>>>:

M(q(ti ))(v+(ti )− v−(ti )) = pi ,

U+N (ti ) = ∇qg(q(ti ))v

+(ti )

U−N (ti ) = ∇qg(q(ti ))v−(ti )

pi = ∇Tq g(q(ti ))PN,i

PαN,i = 0; Uα,+

N (ti ) = Uα,−N (ti ), ∀α ∈ I \ Ic

0 6 U+,αN (ti ) + eU−,α

N (ti ) ⊥ PαN,i > 0, ∀α ∈ Ic

(67)

Using the fact that PαN,i = 0 for α ∈ I \ Ic , this problem can be reduced on

the local unknowns U+N (ti ), PN,i ∀α ∈ Ic .

Page 71: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

Event-Driven scheme.Principle

The Event-driven scheme forLagrangian Dynamicalsystems

Comments and extensions

The Siconos Platform

References

The multi-contact case and the index-sets

Modes for the smooth Dynamics

The smooth unilateral dynamics as a LCP8>>>>>>>>>><>>>>>>>>>>:

M(q)γ+ + Fint(·, q, v) = Fext +∇qg(q)T F+

Γ+N = ∇qg(q)γ+ + ˙∇qg(q)v+

F+,α = 0, ∀α ∈ I \ Is

0 6 Γ+,αN ⊥ F+,α > 0 ∀α ∈ Is

(68)

The smooth bilateral dynamics8>>>>>>>>>><>>>>>>>>>>:

M(q)γ+ + Fint(·, q, v) = Fext +∇qg(q)T F+

Γ+N = ∇qg(q)γ+ + ˙∇qg(q)v+

F+,α = 0, ∀α ∈ I \ Is

Γ+,αN = 0 ∀α ∈ Is

(69)

Page 72: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

Event-Driven scheme.Principle

The Event-driven scheme forLagrangian Dynamicalsystems

Comments and extensions

The Siconos Platform

References

The multi-contact case and the index-sets. An algorithm

Require: (gk , UN,k , Ic,k , Is,k ),Ensure: (gk+1, UN,k+1, Ic,k+1, Is,k+1)

Time-integration on [tk , tk+1] of the system (69) according to Ic,k andIs,k up to an event.Compute the temporary index-sets Ic,k+1 and Is,k+1.if Ic,k+1 r Is,k+1 6= ∅ then

//Impacts occur.

Solve the LCP (67).Update the index-set Ic,k+1 and temporary Is,k+1

Check that Ic,k+1 r Is,k+1 = ∅end ifif Is,k+1 6= ∅ then

Solve the LCP (68)for α ∈ Is,k+1 do

if ΓN,α,k+1 > 0, Fα,k+1 = 0 thenremove α from Is,k+1 and Ic,k+1

else if ΓN,α,k+1 = 0, Fα,k+1 = 0 then//Undetermined case.

end ifend for

end if// Go to the next time step

Page 73: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

Event-Driven scheme.Principle

The Event-driven scheme forLagrangian Dynamicalsystems

Comments and extensions

The Siconos Platform

References

The multi-contact case and the index-sets

Page 74: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

Event-Driven scheme.Principle

The Event-driven scheme forLagrangian Dynamicalsystems

Comments and extensions

The Siconos Platform

References

Comments and extensions

Extensions to Coulomb’s friction

The set Ir is the set of sticking or rolling contact:

Ir = {α ∈ Is , UαN = 0, ‖UT‖ = 0} ⊂ Is , (70)

is the set of sticking or rolling contact, and

It = {α ∈ Is , UαN = 0, ‖UT‖ > 0} ⊂ Is , (71)

is the set of slipping or sliding contact.

Remarks

In the 3D case, checking the events and the transition sticking/sliding andsliding/sticking is not a easy task.

Page 75: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

Event-Driven scheme.Principle

The Event-driven scheme forLagrangian Dynamicalsystems

Comments and extensions

The Siconos Platform

References

1 Introduction

2 Non Smooth Dynamical Systems modelingLagrangian dynamical systemsDynamical complementarity systemsPiece-Wise affine (PWA) and piece-wise continuous (PWC) systems

3 Non Smooth Dynamical Systems simulation.Main approachesComparison

4 Non Smooth Dynamical Systems simulation. Time–steppingPrincipleTime stepping scheme for Linear Complementarity Systems (LCS)Time Discretization of the Lagrangian non smooth dynamicsSummary

5 Non Smooth Dynamical Systems simulation. Event-DrivenEvent-Driven scheme. PrincipleThe Event-driven scheme for Lagrangian Dynamical systemsComments and extensions

6 The Siconos PlatformIntroductionSiconos Kernel DesignExamplesDocumentation and Distribution

Page 76: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Overview of the Siconos Platform

Context

The Siconos Platform is one of the main outcome of the Siconos EUproject.

Functionalities

Modeling, simulation, (analysis and control) of Non Smooth DynamicalSystems.

Constraints and Requirements

various applications fields (Mechanics, Electronics . . . ) andcorresponding modeling habits and formulations

various mathematical and numerical tools

various skills in computer science (from the high perfomancecomputing to the Matlab users)

links and interfaces with existing softwares:low-level numerical libraries (BLAS, LAPACK, ODEPACK, . . . )Matlab or Scilab dedicated user toolboxsimulation tools for an application field: Scicos, Simulink, FEM and DEMSofware (LMGC90, . . . ), Hybrid Modeling Language (Modelica, . . . )

Page 77: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Overview of the Siconos Platform

Context

The Siconos Platform is one of the main outcome of the Siconos EUproject.

Functionalities

Modeling, simulation, (analysis and control) of Non Smooth DynamicalSystems.

Constraints and Requirements

various applications fields (Mechanics, Electronics . . . ) andcorresponding modeling habits and formulations

various mathematical and numerical tools

various skills in computer science (from the high perfomancecomputing to the Matlab users)

links and interfaces with existing softwares:low-level numerical libraries (BLAS, LAPACK, ODEPACK, . . . )Matlab or Scilab dedicated user toolboxsimulation tools for an application field: Scicos, Simulink, FEM and DEMSofware (LMGC90, . . . ), Hybrid Modeling Language (Modelica, . . . )

Page 78: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Overview of the Siconos Platform

Context

The Siconos Platform is one of the main outcome of the Siconos EUproject.

Functionalities

Modeling, simulation, (analysis and control) of Non Smooth DynamicalSystems.

Constraints and Requirements

various applications fields (Mechanics, Electronics . . . ) andcorresponding modeling habits and formulations

various mathematical and numerical tools

various skills in computer science (from the high perfomancecomputing to the Matlab users)

links and interfaces with existing softwares:low-level numerical libraries (BLAS, LAPACK, ODEPACK, . . . )Matlab or Scilab dedicated user toolboxsimulation tools for an application field: Scicos, Simulink, FEM and DEMSofware (LMGC90, . . . ), Hybrid Modeling Language (Modelica, . . . )

Page 79: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Siconos components diagram

SICONOS/Numerics API C:shared dynamic library that provides low-level solvers and algorithmsin C and fortran.Sources: NSSpack (LCP, Friction ...), odepack (Lsodar ...).

SICONOS/Kernel: API C++: compiled command files with highlevel methods (C++ Constructors and/or XML file data loading.)⇒ from simulation → run() to DynamicalSystem → computeFext(t)

SICONOS/Frond-End: “user-friendly” interface providing a moreinteractive way of using the platform.

API C++ with interactive environment Python scripting (Swig wrapper).API C: Scilab and Matlab interfaces.

User Plug-In: to allow user to add specific dedicated functions ortoolboxes.

Page 80: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Siconos components diagram

SICONOS/Numerics API C:shared dynamic library that provides low-level solvers and algorithmsin C and fortran.Sources: NSSpack (LCP, Friction ...), odepack (Lsodar ...).

SICONOS/Kernel: API C++: compiled command files with highlevel methods (C++ Constructors and/or XML file data loading.)⇒ from simulation → run() to DynamicalSystem → computeFext(t)

SICONOS/Frond-End: “user-friendly” interface providing a moreinteractive way of using the platform.

API C++ with interactive environment Python scripting (Swig wrapper).API C: Scilab and Matlab interfaces.

User Plug-In: to allow user to add specific dedicated functions ortoolboxes.

Page 81: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Siconos components diagram

SICONOS/Numerics API C:shared dynamic library that provides low-level solvers and algorithmsin C and fortran.Sources: NSSpack (LCP, Friction ...), odepack (Lsodar ...).

SICONOS/Kernel: API C++: compiled command files with highlevel methods (C++ Constructors and/or XML file data loading.)⇒ from simulation → run() to DynamicalSystem → computeFext(t)

SICONOS/Frond-End: “user-friendly” interface providing a moreinteractive way of using the platform.

API C++ with interactive environment Python scripting (Swig wrapper).API C: Scilab and Matlab interfaces.

User Plug-In: to allow user to add specific dedicated functions ortoolboxes.

Page 82: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Siconos components diagram

SICONOS/Numerics API C:shared dynamic library that provides low-level solvers and algorithmsin C and fortran.Sources: NSSpack (LCP, Friction ...), odepack (Lsodar ...).

SICONOS/Kernel: API C++: compiled command files with highlevel methods (C++ Constructors and/or XML file data loading.)⇒ from simulation → run() to DynamicalSystem → computeFext(t)

SICONOS/Frond-End: “user-friendly” interface providing a moreinteractive way of using the platform.

API C++ with interactive environment Python scripting (Swig wrapper).API C: Scilab and Matlab interfaces.

User Plug-In: to allow user to add specific dedicated functions ortoolboxes.

Page 83: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Siconos components diagram

SICONOS/Numerics API C:shared dynamic library that provides low-level solvers and algorithmsin C and fortran.Sources: NSSpack (LCP, Friction ...), odepack (Lsodar ...).

SICONOS/Kernel: API C++: compiled command files with highlevel methods (C++ Constructors and/or XML file data loading.)⇒ from simulation → run() to DynamicalSystem → computeFext(t)

SICONOS/Frond-End: “user-friendly” interface providing a moreinteractive way of using the platform.

API C++ with interactive environment Python scripting (Swig wrapper).API C: Scilab and Matlab interfaces.

User Plug-In: to allow user to add specific dedicated functions ortoolboxes.

Page 84: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Kernel Components

Kernel

C++ stand-alone dynamic library, based on Numerics (simulation part)

Modeling and Simulation clearly separated and independent(communicate through object Model) ⇒ easiest handling for user

data I/O: xml management, independent package (possibly removedin a ”light” version ...)

User plug-in

Utils: matrices, vectors, exceptions, handling.

Page 85: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Modeling Principle:

Page 86: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Modeling Principle:

Page 87: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Modeling Principle:

Page 88: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Modeling Principle:

Page 89: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Kernel Modeling Part

Siconos Non Smooth Dynamical System:

Dynamical System: a set of ODEs

Interaction: a set of relations (ieconstraints) and a non-smooth law

Topology: link with the simulation,handles relative degrees, index sets...

Simplified Modeling Tools class diagram:

Page 90: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Kernel Modeling Part

Siconos Non Smooth Dynamical System:

Dynamical System: a set of ODEs

Interaction: a set of relations (ieconstraints) and a non-smooth law

Topology: link with the simulation,handles relative degrees, index sets...

Simplified Modeling Tools class diagram:

Page 91: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Dynamical Systems in Siconos/Kernel

Parent Class DynamicalSystem

x = f (x , x , t) + T (x)u(x , t) + r

Derived ClassesLinearDS Linear Dynamical Systems

x = A(t)x + Tu(t) + b(t) + r

LagrangianDS Lagrangian Dynamical Systems

M(q)q + NNL(q, q) + Fint(q, q, t) = Fext(t) + T (q)u(q, t) + p

LagrangianLinearTIDS Lagrangian Linear Time Invariant Systems

Mq + Cq + Kq = Fext(t) + Tu(t) + p

Note: all operators ( f (x , t), M(q), ...) can be set either as matrices(when constant) or with a user-defined external function (plug-in).

Page 92: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Dynamical Systems in Siconos/Kernel

Parent Class DynamicalSystem

x = f (x , x , t) + T (x)u(x , t) + r

Derived ClassesLinearDS Linear Dynamical Systems

x = A(t)x + Tu(t) + b(t) + r

LagrangianDS Lagrangian Dynamical Systems

M(q)q + NNL(q, q) + Fint(q, q, t) = Fext(t) + T (q)u(q, t) + p

LagrangianLinearTIDS Lagrangian Linear Time Invariant Systems

Mq + Cq + Kq = Fext(t) + Tu(t) + p

Note: all operators ( f (x , t), M(q), ...) can be set either as matrices(when constant) or with a user-defined external function (plug-in).

Page 93: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Relations

Parent Class Relation

y = h(x , t, ...) , r = g(λ, t, ...)

Derived Classes:LinearTIR Linear Time Invariant Relation

y = Cx + Fu + Dλ + e, r = Bλ

LagrangianR Lagrangian Relation

y = H(q, t, . . .)q, p = Ht(q, t, . . .)λ

LagrangianLinearR Lagrangian Linear Relation

y = Hq + b, p = Htλ

Page 94: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Relations

Parent Class Relation

y = h(x , t, ...) , r = g(λ, t, ...)

Derived Classes:LinearTIR Linear Time Invariant Relation

y = Cx + Fu + Dλ + e, r = Bλ

LagrangianR Lagrangian Relation

y = H(q, t, . . .)q, p = Ht(q, t, . . .)λ

LagrangianLinearR Lagrangian Linear Relation

y = Hq + b, p = Htλ

Page 95: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Non Smooth laws

Parent Class NonSmoothLaw

Derived ClassesComplementarityConditionNSL Complementarity condition or unilateralcontact

0 6 y ⊥ λ > 0

Relay condition. (y = 0, |λ| 6 1

y 6= 0, λ = sign(y)

NewtonImpactLawNSL Newton impact Law.

if y(t) = 0, 0 6 y(t+) + ey(t−) ⊥ λ > 0

NewtonImpactFrictionNSL Newton impact and Friction (Coulomb) Law.

Page 96: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

C++ description of a Model

Dynamical Systems definition:

DynamicalSystem * DS1 = newLagrangianLinearTIDS(nDof,q0,v0,Mass);DS1→setComputeFExtFunction("BallPlugin.so", "ballFExt");

Interactions definition: non smooth law and relation:

NonSmoothLaw * nslaw = new NewtonImpactNSL(e);Relation * relation = new LagrangianLinearR(H,b);Interaction * inter = new Interaction(name, listOfDS,dim, nslaw,relation);

Non Smooth Dynamical System and ModelNonSmoothDynamicalSystem * nsds = newNonSmoothDynamicalSystem(allDS, allInteractions);Model * theModel = new Model(t0,T);theModel→setNonSmoothDynamicalSystemPtr(nsds);

or in a simpler way, xml loading:Model * = new Model(nameOfXMLFile);< SiconosModel >...< DS Definition >< LagrangianLinearTIDSnumber = 1 >< ndof > 3 < / ndof >< q0vectorSize = 3 > 1.0 0.0 0.0 < / q0 >...

Page 97: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

C++ description of a Model

Dynamical Systems definition:

DynamicalSystem * DS1 = newLagrangianLinearTIDS(nDof,q0,v0,Mass);DS1→setComputeFExtFunction("BallPlugin.so", "ballFExt");

Interactions definition: non smooth law and relation:

NonSmoothLaw * nslaw = new NewtonImpactNSL(e);Relation * relation = new LagrangianLinearR(H,b);Interaction * inter = new Interaction(name, listOfDS,dim, nslaw,relation);

Non Smooth Dynamical System and ModelNonSmoothDynamicalSystem * nsds = newNonSmoothDynamicalSystem(allDS, allInteractions);Model * theModel = new Model(t0,T);theModel→setNonSmoothDynamicalSystemPtr(nsds);

or in a simpler way, xml loading:Model * = new Model(nameOfXMLFile);< SiconosModel >...< DS Definition >< LagrangianLinearTIDSnumber = 1 >< ndof > 3 < / ndof >< q0vectorSize = 3 > 1.0 0.0 0.0 < / q0 >...

Page 98: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

C++ description of a Model

Dynamical Systems definition:

DynamicalSystem * DS1 = newLagrangianLinearTIDS(nDof,q0,v0,Mass);DS1→setComputeFExtFunction("BallPlugin.so", "ballFExt");

Interactions definition: non smooth law and relation:

NonSmoothLaw * nslaw = new NewtonImpactNSL(e);Relation * relation = new LagrangianLinearR(H,b);Interaction * inter = new Interaction(name, listOfDS,dim, nslaw,relation);

Non Smooth Dynamical System and ModelNonSmoothDynamicalSystem * nsds = newNonSmoothDynamicalSystem(allDS, allInteractions);Model * theModel = new Model(t0,T);theModel→setNonSmoothDynamicalSystemPtr(nsds);

or in a simpler way, xml loading:Model * = new Model(nameOfXMLFile);< SiconosModel >...< DS Definition >< LagrangianLinearTIDSnumber = 1 >< ndof > 3 < / ndof >< q0vectorSize = 3 > 1.0 0.0 0.0 < / q0 >...

Page 99: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

C++ description of a Model

Dynamical Systems definition:

DynamicalSystem * DS1 = newLagrangianLinearTIDS(nDof,q0,v0,Mass);DS1→setComputeFExtFunction("BallPlugin.so", "ballFExt");

Interactions definition: non smooth law and relation:

NonSmoothLaw * nslaw = new NewtonImpactNSL(e);Relation * relation = new LagrangianLinearR(H,b);Interaction * inter = new Interaction(name, listOfDS,dim, nslaw,relation);

Non Smooth Dynamical System and ModelNonSmoothDynamicalSystem * nsds = newNonSmoothDynamicalSystem(allDS, allInteractions);Model * theModel = new Model(t0,T);theModel→setNonSmoothDynamicalSystemPtr(nsds);

or in a simpler way, xml loading:Model * = new Model(nameOfXMLFile);< SiconosModel >...< DS Definition >< LagrangianLinearTIDSnumber = 1 >< ndof > 3 < / ndof >< q0vectorSize = 3 > 1.0 0.0 0.0 < / q0 >...

Page 100: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Simulation tools in Siconos/Kernel

Simulation description in C++ input file:

Simulation* s = new TimeStepping(theModel);TimeDiscretisation * t = new TimeDiscretisation(timeStep,s);OneStepIntegrator * OSI = new Moreau(listOfDS,theta,s);OneStepNSProblem * osnspb = new LCP(s, "LCP",Lemke,parameters);

Unitary Relation and Index Sets

UR: y i = h(q, ...).Index Sets: set of Unitary Relations (UR).

I0 = {URα} all unilateral constraints in the system, ie all thepotential interactions/relations of the systems.

Ii = {URα, α ∈ Ii−1, y(i−1) = 0} ⊂ Ii−1

Page 101: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Simulation tools in Siconos/Kernel

Simulation description in C++ input file:

Simulation* s = new TimeStepping(theModel);TimeDiscretisation * t = new TimeDiscretisation(timeStep,s);OneStepIntegrator * OSI = new Moreau(listOfDS,theta,s);OneStepNSProblem * osnspb = new LCP(s, "LCP",Lemke,parameters);

Unitary Relation and Index Sets

UR: y i = h(q, ...).Index Sets: set of Unitary Relations (UR).

I0 = {URα} all unilateral constraints in the system, ie all thepotential interactions/relations of the systems.

Ii = {URα, α ∈ Ii−1, y(i−1) = 0} ⊂ Ii−1

Page 102: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Simulation tools in Siconos/Kernel

Simulation description in C++ input file:

Simulation* s = new TimeStepping(theModel);TimeDiscretisation * t = new TimeDiscretisation(timeStep,s);OneStepIntegrator * OSI = new Moreau(listOfDS,theta,s);OneStepNSProblem * osnspb = new LCP(s, "LCP",Lemke,parameters);

Unitary Relation and Index Sets

UR: y i = h(q, ...).Index Sets: set of Unitary Relations (UR).

I0 = {URα} all unilateral constraints in the system, ie all thepotential interactions/relations of the systems.

Ii = {URα, α ∈ Ii−1, y(i−1) = 0} ⊂ Ii−1

Page 103: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Simulation tools in Siconos/Kernel

Page 104: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Simulation tools in Siconos/Kernel

Page 105: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

OneStepIntegrator :

Moreau: Moreau’s Time-stepping integrator

Lsodar: Numerical integration scheme based on the Livermore Solverfor Ordinary Differential Equations with root finding.

OnestepNSproblem: Numerical one step non smooth problem formulationand solver.

LCP Linear Complementarity Problem(w = Mz + q

0 6 w ⊥ z > 0

FrictionContact2D(3D) Two(three)-dimensional contact frictionproblem

QP Quadratic programming problem(min 1

2zT Qz + zT p

z > 0

Relay

Page 106: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Moreau Time-Stepping

One Step of Integration: (Start from state at time ti , qi , vi , yi ... known).

compute free state (ie without non smooth part) ⇒ qfree , vfree

update index sets: compute yp = yi + 0.5 ∗ yi , if yp < 0, add thecorresponding UR in I1

build and solve LCP “impact” (ie at velocity level) for UnitaryRelations in I1 ⇒ (λ, y)i+1

compute non smooth part pi+1 = f (λi+1, ...)

update state of the Dynamical Systems:(q, v)i+1 = function(qfree , vfree , pi+1, ...)

update output yi+1 = h(qi+1, ...)

In Siconos C++ input file:

while(currentTimeStep < max){s→computeFreeStep();s→updateIndexSets();s→computeOneStepNSProblem();s→update}

Page 107: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Moreau Time-Stepping

One Step of Integration: (Start from state at time ti , qi , vi , yi ... known).

compute free state (ie without non smooth part) ⇒ qfree , vfree

update index sets: compute yp = yi + 0.5 ∗ yi , if yp < 0, add thecorresponding UR in I1

build and solve LCP “impact” (ie at velocity level) for UnitaryRelations in I1 ⇒ (λ, y)i+1

compute non smooth part pi+1 = f (λi+1, ...)

update state of the Dynamical Systems:(q, v)i+1 = function(qfree , vfree , pi+1, ...)

update output yi+1 = h(qi+1, ...)

In Siconos C++ input file:

while(currentTimeStep < max){s→computeFreeStep();s→updateIndexSets();s→computeOneStepNSProblem();s→update}

Page 108: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Event-Driven

EventsManager: member of EventDriven simulation class, a list of allpossible Events.Events: Time Discretisation or Non Smooth.

Start = current event, known.

Computation of the temporary values of (yk+1, yk+1) by performingthe time-integration of the smooth dynamics up to an event (lsodarwith roots finding).

Compute the temporary index-sets

if I1 − I2 6= ∅ (impacts occur) thenbuild, solve the LCP impact and update the index-sets

if I2 6= ∅ then build and solve the LCP at acceleration level, andupdate index sets.

In Siconos C++ input file:

while(eventsManager→hasNextEvent()){s→advanceToEvent();eventsManager→processEvents();}

Page 109: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Event-Driven

EventsManager: member of EventDriven simulation class, a list of allpossible Events.Events: Time Discretisation or Non Smooth.

Start = current event, known.

Computation of the temporary values of (yk+1, yk+1) by performingthe time-integration of the smooth dynamics up to an event (lsodarwith roots finding).

Compute the temporary index-sets

if I1 − I2 6= ∅ (impacts occur) thenbuild, solve the LCP impact and update the index-sets

if I2 6= ∅ then build and solve the LCP at acceleration level, andupdate index sets.

In Siconos C++ input file:

while(eventsManager→hasNextEvent()){s→advanceToEvent();eventsManager→processEvents();}

Page 110: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Model: Lagrangian Linear Time Invariant Dynamical Systems withLagrangian Linear Relations, Newton Impact Law.Simulation: Moreau’s Time Stepping or Event Driven.

Bouncing Ball Beads column

Page 111: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

A 4 diodes bridge wave rectifier.

Model: Linear Dynamical System with Linear Relations, ComplementarityCondition Non Smooth Law.Simulation: Moreau’s Time Stepping

Comparison between the SICONOS Platform (Non Smooth LCS model)and SPICE simulator (Smooth Diode model).

Page 112: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Woodpecker toy (sample from Michael Moeller (CR10))

Model: Lagrangian Linear Dynamical System, Lagrangian LinearRelations, Newton impact-friction law.Simulation: Moreau’s Time Stepping

Page 113: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

A Robotic Arm (Pa10)

Model: Lagrangian Non Linear Dynamical System with Lagrangian NonLinear Relations, Newton impact.Simulation: Moreau’s Time Stepping

Page 114: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Help and Documentation

Doxygen tools for automatic documentation in Numerics and Kernel

Users, developers and theoretical manuals (in progress ...)

Web pages, Bug tracker, forum ... on Gforge.

Samples library as templates.

Diffusion

The SICONOS platform is distributed under GPL licence.

Visit the Gforge Web site forDocumentationsMailing listsDownloadsBug trackerContributing, . . .

http://gforge.inria.fr/projects/siconos/

Page 115: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Help and Documentation

Doxygen tools for automatic documentation in Numerics and Kernel

Users, developers and theoretical manuals (in progress ...)

Web pages, Bug tracker, forum ... on Gforge.

Samples library as templates.

Diffusion

The SICONOS platform is distributed under GPL licence.

Visit the Gforge Web site forDocumentationsMailing listsDownloadsBug trackerContributing, . . .

http://gforge.inria.fr/projects/siconos/

Page 116: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

Introduction

Siconos Kernel Design

Examples

Documentation andDistribution

References

Thank you for your attention.

Page 117: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

K. Camlibel. Complementarity Methods in the Analysis of PiecewiseLinear Dynamical Systems. PhD thesis, Katholieke Universiteit Brabant,2001. ISBN: 90 5668 073X.

K. Camlibel, W.P.M.H. Heemels & J.M. Schumacher. Consistencyof a time-stepping method for a class of piecewise-linear networks. IEEETransactions on Circuits and Systems I, 49, pp. 349–357, 2002.

K. Camlibel, J.S. Pang & J. Shen. Lyaunov stability ofcomplementarity and extended systems. SIAM Journal on Optimization,2006. in revision.

F.H. Clarke. Generalized gradients and its applications. Transactions ofA.M.S., 205, pp. 247–262, 1975.

F.H. Clarke. Optimization and Nonsmooth analysis. Wiley, New York,1983.

R. W. Cottle, J. Pang & R. E. Stone. The linear complementarityproblem. Academic Press, Inc., Boston, MA, 1992.

A. F. Filippov. Differential equations with discontinuous right handsides. Kluwer, Dordrecht, the Netherlands, 1988.

C. Glocker. Set-Valued Force Laws: Dynamics of Non-Smooth systems,volume 1 of Lecture notes in applied mechanics. Spring Verlag, 2001.

D. Goeleven & B. Brogliato. Stability and instability matrices forlinear evolution variational inequalities. IEEE Transactions onAutomatic Control, 49(4), pp. 521–534, 2004.

Page 118: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

W.P.M.H. Heemels. Linear Complementarity Systems. A Study inHybrid Dynamics. PhD thesis, Technical University of Eindhoven, 1999.ISBN 90-386-1690-2.

W.P.M.H. Heemels & B. Brogliato. The complementarity class ofhybrid dynamical systems. European Journal of Control, 9, pp.311–349, 2003.

M. Johansson & A. Rantzer. Computation of piecewise quadraticlyapunov functions for hybrid systems. IEEE Transactions on AutomaticControl, 43(4), pp. 555–559, 1998.

B.S. Mordukhovich. Generalized differential calculus for nonsmooth ansset-valued analysis. Journal of Mathematical analysis and applications,183, pp. 250–288, 1994.

J.J. Moreau. Liaisons unilaterales sans frottement et chocs inelastiques.Comptes Rendus de l’Academie des Sciences, 296 serie II, pp.1473–1476, 1983.

J.J. Moreau. Unilateral contact and dry friction in finite freedomdynamics. J.J. Moreau & Panagiotopoulos P.D., editors,Nonsmooth mechanics and applications, number 302 in CISM, Coursesand lectures, pp. 1–82. CISM 302, Spinger Verlag, 1988. Formulationmathematiques tire du livre Contacts mechanics.

D. Pang, J.-S. an Stewart. Differential variational inequalities.Mathematical Programming A., 2006. submitted, preprint available athttp://www.cis.upenn.edu/davinci/publications/pang-stewart03.pdf.

Page 119: Numerical methods and software for Non Smooth Dynamical Systems…tdang/VAL-AMS/Presentations/s.pdf · 2008-05-30 · Numerical methods and software for Non Smooth Dynamical Systems

Numerical methods andsoftware for

Non Smooth DynamicalSystems.

The Siconos Platform

Vincent AcaryINRIA Rhone–Alpes,

Grenoble, France

Introduction

Outline

NSDS modeling

NSDS simulation.

NSDS simulation.Time–Stepping

NSDS simulation.Event–driven

The Siconos Platform

References

M. Schatzman. Sur une classe de problmes hyperboliques non linaires.Comptes Rendus de l’Academie des Sciences Srie A, 277, pp. 671–674,1973.

M. Schatzman. A class of nonlinear differential equations of secondorder in time. Nonlinear Analysis, Theory, Methods & Applications, 2(3), pp. 355–373, 1978.

V.I. Utkin. Variable structure systems with sliding modes: A survey.IEEE Transactions on Automatic Control, 22, pp. 212–222, 1977.