Skip to content

Commit ac26f8c

Browse files
committed
Use double quotes for docstrings instead of single
1 parent e8c0052 commit ac26f8c

File tree

5 files changed

+26
-26
lines changed

5 files changed

+26
-26
lines changed

5_16_2_Room_Heating.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
'''
1+
"""
22
Created on 24 Mar 2013
33

44
@author: St Elmo Wilken
5-
'''
5+
"""
66
import control as cn
77
import matplotlib.pyplot as plt
88
import numpy as np

PEAK_MIMO.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# TODO redefine this function with utils and utilsplot functions
1111
def PEAK_MIMO(w_start, w_end, error_poles_direction, wr, deadtime_if=0):
12-
'''
12+
"""
1313
This function is for multivariable system analysis of controllability.
1414
gives:
1515
minimum peak values on S and T with or without deadtime
@@ -26,7 +26,7 @@ def PEAK_MIMO(w_start, w_end, error_poles_direction, wr, deadtime_if=0):
2626
-------
2727
var : type
2828
Description.
29-
'''
29+
"""
3030

3131
# TODO use mimotf functions
3232
Zeros_G = zeros(G)

control_add_on.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
'''
1+
"""
22
Created on 21 Mar 2013
33

44
@author: St Elmo Wilken
5-
'''
5+
"""
66

77
import control as cn
88
import numpy as np

siso_controllability.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
'''
1+
"""
22
Created on 22 Mar 2013
33

44
@author: St Elmo Wilken
5-
'''
5+
"""
66
from __future__ import print_function
77
import control as cn
88
import numpy as np

utils.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# -*- coding: utf-8 -*-
2-
'''
2+
"""
33
Created on Jan 27, 2012
44

55
@author: Carl Sandrock
6-
'''
6+
"""
77
from __future__ import division
88
from __future__ import print_function
99
import numpy # do not abbreviate this module as np in utils.py
@@ -1595,7 +1595,7 @@ def feedback_mimo(forward, backward=None, positive=False):
15951595

15961596

15971597
def tf2ss(H):
1598-
'''
1598+
"""
15991599
Converts a mimotf object to the controllable canonical form state space
16001600
representation. This method and the examples were obtained from course work
16011601
notes available at
@@ -1660,7 +1660,7 @@ def tf2ss(H):
16601660
matrix([[ 0.],
16611661
[ 0.]])
16621662

1663-
'''
1663+
"""
16641664

16651665
p, m = H.shape
16661666
d = [[] for k in range(m)] # Construct some empty lists for use later
@@ -1737,7 +1737,7 @@ def lowerdiag(m):
17371737

17381738

17391739
def state_controllability(A, B):
1740-
'''
1740+
"""
17411741
This method checks if the state space description of the system is state
17421742
controllable according to Definition 4.1 (p127).
17431743

@@ -1761,7 +1761,7 @@ def state_controllability(A, B):
17611761
----
17621762
This does not check for state controllability for systems with repeated
17631763
poles.
1764-
'''
1764+
"""
17651765

17661766
state_control = True
17671767

@@ -2168,9 +2168,9 @@ def num_denom(A, symbolic_expr=False):
21682168

21692169

21702170
def minors(G, order):
2171-
'''
2171+
"""
21722172
Returns the order minors of a MIMO tf G.
2173-
'''
2173+
"""
21742174
minor = []
21752175
Nrows, Ncols = G.shape
21762176
for rowstokeep in itertools.combinations(range(Nrows), order):
@@ -2185,9 +2185,9 @@ def minors(G, order):
21852185

21862186

21872187
def lcm_of_all_minors(G):
2188-
'''
2188+
"""
21892189
Returns the lowest common multiple of all minors of G
2190-
'''
2190+
"""
21912191
Nrows, Ncols = G.shape
21922192
denoms = []
21932193
for i in range(1, min(Nrows, Ncols) + 1, 1):
@@ -2199,7 +2199,7 @@ def lcm_of_all_minors(G):
21992199

22002200

22012201
def poles(G=None, A=None):
2202-
'''
2202+
"""
22032203
If G is passed then return the poles of a multivariable transfer
22042204
function system. Applies Theorem 4.4 (p135).
22052205
If G is NOT specified but A is, returns the poles from
@@ -2225,7 +2225,7 @@ def poles(G=None, A=None):
22252225
array([-2.])
22262226
>>> A = numpy.matrix([[1,0,0],[0,8,0],[0,0,5]])
22272227
>>> Poles = poles(None, A)
2228-
'''
2228+
"""
22292229

22302230
if G:
22312231
if not (type(G) == tf or type(G) == mimotf):
@@ -2238,7 +2238,7 @@ def poles(G=None, A=None):
22382238

22392239

22402240
def zeros(G=None, A=None, B=None, C=None, D=None):
2241-
'''
2241+
"""
22422242
Return the zeros of a multivariable transfer function system for with
22432243
transfer functions or state-space. For transfer functions, Theorem 4.5
22442244
(p139) is used. For state-space, the method from Equations 4.66 and 4.67
@@ -2268,7 +2268,7 @@ def zeros(G=None, A=None, B=None, C=None, D=None):
22682268
----
22692269
Not applicable for a non-squared plant, yet. It is assumed that B,C,D will
22702270
have values if A is defined.
2271-
'''
2271+
"""
22722272
# TODO create a beter function to accept parameters and
22732273
# switch between tf and ss
22742274

@@ -2590,7 +2590,7 @@ def Dead_time_matrix(s, dead_time_vec_max_row):
25902590

25912591

25922592
def BoundKS(G, poles, up, e=0.00001):
2593-
'''
2593+
"""
25942594
The functions uses equaption 6.24 (p229) to calculate the peak value for KS
25952595
transfer function using the stable version of the plant.
25962596

@@ -2609,7 +2609,7 @@ def BoundKS(G, poles, up, e=0.00001):
26092609
-------
26102610
KS_max : float
26112611
Minimum peak value.
2612-
'''
2612+
"""
26132613

26142614
KS_PEAK = [numpy.linalg.norm(up.H * numpy.linalg.pinv(G(RHP_p + e)), 2)
26152615
for RHP_p in poles]
@@ -2652,7 +2652,7 @@ def distRej(G, gd):
26522652

26532653

26542654
def distRHPZ(G, Gd, RHP_Z):
2655-
'''
2655+
"""
26562656
Applies equation 6.48 (p239) For performance requirements imposed by
26572657
disturbances. Calculate the system's zeros alignment with the disturbacne
26582658
matrix.
@@ -2674,7 +2674,7 @@ def distRHPZ(G, Gd, RHP_Z):
26742674
Note
26752675
----
26762676
The return value should be less than 1.
2677-
'''
2677+
"""
26782678
if numpy.real(RHP_Z) < 0: # RHP-z
26792679
raise ValueError('Function only applicable to RHP-zeros')
26802680
Yz, _ = pole_zero_directions(G, [RHP_Z], 'z', 'y')

0 commit comments

Comments
 (0)