Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Some doc fixes#919

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
murrayrm merged 9 commits intopython-control:mainfromKybernetikJo:some-doc-fixes
Jul 2, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletioncontrol/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -55,7 +55,7 @@
Available subpackages
---------------------

The main control package includes the mostcommpon functions used in
The main control package includes the mostcommon functions used in
analysis, design, and simulation of feedback control systems. Several
additional subpackages are available that provide more specialized
functionality:
Expand Down
2 changes: 1 addition & 1 deletiondoc/conf.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,7 +30,7 @@
# -- Project information -----------------------------------------------------

project = u'Python Control Systems Library'
copyright = u'2022, python-control.org'
copyright = u'2023, python-control.org'
author = u'Python Control Developers'

# Version information - read from the source code
Expand Down
6 changes: 3 additions & 3 deletionsdoc/conventions.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,8 +16,8 @@ LTI system representation

Linear time invariant (LTI) systems are represented in python-control in
state space, transfer function, or frequency response data (FRD) form. Most
functions in the toolbox will operate on any of these data types and
functions for converting between compatible typesis provided.
functions in the toolbox will operate on any of these data types, and
functions for converting between compatible typesare provided.

State space systems
-------------------
Expand DownExpand Up@@ -152,7 +152,7 @@ in the next section).

The :func:`forced_response` system is the most general and allows by
the zero initial state response to be simulated as well as the
response from a non-zerointial condition.
response from a non-zeroinitial condition.

In addition the :func:`input_output_response` function, which handles
simulation of nonlinear systems and interconnected systems, can be
Expand Down
4 changes: 2 additions & 2 deletionsdoc/examples.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ Examples
********

The source code for the examples below are available in the `examples/`
subdirecory of the source code distribution. The can also be accessed online
subdirectory of the source code distribution.They can also be accessed online
via the [python-control GitHub repository](https://github.com/python-control/python-control/tree/master/examples).


Expand DownExpand Up@@ -38,7 +38,7 @@ Jupyter notebooks
=================

The examples below use `python-control` in a Jupyter notebook environment.
These notebooks demonstrate the use of modeling,anaylsis, and design tools
These notebooks demonstrate the use of modeling,analysis, and design tools
using examples from textbooks
(`FBS <https://fbswiki.org/wiki/index.php?title=FBS>`_,
`OBC <https://fbswiki.org/wiki/index.php?title=OBC>`_), courses, and other
Expand Down
6 changes: 3 additions & 3 deletionsdoc/flatsys.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,7 @@ Differentially flat systems are useful in situations where explicit
trajectory generation is required. Since the behavior of a flat system
is determined by the flat outputs, we can plan trajectories in output
space, and then map these to appropriate inputs. Suppose we wish to
generate a feasible trajectory for thethenonlinear system
generate a feasible trajectory for the nonlinear system

.. math::
\dot x = f(x, u), \qquad x(0) = x_0,\, x(T) = x_f.
Expand DownExpand Up@@ -181,7 +181,7 @@ solve an optimal control problem without a final state::
traj = control.flatsys.solve_flat_ocp(
sys, timepts, x0, u0, cost, basis=basis)

The `cost` parameter is a functionfunctionwith call signature
The `cost` parameter is a function with call signature
`cost(x, u)` and should return the (incremental) cost at the given
state, and input. It will be evaluated at each point in the `timepts`
vector. The `terminal_cost` parameter can be used to specify a cost
Expand All@@ -193,7 +193,7 @@ Example
To illustrate how we can use a two degree-of-freedom design to improve the
performance of the system, consider the problem of steering a car to change
lanes on a road. We use the non-normalized form of the dynamics, which are
derived *Feedback Systems* by Astrom and Murray, Example 3.11.
derivedin*Feedback Systems* by Astrom and Murray, Example 3.11.

.. code-block:: python

Expand Down
1 change: 1 addition & 0 deletionsdoc/interconnect_tutorial.ipynb
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
../examples/interconnect_tutorial.ipynb
4 changes: 2 additions & 2 deletionsdoc/intro.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,7 @@ NumPy and MATLAB can be found `here
<https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html>`_.

In terms of the python-control package more specifically, here are
something to keep in mind:
somethings to keep in mind:

* You must include commas in vectors. So [1 2 3] must be [1, 2, 3].
* Functions that return multiple arguments use tuples.
Expand DownExpand Up@@ -56,7 +56,7 @@ they are not already present.
.. note::
Mixing packages from conda-forge and the default conda channel
can sometimes cause problems with dependencies, so it is usually best to
instally NumPy, SciPy, and Matplotlib from conda-forge as well.)
instally NumPy, SciPy, and Matplotlib from conda-forge as well.

