Skip to content

Commit

Permalink
Use double quotes for docstrings instead of single
Browse files Browse the repository at this point in the history
  • Loading branch information
alchemyst committed May 2, 2018
1 parent e8c0052 commit ac26f8c
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions 5_16_2_Room_Heating.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'''
"""
Created on 24 Mar 2013
@author: St Elmo Wilken
'''
"""
import control as cn
import matplotlib.pyplot as plt
import numpy as np
Expand Down
4 changes: 2 additions & 2 deletions PEAK_MIMO.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

# TODO use mimotf functions
Zeros_G = zeros(G)
Expand Down
4 changes: 2 additions & 2 deletions control_add_on.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'''
"""
Created on 21 Mar 2013
@author: St Elmo Wilken
'''
"""

import control as cn
import numpy as np
Expand Down
4 changes: 2 additions & 2 deletions siso_controllability.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'''
"""
Created on 22 Mar 2013
@author: St Elmo Wilken
'''
"""
from __future__ import print_function
import control as cn
import numpy as np
Expand Down
36 changes: 18 additions & 18 deletions utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
'''
"""
Created on Jan 27, 2012
@author: Carl Sandrock
'''
"""
from __future__ import division
from __future__ import print_function
import numpy # do not abbreviate this module as np in utils.py
Expand Down Expand Up @@ -1595,7 +1595,7 @@ def feedback_mimo(forward, backward=None, positive=False):


def tf2ss(H):
'''
"""
Converts a mimotf object to the controllable canonical form state space
representation. This method and the examples were obtained from course work
notes available at
Expand Down Expand Up @@ -1660,7 +1660,7 @@ def tf2ss(H):
matrix([[ 0.],
[ 0.]])
'''
"""

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


def state_controllability(A, B):
'''
"""
This method checks if the state space description of the system is state
controllable according to Definition 4.1 (p127).
Expand All @@ -1761,7 +1761,7 @@ def state_controllability(A, B):
----
This does not check for state controllability for systems with repeated
poles.
'''
"""

state_control = True

Expand Down Expand Up @@ -2168,9 +2168,9 @@ def num_denom(A, symbolic_expr=False):


def minors(G, order):
'''
"""
Returns the order minors of a MIMO tf G.
'''
"""
minor = []
Nrows, Ncols = G.shape
for rowstokeep in itertools.combinations(range(Nrows), order):
Expand All @@ -2185,9 +2185,9 @@ def minors(G, order):


def lcm_of_all_minors(G):
'''
"""
Returns the lowest common multiple of all minors of G
'''
"""
Nrows, Ncols = G.shape
denoms = []
for i in range(1, min(Nrows, Ncols) + 1, 1):
Expand All @@ -2199,7 +2199,7 @@ def lcm_of_all_minors(G):


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

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


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

Expand Down Expand Up @@ -2590,7 +2590,7 @@ def Dead_time_matrix(s, dead_time_vec_max_row):


def BoundKS(G, poles, up, e=0.00001):
'''
"""
The functions uses equaption 6.24 (p229) to calculate the peak value for KS
transfer function using the stable version of the plant.
Expand All @@ -2609,7 +2609,7 @@ def BoundKS(G, poles, up, e=0.00001):
-------
KS_max : float
Minimum peak value.
'''
"""

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


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

0 comments on commit ac26f8c

Please sign in to comment.