JuliaControl / ControlSystems.jl

A Control Systems Toolbox for Julia
https://juliacontrol.github.io/ControlSystems.jl/stable/
Other
516 stars 86 forks source link

Unity feedback of discrete-time system #304

Closed olof3 closed 2 years ago

olof3 commented 4 years ago

feedback(ss(0.5, 1, 1, 0, 1), 1) currently throws "sampletime mismatch"

I guess that this will be resolved after pulling the sampletime PR, so this is just a reminder to check that this is indeed the case.

Here are two simple regression tests to add.

@test feedback(ss(0.5, 1, 1, 0, 1), 1) == ss(-0.5, 1, 1, 0, 1)
@test feedback(1, ss(0.5, 1, 1, 0, 1)) == ss(-0.5, 1, -1, 1, 1)
olof3 commented 4 years ago

We should support feedback with UniformScaling since 1 doesn't really make sense for MIMO systems. Perhaps still makes sense to support feedback with Number for the SISO case?

mfalt commented 4 years ago

Did we solve this?

olof3 commented 4 years ago

Nope. This is still an issue. I also found this problem

@test [ss(1,1,1,0,1) 1] == ss(1, [1 0], 1, [0 1], 1)

We've had all these problems for systems with different sample times etc. Couldn't we just rely on promote to a greater extent than convert? It seems like this would make it a lot easier to get the sampletime right.