To install using pip::

Expand Down
4 changes: 2 additions & 2 deletionsdoc/iosys.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -251,7 +251,7 @@ will create a unity gain, negative feedback system::
If a signal name appears in multiple outputs then that signal will be summed
when it is interconnected. Similarly, if a signal name appears in multiple
inputs then all systems using that signal name will receive the same input.
The :func:`~control.interconnect` function will generate an error ifan signal
The :func:`~control.interconnect` function will generate an error ifa signal
listed in ``inplist`` or ``outlist`` (corresponding to the inputs and outputs
of the interconnected system) is not found, but inputs and outputs of
individual systems that are not connected to other systems are left
Expand DownExpand Up@@ -404,7 +404,7 @@ The closed loop controller will include both the state feedback and
the estimator.

Integral action can be included using the `integral_action` keyword.
The value of this keyword can either bean matrix (ndarray) or a
The value of this keyword can either bea matrix (ndarray) or a
function. If a matrix :math:`C` is specified, the difference between
the desired state and system state will be multiplied by this matrix
and integrated. The controller gain should then consist of a set of
Expand Down
12 changes: 6 additions & 6 deletionsdoc/optimal.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -129,7 +129,7 @@ The result of this optimization gives us the estimated state for the
previous :math:`N` steps in time, including the "current" time
:math:`x[N]`. The basic idea is thus to compute the state estimate that is
most consistent with our model and penalize the noise and disturbances
according to how likelythe are (based on the given stochastic system
according to how likelythey are (based on the given stochastic system
model for each).

Given a solution to this fixed-horizon optimal estimation problem, we can
Expand DownExpand Up@@ -344,7 +344,7 @@ following code::

We consider an optimal control problem that consists of "changing lanes" by
moving from the point x = 0 m, y = -2 m, :math:`\theta` = 0 to the point x =
100 m, y = 2 m, :math:`\theta` = 0) over a period of 10 seconds and with a
100 m, y = 2 m, :math:`\theta` = 0) over a period of 10 seconds and
with a starting and ending velocity of 10 m/s::

x0 = np.array([0., -2., 0.]); u0 = np.array([10., 0.])
Expand All@@ -360,7 +360,7 @@ penalizes the state and input using quadratic cost functions::
traj_cost = obc.quadratic_cost(vehicle, Q, R, x0=xf, u0=uf)
term_cost = obc.quadratic_cost(vehicle, P, 0, x0=xf)

We alsoconstraint the maximum turning rate to 0.1 radians (about 6degees)
We alsoconstrain the maximum turning rate to 0.1 radians (about 6degrees)
and constrain the velocity to be in the range of 9 m/s to 11 m/s::

constraints = [ obc.input_range_constraint(vehicle, [8, -0.1], [12, 0.1]) ]
Expand DownExpand Up@@ -431,7 +431,7 @@ solutions do not seem close to optimal, here are a few things to try:
good solutions with a small number of free variables (the example above
uses 3 time points for 2 inputs, so a total of 6 optimization variables).
Note that you can "resample" the optimal trajectory by running a
simulation of thesytem and using the `t_eval` keyword in
simulation of thesystem and using the `t_eval` keyword in
`input_output_response` (as done above).

* Use a smooth basis: as an alternative to parameterizing the optimal
Expand All@@ -445,14 +445,14 @@ solutions do not seem close to optimal, here are a few things to try:
and `minimize_kwargs` keywords in :func:`~control.solve_ocp`, you can
choose the SciPy optimization function that you use and set many
parameters. See :func:`scipy.optimize.minimize` for more information on
theoptimzers that are available and the options and keywords that they
theoptimizers that are available and the options and keywords that they
accept.

* Walk before you run: try setting up a simpler version of the optimization,
remove constraints or simplifying the cost to get a simple version of the
problem working and then add complexity. Sometimes this can help you find
the right set of options or identify situations in which you are being too
aggressive in whatyour are trying to get the system to do.
aggressive in whatyou are trying to get the system to do.

See :ref:`steering-optimal` for some examples of different problem
formulations.
Expand Down
1 change: 1 addition & 0 deletionsdoc/simulating_discrete_nonlinear.ipynb
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
../examples/simulating_discrete_nonlinear.ipynb
2 changes: 1 addition & 1 deletiondoc/steering-optimal.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
.. _steering-optimal:

Optimal control for vehiclesteeering (lane change)
Optimal control for vehiclesteering (lane change)
---------------------------------------------------

Code
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp