Skip to content

Commit ca5a4a4

Browse files
committed
remove a_end parameter
1 parent 26bfd8e commit ca5a4a4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Blocks/continuous.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -633,13 +633,13 @@ See also [`StateSpace`](@ref) which handles MIMO systems, as well as [ControlSys
633633
description = "Denominator coefficients of transfer function (e.g., `s² + 2ωs + ω^2` is specified as [1, 2ω, ω^2])"
634634
]
635635
bb[1:(nbb + nb)] = [zeros(nbb); b]
636-
d = bb[1] / a[1], [description = "Direct feedthrough gain"]
637636
end
637+
d = bb[1] / a[1]# , [description = "Direct feedthrough gain"]
638638

639639
a = collect(a)
640-
@parameters a_end = ifelse(a[end] > 100 * symbolic_eps(sqrt(a' * a)), a[end], 1.0)
640+
a_end = ifelse(a[end] > 100 * symbolic_eps(sqrt(a' * a)), a[end], 1.0)
641641

642-
pars = [collect(b); a; collect(bb); d; a_end]
642+
pars = [collect(b); a; collect(bb)]
643643
@variables begin
644644
x(t)[1:nx] = zeros(nx),
645645
[description = "State of transfer function on controller canonical form"]

test/Blocks/continuous.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ end
430430
@named pt1 = TransferFunction(b = [1.2], a = [3.14, 1])
431431
@named iosys = ODESystem(connect(c.output, pt1.input), t, systems = [pt1, c])
432432
sys = structural_simplify(iosys)
433-
prob = ODEProblem(sys, Pair[pt1.a_end => 1], (0.0, 100.0))
433+
prob = ODEProblem(sys, Pair[], (0.0, 100.0))
434434
sol = solve(prob, Rodas4())
435435
@test sol.retcode == Success
436436
@test sol[pt1.output.u]pt1_func.(sol.t, 1.2, 3.14) atol=1e-3
@@ -440,7 +440,7 @@ end
440440
@named pt1 = TransferFunction(b = [1.2], a = [3.14, 0])
441441
@named iosys = ODESystem(connect(c.output, pt1.input), t, systems = [pt1, c])
442442
sys = structural_simplify(iosys)
443-
prob = ODEProblem(sys, Pair[pt1.a_end => 1], (0.0, 100.0))
443+
prob = ODEProblem(sys, Pair[], (0.0, 100.0))
444444
sol = solve(prob, Rodas4())
445445
@test sol.retcode == Success
446446
@test sol[pt1.output.u] sol.t .* (1.2 / 3.14)
@@ -464,7 +464,7 @@ end
464464
@named pt1 = TransferFunction(b = [w^2], a = [1, 2d * w, w^2])
465465
@named iosys = ODESystem(connect(c.output, pt1.input), t, systems = [pt1, c])
466466
sys = structural_simplify(iosys)
467-
prob = ODEProblem(sys, Pair[pt1.a_end => 1], (0.0, 100.0))
467+
prob = ODEProblem(sys, Pair[], (0.0, 100.0))
468468
sol = solve(prob, Rodas4())
469469
@test sol.retcode == Success
470470
@test sol[pt1.output.u]pt2_func.(sol.t, k, w, d) atol=1e-3
@@ -474,7 +474,7 @@ end
474474
@named pt1 = TransferFunction(b = [1, 0], a = [1, 1])
475475
@named iosys = ODESystem(connect(c.output, pt1.input), t, systems = [pt1, c])
476476
sys = structural_simplify(iosys)
477-
prob = ODEProblem(sys, Pair[pt1.a_end => 1], (0.0, 100.0))
477+
prob = ODEProblem(sys, Pair[], (0.0, 100.0))
478478
sol = solve(prob, Rodas4())
479479
@test sol.retcode == Success
480480
@test sol[pt1.output.u]1 .- pt1_func.(sol.t, 1, 1) atol=1e-3
@@ -484,7 +484,7 @@ end
484484
@named pt1 = TransferFunction(b = [2.7], a = [pi])
485485
@named iosys = ODESystem(connect(c.output, pt1.input), t, systems = [pt1, c])
486486
sys = structural_simplify(iosys)
487-
prob = ODEProblem(sys, Pair[pt1.a_end => 1], (0.0, 100.0))
487+
prob = ODEProblem(sys, Pair[], (0.0, 100.0))
488488
sol = solve(prob, Rodas4())
489489
@test sol.retcode == Success
490490
@test all(==(2.7 / pi), sol[pt1.output.u])

0 commit comments

Comments
 (0)