Skip to content

Commit 0c979c9

Browse files
committed
test: shorter title
1 parent d7f752e commit 0c979c9

1 file changed

Lines changed: 32 additions & 32 deletions

File tree

test/2_test_state_estim.jl

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@testitem "SteadyKalmanFilter construction" setup=[SetupMPCtests] begin
1+
@testitem "SKF construction" setup=[SetupMPCtests] begin
22
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
33
linmodel = LinModel(sys,Ts,i_u=[1,2])
44
kalmanfilter1 = SteadyKalmanFilter(linmodel)
@@ -61,7 +61,7 @@
6161
@test_throws ErrorException SteadyKalmanFilter(linmodel, nint_u=[1,1], nint_ym=[1,1])
6262
end
6363

64-
@testitem "SteadyKalmanFilter estimator methods" setup=[SetupMPCtests] begin
64+
@testitem "SKF estimator methods" setup=[SetupMPCtests] begin
6565
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
6666
linmodel = setop!(LinModel(sys,Ts,i_u=[1,2]), uop=[10,50], yop=[50,30])
6767
kalmanfilter1 = SteadyKalmanFilter(linmodel, nint_ym=[1, 1])
@@ -114,7 +114,7 @@ end
114114
@test_throws ArgumentError updatestate!(kalmanfilter1, [10, 50])
115115
end
116116

117-
@testitem "SteadyKalmanFilter set model" setup=[SetupMPCtests] begin
117+
@testitem "SKF set model" setup=[SetupMPCtests] begin
118118
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
119119
linmodel = LinModel(ss(0.5, 0.3, 1.0, 0, 10.0))
120120
linmodel = setop!(linmodel, uop=[2.0], yop=[50.0], xop=[3.0], fop=[3.0])
@@ -125,7 +125,7 @@ end
125125
@test_throws ErrorException setmodel!(skalmanfilter, linmodel, R̂=[0.01])
126126
end
127127

128-
@testitem "SteadyKalmanFilter real-time simulations" setup=[SetupMPCtests] begin
128+
@testitem "SKF real-time simulations" setup=[SetupMPCtests] begin
129129
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
130130
linmodel = LinModel(tf(2, [10, 1]), 0.25)
131131
kalmanfilter1 = SteadyKalmanFilter(linmodel)
@@ -139,7 +139,7 @@ end
139139
@test all(isapprox.(diff(times1[2:end]), 0.25, atol=0.01))
140140
end
141141

142-
@testitem "KalmanFilter construction" setup=[SetupMPCtests] begin
142+
@testitem "KF construction" setup=[SetupMPCtests] begin
143143
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
144144
linmodel = setop!(LinModel(sys,Ts,i_u=[1,2]), uop=[10,50], yop=[50,30])
145145
kalmanfilter1 = KalmanFilter(linmodel)
@@ -191,7 +191,7 @@ end
191191
@test_throws DimensionMismatch KalmanFilter(linmodel, nint_ym=0, σP_0=[1])
192192
end
193193

194-
@testitem "KalmanFilter estimator methods" setup=[SetupMPCtests] begin
194+
@testitem "KF estimator methods" setup=[SetupMPCtests] begin
195195
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
196196
linmodel = setop!(LinModel(sys,Ts,i_u=[1,2]), uop=[10,50], yop=[50,30])
197197
kalmanfilter1 = KalmanFilter(linmodel)
@@ -240,7 +240,7 @@ end
240240
@test_throws ArgumentError updatestate!(kalmanfilter1, [10, 50])
241241
end
242242

243-
@testitem "KalmanFilter set model" setup=[SetupMPCtests] begin
243+
@testitem "KF set model" setup=[SetupMPCtests] begin
244244
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
245245
linmodel = LinModel(ss(0.5, 0.3, 1.0, 0, 10.0))
246246
linmodel = setop!(linmodel, uop=[2.0], yop=[50.0], xop=[3.0], fop=[3.0])
@@ -268,7 +268,7 @@ end
268268
@test kalmanfilter.cov. [1e-6]
269269
end
270270

271-
@testitem "Luenberger construction" setup=[SetupMPCtests] begin
271+
@testitem "Luenb. construction" setup=[SetupMPCtests] begin
272272
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
273273
linmodel = LinModel(sys,Ts,i_u=[1,2])
274274
lo1 = Luenberger(linmodel)
@@ -309,7 +309,7 @@ end
309309
@test_throws ErrorException Luenberger(LinModel(tf(1,[1, 0]),0.1), poles=[0.5,0.6])
310310
end
311311

