7878from numpy import angle , array , empty , ones , \
7979 real , imag , matrix , absolute , eye , linalg , where , dot
8080from scipy .interpolate import splprep , splev
81- from .lti import Lti
81+ from .lti import LTI
8282
83- class FRD (Lti ):
84- """The FRD class represents (measured?) frequency response
85- TF instances and functions.
83+ class FRD (LTI ):
84+ """A class for models defined by Frequency Response Data (FRD)
8685
87- The FRD class is derived from the Lti parent class. It is used
88- throughout the python-control library to represent systems in frequency
89- response data form.
86+ The FRD class is used to represent systems in frequency response data form.
9087
91- The main data members are 'omega' and 'fresp'. omega is a 1D
92- array with the frequency points of the response. fresp is a 3D array,
93- with the first dimension corresponding to the outputs of the FRD,
94- the second dimension corresponding to the inputs , and the 3rd dimension
88+ The main data members are 'omega' and 'fresp', where ` omega` is a 1D
89+ array with the frequency points of the response, and ` fresp` is a 3D array,
90+ with the first dimension corresponding to the output index of the FRD,
91+ the second dimension corresponding to the input index , and the 3rd dimension
9592 corresponding to the frequency points in omega.
9693 For example,
9794
@@ -107,7 +104,7 @@ class FRD(Lti):
107104 epsw = 1e-8
108105
109106 def __init__ (self , * args , ** kwargs ):
110- """Construct a transfer function.
107+ """Construct an FRD object
111108
112109 The default constructor is FRD(d, w), where w is an iterable of
113110 frequency points, and d is the matching frequency data.
@@ -118,16 +115,14 @@ def __init__(self, *args, **kwargs):
118115 To call the copy constructor, call FRD(sys), where sys is a
119116 FRD object.
120117
121- To construct frequency response data for an existing Lti
118+ To construct frequency response data for an existing LTI
122119 object, other than an FRD, call FRD(sys, omega)
123120
124-
125-
126121 """
127122 smooth = kwargs .get ('smooth' , False )
128123
129124 if len (args ) == 2 :
130- if not isinstance (args [0 ], FRD ) and isinstance (args [0 ], Lti ):
125+ if not isinstance (args [0 ], FRD ) and isinstance (args [0 ], LTI ):
131126 # not an FRD, but still a system, second argument should be
132127 # the frequency range
133128 otherlti = args [0 ]
@@ -179,7 +174,7 @@ def __init__(self, *args, **kwargs):
179174 w = 1.0 / (absolute (self .fresp [i , j , :])+ 0.001 ), s = 0.0 )
180175 else :
181176 self .ifunc = None
182- Lti .__init__ (self , self .fresp .shape [1 ], self .fresp .shape [0 ])
177+ LTI .__init__ (self , self .fresp .shape [1 ], self .fresp .shape [0 ])
183178
184179 def __str__ (self ):
185180 """String representation of the transfer function."""
@@ -437,7 +432,7 @@ def _convertToFRD(sys, omega, inputs=1, outputs=1):
437432
438433 If sys is already an frd, and its frequency range matches or
439434 overlaps the range given in omega then it is returned. If sys is
440- another Lti object or a transfer function, then it is converted to
435+ another LTI object or a transfer function, then it is converted to
441436 a frequency response data at the specified omega. If sys is a
442437 scalar, then the number of inputs and outputs can be specified
443438 manually, as in:
@@ -459,7 +454,7 @@ def _convertToFRD(sys, omega, inputs=1, outputs=1):
459454 raise NotImplementedError (
460455 "Frequency ranges of FRD do not match, conversion not implemented" )
461456
462- elif isinstance (sys , Lti ):
457+ elif isinstance (sys , LTI ):
463458 omega .sort ()
464459 fresp = empty ((sys .outputs , sys .inputs , len (omega )), dtype = complex )
465460 for k , w in enumerate (omega ):
0 commit comments