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

add functions to check controllability/observability using the PHB test #866

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

baggepinnen
Copy link
Member

@baggepinnen baggepinnen commented Sep 4, 2023

See discussion in #865

@franckgaga

@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (737a925) 92.72% compared to head (5cbf7ce) 92.72%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #866   +/-   ##
=======================================
  Coverage   92.72%   92.72%           
=======================================
  Files           5        5           
  Lines         330      330           
=======================================
  Hits          306      306           
  Misses         24       24           

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

@JuliaControlBot
Copy link

This is an automated message.
Plots were compared to references. 11/11 images have changed, see differences below.
After pulling this PR, please update the reference images by creating a PR to ControlExamplePlots.jl here.

Difference Reference Image New Image
❌ 0.047 Reference New
✔️ 0.011 Reference New
✔️ 0.001 Reference New
✔️ 0.001 Reference New
✔️ 0.007 Reference New
✔️ 0.003 Reference New
✔️ 0.0 Reference New
⚠️ 0.028 Reference New
❌ 0.06 Reference New
✔️ 0.0 Reference New
⚠️ 0.017 Reference New

@JuliaControlBot
Copy link

This is an automated message.
Plots were compared to references. 11/11 images have changed, see differences below.
After pulling this PR, please update the reference images by creating a PR to ControlExamplePlots.jl here.

Difference Reference Image New Image
❌ 0.047 Reference New
✔️ 0.011 Reference New
✔️ 0.001 Reference New
✔️ 0.001 Reference New
✔️ 0.007 Reference New
✔️ 0.003 Reference New
✔️ 0.0 Reference New
⚠️ 0.028 Reference New
❌ 0.06 Reference New
✔️ 0.0 Reference New
⚠️ 0.017 Reference New

@baggepinnen baggepinnen merged commit 3663d5c into master Sep 4, 2023
7 checks passed
@baggepinnen baggepinnen deleted the phbtest branch September 4, 2023 12:15
@baggepinnen baggepinnen changed the title add functions to check controllability/observability using the PH test add functions to check controllability/observability using the PHB test Sep 4, 2023
@JuliaControlBot
Copy link

This is an automated message.
Plots were compared to references. 11/11 images have changed, see differences below.
After pulling this PR, please update the reference images by creating a PR to ControlExamplePlots.jl here.

Difference Reference Image New Image
❌ 0.047 Reference New
✔️ 0.011 Reference New
✔️ 0.001 Reference New
✔️ 0.001 Reference New
✔️ 0.007 Reference New
✔️ 0.003 Reference New
✔️ 0.0 Reference New
⚠️ 0.028 Reference New
❌ 0.06 Reference New
✔️ 0.0 Reference New
⚠️ 0.017 Reference New

@franckgaga
Copy link
Member

good job @baggepinnen! I'll use them in my package :)

@andreasvarga
Copy link

I would move the check for square matrix before eigenvalue computation.

@andreasvarga
Copy link

In a strict sense, the function controllabiliy checks the reachability of a LTI system. While for continuous-time systems the two notions are equivalent, for discrete-time systems there is a subtle difference between them. In general reachability implies controllability, but the reverse is not true. The controllability property is defined as the ability of a system to drive any state into the origin, while reachability is the ability to drive any state into another arbitrary state, in finite time. For example, discrete-time systems with B = 0 and A nillpotent are controllable! In MATLAB this aspect is handled incorrectly, so there is a chance to address it in a rigourous manner in Julia! The function observability checks the right property!

@baggepinnen
Copy link
Member Author

Thanks for the comment! Is your proposed change to rename the implemented function to reachability, or to change the implementation to distinguish between controllability and reachability for discrete-time systems? If the latter, do you know of a reference that can be used to guide the implementation?

@andreasvarga
Copy link

A pertinent discussion of this aspect is, for example, in the book of Kailath (1980), starting with page 95, where also the dual concepts observability and constructibility are discussed. See also the picture on page 100, which illustrates the equivalence of these notions in discrete case if A is nonsingular. I would suggest to keep the function controllability as it is now, but add a remark, that it concerns with “controllability from the origin (also called reachability)”.

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.

4 participants