Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StateSpace to SisoZpk conversion removes states #481

Closed
albheim opened this issue May 10, 2021 · 3 comments
Closed

StateSpace to SisoZpk conversion removes states #481

albheim opened this issue May 10, 2021 · 3 comments

Comments

@albheim
Copy link
Member

albheim commented May 10, 2021

Got asked why this was behaving weirdly, and I'm not sure. Seems like the struct_ctrb_obsv removes some states when converting from state space to zpk, but was not immediately clear to me what was going on in there.

using ControlSystems

A = [-0.016303260598174024   0.008606869939999928   0.002945859872611465   0.00038747346072186837
        0.00211965267541959   -0.00211965267541959    0.0                    0.0
        6.776556776556777e-5   0.0                   -6.776556776556777e-5   0.0
        0.0                    0.0                    0.0                   -0.0024333333333333334]
B = [0; 0; 0; 1.0]
C = [1.0 0 0 0]

sys = ss(A, B, C, 0)

@show tzero(sys) pole(sys)
@show tzero(tf(sys)), pole(tf(sys))
@show tzero(zpk(tf(sys))), pole(zpk(tf(sys)))
@show tzero(zpk(sys)), pole(zpk(sys)) # This is different than all the others, still seems similar but some states removed
@baggepinnen
Copy link
Member

I've had problems with struct_ctrb_obsv before as well, #409
maybe it needs a rewrite. I'm not even sure what it does.

@olof3
Copy link
Contributor

olof3 commented May 10, 2021

Most recently discussed some days ago in #475

@albheim
Copy link
Member Author

albheim commented May 10, 2021

Okay, closing this then and we can continue discussing in the other ones.

@albheim albheim closed this as completed May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants