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

improve forced_response and its documentation#588

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
bnavigator merged 12 commits intopython-control:masterfrombnavigator:timeresp-doc
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
12 commits
Select commitHold shift + click to select a range
1f51526
update parameter doc and error message for forced_response
bnavigatorMar 24, 2021
2870432
allow T=None with sys.dt=None in forced_response
bnavigatorMar 24, 2021
517b1eb
timeresp: add test system with dt=None
bnavigatorMar 25, 2021
52a3fd4
more docstring fixups
bnavigatorMar 25, 2021
f0d764f
test forced_response omitting parameters as documented
bnavigatorMar 25, 2021
9cac9fa
ensure dlsim output length
bnavigatorMar 26, 2021
7be508b
rework fixture setup for timeresp_test
bnavigatorMar 26, 2021
a72441b
specify tolerance and add comment for markov test
bnavigatorMar 26, 2021
177290c
reactivate the the fast forced_response(U=0) algorithm and test it
bnavigatorMar 26, 2021
ce51d34
cover TF initial condition warning in forced_response
bnavigatorMar 27, 2021
4404169
reallow non zero timevector start
bnavigatorMar 27, 2021
a8b72f5
avoid different realizations with and without slycot
bnavigatorMar 27, 2021
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
10 changes: 5 additions & 5 deletionscontrol/tests/modelsimp_test.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,8 +65,6 @@ def testMarkovSignature(self, matarrayout, matarrayin):
markov(Y, U, m)

# Make sure markov() returns the right answer
# forced response can return wrong shape until gh-488 is merged
@pytest.mark.xfail
@pytest.mark.parametrize("k, m, n",
[(2, 2, 2),
(2, 5, 5),
Expand All@@ -81,7 +79,7 @@ def testMarkovResults(self, k, m, n):
# m = number of Markov parameters
# n = size of the data vector
#
# Values should match exactly for n = m, otherewise you get a
# Values*should* match exactly for n = m, otherewise you get a
# close match but errors due to the assumption that C A^k B =
# 0 for k > m-2 (see modelsimp.py).
#
Expand All@@ -108,7 +106,10 @@ def testMarkovResults(self, k, m, n):
Mcomp = markov(Y, U, m)

# Compare to results from markov()
np.testing.assert_array_almost_equal(Mtrue, Mcomp)
# experimentally determined probability to get non matching results
# with rtot=1e-6 and atol=1e-8 due to numerical errors
# for k=5, m=n=10: 0.015 %
np.testing.assert_allclose(Mtrue, Mcomp, rtol=1e-6, atol=1e-8)

def testModredMatchDC(self, matarrayin):
#balanced realization computed in matlab for the transfer function:
Expand DownExpand Up@@ -219,4 +220,3 @@ def testBalredMatchDC(self, matarrayin):
np.testing.assert_array_almost_equal(rsys.B, Brtrue, decimal=4)
np.testing.assert_array_almost_equal(rsys.C, Crtrue, decimal=4)
np.testing.assert_array_almost_equal(rsys.D, Drtrue, decimal=4)

Loading

[8]ページ先頭

©2009-2025 Movatter.jp