312-
@testitem "Luenberger estimator methods" setup=[SetupMPCtests] begin
312+
@testitem "Luenb. estimator methods" setup=[SetupMPCtests] begin
313313
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
314314
linmodel = setop!(LinModel(sys,Ts,i_u=[1,2]), uop=[10,50], yop=[50,30])
315315
lo1 = Luenberger(linmodel, nint_ym=[1, 1])
@@ -357,7 +357,7 @@ end
357357
@test_throws ErrorException setstate!(lo1, [1,2,3,4], diagm(.1:.1:.4))
358358
end
359359

360-
@testitem "Luenberger set model" setup=[SetupMPCtests] begin
360+
@testitem "Luenb. set model" setup=[SetupMPCtests] begin
361361
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
362362
linmodel = LinModel(ss(0.5, 0.3, 1.0, 0, 10.0))
363363
linmodel = setop!(linmodel, uop=[2.0], yop=[50.0], xop=[3.0], fop=[3.0])
@@ -366,7 +366,7 @@ end
366366
@test_throws ErrorException setmodel!(lo, deepcopy(linmodel))
367367
end
368368

369-
@testitem "InternalModel construction" setup=[SetupMPCtests] begin
369+
@testitem "IM construction" setup=[SetupMPCtests] begin
370370
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
371371
linmodel = LinModel(sys,Ts,i_u=[1,2])
372372
internalmodel1 = InternalModel(linmodel)
@@ -436,7 +436,7 @@ end
436436
@test_throws ErrorException InternalModel(linmodel, stoch_ym=ss(1,1,1,0,Ts).*I(2))
437437
end
438438

439-
@testitem "InternalModel estimator methods" setup=[SetupMPCtests] begin
439+
@testitem "IM estimator methods" setup=[SetupMPCtests] begin
440440
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
441441
linmodel = setop!(LinModel(sys,Ts,i_u=[1,2]) , uop=[10,50], yop=[50,30])
442442
internalmodel1 = InternalModel(linmodel)
@@ -476,7 +476,7 @@ end
476476
@test_throws ErrorException setstate!(internalmodel1, [1,2,3,4], diagm(.1:.1:.4))
477477
end
478478

479-
@testitem "InternalModel set model" setup=[SetupMPCtests] begin
479+
@testitem "IM set model" setup=[SetupMPCtests] begin
480480
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
481481
linmodel = LinModel(ss(0.5, 0.3, 1.0, 0, 10.0))
482482
linmodel = setop!(linmodel, uop=[2.0], yop=[50.0], xop=[3.0], fop=[3.0])
@@ -501,7 +501,7 @@ end
501501
@test internalmodel.x̂0 [3.0 - 8.0]
502502
end
503503

504-
@testitem "UnscentedKalmanFilter construction" setup=[SetupMPCtests] begin
504+
@testitem "UKF construction" setup=[SetupMPCtests] begin
505505
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
506506
linmodel = LinModel(sys,Ts,i_d=[3])
507507
f(x,u,d,model) = model.A*x + model.Bu*u + model.Bd*d
@@ -559,7 +559,7 @@ end
559559
@test isa(ukf10, UnscentedKalmanFilter{Float32})
560560
end
561561

562-
@testitem "UnscentedKalmanFilter estimator methods" setup=[SetupMPCtests] begin
562+
@testitem "UKF estimator methods" setup=[SetupMPCtests] begin
563563
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
564564
linmodel = LinModel(sys,Ts,i_u=[1,2])
565565
function f!(xnext, x,u,_,model)
@@ -618,7 +618,7 @@ end
618618
@test isa(x̂, Vector{Float32})
619619
end
620620

621-
@testitem "UnscentedKalmanFilter set model" setup=[SetupMPCtests] begin
621+
@testitem "UKF set model" setup=[SetupMPCtests] begin
622622
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
623623
linmodel = LinModel(ss(0.5, 0.3, 1.0, 0, 10.0))
624624
linmodel = setop!(linmodel, uop=[2.0], yop=[50.0], xop=[3.0], fop=[3.0])
@@ -654,7 +654,7 @@ end
654654
@test_throws ErrorException setmodel!(ukf2, deepcopy(nonlinmodel))
655655
end
656656

