12
12
from numpy import inf , nan
13
13
from numpy .testing import assert_allclose
14
14
15
- from ..frdata import FrequencyResponseData
16
- from ..margins import margin , phase_crossover_frequencies , stability_margins
17
- from ..statesp import StateSpace
18
- from ..xferfcn import TransferFunction
19
- from ..exception import ControlMIMONotImplemented
15
+ from control import ControlMIMONotImplemented , FrequencyResponseData , \
16
+ StateSpace , TransferFunction , margin , phase_crossover_frequencies , \
17
+ stability_margins
20
18
21
19
s = TransferFunction .s
22
20
@@ -110,7 +108,6 @@ def test_margin_3input(tsys):
110
108
out = margin ((mag , phase * 180 / np .pi , omega_ ))
111
109
assert_allclose (out , np .array (refout )[[0 , 1 , 3 , 4 ]], atol = 1.5e-3 )
112
110
113
-
114
111
@pytest .mark .parametrize (
115
112
'tfargs, omega_ref, gain_ref' ,
116
113
[(([1 ], [1 , 2 , 3 , 4 ]), [1.7325 , 0. ], [- 0.5 , 0.25 ]),
@@ -121,6 +118,7 @@ def test_margin_3input(tsys):
121
118
(([200.0 ], [1.0 , 21.0 , 20.0 , 0.0 ]),
122
119
[4.47213595 , 0 ], [- 0.47619048 , inf ]),
123
120
])
121
+ @pytest .mark .filterwarnings ("error" )
124
122
def test_phase_crossover_frequencies (tfargs , omega_ref , gain_ref ):
125
123
"""Test phase_crossover_frequencies() function"""
126
124
sys = TransferFunction (* tfargs )
0 commit comments