mpc-control 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mpc_control-0.2.1/mpc_control.egg-info → mpc_control-0.2.2}/PKG-INFO +1 -1
- {mpc_control-0.2.1 → mpc_control-0.2.2}/mpc/kalman.py +2 -2
- {mpc_control-0.2.1 → mpc_control-0.2.2/mpc_control.egg-info}/PKG-INFO +1 -1
- {mpc_control-0.2.1 → mpc_control-0.2.2}/pyproject.toml +1 -1
- {mpc_control-0.2.1 → mpc_control-0.2.2}/LICENSE +0 -0
- {mpc_control-0.2.1 → mpc_control-0.2.2}/README.md +0 -0
- {mpc_control-0.2.1 → mpc_control-0.2.2}/mpc/__init__.py +0 -0
- {mpc_control-0.2.1 → mpc_control-0.2.2}/mpc/discrete.py +0 -0
- {mpc_control-0.2.1 → mpc_control-0.2.2}/mpc/mpc.py +0 -0
- {mpc_control-0.2.1 → mpc_control-0.2.2}/mpc/plant.py +0 -0
- {mpc_control-0.2.1 → mpc_control-0.2.2}/mpc/rls.py +0 -0
- {mpc_control-0.2.1 → mpc_control-0.2.2}/mpc_control.egg-info/SOURCES.txt +0 -0
- {mpc_control-0.2.1 → mpc_control-0.2.2}/mpc_control.egg-info/dependency_links.txt +0 -0
- {mpc_control-0.2.1 → mpc_control-0.2.2}/mpc_control.egg-info/requires.txt +0 -0
- {mpc_control-0.2.1 → mpc_control-0.2.2}/mpc_control.egg-info/top_level.txt +0 -0
- {mpc_control-0.2.1 → mpc_control-0.2.2}/setup.cfg +0 -0
- {mpc_control-0.2.1 → mpc_control-0.2.2}/test/test_kalman.py +0 -0
- {mpc_control-0.2.1 → mpc_control-0.2.2}/test/test_mpc.py +0 -0
- {mpc_control-0.2.1 → mpc_control-0.2.2}/test/test_plant.py +0 -0
- {mpc_control-0.2.1 → mpc_control-0.2.2}/test/test_rls.py +0 -0
|
@@ -134,14 +134,14 @@ class Ekf:
|
|
|
134
134
|
"""
|
|
135
135
|
if self._linearized is None:
|
|
136
136
|
raise RuntimeError('Should call `predict` before updating.')
|
|
137
|
-
c = self.
|
|
137
|
+
c, v = self._system._linearize_output(self._x)
|
|
138
138
|
# Calculate innovation covariance `S`.
|
|
139
139
|
S = c @ self._p @ c.T + r
|
|
140
140
|
# Calculate Kalman gain `k`.
|
|
141
141
|
# k = p @ C.T @ inv(S) is equivalent to k.T = solve(S, C @ p)
|
|
142
142
|
k = np.linalg.solve(S, c @ self._p).T
|
|
143
143
|
# Calculate the updated state vector `x`.
|
|
144
|
-
x = self._x + k @ (np.asarray(z) - c @ self._x)
|
|
144
|
+
x = self._x + k @ (np.asarray(z) - c @ self._x - v)
|
|
145
145
|
# Calculate the updated uncertainty `p` for the state vector.
|
|
146
146
|
T = np.eye(k.shape[0]) - k @ c
|
|
147
147
|
p = T @ self._p @ T.T + k @ r @ k.T
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|