657-
@testitem "ExtendedKalmanFilter construction" setup=[SetupMPCtests] begin
657+
@testitem "EKF construction" setup=[SetupMPCtests] begin
658658
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
659659
using DifferentiationInterface
660660
import FiniteDiff
@@ -713,7 +713,7 @@ end
713713
@test isa(ekf8, ExtendedKalmanFilter{Float32})
714714
end
715715

716-
@testitem "ExtendedKalmanFilter estimator methods" setup=[SetupMPCtests] begin
716+
@testitem "EKF estimator methods" setup=[SetupMPCtests] begin
717717
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
718718
using DifferentiationInterface
719719
import FiniteDiff
@@ -779,7 +779,7 @@ end
779779
@test evaloutput(ekf4) ekf4() [50, 30]
780780
end
781781

782-
@testitem "ExtendedKalmanFilter set model" setup=[SetupMPCtests] begin
782+
@testitem "EKF set model" setup=[SetupMPCtests] begin
783783
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
784784
linmodel = LinModel(ss(0.5, 0.3, 1.0, 0, 10.0))
785785
linmodel = setop!(linmodel, uop=[2.0], yop=[50.0], xop=[3.0], fop=[3.0])
@@ -815,7 +815,7 @@ end
815815
@test_throws ErrorException setmodel!(ekf2, deepcopy(nonlinmodel))
816816
end
817817

818-
@testitem "MovingHorizonEstimator construction (LinModel)" setup=[SetupMPCtests] begin
818+
@testitem "MHE construction (LinModel)" setup=[SetupMPCtests] begin
819819
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
820820
import FiniteDiff
821821
linmodel = LinModel(sys,Ts,i_d=[3])
@@ -885,7 +885,7 @@ end
885885
@test_throws ArgumentError MovingHorizonEstimator(linmodel, Cwt=-1)
886886
end
887887

888-
@testitem "MovingHorizonEstimator construction (NonLinModel)" setup=[SetupMPCtests] begin
888+
@testitem "MHE construction (NonLinModel)" setup=[SetupMPCtests] begin
889889
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
890890
using JuMP, Ipopt, DifferentiationInterface
891891
import FiniteDiff
@@ -936,7 +936,7 @@ end
936936
)
937937
end
938938

939-
@testitem "MovingHorizonEstimator estimation and getinfo (LinModel)" setup=[SetupMPCtests] begin
939+
@testitem "MHE estimation and getinfo (LinModel)" setup=[SetupMPCtests] begin
940940
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra, ForwardDiff
941941
using JuMP, DAQP
942942
linmodel = LinModel(sys,Ts,i_u=[1,2], i_d=[3])
@@ -1006,7 +1006,7 @@ end
10061006
@test isa(x̂, Vector{Float32})
10071007
end
10081008

1009-
@testitem "MovingHorizonEstimator estimation and getinfo (NonLinModel)" setup=[SetupMPCtests] begin
1009+
@testitem "MHE estimation and getinfo (NonLinModel)" setup=[SetupMPCtests] begin
10101010
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra, ForwardDiff
10111011
using JuMP, Ipopt
10121012
linmodel = LinModel(sys,Ts,i_u=[1,2], i_d=[3])
@@ -1115,7 +1115,7 @@ end
11151115

11161116
end
11171117

1118-
@testitem "MovingHorizonEstimator estimation with unfilled window" setup=[SetupMPCtests] begin
1118+
@testitem "MHE estimation with unfilled window" setup=[SetupMPCtests] begin
11191119
f(x,u,_,_) = 0.5x + u
11201120
h(x,_,_) = x
11211121
model = NonLinModel(f, h, 10.0, 1, 1, 1, solver=nothing)
@@ -1140,7 +1140,7 @@ end
11401140
@test mhe2() model() atol = 1e-6
11411141
end
11421142

1143-
@testitem "MovingHorizonEstimator fallbacks for arrival covariance estimation" setup=[SetupMPCtests] begin
1143+
@testitem "MHE fallbacks for arrival covariance estimation" setup=[SetupMPCtests] begin
11441144
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
11451145
linmodel = setop!(LinModel(sys,Ts,i_u=[1,2], i_d=[3]), uop=[10,50], yop=[50,30], dop=[5])
11461146
f(x,u,d,model) = model.A*x + model.Bu*u + model.Bd*d
@@ -1186,7 +1186,7 @@ end
11861186
@test mhe.cov.invP̄ invP̄_copy
11871187
end
11881188

