@@ -410,8 +410,7 @@ def horner(self, s):
410
410
411
411
# Method for generating the frequency response of the system
412
412
def freqresp (self , omega ):
413
- """
414
- Evaluate the system's transfer func. at a list of freqs, omega.
413
+ """Evaluate the system's transfer func. at a list of freqs, omega.
415
414
416
415
mag, phase, omega = self.freqresp(omega)
417
416
@@ -426,20 +425,23 @@ def freqresp(self, omega):
426
425
427
426
Parameters
428
427
----------
429
- omega: A list of frequencies in radians/sec at which the system
430
- should be evaluated. The list can be either a python list
431
- or a numpy array and will be sorted before evaluation.
428
+ omega : array
429
+ A list of frequencies in radians/sec at which the system should be
430
+ evaluated. The list can be either a python list or a numpy array
431
+ and will be sorted before evaluation.
432
432
433
433
Returns
434
434
-------
435
- mag: The magnitude (absolute value, not dB or log10) of the system
435
+ mag : float
436
+ The magnitude (absolute value, not dB or log10) of the system
436
437
frequency response.
437
438
438
- phase: The wrapped phase in radians of the system frequency
439
- response.
439
+ phase : float
440
+ The wrapped phase in radians of the system frequency response.
440
441
441
- omega: The list of sorted frequencies at which the response
442
- was evaluated.
442
+ omega : array
443
+ The list of sorted frequencies at which the response was
444
+ evaluated.
443
445
444
446
"""
445
447
@@ -614,11 +616,11 @@ def lft(self, other, nu=-1, ny=-1):
614
616
615
617
Parameters
616
618
----------
617
- other: LTI
619
+ other : LTI
618
620
The lower LTI system
619
- ny: int, optional
621
+ ny : int, optional
620
622
Dimension of (plant) measurement output.
621
- nu: int, optional
623
+ nu : int, optional
622
624
Dimension of (plant) control input.
623
625
624
626
"""
@@ -793,19 +795,21 @@ def sample(self, Ts, method='zoh', alpha=None):
793
795
method : {"gbt", "bilinear", "euler", "backward_diff", "zoh"}
794
796
Which method to use:
795
797
796
- * gbt: generalized bilinear transformation
797
- * bilinear: Tustin's approximation ("gbt" with alpha=0.5)
798
- * euler: Euler (or forward differencing) method ("gbt" with alpha=0)
799
- * backward_diff: Backwards differencing ("gbt" with alpha=1.0)
800
- * zoh: zero-order hold (default)
798
+ * gbt: generalized bilinear transformation
799
+ * bilinear: Tustin's approximation ("gbt" with alpha=0.5)
800
+ * euler: Euler (or forward differencing) method ("gbt" with
801
+ alpha=0)
802
+ * backward_diff: Backwards differencing ("gbt" with alpha=1.0)
803
+ * zoh: zero-order hold (default)
801
804
802
805
alpha : float within [0, 1]
803
806
The generalized bilinear transformation weighting parameter, which
804
- should only be specified with method="gbt", and is ignored otherwise
807
+ should only be specified with method="gbt", and is ignored
808
+ otherwise
805
809
806
810
Returns
807
811
-------
808
- sysd : StateSpace system
812
+ sysd : StateSpace
809
813
Discrete time system, with sampling rate Ts
810
814
811
815
Notes
@@ -1079,18 +1083,18 @@ def _mimo2siso(sys, input, output, warn_conversion=False):
1079
1083
1080
1084
Parameters
1081
1085
----------
1082
- sys: StateSpace
1086
+ sys : StateSpace
1083
1087
Linear (MIMO) system that should be converted.
1084
- input: int
1088
+ input : int
1085
1089
Index of the input that will become the SISO system's only input.
1086
- output: int
1090
+ output : int
1087
1091
Index of the output that will become the SISO system's only output.
1088
- warn_conversion: bool
1089
- If True: print a warning message when sys is a MIMO system.
1090
- Warn that a conversion will take place.
1092
+ warn_conversion : bool, optional
1093
+ If ` True`, print a message when sys is a MIMO system,
1094
+ warning that a conversion will take place. Default is False .
1091
1095
1092
1096
Returns
1093
- sys: StateSpace
1097
+ sys : StateSpace
1094
1098
The converted (SISO) system.
1095
1099
"""
1096
1100
if not (isinstance (input , int ) and isinstance (output , int )):
@@ -1341,16 +1345,16 @@ def rss(states=1, outputs=1, inputs=1):
1341
1345
1342
1346
Parameters
1343
1347
----------
1344
- states: integer
1348
+ states : integer
1345
1349
Number of state variables
1346
- inputs: integer
1350
+ inputs : integer
1347
1351
Number of system inputs
1348
- outputs: integer
1352
+ outputs : integer
1349
1353
Number of system outputs
1350
1354
1351
1355
Returns
1352
1356
-------
1353
- sys: StateSpace
1357
+ sys : StateSpace
1354
1358
The randomly created linear system
1355
1359
1356
1360
Raises
@@ -1379,16 +1383,16 @@ def drss(states=1, outputs=1, inputs=1):
1379
1383
1380
1384
Parameters
1381
1385
----------
1382
- states: integer
1386
+ states : integer
1383
1387
Number of state variables
1384
- inputs: integer
1388
+ inputs : integer
1385
1389
Number of system inputs
1386
- outputs: integer
1390
+ outputs : integer
1387
1391
Number of system outputs
1388
1392
1389
1393
Returns
1390
1394
-------
1391
- sys: StateSpace
1395
+ sys : StateSpace
1392
1396
The randomly created linear system
1393
1397
1394
1398
Raises
@@ -1417,7 +1421,7 @@ def ssdata(sys):
1417
1421
1418
1422
Parameters
1419
1423
----------
1420
- sys: LTI (StateSpace, or TransferFunction)
1424
+ sys : LTI (StateSpace, or TransferFunction)
1421
1425
LTI system whose data will be returned
1422
1426
1423
1427
Returns
0 commit comments