-
Notifications
You must be signed in to change notification settings - Fork 16
EMbrake
Marcelo Forets edited this page Apr 28, 2020
·
65 revisions
- Use
mforets/RA
branch in LazySets. - Models: embrake.jl in the tests folder
- Notebook: Verif_EMBrake
Alg. | Jitter | Run(s) | Alloc | |
---|---|---|---|---|
nopv | GLGM06(δ=1e-8, max_order=3) |
no | 7.21 | 4.16GB |
nopv | GLGM06(δ=1e-8, max_order=3) |
ζ=1e-7 | 7.23 s | 4.27GB |
pv1 | ASB07(δ=1e-8, max_order=3) |
no | 152.25 s | 46.14GB |
ASB07(δ=1e-8, max_order=3) |
ζ=1e-7 | 153.66 s | 46.24GB | |
pv2, χ=5.0% | ASB07(δ=1e-8, max_order=3) |
no | 151.84 s | 46.14GB |
ASB07(δ=1e-8, max_order=3) |
ζ=1e-7 | 153.30 s | 46.24GB | |
pv2, χ=0.5% | ASB07(δ=1e-8, max_order=3) |
no | 140.54 s | 46.14GB |
ASB07(δ=1e-8, max_order=3) |
ζ=1e-7 | 143.26 s | 46.24GB |
- In all cases,
Tsample = 1e-4
andmax_jumps = 1_000 (1_001)
without (with) jitter. - Final width: defined as the width of the final set projected to variable
I
(current). - p.v. 1: parameter variation changing 1 constant, Flow* setting
- p.v. 2: parameter variation changing all constants associated to physical variables by +-χ% w.r.t. their nominal values
-
G
meansGLGM06
-
A
meansASB07
- n°s: number of sets
Other data:
Alg. | Jitter | w(I[end]) | w(x[end]) | n°s | |
---|---|---|---|---|---|
nopv | GLGM06(δ=1e-8, max_order=3) |
no | 1.369 | 7.34e-5 | 10010000 |
nopv | GLGM06(δ=1e-8, max_order=3) |
ζ=1e-7 | 28.6 | 1.5e-3 | 9999990 |
pv1 | ASB07(δ=1e-8, max_order=3) |
no | 137.24 | 7.31e-3 | 10010000 |
ASB07(δ=1e-8, max_order=3) |
ζ=1e-7 | 165.10 | 8.79e-3 | 9999990 | |
pv2, χ=5.0% | ASB07(δ=1e-8, max_order=3) |
no | 30948.66 | 1.402 | 10010000 |
ASB07(δ=1e-8, max_order=3) |
ζ=1e-7 | 31131.96 | 1.411 | 9999990 | |
pv2, χ=0.5% | ASB07(δ=1e-8, max_order=3) |
no | 921.62 | 4.85e-2 | 10010000 |
ASB07(δ=1e-8, max_order=3) |
ζ=1e-7 | 952.91 | 5.02e-2 | 9999990 |
Experiments were performed on a computer with 3.2G Hz Intel Core i7-8700 processor and 16 GiB RAM running 64-Bit Windows 10 Pro Version 1909.
$ git checkout 8978e8e0064b960c74c71dbe5c3c520
Code:
using ReachabilityAnalysis
using ReachabilityAnalysis: solve_hybrid
using SparseArrays
# model's constants
L = 1.e-3
KP = 10000.
KI = 1000.
R = 0.5
K = 0.02
drot = 0.1
i = 113.1167
Tsample = 1.E-4
p = 504. + (-3. .. +3.)
# state variables: [I, x, xe, xc]
A = IntervalMatrix([-p 0 KP/L KI/L;
K/i/drot 0 0 0;
0 0 0 0;
0 0 0 0])
EMbrake = @system(x' = Ax)
# initial conditions
I₀ = Singleton([0.0]) #+ Interval(0., 10.0)
x₀ = Singleton([0.0]) #+ Interval(-0.001, 0.001)
xe₀ = Singleton([0.0])
xc₀ = Singleton([0.0])
X₀ = I₀ × x₀ × xe₀ × xc₀;
x0 = 0.05
Ar = sparse([1, 2, 3, 4, 4], [1, 2, 2, 2, 4], [1., 1., -1., -Tsample, 1.], 4, 4)
br = sparsevec([3, 4], [x0, Tsample*x0], 4)
reset_map(X) = Ar * X + br
δ = 3e-7
@time sol_flow_7 = solve_hybrid(EMbrake, X₀, reset_map; Tsample=Tsample, max_jumps=1001, ζ=1e-7, alg=ASB07(δ=δ));
(Refs: <: remove; >: add)
1.- LazySets: branch mforets/EMbrake
- Approximations/overapproximate.jl -- function overapproximate
< row = @view Ms[i, :]
> row = Ms[i, :]
2.- ReachabilityAnalysis: branch master, commit 8978e8e0064b960c74c71dbe5c3c520
$ git checkout 8978e8e0064b960c74c71dbe5c3c520
- Algorithms/ASB07/reach.jl -- function reach_homog_ASB07!
while k <= NSTEPS
Rₖ = overapproximate(Φ * set(F[k-1]), Zonotope)
> Rₖ = reduce_order(Rₖ, max_order)
Δt += δ
OUT OF MEMORY:
δ = 1e-8
@time sol_flow_7 = solve_hybrid(EMbrake, X₀, reset_map; Tsample=Tsample, max_jumps=6, ζ=1e-7, alg=ASB07(δ=δ));
(Note that max_jumps=6)
- Use the same discretization method.
- Run with shifted flowpipes again, see
mforets/shifted_flowpipe
. - Consider different overapproximation strategies for the convexification operation.
function LazySets.diameter(R::ReachabilityAnalysis.AbstractLazyReachSet; vars::Int) overapproximate(project(R, vars=vars), Interval) |> set |> diameter end