-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ sympy/sympy@e228082 🚀
- Loading branch information
1 parent
32416f5
commit dc23cfa
Showing
453 changed files
with
10,102 additions
and
7,041 deletions.
There are no files selected for viewing
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/0130acc9674ca6615e762dac32f6f525/matrices-10.pdf
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/02f5470280a542a7c80635a082cb7e09/beam-23.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/034c3ce6c53eca7932c83f9b35d14c64/plotting-2.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/0616d85a2c2e5a070fd791bdcdb1e35e/plotting-32_01.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/0680199b4e61bc189fceb4418aa72812/control_plots-4.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/077b659bec1d5c2fd531dbd0f7e15f0f/beam_problems-13_00.pdf
Binary file not shown.
Binary file not shown.
File renamed without changes
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/0eb265c8614c7bd3f16f6034d076f6d3/beam-21.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/0efc8f797e345bcc903c8f4dab4a5322/plotting-4.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/0ffd2a0f4570e502b64ad8529258801f/plotting-17.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/1362531cda049d5b7f4db4abe11d4178/plotting-6.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/14bd882358332276f28c2e3ace8343d5/control_plots-5.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/16c046e4f150f3aca5fb6bd438b952ce/matrices-24.pdf
Binary file not shown.
File renamed without changes
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/16f8dba9abaa041f16c4636d6e41a0ac/matrices-25.pdf
Binary file not shown.
Binary file renamed
BIN
+15.5 KB
...86e563449007007d8/generate_plots_q3_3.pdf → ...5062befbddb76e6ca/generate_plots_q3_3.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/1f24a27fa4a24f0b331e9442f61363d7/plotting-16.pdf
Binary file not shown.
Binary file modified
BIN
-38 Bytes
(100%)
dev/_downloads/2019cb6b524d1d6351bac9c894de42dd/plotting-26.hires.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/2082eb4d6b0c42668444836c10a5a149/beam_problems-14.pdf
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+16.2 KB
...bf28009eae144b3/generate_plots_q3_5_2.pdf → ...c1c236b698c1d17/generate_plots_q3_5_2.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/2608cc95ac952e335ca0ce8cea458c1b/matrices-22.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/2667a5fcc739d282a7512f6b7b39071a/matrices-4.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/26aeb23613c82467dc9ad9bdc328ab32/plotting-32_00.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/295bb235d3caa42841a5fbfa905580df/beam_problems-18.pdf
Binary file not shown.
Binary file modified
BIN
+88 Bytes
(100%)
dev/_downloads/2acde0fab574588f4a28670019a75bf9/plotting-26.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/2f44ee19ebd4c314ad1c408629357c53/plotting-1.pdf
Binary file not shown.
Binary file modified
BIN
+28 Bytes
(100%)
dev/_downloads/2fe7ddde63c7b986288bcf42780219f7/plotting-29.hires.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/3319e145d33fb7c15b85dd93189e26e2/control_plots-2.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/33391c644ccb248b4c17deb758dc2301/control_plots-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/39dc203c3bf6e7485368c7a401448a6f/matrices-8.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/3af3ee18448b7a687ef6594665f932f9/plotting-19.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/3cd14c510b41514f1496a3155ea8cf2d/matrices-17.pdf
Binary file not shown.
File renamed without changes
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/464f047ba3ef7f04429a4eb163a6a2de/matrices-18.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/4c9cbd846f69df68795ea4e2cdf667e9/plotting-33.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/4d0c9c96647fc2441757598f44d4936b/beam-20.pdf
Binary file not shown.
Binary file renamed
BIN
+15.8 KB
...3427fff48770818b4/generate_plots_q3_4.pdf → ...4c2ceae9f2ca04cdc/generate_plots_q3_4.pdf
Binary file not shown.
Binary file modified
BIN
-26 Bytes
(100%)
dev/_downloads/4f8a4d280007c46440ecb7e279e1d3cb/plotting-25.hires.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/5271bad998891ddd195bf7ea0e44d844/biomechanics-11.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/53f951a6065782035628167d02f26410/biomechanical-model-example-35.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/56227f1745cb31fcd75cdc19f5cad645/beam_problems-13_01.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/56447441b8d8108229134a5d3454516c/plotting-7.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/569497501b2d3eb864ce466d19b06017/plotting-20.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/5815ed289d6d66d90e420fd31330fef7/plotting-28.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/5860560b08ead850923e530e3240b5c6/plotting-15.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/5b83bd080155a6f59e2eeb633bda5ab4/matrices-13.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/6236456dc31640e622c3f943842d9925/plotting-27.pdf
Binary file not shown.
File renamed without changes
Binary file modified
BIN
-26 Bytes
(100%)
dev/_downloads/68597f1bcbf2528fdc041a5c14e53f0f/plotting-30.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/68bf3baa5f6498f8399b26d3d85ce17a/biomechanics-12.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/704bfe351153d402a4a0a831ece25675/matrices-2.pdf
Binary file not shown.
File renamed without changes
Binary file modified
BIN
-5 Bytes
(100%)
dev/_downloads/76c597139b65debdf0e125c15cd040ca/plotting-25.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/7bfa6a992ea402720a120fd5093741a4/plotting-11.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/7d4a2d083d96719b05ab2f759c57874a/matrices-6.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/7eed1bf07a4dacbb97d209dac2614e9a/matrices-19.pdf
Binary file not shown.
Binary file modified
BIN
-3 Bytes
(100%)
dev/_downloads/81a43cb7598cbbe880e19146241abe5f/plotting-26.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/81a780d815116a5eb737d2d484c44444/matrices-21.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/81f16477713a2ebedd53f1c8ec85b754/plotting-12.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/83ec70596dcaacc88e256e7679fafcee/matrices-12.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/865dedeca3d1430244910d89d552e5ef/beam-19.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/88f8d6df1485ab9648408b70b7cd4c46/beam_problems-11_00.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/8c3e8789c867600d80b2cce11272d81e/matrices-15.pdf
Binary file not shown.
Binary file modified
BIN
+299 Bytes
(100%)
dev/_downloads/8f6a7c938e347f134c67566d5aef740d/plotting-29.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/90b2354acc779cd49f552b57929e55ab/plotting-13.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/912e64195566ca0058bfdb868fabd27b/beam_problems-16.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/945e2a45816629e69cae83f93476425f/biomechanics-14.pdf
Binary file not shown.
Binary file modified
BIN
+28 Bytes
(100%)
dev/_downloads/950e4c42a3beff8bac74d47e0f8d8516/plotting-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/95feb1999af91b22f624aa3ce3c6b1c4/solve-ode-1.pdf
Binary file not shown.
File renamed without changes
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/9728219edea47500a9403b3679a5bc09/plotting-10.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/9ae786c847d9ecd9aa665dd52ee79f4e/biomechanics-34.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/9ba0a373644e3b8e75cb2f2d1a46ac33/plotting-35.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/a11367bb58b03bf09a75c9657b4e223a/matrices-16.pdf
Binary file not shown.
Binary file renamed
BIN
+16.2 KB
...1dad5a63189ba69/generate_plots_q3_5_1.pdf → ...2e4702f43ad98bc/generate_plots_q3_5_1.pdf
Binary file not shown.
Binary file modified
BIN
-952 Bytes
(96%)
dev/_downloads/a3a06dbcaf4cb9dbce7fe53c37ec22a8/plotting-30.pdf
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/a6ba697f4fd41244d4a03ae13c871d77/matrices-20.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/a892d8f10080acfce9914123b164dd0e/matrices-11.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/aa497c934ec12bc50f842dac34beeab7/plotting-32_02.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/ac472fec5b32a66f329e9328277c64b3/plotting-34.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/b0f2a5ef738f9e96458a670bdb264732/beam-18.pdf
Binary file not shown.
File renamed without changes
File renamed without changes
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/b78b32e3870f0d0ffa753084ae625ec7/plotting-9.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/ba5808c3dcaa3ca2706d8976a3ba018c/beam_problems-11_01.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/be5321e199329605807b665644b38c93/biomechanical-model-example-38.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/c1423271668bdc35a9c394131066e255/control_plots-3.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/c1adee8d5f4e9aedd715240ee2abc6e5/matrices-9.pdf
Binary file not shown.
Binary file renamed
BIN
+16.1 KB
...5e3e9902fd44e25970e/generate_plots_q5.pdf → ...a52fd8723b47976d6ff/generate_plots_q5.pdf
Binary file not shown.
File renamed without changes
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/ca52fc8f0db47908fb8d38cc335d5c1a/plotting-22.pdf
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
dev/_downloads/cb44a32b25833934efb3a9d4adfe400c/plotting-29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/cc4619d4e67ea48ddf5026828b7569eb/beam-22.pdf
Binary file not shown.
Binary file modified
BIN
-7 Bytes
(100%)
dev/_downloads/ce89ed58fdb41bf7840cc83d6e6a1ba6/plotting-30.hires.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/d1eadb36634e8e0276f3d1752e83893e/matrices-14.pdf
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/d3453595eb36f834c2ad86d18546535c/matrices-7.pdf
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/d8f4bbfa41aeb33459953469d86ea8b1/plotting-32_03.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/dac00acb10450bde21ecfc4fd9c34817/matrices-1.pdf
Binary file not shown.
Binary file modified
BIN
+18 Bytes
(100%)
dev/_downloads/db76a3db1d29ef7f72c47b067c360357/plotting-24.hires.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/ddddc4679201fda850a702ce6ca7ff1e/plotting-5.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/e0563f4c3c89c72192ce76efd2e6fe6b/matrices-3.pdf
Binary file not shown.
Binary file modified
BIN
-101 Bytes
(100%)
dev/_downloads/e07f3720dbc2048eb106de8a904dcfa9/plotting-25.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/e51f495094ca971c2da007d95d7c6aff/matrices-5.pdf
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/eb990a3106294a2a2f898aea0b429ab7/matrices-23.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/ebf272f79479d63cc5b71ad0f0e41f7d/fourier-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/ee22a6375b132bbe50ac86a0282c8f8f/fourier-2.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/ef1b602db6b31a5b8d8b9d20a2410f41/beam-10.pdf
Binary file not shown.
Binary file modified
BIN
-102 Bytes
(100%)
dev/_downloads/f0b1ed1309beacf065f53d41a069ebe1/plotting-24.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/f0f9e180dc0f510887f7768447a685c0/biomechanics-13.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
dev/_downloads/f143e8af7f67232f463360136b513860/truss-1.pdf
Binary file not shown.
Binary file modified
BIN
+341 Bytes
(100%)
dev/_downloads/fd7d64e97562f1e8bfd34628ef58f000/plotting-31_01.pdf
Binary file not shown.
Binary file modified
BIN
+34 Bytes
(100%)
dev/_downloads/fd8f37f13aecb42027ed8c23548b8132/plotting-31_00.pdf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
300 changes: 300 additions & 0 deletions
300
dev/_sources/tutorials/physics/control/electrical_problems.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,300 @@ | ||
.. _electrical_problems-physics: | ||
|
||
============================================= | ||
Electrical Problems using StateSpace | ||
============================================= | ||
|
||
The state-space approach is a powerful method used to model and analyze systems in control | ||
theory. Instead of focusing solely on the input-output relationships like the transfer function | ||
approach, the state-space approach represents systems as a set of first-order differential | ||
equations. | ||
|
||
The state-space representation of a system can be written as: | ||
|
||
.. math:: | ||
\dot{x}(t) = A x(t) + B u(t) \\ | ||
y(t) = C x(t) + D u(t) | ||
Where :math:`x(t)` is the state vector, :math:`u(t)` is the input vector, :math:`y(t)` is the output vector, | ||
:math:`A`, :math:`B`, :math:`C`, and :math:`D` are matrices that define the system dynamics. | ||
|
||
Below are some examples to demonstrate the use of StateSpace to solve Electrical problems. | ||
|
||
Example 1 | ||
--------- | ||
|
||
.. image:: Electrical_Problems_Q1.svg | ||
:align: center | ||
|
||
In a series RLC circuit, we have a resistor :math:`R`, an inductor :math:`L`, and a capacitor :math:`C` | ||
connected in series with an input voltage :math:`v_{in}(t)`. The state variables are the current through | ||
the inductor :math:`i(t)` and the voltage across the capacitor :math:`v_C(t)`. | ||
|
||
Applying **Kirchhoff's Voltage Law** (KVL) around the loop in the above diagram gives: | ||
|
||
.. math:: | ||
v_{in}(t) = R \cdot i(t) + L \frac{di(t)}{dt} + V_C(t) | ||
Where: :math:`v_{in}(t)` is the input voltage, :math:`i(t)` is the current through the inductor and | ||
:math:`v_C(t)` is the voltage across the capacitor. | ||
|
||
This equation relates the input voltage to the elements of the RLC circuit. | ||
|
||
**Capacitor Voltage Equation** | ||
|
||
The voltage across the capacitor can be related to the current by: | ||
|
||
.. math:: | ||
V_C(t) = \frac{1}{C} \int i(t) \, dt | ||
Taking the time derivative of both sides, we obtain the rate of change of the capacitor voltage: | ||
|
||
.. math:: | ||
\dot{v}_C(t) = \frac{d v_C(t)}{dt} = \frac{i(t)}{C} | ||
This equation shows that the rate of change of the capacitor voltage is proportional to the current through the circuit. | ||
|
||
From the KVL equation, solving for the derivative of the current gives: | ||
|
||
.. math:: | ||
\frac{di(t)}{dt} = -\frac{R}{L} i(t) - \frac{1}{L} v_C(t) + \frac{1}{L} v_{in}(t) | ||
This is the first-order differential equation that describes the rate of change of the current in terms of the circuit's components and input voltage. | ||
|
||
The state-space representation expresses the system in terms of state variables, which are typically the variables that describe the energy stored in the circuit elements (such as current and voltage). | ||
|
||
We define the state vector `X(t)` as: | ||
|
||
.. math:: | ||
X(t) = \begin{bmatrix} x_1(t) \\ x_2(t) \end{bmatrix} = \begin{bmatrix} i(t) \\ v_C(t) \end{bmatrix} | ||
Here `x_1(t) = i(t)` is the current through the inductor and `x_2(t) = v_C(t)` is the voltage across the capacitor. | ||
|
||
The input vector `U(t)` is the input voltage: | ||
|
||
.. math:: | ||
U(t) = v_{in}(t) | ||
The system of differential equations in terms of the state variables becomes: | ||
|
||
1. The derivative of the current: | ||
|
||
.. math:: | ||
\dot{x}_1(t) = -\frac{R}{L} x_1(t) - \frac{1}{L} x_2(t) + \frac{1}{L} v_{in}(t) | ||
2. The derivative of the capacitor voltage: | ||
|
||
.. math:: | ||
\dot{x}_2(t) = \frac{x_1(t)}{C} | ||
The matrices for the series RLC circuit are: | ||
|
||
.. math:: | ||
A = \begin{bmatrix} | ||
-\frac{R}{L} & -\frac{1}{L} \\ | ||
\frac{1}{C} & 0 | ||
\end{bmatrix}, | ||
B = \begin{bmatrix} | ||
\frac{1}{L} \\ | ||
0 | ||
\end{bmatrix}, | ||
C = \begin{bmatrix} 0 & 1 \end{bmatrix}, | ||
D = \begin{bmatrix} 0 \end{bmatrix} | ||
Thus, the state-space representation of the series RLC circuit is: | ||
|
||
.. math:: | ||
\dot{X}(t) = \begin{bmatrix} | ||
-\frac{R}{L} & -\frac{1}{L} \\ | ||
\frac{1}{C} & 0 | ||
\end{bmatrix} | ||
\begin{bmatrix} x_1(t) \\ x_2(t) \end{bmatrix} | ||
+ \begin{bmatrix} | ||
\frac{1}{L} \\ | ||
0 | ||
\end{bmatrix} V_{in}(t) | ||
Y(t) = \begin{bmatrix} 0 & 1 \end{bmatrix} | ||
\begin{bmatrix} x_1(t) \\ x_2(t) \end{bmatrix} | ||
+ \begin{bmatrix} 0 \end{bmatrix} V_{in}(t) | ||
The state-space representation provides a compact way of modeling | ||
the series RLC circuit by using matrices to describe the system's | ||
dynamics. The matrices :math:`A`, :math:`B`, :math:`C`, and :math:`D` | ||
capture the relationships between the circuit's state variables, | ||
input, and output. This representation is particularly useful for | ||
analyzing the system's behavior in the time domain and for designing | ||
control systems. | ||
|
||
Solution | ||
|
||
>>> from sympy import Matrix, symbols, pprint | ||
>>> from sympy.physics.control import * | ||
>>> R, L, C = symbols('R L C') | ||
>>> A = Matrix([[-R/L, -1/L], [1/C, 0]]) | ||
>>> B = Matrix([[1/L], [0]]) | ||
>>> C = Matrix([[0, 1]]) | ||
>>> D = Matrix([[0]]) | ||
>>> ss = StateSpace(A, B, C, D) | ||
>>> ss | ||
StateSpace(Matrix([ | ||
[-R/L, -1/L], | ||
[ 1/C, 0]]), Matrix([ | ||
[1/L], | ||
[ 0]]), Matrix([[0, 1]]), Matrix([[0]])) | ||
|
||
We can convert the StateSpace to TransferFunction by rewrite method. | ||
|
||
>>> tf = ss.rewrite(TransferFunction)[0][0] | ||
>>> tf | ||
TransferFunction(1, C*L*s**2 + C*R*s + 1, s) | ||
|
||
|
||
Example 2 | ||
--------- | ||
|
||
.. image:: Electrical_Problems_Q2.svg | ||
:align: center | ||
|
||
Obtain the state model for a system represented by an electrical | ||
system as shown in figure | ||
|
||
The system is modeled with two state variables, | ||
`x_1(t)` and `x_2(t)`, which are related to the physical voltages at the nodes | ||
`v_1(t)` and `v_2(t)` respectively. | ||
|
||
Let the two state variables be defined as: | ||
|
||
.. math:: | ||
v_1(t) = x_1(t) | ||
v_2(t) = x_2(t) | ||
The governing equations are derived by applying Kirchhoff's Current Law (KCL) at the nodes `v_1(t)` and `v_2(t)`. | ||
|
||
Applying KCL at node `v_1(t)`: | ||
|
||
.. math:: | ||
\frac{v_1(t) - u(t)}{R} + C \frac{d v_1(t)}{dt} + \frac{v_1(t) - v_2(t)}{R} = 0 | ||
Substituting the state variables: | ||
|
||
.. math:: | ||
\frac{x_1(t) - u(t)}{R} + C \frac{dx_1(t)}{dt} + \frac{x_1(t) - x_2(t)}{R} = 0 | ||
Simplifying: | ||
|
||
.. math:: | ||
C \dot{x_1}(t) = -\frac{2x_1(t)}{R} + \frac{x_2(t)}{R} + \frac{u(t)}{R} | ||
Thus, the state equation for `x_1(t)` becomes: | ||
|
||
.. math:: | ||
\dot{x_1}(t) = -\frac{2x_1(t)}{RC} + \frac{x_2(t)}{RC} + \frac{u(t)}{RC} | ||
Applying KCL at node `v_2(t)`: | ||
|
||
.. math:: | ||
C \frac{d v_2(t)}{dt} + \frac{v_2(t) - v_1(t)}{R} = 0 | ||
Substituting the state variables: | ||
|
||
.. math:: | ||
C \frac{d x_2(t)}{dt} + \frac{x_2(t) - x_1(t)}{R} = 0 | ||
Simplifying: | ||
|
||
.. math:: | ||
C \dot{x_2}(t) = \frac{x_1(t)}{R} - \frac{x_2(t)}{R} | ||
Thus, the state equation for `x_2(t)` becomes: | ||
|
||
.. math:: | ||
\dot{x_2}(t) = \frac{x_1(t)}{RC} - \frac{x_2(t)}{RC} | ||
The state-space representation is given by the following matrix equation: | ||
|
||
.. math:: | ||
\begin{bmatrix} | ||
\dot{x_1}(t) \\ | ||
\dot{x_2}(t) | ||
\end{bmatrix} | ||
= | ||
\begin{bmatrix} | ||
-\frac{2}{RC} & \frac{1}{RC} \\ | ||
\frac{1}{RC} & -\frac{1}{RC} | ||
\end{bmatrix} | ||
\begin{bmatrix} | ||
x_1(t) \\ | ||
x_2(t) | ||
\end{bmatrix} | ||
+ | ||
\begin{bmatrix} | ||
\frac{1}{RC} \\ | ||
0 | ||
\end{bmatrix} | ||
u(t) | ||
The output of the circuit is defined as: | ||
|
||
.. math:: | ||
y(t) = v_2(t) = x_2(t) | ||
Thus, the output equation can be written as: | ||
|
||
.. math:: | ||
y(t) = \begin{bmatrix} 0 & 1 \end{bmatrix} | ||
\begin{bmatrix} | ||
x_1(t) \\ | ||
x_2(t) | ||
\end{bmatrix} | ||
Solution | ||
|
||
>>> from sympy import symbols, Matrix | ||
>>> from sympy.physics.control import * | ||
>>> R, C = symbols('R C') | ||
>>> A = Matrix([[-2/(R*C), 1/(R*C)], [1/(R*C), -1/(R*C)]]) | ||
>>> B = Matrix([[1/(R*C)], [0]]) | ||
>>> C = Matrix([[0, 1]]) | ||
>>> ss = StateSpace(A, B, C) | ||
>>> ss | ||
StateSpace(Matrix([ | ||
[-2/(C*R), 1/(C*R)], | ||
[ 1/(C*R), -1/(C*R)]]), Matrix([ | ||
[1/(C*R)], | ||
[ 0]]), Matrix([[0, 1]]), Matrix([[0]])) | ||
|
||
|
||
References | ||
---------- | ||
1. `bmsce.ac.in <https://bmsce.ac.in/Content/TE/STATE_SPACE_ANALYSIS.pdf>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.. _control_tutorial: | ||
|
||
============================= | ||
Control Tutorials | ||
============================= | ||
|
||
The control module in SymPy provides essential tools for symbolic control system | ||
analysis. The TransferFunction class allows for creating transfer functions and | ||
analyzing their properties, such as stability is_stable(), poles, and zeros. | ||
Series, Parallel, and Feedback classes enable constructing and simplifying | ||
system interconnections. The TransferFunctionMatrix handles multi-input, multi-output | ||
(MIMO) systems, while MIMOSeries, MIMOParallel, and MIMOFeedback extend these | ||
functionalities for complex systems. | ||
|
||
Additionally, the module includes the StateSpace class, which allows for modeling | ||
control systems using state variables, inputs, and outputs in matrix form. This | ||
representation is particularly useful for time-domain analysis and handling complex | ||
MIMO systems. | ||
|
||
This tutorial contains a breif guide on how to solve Control Problems using | ||
`TransferFunction` and `StateSpace`. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
control_problems.rst | ||
electrical_problems.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,4 @@ write to our `mailing list | |
|
||
biomechanics/index.rst | ||
mechanics/index.rst | ||
control/index.rst |
Oops, something went wrong.