modeling and simulation of filippov system models with

16
Modeling and Simulation of Filippov System Models with Sliding Motions using Modelica Mohammed Ahsan Adib Murad, Luigi Vanfretti, Federico Milano September 22-24, 2020 Modelica2020US September 22-24, 2020 1 / 16

Upload: others

Post on 18-Apr-2022

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Modeling and Simulation of Filippov System Models with

Modeling and Simulation of Filippov System Modelswith Sliding Motions using Modelica

Mohammed Ahsan Adib Murad, Luigi Vanfretti,Federico Milano

September 22-24, 2020

Modelica2020US September 22-24, 2020 1 / 16

Page 2: Modeling and Simulation of Filippov System Models with

Outline

Motivation

Objectives

Filippov Theory and Proposed Modeling Formulation

Case Studies

Conclusions

Modelica2020US September 22-24, 2020 2 / 16

Page 3: Modeling and Simulation of Filippov System Models with

Motivation

Modelica is an industry standard to model hybrid (discrete-continuous)dynamical systems described by ODEs or DAEs.

A subclass of hybrid systems referred to as Filippov systems wherediscontinuities appear in the right hand side of the model’s equations.

A Modelica implementation of the Filippov systems without consideringFilippov formalism leads to chattering-Zeno-type deadlocks, whichconsists of infinitely many instantaneous switches of the discrete variablesduring time domain simulation.

This significantly restrains the performance of the solvers of Modelicasimulation tools and can lead to a simulation halt.

A generalized formulation is required for smooth continuation oftrajectories of Fillippov system models in Modelica tools.

Modelica2020US September 22-24, 2020 3 / 16

Page 4: Modeling and Simulation of Filippov System Models with

Objectives

To propose a generic formulation based on Filippov Theory (FT) for theimplementation and direct numerical simulation of Filippov systems withone sliding surface using Modelica.

To validate the proposed formulation comparing the results with aMatlab implementation and via simulation in two Modelica tools, namelyOpenModelica and Dymola.

Modelica2020US September 22-24, 2020 4 / 16

Page 5: Modeling and Simulation of Filippov System Models with

Filippov Theory

Consider the following switched dynamical system:

x = f(x) =

