Skip to content

Conversation

alecarraro
Copy link
Collaborator

Implement proposition of LKB23

@alecarraro alecarraro force-pushed the alecarraro/prop3_lkb23 branch from d6947ab to 09a5865 Compare July 30, 2025 12:09
@schillic
Copy link
Member

I tried out a simple example where the SPZ is just a zonotope and the MZ is just a matrix. The overapproximation is not enormously bigger, and it gets quite tight when raising $\kappa$ to 5. This gives some confidence in the correctness.

using LazySets
import IntervalMatrices
N = Float64
P = SparsePolynomialZonotope(zeros(N, 2), zeros(N, 2, 0), N[1 0; 0 1], zeros(Int, 1, 0), [2])
M = N[1 0; 0 1]
EP = exponential_map(M, P)
MZ = MatrixZonotope(M, Vector{Matrix{N}}())
MZE = MatrixZonotopeExp(MZ)
EM = ExponentialMap(MZE, P)
oEP = overapproximate(EM, SparsePolynomialZonotope, 2)  # for value 5 the sets are almost identical

using Plots
plot(oEP)
plot!(EP)
spz

@alecarraro
Copy link
Collaborator Author

I tried out a simple example where the SPZ is just a zonotope and the MZ is just a matrix. The overapproximation is not enormously bigger, and it gets quite tight when raising κ to 5. This gives some confidence in the correctness.

thats very nice!

@alecarraro alecarraro force-pushed the alecarraro/prop3_lkb23 branch 2 times, most recently from 7891d54 to fff5c3e Compare July 31, 2025 14:53
fix factorial, index variable, docstring and early return of `exponential_map`
changed docstring for `_compute_inner_powers`
fix docstring for `taylor_expmap_remainder`

change `P` to `Z` in `taylor_expmap_remainder`

fix argument in `taylor_exp_remainder`
@alecarraro alecarraro force-pushed the alecarraro/prop3_lkb23 branch from 9d2c44c to ea44143 Compare July 31, 2025 15:02
@schillic
Copy link
Member

I tried out a simple example where the SPZ is just a zonotope and the MZ is just a matrix. The overapproximation is not enormously bigger, and it gets quite tight when raising κ to 5. This gives some confidence in the correctness.

With the new code changes, the sets are actually identical already for κ = 2.

I was first surprised because I expected the approximation to get coarser with the fixes. But then I realized that this happens because you now handle this case exactly. So the example above is not a good benchmark anymore 😅

@schillic
Copy link
Member

Modifying the example slightly,

MZ = MatrixZonotope(M, [N[0 0; 0 0]])

i.e., adding a zero generator to the MZ, does not trigger the shortcut. So it uses the proper approximation, and I get basically the same results as before.

@schillic
Copy link
Member

@alecarraro Is this ready to be merged?

@alecarraro
Copy link
Collaborator Author

@alecarraro Is this ready to be merged?

Yes, I implemented all the feedback from your reviews. I tested the reachability algorithm to test a real use case of these methods and it works .

@schillic schillic merged commit 61cf311 into master Jul 31, 2025
7 checks passed
@schillic schillic deleted the alecarraro/prop3_lkb23 branch July 31, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants