@@ -87,21 +87,21 @@ class TransferFunction(LTI):
8787 means that the numerator of the transfer function from the 6th input to the
8888 3rd output is set to s^2 + 4s + 8.
8989
90- A discrete time transfer function is created by specifying a nonzero
90+ A discrete time transfer function is created by specifying a nonzero
9191 'timebase' dt when the system is constructed:
9292
9393 * dt = 0: continuous time system (default)
9494 * dt > 0: discrete time system with sampling period 'dt'
9595 * dt = True: discrete time with unspecified sampling period
96- * dt = None: no timebase specified
97-
98- Systems must have compatible timebases in order to be combined. A discrete
99- time system with unspecified sampling time (`dt = True`) can be combined
100- with a system having a specified sampling time; the result will be a
101- discrete time system with the sample time of the latter system. Similarly,
102- a system with timebase `None` can be combined with a system having any
103- timebase; the result will have the timebase of the latter system.
104- The default value of dt can be changed by changing the value of
96+ * dt = None: no timebase specified
97+
98+ Systems must have compatible timebases in order to be combined. A discrete
99+ time system with unspecified sampling time (`dt = True`) can be combined
100+ with a system having a specified sampling time; the result will be a
101+ discrete time system with the sample time of the latter system. Similarly,
102+ a system with timebase `None` can be combined with a system having any
103+ timebase; the result will have the timebase of the latter system.
104+ The default value of dt can be changed by changing the value of
105105 ``control.config.defaults['control.default_dt']``.
106106
107107 The TransferFunction class defines two constants ``s`` and ``z`` that
@@ -112,7 +112,7 @@ class TransferFunction(LTI):
112112 >>> s = TransferFunction.s
113113 >>> G = (s + 1)/(s**2 + 2*s + 1)
114114 """
115-
115+
116116 def __init__ (self , * args , ** kwargs ):
117117 """TransferFunction(num, den[, dt])
118118
@@ -212,7 +212,7 @@ def __init__(self, *args, **kwargs):
212212 dt = kwargs ['dt' ]
213213 elif self .is_static_gain ():
214214 dt = None
215- else :
215+ else :
216216 dt = config .defaults ['control.default_dt' ]
217217 elif len (args ) == 3 :
218218 # Discrete time transfer function
@@ -225,7 +225,7 @@ def __init__(self, *args, **kwargs):
225225 except NameError : # pragma: no coverage
226226 if self .is_static_gain ():
227227 dt = None
228- else :
228+ else :
229229 dt = config .defaults ['control.default_dt' ]
230230 self .dt = dt
231231
@@ -439,7 +439,7 @@ def __mul__(self, other):
439439 outputs = self .outputs
440440
441441 dt = common_timebase (self .dt , other .dt )
442-
442+
443443 # Preallocate the numerator and denominator of the sum.
444444 num = [[[0 ] for j in range (inputs )] for i in range (outputs )]
445445 den = [[[1 ] for j in range (inputs )] for i in range (outputs )]
@@ -1003,11 +1003,11 @@ def sample(self, Ts, method='zoh', alpha=None, prewarp_frequency=None):
10031003 The generalized bilinear transformation weighting parameter, which
10041004 should only be specified with method="gbt", and is ignored
10051005 otherwise.
1006-
1006+
10071007 prewarp_frequency : float within [0, infinity)
10081008 The frequency [rad/s] at which to match with the input continuous-
1009- time system's magnitude and phase (the gain=1 crossover frequency,
1010- for example). Should only be specified with method='bilinear' or
1009+ time system's magnitude and phase (the gain=1 crossover frequency,
1010+ for example). Should only be specified with method='bilinear' or
10111011 'gbt' with alpha=0.5 and ignored otherwise.
10121012
10131013 Returns
@@ -1037,7 +1037,7 @@ def sample(self, Ts, method='zoh', alpha=None, prewarp_frequency=None):
10371037 if (method == 'bilinear' or (method == 'gbt' and alpha == 0.5 )) and \
10381038 prewarp_frequency is not None :
10391039 Twarp = 2 * np .tan (prewarp_frequency * Ts / 2 )/ prewarp_frequency
1040- else :
1040+ else :
10411041 Twarp = Ts
10421042 numd , dend , _ = cont2discrete (sys , Twarp , method , alpha )
10431043 return TransferFunction (numd [0 , :], dend , Ts )
@@ -1079,13 +1079,13 @@ def _dcgain_cont(self):
10791079 return np .squeeze (gain )
10801080
10811081 def is_static_gain (self ):
1082- """returns True if and only if all of the numerator and denominator
1083- polynomials of the (possibly MIMO) transfer funnction are zeroth order,
1082+ """returns True if and only if all of the numerator and denominator
1083+ polynomials of the (possibly MIMO) transfer funnction are zeroth order,
10841084 that is, if the system has no dynamics. """
1085- for list_of_polys in self .num , self .den :
1085+ for list_of_polys in self .num , self .den :
10861086 for row in list_of_polys :
10871087 for poly in row :
1088- if len (poly ) > 1 :
1088+ if len (poly ) > 1 :
10891089 return False
10901090 return True
10911091
0 commit comments