Skip to main content
. 2023 Apr 12;13(4):426. doi: 10.3390/membranes13040426
Algorithm 1 The procedures of the UKF algorithm

1. Initialization (k = 0):

X^0=E(X0), P0=E[(X0X^0)(X0X^0)T]

2. Time update:

X^k|k1=AX^k1|k1,   Pk|k1=APk1|k1AT+Φ

3. Sigma points and weights calculation:

(1) {Xk|k1(0)=X^k|k1, i=0; Xk|k1(i)=X^k|k1+((n+λ)P)i, i=1n; Xk|k1(i)=X^k|k1((n+λ)P)i, i=n+12n

where (P)T(P)=P, (P)i is the ith column of the square root of the matrix P.

(2) wm(0)=λ/n+λ; wc(0)=λ/n+λ+(1τ2+β); wm(i)=wc(i)=λ/2(n+λ), i=12n,

where λ=τ2(n+κ) is the scaling parameter, and the other parameters are generally set to τ2=0.01, β=0, (n+λ)P = 3

4. Measurement update

Vk|k1(i)=h[Xk|k1(i)]

V¯k|k1=i=02nwm(i)Vk|k1(i)

PVkVk=i=02nwc(i)[Vk|k1(i)V¯k|k1][Vk|k1(i)V¯k|k1]T+R

PXkVk=i=02nwc(i)[Xk|k1(i)X^k|k1][Vk|k1(i)V¯k|k1]T

Kk=PXkVkPVkVk1

X^k|k=X^k|k1+Kk[VkV¯k]

Pk|k=Pk|k1PVkVkKkKkT