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

Fix margin() documentation to address issue #195#198

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
murrayrm merged 3 commits intopython-control:masterfrommurrayrm:fix_margins_doc
Jul 2, 2018
Merged
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
32 changes: 18 additions & 14 deletionscontrol/margins.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -108,12 +108,12 @@ def stability_margins(sysdata, returnall=False, epsw=0.0):
Linear SISO system
mag, phase, omega : sequence of array_like
Arrays of magnitudes (absolute values, not dB), phases (degrees),
and corresponding frequencies.Crossover frequencies returned are
and corresponding frequencies. Crossover frequencies returned are
in the same units as those in `omega` (e.g., rad/sec or Hz).
returnall: bool, optional
If true, return all margins found. Iffalse (default), return only the
minimum stability margins.For frequency data or FRD systems, only one
margin is found and returned.
If true, return all margins found. IfFalse (default), return only the
minimum stability margins. For frequency data or FRD systems, only
margins in the given frequency region can be found and returned.
epsw: float, optional
Frequencies below this value (default 0.0) are considered static gain,
and not returned as margin.
Expand All@@ -127,11 +127,11 @@ def stability_margins(sysdata, returnall=False, epsw=0.0):
sm: float or array_like
Stability margin, the minimum distance from the Nyquist plot to -1
wg: float or array_like
Gain margin crossover frequency (where phasecrosses -180 degrees)
Frequency for gain margin (at phasecrossover, phase = -180 degrees)
wp: float or array_like
Phase margin crossover frequency (where gaincrosses 0 dB)
Frequency for phase margin (at gaincrossover, gain = 0 dB)
ws: float or array_like
Stability margin frequency (where Nyquist plot is closest to -1)
Frequency for stability margin (complex gain closest to -1)
"""

try:
Expand DownExpand Up@@ -340,18 +340,22 @@ def margin(*args):
Gain margin
pm : float
Phase margin (in degrees)
Wcg: float
Gain crossover frequency (corresponding tophasemargin)
Wcp: float
Phase crossover frequency (corresponding togainmargin) (in rad/sec)
wg: float
Frequency for gain margin (at phase crossover,phase= -180 degrees)
wp: float
Frequency for phase margin (at gain crossover,gain= 0 dB)

Margins are of SISO open-loop. If more than one crossover frequency is
detected, returns the lowest corresponding margin.
Margins are calculated for a SISO open-loop system.

If there is more than one gain crossover, the one at the smallest
margin (deviation from gain=0dB), in absolute sense, is
returned. Likewise the smallest phase margin (in absolute sense)
is returned.

Examples
--------
>>> sys = tf(1, [1, 2, 1, 0])
>>> gm, pm,Wcg, Wcp = margin(sys)
>>> gm, pm,wg, wp = margin(sys)

"""
if len(args) == 1:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp