@@ -7,7 +7,9 @@ sys = [ tf(1.90,[1800.0,1]) tf(1.90,[1800.0,1]) tf(1.90,[1800.0,1]);
77
88const SUITE = BenchmarkGroup ()
99
10- # # ================== SimModel benchmarks =========================================
10+ # # ==================================================================================
11+ # # ================== SimModel benchmarks ===========================================
12+ # # ==================================================================================
1113linmodel = setop! (LinModel (sys, Ts, i_d= [3 ]), uop= [10 , 50 ], yop= [50 , 30 ], dop= [5 ])
1214function f! (ẋ, x, u, d, p)
1315 mul! (ẋ, p. A, x)
@@ -47,7 +49,9 @@ SUITE["SimModel"]["allocation"]["NonLinModel_linearize!"] = @benchmarkable(
4749 samples= 1
4850)
4951
50- # # ================== StateEstimator benchmarks ================================
52+ # # ==================================================================================
53+ # # ================== StateEstimator benchmarks =====================================
54+ # # ==================================================================================
5155skf = SteadyKalmanFilter (linmodel)
5256
5357SUITE[" StateEstimator" ][" allocation" ] = BenchmarkGroup ([" allocation" ])
@@ -64,4 +68,21 @@ SUITE["StateEstimator"]["allocation"]["SteadyKalmanFilter_evaloutput"] = @benchm
6468 evaloutput ($ skf, $ d),
6569 setup= preparestate! ($ skf, $ y, $ d),
6670 samples= 1
71+ )
72+
73+ kf = KalmanFilter (linmodel, nint_u= [1 , 1 ], direct= false )
74+
75+ SUITE[" StateEstimator" ][" allocation" ][" KalmanFilter_preparestate!" ] = @benchmarkable (
76+ preparestate! ($ kf, $ y, $ d),
77+ samples= 1
78+ )
79+ SUITE[" StateEstimator" ][" allocation" ][" KalmanFilter_updatestate!" ] = @benchmarkable (
80+ updatestate! ($ kf, $ u, $ y, $ d),
81+ setup= preparestate! ($ kf, $ y, $ d),
82+ samples= 1
83+ )
84+ SUITE[" StateEstimator" ][" allocation" ][" KalmanFilter_evaloutput" ] = @benchmarkable (
85+ evaloutput ($ kf, $ d),
86+ setup= preparestate! ($ kf, $ y, $ d),
87+ samples= 1
6788)
0 commit comments