-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: fix flake8 and documentation formatting errors
This commit fixes several flake8 and doc formatting errors.
- Loading branch information
Showing
8 changed files
with
92 additions
and
44 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,8 +1,11 @@ | ||
[flake8] | ||
max-line-length = 89 | ||
extend-ignore = E266 | ||
exclude = | ||
docs/source/conf.py, | ||
build, | ||
node_modules | ||
node_modules, | ||
tests, | ||
stable_gym/version.py | ||
per-file-ignores = | ||
__init__.py: F401, E501 | ||
extend-ignore = E266, D400, D401, D205 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,70 @@ | ||
"""Noisy master slave system (Ex3EKF) gymnasium environment. | ||
r"""Noisy master slave system (Ex3EKF) gymnasium environment. | ||
The dynamic system whose state is to be estimated: | ||
Dynamics | ||
======== | ||
The dynamics of the system whose state is to be estimated are given by: | ||
.. math:: | ||
:nowrap: | ||
\[ | ||
\begin{split} | ||
x(k+1) &= A x(k) + w(k) \\ | ||
\end{split} | ||
\] | ||
In which the state vector :math:`(x(k)` is given by: | ||
.. math:: | ||
:nowrap: | ||
\[ | ||
\begin{align*} | ||
x_1 &: \text{angle} \\ | ||
x_2 &: \text{frequency} \\ | ||
x_3 &: \text{amplitude} | ||
\end{align*} | ||
\] | ||
x(k+1)=Ax(k)+w(k) | ||
x_1: angle | ||
x_2: frequency | ||
x_3: amplitude | ||
and the measurement vector :math:`(y(k))` is given by: | ||
.. math:: | ||
:nowrap: | ||
y(k)=x_3(k)*sin(x_1(k))+v(k) | ||
A=[1,dt,0;0,1,0;0,0,1] | ||
x(0)~N([0;10;1],[3,0,0;0,3,0;0,0,3]) | ||
w(k)~N([0;0;0],[1/3*(dt)^3*q_1,1/2*(dt)^2*q_1,0;1/2*(dt)^2*q_1,dt*q_1,0;0,0,dt*q_2]) | ||
v(k)~N(0,1) | ||
\[ | ||
\begin{split} | ||
y(k) &= x_3(k) \cdot \sin(x_1(k)) + v(k) \\ | ||
A &= \begin{bmatrix} | ||
1 & dt & 0 \\ | ||
0 & 1 & 0 \\ | ||
0 & 0 & 1 | ||
\end{bmatrix} \\ | ||
x(0) &\sim \mathcal{N}\left(\begin{bmatrix}0 \\ 10 \\ 1\end{bmatrix}, \begin{bmatrix} | ||
3 & 0 & 0 \\ | ||
0 & 3 & 0 \\ | ||
0 & 0 & 3 | ||
\end{bmatrix}\right) \\ | ||
w(k) &\sim \mathcal{N}\left(\begin{bmatrix}0 \\ 0 \\ 0\end{bmatrix}, \begin{bmatrix} | ||
\frac{1}{3}dt^3 q_1 & \frac{1}{2}dt^2 q_1 & 0 \\ | ||
\frac{1}{2}dt^2 q_1 & dt q_1 & 0 \\ | ||
0 & 0 & dt q_2 | ||
\end{bmatrix}\right) \\ | ||
v(k) &\sim \mathcal{N}(0, 1) | ||
\end{split} | ||
\] | ||
Estimator design: | ||
.. math:: | ||
:nowrap: | ||
\\hat(x)(k+1)=A\\hat(x)(k)+u | ||
where u=[u1,u2,u3]', u=l(\\hat(x)(k),y(k)) come from the policy network l(.,.) | ||
\[ | ||
\begin{split} | ||
\hat{x}(k+1) &= A \hat{x}(k) + u \\ | ||
\text{where } u &= [u1, u2, u3]', \ u = l(\hat{x}(k), y(k)) \text{ come from the policy network } l(.,.). | ||
\end{split} | ||
\] | ||
""" | ||
|
||
from stable_gym.envs.classic_control.ex3_ekf.ex3_ekf import Ex3EKF |
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
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