@@ -164,7 +164,7 @@ let (; c2d, tf, feedback, lsim) = CS
164
164
G = feedback (C, P)
165
165
res = lsim (G, (x, t) -> [0.5 ], timevec)
166
166
y = res. y[:]
167
- @test sol (timevec, idxs = model. plant. input. u)≈ y rtol= 1e-8
167
+ @test_broken sol (timevec, idxs = model. plant. input. u)≈ y rtol= 1e-8
168
168
# plot([y sol(timevec, idxs=model.plant.input.u).u], lab=["CS" "MTK"])
169
169
# plot(timevec, [y sol(timevec, idxs = model.controller.u)[:]], m = :o, lab = ["CS" "MTK"])
170
170
end
@@ -324,8 +324,8 @@ using Statistics
324
324
sol = solve (prob, Tsit5 ())
325
325
@test ! all (iszero, sol. u)
326
326
tv = 0 : k. clock. dt: sol. t[end ]
327
- @test std (sol (tv, idxs = m. plant . u )) ≈ 1 rtol= 0.1
328
- @test mean (sol (tv, idxs = m. plant . u )) ≈ 0 atol= 0.08
327
+ @test std (sol (tv, idxs = m. noise . y )) ≈ 1 rtol= 0.1
328
+ @test mean (sol (tv, idxs = m. noise . y )) ≈ 0 atol= 0.08
329
329
end
330
330
331
331
@testset " UniformNoise" begin
350
350
sol = solve (prob, Tsit5 ())
351
351
@test ! all (iszero, sol. u)
352
352
tv = 0 : k. clock. dt: sol. t[end ]
353
- @test minimum (sol (tv, idxs = m. plant . u )) ≈ 0 atol= 0.02
354
- @test maximum (sol (tv, idxs = m. plant . u )) ≈ 1 atol= 0.02
353
+ @test minimum (sol (tv, idxs = m. noise . y )) ≈ 0 atol= 0.02
354
+ @test maximum (sol (tv, idxs = m. noise . y )) ≈ 1 atol= 0.02
355
355
end
356
356
357
357
564
564
# plot(sol, idxs=m.filter.y)
565
565
@test sol (1.5 , idxs= m. filter. y) == 1
566
566
@test sol (0.999 , idxs= m. filter. y) == 0
567
- @test 0 < sol (1.1 , idxs= m. filter. y) < 1
567
+ @test_broken 0 < sol (1.1 , idxs= m. filter. y) < 1
568
+
569
+ @test_broken count (! ∈ ((1 ,0 )), sol[m. filter. y]) == 2 # With 3 taps there are two steps where tap values have both 0 and 1
568
570
end
569
571
570
572
@testset " sampling with AD effects" begin
0 commit comments