|
11 | 11 | from control.xferfcn import TransferFunction |
12 | 12 | from control.statesp import StateSpace |
13 | 13 | from control.bdalg import feedback, append, connect |
14 | | -from control.lti import zero, pole |
| 14 | +from control.lti import zeros, poles |
15 | 15 |
|
16 | 16 |
|
17 | 17 | class TestFeedback: |
@@ -188,52 +188,52 @@ def testLists(self, tsys): |
188 | 188 |
|
189 | 189 | # Series |
190 | 190 | sys1_2 = ctrl.series(sys1, sys2) |
191 | | - np.testing.assert_array_almost_equal(sort(pole(sys1_2)), [-4., -2.]) |
192 | | - np.testing.assert_array_almost_equal(sort(zero(sys1_2)), [-3., -1.]) |
| 191 | + np.testing.assert_array_almost_equal(sort(poles(sys1_2)), [-4., -2.]) |
| 192 | + np.testing.assert_array_almost_equal(sort(zeros(sys1_2)), [-3., -1.]) |
193 | 193 |
|
194 | 194 | sys1_3 = ctrl.series(sys1, sys2, sys3) |
195 | | - np.testing.assert_array_almost_equal(sort(pole(sys1_3)), |
| 195 | + np.testing.assert_array_almost_equal(sort(poles(sys1_3)), |
196 | 196 | [-6., -4., -2.]) |
197 | | - np.testing.assert_array_almost_equal(sort(zero(sys1_3)), |
| 197 | + np.testing.assert_array_almost_equal(sort(zeros(sys1_3)), |
198 | 198 | [-5., -3., -1.]) |
199 | 199 |
|
200 | 200 | sys1_4 = ctrl.series(sys1, sys2, sys3, sys4) |
201 | | - np.testing.assert_array_almost_equal(sort(pole(sys1_4)), |
| 201 | + np.testing.assert_array_almost_equal(sort(poles(sys1_4)), |
202 | 202 | [-8., -6., -4., -2.]) |
203 | | - np.testing.assert_array_almost_equal(sort(zero(sys1_4)), |
| 203 | + np.testing.assert_array_almost_equal(sort(zeros(sys1_4)), |
204 | 204 | [-7., -5., -3., -1.]) |
205 | 205 |
|
206 | 206 | sys1_5 = ctrl.series(sys1, sys2, sys3, sys4, sys5) |
207 | | - np.testing.assert_array_almost_equal(sort(pole(sys1_5)), |
| 207 | + np.testing.assert_array_almost_equal(sort(poles(sys1_5)), |
208 | 208 | [-8., -6., -4., -2., -0.]) |
209 | | - np.testing.assert_array_almost_equal(sort(zero(sys1_5)), |
| 209 | + np.testing.assert_array_almost_equal(sort(zeros(sys1_5)), |
210 | 210 | [-9., -7., -5., -3., -1.]) |
211 | 211 |
|
212 | 212 | # Parallel |
213 | 213 | sys1_2 = ctrl.parallel(sys1, sys2) |
214 | | - np.testing.assert_array_almost_equal(sort(pole(sys1_2)), [-4., -2.]) |
215 | | - np.testing.assert_array_almost_equal(sort(zero(sys1_2)), |
216 | | - sort(zero(sys1 + sys2))) |
| 214 | + np.testing.assert_array_almost_equal(sort(poles(sys1_2)), [-4., -2.]) |
| 215 | + np.testing.assert_array_almost_equal(sort(zeros(sys1_2)), |
| 216 | + sort(zeros(sys1 + sys2))) |
217 | 217 |
|
218 | 218 | sys1_3 = ctrl.parallel(sys1, sys2, sys3) |
219 | | - np.testing.assert_array_almost_equal(sort(pole(sys1_3)), |
| 219 | + np.testing.assert_array_almost_equal(sort(poles(sys1_3)), |
220 | 220 | [-6., -4., -2.]) |
221 | | - np.testing.assert_array_almost_equal(sort(zero(sys1_3)), |
222 | | - sort(zero(sys1 + sys2 + sys3))) |
| 221 | + np.testing.assert_array_almost_equal(sort(zeros(sys1_3)), |
| 222 | + sort(zeros(sys1 + sys2 + sys3))) |
223 | 223 |
|
224 | 224 | sys1_4 = ctrl.parallel(sys1, sys2, sys3, sys4) |
225 | | - np.testing.assert_array_almost_equal(sort(pole(sys1_4)), |
| 225 | + np.testing.assert_array_almost_equal(sort(poles(sys1_4)), |
226 | 226 | [-8., -6., -4., -2.]) |
227 | 227 | np.testing.assert_array_almost_equal( |
228 | | - sort(zero(sys1_4)), |
229 | | - sort(zero(sys1 + sys2 + sys3 + sys4))) |
| 228 | + sort(zeros(sys1_4)), |
| 229 | + sort(zeros(sys1 + sys2 + sys3 + sys4))) |
230 | 230 |
|
231 | 231 | sys1_5 = ctrl.parallel(sys1, sys2, sys3, sys4, sys5) |
232 | | - np.testing.assert_array_almost_equal(sort(pole(sys1_5)), |
| 232 | + np.testing.assert_array_almost_equal(sort(poles(sys1_5)), |
233 | 233 | [-8., -6., -4., -2., -0.]) |
234 | 234 | np.testing.assert_array_almost_equal( |
235 | | - sort(zero(sys1_5)), |
236 | | - sort(zero(sys1 + sys2 + sys3 + sys4 + sys5))) |
| 235 | + sort(zeros(sys1_5)), |
| 236 | + sort(zeros(sys1 + sys2 + sys3 + sys4 + sys5))) |
237 | 237 |
|
238 | 238 | def testMimoSeries(self, tsys): |
239 | 239 | """regression: bdalg.series reverses order of arguments""" |
|
0 commit comments