{f1(x) when h(x) < 0

f2(x) when h(x) > 0

The state space Rn is split into two regions R1 and R2 separated by ahyper-surface Σ. Where,

R1 = {x ∈ Rn | h(x) < 0},R2 = {x ∈ Rn | h(x) > 0},Σ = {x ∈ Rn | h(x) = 0}.

Filippov convex method: the vectorfield on the surface of discontinuity isa convex combination of the vectorfields in the different regions of thestate space.

R1

R2

Σ

Modelica2020US September 22-24, 2020 5 / 16

Page 6: Modeling and Simulation of Filippov System Models with

Filippov First Order Theory

Filippov first order theory defines the vector field if the solutionapproaches the discontinuous surface.

The trajectory of x = f1(x), with x(0) = x0 reaches at Σ in finite time.

Let n(x) is the unit normal to Σ at x i.e. n(x) = hx(x)‖hx(x)‖ where,

hx(x) = ∇h(x) and ∇ = ∂∂x .

Transversal Crossing: If atx ∈ Σ,

(nT (x)f1(x)).(nT (x)f2(x)) > 0,

leave Σ:

if nT (x)f1(x) > 0, to R2,if nT (x)f1(x) < 0, to R1.

f1(x)

f2(x)

Σ

n(x)x(t)

x(t)

R2

R1

[I]

Modelica2020US September 22-24, 2020 6 / 16

Page 7: Modeling and Simulation of Filippov System Models with

Filippov Theory: Sliding

Sliding:(nT (x)f1(x)).(nT (x)f2(x)) < 0

Attracting: Have existence and uniqueness (a1 in Fig. [II]):

(nT (x)f1(x)) > 0 and (nT (x)f2(x)) < 0

Repulsive: No uniqueness. Not covered.

Filippov vector field: Whilesliding along Σ, time derivative fF

is given by,

fF (x) = (1−α(x))f1(x)+α(x)f2(x),

α(x) =nT (x)f1(x)

nT (x)(f1(x) − f2(x))·

Exit: during sliding, if one of thevector fields starts to point away,the solution continues above orbelow the sliding surface.

f1(x)f1(x)

f2(x)f2(x)

Σ

n(x)

x(t)

R2

R1

a1 b1

[II]

Modelica2020US September 22-24, 2020 7 / 16

Page 8: Modeling and Simulation of Filippov System Models with

Proposed Modeling Formulation

According to FT, a system can have three states: h(x) < 0 (R1).h(x) > 0 (R2), and h(x) = 0 (SLIDING).

To implement in Modelica, we introduce two discrete variables: say z1

and z2, into the differential equations, as follows:

x = f1(x) z1(1− z2) + f2(x)(1− z1)(1− z2) + fF (x)z2

Depending on the values of z1

and z2 (e.g. 1 or 0), a propervector field is activated.

In the SLIDING state thevalue of z2 = 1.

SLIDING deactivates bothf1(x) and f2(x), without theneed of changing the value ofz1. So the previous value(pre(z1)) is retained.

z1 = 0,z2 = 0

r1r2 < 0 &

r1 > 0 & r2 < 0

r1r2>

0&

r1<

0

SLIDING

pre(z1),z2 = 1

R2

α = 1

α=

0

R1

z1 = 1,z2 = 0

r1r2>

0&

r1>

0

r1r

2<

0&

r1>

0&

r2<

0

Modelica2020US September 22-24, 2020 8 / 16

Page 9: Modeling and Simulation of Filippov System Models with

Case Study I: Stick-slip System

Consider the two-dimensionalStick-slip system:

x = f(x) =

{f1(x) when h(x) < 0

f2(x) when h(x) > 0

where h(x) = x2 − 0.2 with

f1(x) =

(x2

−x1 + 11.2−x2

),

f2(x) =

(x2

−x1 − 10.8+x2

),

Simulation issues are observedwith a direct implementationof this system using Modelicain OpenModelica and Dymola.

OpenModelica: Chattering detectedaround time0.221654558425..0.221654756475 (100state events in a row with a total timedelta less than the step size 0.001).

Dymola: DASSL fails to continue thesimulation. However RkFix2 andEuler allows to continue exposingchattering.

Due to chattering during thesimulation, the results are notmathematically accurate.

It is not possible to understand thedynamic behavior of the real physicalsystem.

Modelica2020US September 22-24, 2020 9 / 16

Page 10: Modeling and Simulation of Filippov System Models with

Case Study I: Stick-slip System

Using this FT based implementation the simulation of this system can besuccessfully carried out in both OpenModelica and Dymola withoutnumerical issues.

0.0 0.2 0.4 0.6 0.8 1.0 1.2

-2.5

-2.0

-1.5

-1.0

-0.5

0.0

0.5

1.0

1.5

x1

der(x2) [NF]

der(x2) [F]

Figure 1: Time derivative of state variable (x1)of stick-slip system without (NF) and with (F)

Filippov theory simulated in Dymola.

0 0.2 0.4 0.6 0.8 1 1.2

x1

-0.6

-0.5

-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

x2

Dymola

OpenModelica

Matlab

Figure 2: Periodic trajectories of the stick-slipsystem obtained in different simulation software

tools.

Modelica2020US September 22-24, 2020 10 / 16

Page 11: Modeling and Simulation of Filippov System Models with

Case Study II: A Realy Feedback System

A relay feedback system withsingle-input and single-outputis as follows:

x = f(x) =

{f1(x) when h(x) < 0

f2(x) when h(x) > 0

where h(x) = x1 with

f1(x) =

−(2ζω + 1)x1 + x2 + 1−(2ζω + ω2)x1 + x3 − 2σ

−ω2x1 + 1

,

f2(x) =

−(2ζω + 1)x1 + x2 − 1−(2ζω + ω2)x1 + x3 + 2σ

−ω2x1 − 1

.

-0.012 -0.008 -0.004 0.000 0.004 0.008 0.012

-6

-4

-2

0

2

4

6

8

x1

der(x2) [NF]

der(x2) [F]

-0.01

0

0.01

2

0.02

x1

0.03

1

x3

0

0.04

x2

0.05

0-2

-1

Dymola

OpenModelica

Matlab

Modelica2020US September 22-24, 2020 11 / 16

Page 12: Modeling and Simulation of Filippov System Models with

Case Study III: Anti-windup PI in an SMIB

DAEs:

x = f(x, y)

0 = g(x, y)

h(x) = kpva + xi − vmax

f2(x, y):

e′q =1

T ′d0

(vmax − xdx′de′q +

xd − x′dx′d

v1cos(δ − θ1))

xi = 0

f1(x, y):

δ = ω

ω =1

M(pm − pe −Dω)

e′q =1

T ′d0

(vf −xdx′de′q +

xd − x′dx′d

v1cos(δ − θ1))

va = (ka(vref + c3 − v1)− va)/Ta

xi = kiva

s1 =1

T2(c2 − s1)

Gen

v1 6 θ1

jx13

v3 6 θ3

jx23

pl + jql

v20 6 θ20

+

_uin ks

1 + T1s

1 + T2s

c3 va

v1

ka

1 + Tas

vref

vmax

vmin

kpki

s

vf

Modelica2020US September 22-24, 2020 12 / 16

Page 13: Modeling and Simulation of Filippov System Models with

Case Study III: Implementation Using Filippov Theory

Calculating, hx(x) = [∂h(x)∂x1

∂h(x)∂x2

... ∂h(x)∂x6

]T = [0 0 0 kp 1 0]T .

On the switching manifold,

hTx (x)f1(x, y) = kp((ka(vref + c3 − v1)− va)/Ta ) + kiva ,

hTx (x)f2(x, y) = kp((ka(vref + c3 − v1)− va)/Ta ) .

If an attractive sliding occurs on Σ, then α(x, y) is given by:

α(x, y) =kp((ka(vref + c3 − v1)− va)/Ta ) + kiva

kiva.

Thus during the sliding:

fF (x, y) = −kp((ka(vref + c3 − v1)− va)/Ta ) .

These expressions are used in the Modelica implementation.

Modelica2020US September 22-24, 2020 13 / 16

Page 14: Modeling and Simulation of Filippov System Models with

Case Study III: Results of SMIB System

The SMIB system is implemented considering the FT-based formulationand a deadband based method in Modelica.

Disturbance: step change in the voltage reference set-point (vref = 1.01)and load (pl0 = 0.71 pu, ql0 = 0.016 pu) at t = 5 s.

1.45 1.50 1.55

-0.2

0.0

0.2

0.4

0.6

0.8

xi

der(xi) [DB]

der(xi) [F]

Dymola trial version, see www.dymola.com

Figure 3: Time derivative of the integratorstate variable (xi) in the AW PI controller withrespect to the state variable (xi) using DB and

Filippov (F) methods simulated in Dymola.

Time(s)

5 6 7 8 9 10 11 12

vf

1.42

1.44

1.46

1.48

1.5

1.52

1.54

1.56

1.58

1.6

1.62

DB

F

5 5.1 5.2 5.3 5.4 5.5 5.6

1.5998

1.5999

1.6

Figure 4: Trajectories of the field voltage (vf )using DB and Filippov (F) methods simulated in

Dymola.

Modelica2020US September 22-24, 2020 14 / 16

Page 15: Modeling and Simulation of Filippov System Models with

Conclusions and Future Work

A generic formulation to implement Filippov system models with slidingmotion using Modelica is proposed.

Three examples are presented considering such a general-purpose designand implementation details are given.

Simulation results in different Modelica tools indicate accurate dynamicresponse without any chattering or simulation halt.

Future Work:

Future work will extend the FT-based design for multiple discontinuitysurface.Study the advantages from computational point of view.

The case studies are posted on-line!https://github.com/ALSETLab/Modelica_Fillipov_Sliding_Models

Modelica2020US September 22-24, 2020 15 / 16

Page 16: Modeling and Simulation of Filippov System Models with

Thank you!

Modelica2020US September 22-24, 2020 16 / 16