def drss(states=1, inputs=1, outputs=1): """ Create a stable **discrete** random state space object. Parameters ---------- states: integer Number of state variables inputs: integer Number of system inputs outputs: integer Number of system outputs Returns ------- sys: StateSpace The randomly created linear system Raises ------ ValueError if any input is not a positive integer See Also -------- rss Notes ----- If the number of states, inputs, or outputs is not specified, then the missing numbers are assumed to be 1. The poles of the returned system will always have a magnitude less than 1. """ return _rss_generate(states, inputs, outputs, 'd')
def drss(states=1, outputs=1, inputs=1): """ Create a stable **discrete** random state space object. Parameters ---------- states: integer Number of state variables inputs: integer Number of system inputs outputs: integer Number of system outputs Returns ------- sys: StateSpace The randomly created linear system Raises ------ ValueError if any input is not a positive integer See Also -------- rss Notes ----- If the number of states, inputs, or outputs is not specified, then the missing numbers are assumed to be 1. The poles of the returned system will always have a magnitude less than 1. """ return _rss_generate(states, inputs, outputs, 'd')
def test_rss_invalid(self, par, errmatch): """Test invalid inputs for rss() and drss().""" with pytest.raises(ValueError, match=errmatch): _rss_generate(*par)