GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — discard zero imaginary part for sys.dcgain() by bnavigator · Pull Request #579 · python-control/python-control Conversation
Contributor
Closes #578
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
Coverage increased (+0.2%) to 89.14% when pulling 9a54254 on bnavigator:dcgain-real into 22b9953 on python-control:master. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| np.testing.assert_equal( | ||
| sys_tf.dcgain(warn_infinite=False), complex(np.nan, np.nan)) | ||
| sys_tf.dcgain(warn_infinite=False), np.nan) | ||
|
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a test to show that dcgain() on a system with negative gain at zero frequency returns a negative number.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Already exists:
python-control/control/tests/freqresp_test.py
Lines 505 to 507 in 8c9e807
| # Make sure that we get the *signed* DC gain | |
| sys_tf = -1 / (s + 1) | |
| np.testing.assert_almost_equal(sys_tf.dcgain(), -1) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ------- | ||
| gain : ndarray | ||
| The zero-frequency gain | ||
| gain : (outputs, inputs) ndarray or scalar |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
gain : (noutputs, ninputs) ndarray or scalar
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| zero-frequency (or DC) gain, or, if the frequency response is | ||
| singular, the array will be filled with (inf + nanj). | ||
|
|
||
| gain : (outputs, inputs) ndarray or scalar |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
gain : (noutputs, ninputs) ndarray or scalar
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
sys.dcgain() should return a real value rather than a complex value (until/unless we support complex coefficients)
There was an error while loading. Please reload this page.