You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im kind of new and tried to build an RAUKF model with help of some papers and this python code. Maybe you have some paper suggestions on these RAUKF models with plant dynamics integration, because I have no clue what this is... So here comes my problem:
Traceback (most recent call last):
File "", line 137, in
ukf = Ukf(x0, P0, Q0, R0, kappa=0, sigma=0.5, robust=False)
File "", line 28, in init
self.initialize(x0, P0, Q0, R0)
File "", line 31, in initialize
self.x = np.zeros((self.t_sim, self.L))
TypeError: 'NoneType' object cannot be interpreted as an integer
I'm new to this and removed the neoron dynamics part, in order to be leftover with the pure RAUKF implementation. But Now Im getting this error, maybe it was due to my removals. Here the completed code:
import numpy as np
from scipy.stats.distributions import chi2
from scipy.linalg import sqrtm
from tqdm import tqdm
class Ukf:
"""Unscented Kalman Filter (UKF) estimator"""
Im kind of new and tried to build an RAUKF model with help of some papers and this python code. Maybe you have some paper suggestions on these RAUKF models with plant dynamics integration, because I have no clue what this is... So here comes my problem:
Traceback (most recent call last):
File "", line 137, in
ukf = Ukf(x0, P0, Q0, R0, kappa=0, sigma=0.5, robust=False)
File "", line 28, in init
self.initialize(x0, P0, Q0, R0)
File "", line 31, in initialize
self.x = np.zeros((self.t_sim, self.L))
TypeError: 'NoneType' object cannot be interpreted as an integer
I'm new to this and removed the neoron dynamics part, in order to be leftover with the pure RAUKF implementation. But Now Im getting this error, maybe it was due to my removals. Here the completed code:
import numpy as np
from scipy.stats.distributions import chi2
from scipy.linalg import sqrtm
from tqdm import tqdm
class Ukf:
"""Unscented Kalman Filter (UKF) estimator"""
Define the dimensions
L = 1 # The state dimension
Initialize variables
x0 = np.random.rand(L, 1) # Initial state estimate
P0 = np.eye(L) # Initial covariance matrix
Q0 = np.eye(L) # Process noise covariance matrix
R0 = np.eye(1) # Measurement noise covariance matrix
Create the Ukf object
ukf = Ukf(x0, P0, Q0, R0, kappa=0, sigma=0.5, robust=False)
ukf.t_sim = len(np.array(measurements)) # Set the value of t_sim before initializing
Ukf.initialize(x0, P0, Q0, R0) # Initialize the UKF
Run the state estimation
x_estimated, P_estimated = ukf.run_estimation() Maybe you could help me out 💯
The text was updated successfully, but these errors were encountered: