Skip to content

Commit 61f8f79

Browse files
committed
Fixed minor docstring typos
1 parent da27d35 commit 61f8f79

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

control/bdalg.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def append(*sys):
263263
264264
Parameters
265265
----------
266-
sys1, sys2, ..., sysn: StateSpace or Transferfunction
266+
sys1, sys2, ..., sysn: StateSpace or TransferFunction
267267
LTI systems to combine
268268
269269
@@ -275,7 +275,7 @@ def append(*sys):
275275
276276
Examples
277277
--------
278-
>>> sys1 = ss([[1., -2], [3., -4]], [[5.], [7]]", [[6., 8]], [[9.]])
278+
>>> sys1 = ss([[1., -2], [3., -4]], [[5.], [7]], [[6., 8]], [[9.]])
279279
>>> sys2 = ss([[-1.]], [[1.]], [[1.]], [[0.]])
280280
>>> sys = append(sys1, sys2)
281281
@@ -299,7 +299,7 @@ def connect(sys, Q, inputv, outputv):
299299
300300
Parameters
301301
----------
302-
sys : StateSpace Transferfunction
302+
sys : StateSpace or TransferFunction
303303
System to be connected
304304
Q : 2D array
305305
Interconnection matrix. First column gives the input to be connected.

control/iosys.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def __init__(self, inputs=None, outputs=None, states=None, params={},
131131
name=None, **kwargs):
132132
"""Create an input/output system.
133133
134-
The InputOutputSystem contructor is used to create an input/output
134+
The InputOutputSystem constructor is used to create an input/output
135135
object with the core information required for all input/output
136136
systems. Instances of this class are normally created by one of the
137137
input/output subclasses: :class:`~control.LinearICSystem`,
@@ -661,7 +661,7 @@ def copy(self, newname=None):
661661
class LinearIOSystem(InputOutputSystem, StateSpace):
662662
"""Input/output representation of a linear (state space) system.
663663
664-
This class is used to implementat a system that is a linear state
664+
This class is used to implement a system that is a linear state
665665
space system (defined by the StateSpace system object).
666666
667667
Parameters
@@ -1675,7 +1675,7 @@ def find_eqpt(sys, x0, u0=[], y0=None, t=0, params={},
16751675
return_y=False, return_result=False, **kw):
16761676
"""Find the equilibrium point for an input/output system.
16771677
1678-
Returns the value of an equlibrium point given the initial state and
1678+
Returns the value of an equilibrium point given the initial state and
16791679
either input value or desired output value for the equilibrium point.
16801680
16811681
Parameters
@@ -1926,15 +1926,15 @@ def linearize(sys, xeq, ueq=[], t=0, params={}, **kw):
19261926
19271927
This function computes the linearization of an input/output system at a
19281928
given state and input value and returns a :class:`~control.StateSpace`
1929-
object. The eavaluation point need not be an equilibrium point.
1929+
object. The evaluation point need not be an equilibrium point.
19301930
19311931
Parameters
19321932
----------
19331933
sys : InputOutputSystem
19341934
The system to be linearized
19351935
xeq : array
19361936
The state at which the linearization will be evaluated (does not need
1937-
to be an equlibrium state).
1937+
to be an equilibrium state).
19381938
ueq : array
19391939
The input at which the linearization will be evaluated (does not need
19401940
to correspond to an equlibrium state).
@@ -2055,7 +2055,7 @@ def interconnect(syslist, connections=None, inplist=[], outlist=[],
20552055
('sys', 'sig') are also recognized.
20562056
20572057
Similarly, each output-spec should describe an output signal from one
2058-
of the susystems. The lowest level representation is a tuple of the
2058+
of the subsystems. The lowest level representation is a tuple of the
20592059
form `(subsys_i, out_j, gain)`. The input will be constructed by
20602060
summing the listed outputs after multiplying by the gain term. If the
20612061
gain term is omitted, it is assumed to be 1. If the system has a

control/optimal.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class OptimalControlProblem():
2525
"""Description of a finite horizon, optimal control problem.
2626
2727
The `OptimalControlProblem` class holds all of the information required to
28-
specify and optimal control problem: the system dynamics, cost function,
28+
specify an optimal control problem: the system dynamics, cost function,
2929
and constraints. As much as possible, the information used to specify an
3030
optimal control problem matches the notation and terminology of the SciPy
3131
`optimize.minimize` module, with the hope that this makes it easier to
@@ -94,13 +94,13 @@ class OptimalControlProblem():
9494
The `_cost_function` method takes the information computes the cost of the
9595
trajectory generated by the proposed input. It does this by calling a
9696
user-defined function for the integral_cost given the current states and
97-
inputs at each point along the trajetory and then adding the value of a
97+
inputs at each point along the trajectory and then adding the value of a
9898
user-defined terminal cost at the final pint in the trajectory.
9999
100100
The `_constraint_function` method evaluates the constraint functions along
101101
the trajectory generated by the proposed input. As in the case of the
102102
cost function, the constraints are evaluated at the state and input along
103-
each point on the trjectory. This information is compared against the
103+
each point on the trajectory. This information is compared against the
104104
constraint upper and lower bounds. The constraint function is processed
105105
in the class initializer, so that it only needs to be computed once.
106106
@@ -567,7 +567,7 @@ def _process_initial_guess(self, initial_guess):
567567
#
568568
# Initially guesses from the user are passed as input vectors as a
569569
# function of time, but internally we store the guess in terms of the
570-
# basis coefficients. We do this by solving a least squares probelm to
570+
# basis coefficients. We do this by solving a least squares problem to
571571
# find coefficients that match the input functions at the time points (as
572572
# much as possible, if the problem is under-determined).
573573
#
@@ -880,7 +880,7 @@ def solve_ocp(
880880
Function that returns the terminal cost given the current state
881881
and input. Called as terminal_cost(x, u).
882882
883-
terminal_constraint : list of tuples, optional
883+
terminal_constraints : list of tuples, optional
884884
List of constraints that should hold at the end of the trajectory.
885885
Same format as `constraints`.
886886
@@ -914,7 +914,7 @@ def solve_ocp(
914914
res : OptimalControlResult
915915
Bundle object with the results of the optimal control problem.
916916
917-
res.success: bool
917+
res.success : bool
918918
Boolean flag indicating whether the optimization was successful.
919919
920920
res.time : array
@@ -982,7 +982,7 @@ def create_mpc_iosystem(
982982
Function that returns the terminal cost given the current state
983983
and input. Called as terminal_cost(x, u).
984984
985-
terminal_constraint : list of tuples, optional
985+
terminal_constraints : list of tuples, optional
986986
List of constraints that should hold at the end of the trajectory.
987987
Same format as `constraints`.
988988
@@ -992,7 +992,7 @@ def create_mpc_iosystem(
992992
Returns
993993
-------
994994
ctrl : InputOutputSystem
995-
An I/O system taking the currrent state of the model system and
995+
An I/O system taking the current state of the model system and
996996
returning the current input to be applied that minimizes the cost
997997
function while satisfying the constraints.
998998
@@ -1039,9 +1039,9 @@ def quadratic_cost(sys, Q, R, x0=0, u0=0):
10391039
R : 2D array_like
10401040
Weighting matrix for input cost. Dimensions must match system input.
10411041
x0 : 1D array
1042-
Nomimal value of the system state (for which cost should be zero).
1042+
Nominal value of the system state (for which cost should be zero).
10431043
u0 : 1D array
1044-
Nomimal value of the system input (for which cost should be zero).
1044+
Nominal value of the system input (for which cost should be zero).
10451045
10461046
Returns
10471047
-------
@@ -1082,7 +1082,7 @@ def quadratic_cost(sys, Q, R, x0=0, u0=0):
10821082
# As in the cost function evaluation, the main "trick" in creating a constrain
10831083
# on the state or input is to properly evaluate the constraint on the stacked
10841084
# state and input vector at the current time point. The constraint itself
1085-
# will be called at each poing along the trajectory (or the endpoint) via the
1085+
# will be called at each point along the trajectory (or the endpoint) via the
10861086
# constrain_function() method.
10871087
#
10881088
# Note that these functions to not actually evaluate the constraint, they
@@ -1250,7 +1250,7 @@ def input_range_constraint(sys, lb, ub):
12501250
def output_poly_constraint(sys, A, b):
12511251
"""Create output constraint from polytope
12521252
1253-
Creates a linear constraint on the system ouput of the form A y <= b that
1253+
Creates a linear constraint on the system output of the form A y <= b that
12541254
can be used as an optimal control constraint (trajectory or terminal).
12551255
12561256
Parameters

control/statefbk.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,9 @@ def lqe(A, G, C, QN, RN, NN=None):
277277
278278
.. math:: x_e = A x_e + B u + L(y - C x_e - D u)
279279
280-
produces a state estimate that x_e that minimizes the expected squared
281-
error using the sensor measurements y. The noise cross-correlation `NN`
282-
is set to zero when omitted.
280+
produces a state estimate x_e that minimizes the expected squared error
281+
using the sensor measurements y. The noise cross-correlation `NN` is
282+
set to zero when omitted.
283283
284284
Parameters
285285
----------
@@ -617,7 +617,7 @@ def gram(sys, type):
617617
if type not in ['c', 'o', 'cf', 'of']:
618618
raise ValueError("That type is not supported!")
619619

620-
# TODO: Check for continous or discrete, only continuous supported for now
620+
# TODO: Check for continuous or discrete, only continuous supported for now
621621
# if isCont():
622622
# dico = 'C'
623623
# elif isDisc():

0 commit comments

Comments
 (0)