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

handle proper quotient of proper statespace systems #906

Merged
merged 2 commits into from
Dec 6, 2023
Merged

Conversation

baggepinnen
Copy link
Member

The PR adds a method of / between two statespace systems
$$G_2 G_1^{-1}$$
that handles situations in which $G_1^{-1}$ s non-proper and naive inversion fails, but the quotient $G_2 G_1^{-1}$ is proper and can be represented as a statespace system.

The intermediate result is a descriptor system with non-identity and singular mass matrix Ei which is immediately simplified using MatrixPencils.lsminreal into a descriptor system with invertible mass matrix (if possible). This system is in turn simplified to have unit mass matrix. If the quotient isn't proper, at least one of the steps above will fail and throw an error The system sys2 is not invertible.

The call to lsminreal will generally lead to a smaller realization compared to what was returned before. This is the reason the test

C_221/C_222_d == SS([-5 -3 -1 0; 2 -9 -0 -2; 0 0 -6 -3;
        0 0 2 -11],[1 0; 0 2; 1 0; 0 2],[1 0 0 0],[0 0])

was changed to compare the H-infnorm, we now return a second-order system instead of 4:th order.

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Attention: 33 lines in your changes are missing coverage. Please review.

Comparison is base (27c1b00) 4.02% compared to head (2b41c29) 33.52%.

❗ Current head 2b41c29 differs from pull request most recent head 313d2b4. Consider uploading reports for the commit 313d2b4 to get more accurate results

Files Patch % Lines
lib/ControlSystemsBase/src/types/StateSpace.jl 0.00% 33 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #906       +/-   ##
===========================================
+ Coverage    4.02%   33.52%   +29.50%     
===========================================
  Files          41       42        +1     
  Lines        4623     4698       +75     
===========================================
+ Hits          186     1575     +1389     
+ Misses       4437     3123     -1314     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@baggepinnen baggepinnen merged commit 080207b into master Dec 6, 2023
3 of 4 checks passed
@baggepinnen baggepinnen deleted the ss_inv branch December 6, 2023 17:33
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

Successfully merging this pull request may close these issues.

None yet

1 participant