1189-
@testitem "MovingHorizonEstimator set constraints" setup=[SetupMPCtests] begin
1189+
@testitem "MHE set constraints" setup=[SetupMPCtests] begin
11901190
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
11911191
linmodel = setop!(LinModel(sys,Ts,i_u=[1,2]), uop=[10,50], yop=[50,30])
11921192
mhe1 = MovingHorizonEstimator(linmodel, He=1, nint_ym=0, Cwt=1e3)
@@ -1287,7 +1287,7 @@ end
12871287
@test_throws ArgumentError setconstraint!(mhe4, c_v̂max=[1,1])
12881288
end
12891289

1290-
@testitem "MovingHorizonEstimator constraint violation" setup=[SetupMPCtests] begin
1290+
@testitem "MHE constraint violation" setup=[SetupMPCtests] begin
12911291
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
12921292
linmodel = setop!(LinModel(sys,Ts,i_u=[1,2]), uop=[10,50], yop=[50,30])
12931293
mhe = MovingHorizonEstimator(linmodel, He=1, nint_ym=0)
@@ -1442,7 +1442,7 @@ end
14421442

14431443
end
14441444

1445-
@testitem "MovingHorizonEstimator set model" setup=[SetupMPCtests] begin
1445+
@testitem "MHE set model" setup=[SetupMPCtests] begin
14461446
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
14471447
linmodel = LinModel(ss(0.5, 0.3, 1.0, 0, 10.0))
14481448
linmodel = setop!(linmodel, uop=[2.0], yop=[50.0], xop=[3.0], fop=[3.0])
@@ -1493,7 +1493,7 @@ end
14931493
@test_throws ErrorException setmodel!(mhe, R̂=diagm([-0.1]))
14941494
end
14951495

1496-
@testitem "MovingHorizonEstimator v.s. Kalman filters" setup=[SetupMPCtests] begin
1496+
@testitem "MHE v.s. Kalman filters" setup=[SetupMPCtests] begin
14971497
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
14981498
linmodel = setop!(LinModel(sys,Ts,i_d=[3]), uop=[10,50], yop=[50,30], dop=[20])
14991499
kf = KalmanFilter(linmodel, nint_ym=0, direct=false)
@@ -1582,7 +1582,7 @@ end
15821582
@test X̂_mhe X̂_ekf atol=1e-6 rtol=1e-6
15831583
end
15841584

1585-
@testitem "MovingHorizonEstimator LinModel v.s. NonLinModel" setup=[SetupMPCtests] begin
1585+
@testitem "MHE LinModel v.s. NonLinModel" setup=[SetupMPCtests] begin
15861586
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra, JuMP, Ipopt
15871587
linmodel = setop!(LinModel(sys,Ts,i_d=[3]), uop=[10,50], yop=[50,30], dop=[20])
15881588
f = (x,u,d,model) -> model.A*x + model.Bu*u + model.Bd*d
@@ -1632,7 +1632,7 @@ end
16321632
@test X̂_lin X̂_nonlin atol=1e-3 rtol=1e-3
16331633
end
16341634

1635-
@testitem "ManualEstimator construction" setup=[SetupMPCtests] begin
1635+
@testitem "Manual construction" setup=[SetupMPCtests] begin
16361636
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
16371637
linmodel = LinModel(sys,Ts,i_u=[1,2])
16381638
f = (x,u,d,model) -> model.A*x + model.Bu*u + model.Bd*d
@@ -1680,7 +1680,7 @@ end
16801680
@test manual7.nx̂ == 6
16811681
end
16821682

1683-
@testitem "ManualEstimator estimator methods" setup=[SetupMPCtests] begin
1683+
@testitem "Manual estimator methods" setup=[SetupMPCtests] begin
16841684
using .SetupMPCtests, ControlSystemsBase, LinearAlgebra
16851685
linmodel = LinModel(sys,Ts,i_u=[1,2])
16861686
f = (x,u,d,model) -> model.A*x + model.Bu*u + model.Bd*d

0 commit comments

Comments
 (0)