@@ -121,8 +121,45 @@ function quadratic_expansion(A::IntervalMatrix, α::Real, β::Real)
121
121
return IntervalMatrix (B)
122
122
end
123
123
124
+ function _truncated_exponential_series (A:: IntervalMatrix{T} , t, p:: Integer ;
125
+ n= checksquare (A)) where {T}
126
+ if p == 0
127
+ # index i = 0 (identity matrix)
128
+ return IntervalMatrix (Interval (one (T)) * I, n)
129
+ elseif p == 1
130
+ # index i = 1
131
+ S = A * t
132
+ else
133
+ # indices i = 1 and i = 2
134
+ S = quadratic_expansion (A, t)
135
+ end
136
+
137
+ # index i = 0, (identity matrix, added implicitly)
138
+ for i in 1 : n
139
+ S[i, i] += one (T)
140
+ end
141
+
142
+ if p < 3
143
+ return S
144
+ end
145
+
146
+ # indices i >= 3
147
+ pow = IntervalMatrixPower (A)
148
+ increment! (pow)
149
+ fact_num = t^ 2
150
+ fact_denom = 2
151
+ for i in 3 : p
152
+ fact_num *= t
153
+ fact_denom *= i
154
+ Aⁱ = increment! (pow)
155
+ S += Aⁱ * (fact_num / fact_denom)
156
+ end
157
+
158
+ return S
159
+ end
160
+
124
161
"""
125
- exp_overapproximation(M ::IntervalMatrix{T, Interval{T}}, t, p) where {T}
162
+ exp_overapproximation(A ::IntervalMatrix{T, Interval{T}}, t, p) where {T}
126
163
127
164
Overapproximation of the exponential of an interval matrix.
128
165
@@ -139,26 +176,9 @@ Parameters and Inputs* by M. Althoff, O. Stursberg, M. Buss.
139
176
"""
140
177
function exp_overapproximation (A:: IntervalMatrix{T, Interval{T}} , t, p) where {T}
141
178
n = checksquare (A)
142
-
179
+ S = _truncated_exponential_series (A, t, p; n = n)
143
180
E = _exp_remainder (A, t, p; n= n)
144
- S = IntervalMatrix (zeros (Interval{T}, n, n))
145
- Ai = square (A)
146
- fact_num = t^ 2
147
- fact_denom = 2
148
- for i in 3 : p
149
- fact_num *= t
150
- fact_denom *= i
151
- Ai *= A
152
- S += Ai * (fact_num / fact_denom)
153
- end
154
- W = quadratic_expansion (A, t)
155
- res = W + S + E
156
-
157
- # add identity matrix implicitly
158
- for i in 1 : n
159
- res[i, i] += one (T)
160
- end
161
- return res
181
+ return S + E
162
182
end
163
183
164
184
# Implementation of Prop. 1 in Althoff, Matthias, Bruce H. Krogh, and Olaf Stursberg.
@@ -263,24 +283,25 @@ See Theorem 2 in *Reachability Analysis of Linear Systems with Uncertain
263
283
Parameters and Inputs* by M. Althoff, O. Stursberg, M. Buss.
264
284
"""
265
285
function exp_underapproximation (A:: IntervalMatrix{T, Interval{T}} , t, p) where {T}
286
+ @assert p > 1 " the order $p < 2 is not supported"
266
287
n = checksquare (A)
267
288
268
289
Y = zeros (n, n)
269
290
LA = inf (A)
270
- Ail = LA^ 2
291
+ Aⁱl = LA^ 2
271
292
Z = zeros (n, n)
272
293
RA = sup (A)
273
- Air = RA^ 2
294
+ Aⁱr = RA^ 2
274
295
fact_num = t^ 2
275
296
fact_denom = 2
276
297
for i in 3 : p
277
298
fact_num *= t
278
299
fact_denom *= i
279
300
fact = fact_num / fact_denom
280
- Ail *= LA
281
- Y += Ail * fact
282
- Air *= RA
283
- Z += Air * fact
301
+ Aⁱl *= LA
302
+ Y += Aⁱl * fact
303
+ Aⁱr *= RA
304
+ Z += Aⁱr * fact
284
305
end
285
306
286
307
B = IntervalMatrix {T} (undef, n , n)
0 commit comments