MATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical Systems

MATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical Systems

Click the blue text above to follow us

MATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical Systems

📋📋📋 The contents of this article are as follows: 🎁🎁🎁

Contents

💥1 Overview

📚2 Results

🎉3 References

🌈4 MATLAB Code, Data, Articles

MATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical SystemsMATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical SystemsMATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical Systems

1 Overview

MATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical Systems

Abstract: This article presents a non-parametric method for state estimation of high-dimensional nonlinear stochastic dynamical systems, which evolve according to a gradient flow with isotropic diffusion. We combine the concepts of diffusion mapping (a manifold learning technique), linear Kalman filtering, and Koopman operator theory. Specifically, using diffusion mapping, we construct data-driven virtual state coordinates that linearize the system model. Based on these coordinates, we design a data-driven framework for state estimation using a Kalman filter. We demonstrate the advantages of our method over parametric and non-parametric algorithms through three tracking problems. In particular, applying this method to actual recordings of hippocampal neural activity in rodents directly yields representations of the animal’s position. We show that the proposed method outperforms competing non-parametric algorithms in the considered stochastic problem formulation. Furthermore, we achieve results comparable to classical parametric algorithms, which differ from our method in that they possess model knowledge.

A widely discussed approach to designing such computational methods in recent years is to address data-driven system analysis and state estimation problems from the perspective of operator theory. In this approach, dynamical systems are described by two dual operators: the Perron-Frobenius operator, which represents the evolution of probability density, and the Koopman operator, which describes the time evolution of observables defined on some infinite-dimensional linear function space [8], [9]. The main challenge in empirical dynamical system analysis is to approximate these operators from system measurements. Several methods for estimating the Koopman operator have been proposed in recent years [9]–[14]. For example, Extended Dynamic Mode Decomposition (EDMD) [9], [10] approximates Koopman eigenfunctions and modes based on two sets of points correlated with system dynamics and a set of dictionary elements. However, the optimal choice of dictionary in EDMD depends on the data [10]. This framework for estimating Koopman eigenfunctions and modes was later used in [3] as part of a non-parametric Kalman filtering framework, where a linear Kalman filter is constructed based on approximations of the Koopman operator and its eigenvectors, eigenvalues, and Koopman modes. The Kalman filter propagates the system in the space spanned by the Koopman eigenvectors and then projects the resulting estimates back to the state space. Other works on nonlinear stochastic dynamical system analysis based on Koopman operator theory include [11], [12], [15]. In [15], a formal definition and rigorous mathematical analysis for the generalization of the Koopman operator for stochastic dynamical systems is provided. Additionally, a new framework for approximating the eigenfunctions and eigenvalues of this stochastic Koopman operator (SKO) is proposed. In [11] and [12], a different approach is presented, where the authors characterize the long-term behavior (asymptotic dynamics) of the system based on time averages of functions. In [11], invariant measures are defined, and it is shown that these measures correspond to the eigenfunctions of the Koopman operator and can be computed simply via Fourier transforms. In [12], this framework is extended to handle dynamical systems that do not preserve measures, using Laplace averages. In [11] and [12], the analysis requires several trajectories of the system.

MATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical SystemsMATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical Systems

2 Results

MATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical SystemsMATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical SystemsMATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical SystemsMATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical Systems

% Estimate local covariance matrices and the modified mahalanobis distance% ***************************************************************@function [mahDist] = modified_mahalanobis(yM)%MODIFIED_MAHALANOBIS calculates estimated covariances and the modified% mahalanobis distance for the input data yM (size: variables x samples)%% Configurationncov     = 15; % size of neighborhood for covariance finalDim = 2;  % final data dimension%% Covariance estimationinv_c = zeros(size(yM,1), size(yM,1), size(yM,2)); for i = 1+ncov:length(yM)-ncov    % Estimate covariance in short time windows    win = yM(:, i-ncov:i+ncov-1);    c   = cov(win');    % Denoise via projection on "known" # of dimensions    [U, S, V]    = svd(c);    inv_c(:,:,i) = V(:,1:finalDim) / (S(1:finalDim,1:finalDim)) * U(:,1:finalDim)';end% Complete missing covariance matrices (beginning and end) by duplicationfor i = 1:ncov    inv_c(:,:,i) = inv_c(:,:,1+ncov);endfor i = (length(yM)-ncov+1):length(yM)    inv_c(:,:,i) = inv_c(:,:,length(yM)-ncov);end%% Mahalanobis distance calculationdata    = yM.';mahDist = zeros(size(yM,2));for i = 1:size(yM,2)    mahDist(:,i) = sum((bsxfun(@minus,data,data(i,:))*inv_c(:,:,i)).*bsxfun(@minus,data,data(i,:)),2);endmahDist = (mahDist + mahDist.');end

MATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical Systems

MATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical Systems

3 References

MATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical Systems

Some content in this article is sourced from the internet, and references will be noted. If there are any inaccuracies, please feel free to contact us for removal.Tal Shnitzer, Ronen Talmon, Jean-Jacques Slotine (2020)

MATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical SystemsMATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical SystemsMATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical SystemsMATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical Systems

4 MATLAB Code, Data, Articles

MATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical SystemsPublic AccountDASHU

Lychee Research Society

MATLAB | Diffusion Mapping + Linear Kalman Filtering + Koopman Operator | A Non-Parametric Method for State Estimation of High-Dimensional Nonlinear Stochastic Dynamical Systems

Leave a Comment