control-utils 1.1.3__zip → 1.1.4__zip
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {control_utils-1.1.3 → control_utils-1.1.4}/PKG-INFO +1 -1
- {control_utils-1.1.3 → control_utils-1.1.4}/control_utils/__init__.py +9 -9
- {control_utils-1.1.3 → control_utils-1.1.4}/control_utils.egg-info/PKG-INFO +1 -1
- {control_utils-1.1.3 → control_utils-1.1.4}/setup.py +1 -1
- {control_utils-1.1.3 → control_utils-1.1.4}/control_utils.egg-info/SOURCES.txt +0 -0
- {control_utils-1.1.3 → control_utils-1.1.4}/control_utils.egg-info/dependency_links.txt +0 -0
- {control_utils-1.1.3 → control_utils-1.1.4}/control_utils.egg-info/top_level.txt +0 -0
- {control_utils-1.1.3 → control_utils-1.1.4}/setup.cfg +0 -0
|
@@ -132,8 +132,8 @@ def root_list_to_latex(pole_list):
|
|
|
132
132
|
def TF_to_factored_latex(G,lhs=None,substr=None):
|
|
133
133
|
"""Convert a TF instance to latex where the numerator and
|
|
134
134
|
denominator are factored into first and second order terms."""
|
|
135
|
-
p_list = second_order_roots_to_tuple(G.
|
|
136
|
-
z_list = second_order_roots_to_tuple(G.
|
|
135
|
+
p_list = second_order_roots_to_tuple(G.poles())
|
|
136
|
+
z_list = second_order_roots_to_tuple(G.zeros())
|
|
137
137
|
if not z_list:
|
|
138
138
|
z_str = '1'
|
|
139
139
|
else:
|
|
@@ -158,7 +158,7 @@ def print_factored_latex_for_TF(G, **kwargs):
|
|
|
158
158
|
print(mystr)
|
|
159
159
|
|
|
160
160
|
|
|
161
|
-
def build_TF(
|
|
161
|
+
def build_TF(s=[], zeros=[]):
|
|
162
162
|
"""Build a TF whose poles and zeros are given. Complex poles or zeros
|
|
163
163
|
are created by passing (wn,z) as a tuple in the pole or zero list."""
|
|
164
164
|
if np.isscalar(poles):
|
|
@@ -175,7 +175,7 @@ def build_TF(poles=[], zeros=[]):
|
|
|
175
175
|
|
|
176
176
|
|
|
177
177
|
def root_locus_plot(G, k=None, xlim=None, ylim=None, fmtstr='-'):
|
|
178
|
-
rmat, kout = control.
|
|
178
|
+
rmat, kout = control.root_locus(G, k, plot=False)
|
|
179
179
|
plot(real(rmat), imag(rmat), fmtstr)
|
|
180
180
|
poles = G.poles()
|
|
181
181
|
plot(real(poles), imag(poles), 'x')
|
|
@@ -189,7 +189,7 @@ def root_locus_plot(G, k=None, xlim=None, ylim=None, fmtstr='-'):
|
|
|
189
189
|
|
|
190
190
|
|
|
191
191
|
def add_point_to_root_locus(G, k, fmtstr='^'):
|
|
192
|
-
rmat, kout = control.
|
|
192
|
+
rmat, kout = control.root_locus(G, [k], plot=False)
|
|
193
193
|
plot(real(rmat), imag(rmat), fmtstr)
|
|
194
194
|
|
|
195
195
|
|
|
@@ -311,10 +311,10 @@ def calc_angle_list(s1, point_list):
|
|
|
311
311
|
return angle_list
|
|
312
312
|
|
|
313
313
|
def calc_psi_and_phi_lists(s1, TF):
|
|
314
|
-
zeros_a = TF.
|
|
314
|
+
zeros_a = TF.zeros()#this returns an array
|
|
315
315
|
zeros = zeros_a.tolist()
|
|
316
316
|
zeros.reverse()#arrays don't have the reverse method that lists do
|
|
317
|
-
poles_a = TF.
|
|
317
|
+
poles_a = TF.poles()
|
|
318
318
|
poles = poles_a.tolist()
|
|
319
319
|
poles.reverse()
|
|
320
320
|
|
|
@@ -334,8 +334,8 @@ def plot_points_and_angles(fignum, s1, P, ms=8, msp=10, \
|
|
|
334
334
|
|
|
335
335
|
za_labels are the labels for the zero angles.
|
|
336
336
|
pa_labels are the labels fro the pole angles."""
|
|
337
|
-
zeros = P.
|
|
338
|
-
poles_a = P.
|
|
337
|
+
zeros = P.zeros()
|
|
338
|
+
poles_a = P.poles()
|
|
339
339
|
poles = poles_a.tolist()
|
|
340
340
|
poles.reverse()
|
|
341
341
|
print('poles: ' + str(poles))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|