Skip to main content
. 2021 Jun 30;21(13):4512. doi: 10.3390/s21134512
Algorithm 1 Particle filter for rotor temperature estimation
Initialization
Initialize posterior distribution: pTnet,k1/d1:k1p0
Generate Np particles with initial distribution p0 and place them in a set called Tpost.
Run
Compute  Tα[k]
Tα[k]=h(h+τ)hτTα[k1]α1hTs[k1]+(α1+hα2)hTs[k]
while iNp do
  Predict
  Tnet[i]=narx(ir[k],is[k],η[k],Ts[k],Tpost[i])
  Update
  Calculate the weight associated with each projected state:
  w(i)=1/2πRmexp[(Tα[k]Tnet(i))2/(2Rm)];
  i = i + 1
end while
Normalize weights: w(i)=w(i)i=1Npw(i)
Re-sample
Sample the discrete distribution w to generate Np random samples which will represent the posterior Tpost:
X=rand(Np,1); fetch Np values from a uniform distribution X[0,1];
for j = 1: Np do
  csw(j)=L=1jw(L); Cumulative Sum of W; csw[0,1]
end for
for j = 1: Np do
  ip(j)=argmini|X(i)csw(j)|; ip will be the index of the posterior after re-sampling
end for
for j = 1: Np do
  Tpost(j)=Tnet[ip(j)]
end for
T^r(k)=1Npi=1NpTpost(i)