Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Change function names in modelsimp, add aliases#1028

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletionscontrol/modelsimp.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,15 +49,17 @@
from .statesp import StateSpace
from .statefbk import gram

__all__ = ['hsvd', 'balred', 'modred', 'era', 'markov', 'minreal']
__all__ = ['hankel_singular_values', 'balanced_reduction', 'model_reduction',
'minimal_realization', 'eigensys_realization', 'markov', 'hsvd',
'balred', 'modred', 'minreal', 'era']


# Hankel Singular Value Decomposition
#
# The following returns the Hankel singular values, which are singular values
# of the matrix formed by multiplying the controllability and observability
# Gramians
defhsvd(sys):
defhankel_singular_values(sys):
"""Calculate the Hankel singular values.

Parameters
Expand DownExpand Up@@ -106,7 +108,7 @@ def hsvd(sys):
return hsv[::-1]


defmodred(sys, ELIM, method='matchdc'):
defmodel_reduction(sys, ELIM, method='matchdc'):
"""
Model reduction of `sys` by eliminating the states in `ELIM` using a given
method.
Expand DownExpand Up@@ -216,7 +218,7 @@ def modred(sys, ELIM, method='matchdc'):
return rsys


defbalred(sys, orders, method='truncate', alpha=None):
defbalanced_reduction(sys, orders, method='truncate', alpha=None):
"""Balanced reduced order model of sys of a given order.
States are eliminated based on Hankel singular value.
If sys has unstable modes, they are removed, the
Expand DownExpand Up@@ -340,7 +342,7 @@ def balred(sys, orders, method='truncate', alpha=None):
return rsys


defminreal(sys, tol=None, verbose=True):
defminimal_realization(sys, tol=None, verbose=True):
'''
Eliminates uncontrollable or unobservable states in state-space
models or cancelling pole-zero pairs in transfer functions. The
Expand DownExpand Up@@ -368,7 +370,7 @@ def minreal(sys, tol=None, verbose=True):
return sysr


defera(YY, m, n, nin, nout, r):
defeigensys_realization(YY, m, n, nin, nout, r):
"""Calculate an ERA model of order `r` based on the impulse-response data
`YY`.

Expand DownExpand Up@@ -556,3 +558,10 @@ def markov(Y, U, m=None, transpose=False):

# Return the first m Markov parameters
return H if transpose else np.transpose(H)

# Function aliases
hsvd = hankel_singular_values
balred = balanced_reduction
modred = model_reduction
minreal = minimal_realization
era = eigensys_realization
10 changes: 5 additions & 5 deletionsdoc/control.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -133,11 +133,11 @@ Model simplification tools
.. autosummary::
:toctree: generated/

minreal
balred
hsvd
modred
era
minimal_realization
balanced_reduction
hankel_singular_values
model_reduction
eigensys_realization
markov

Nonlinear system support
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp