## 3 Particle Filter with Weight Adjustment Design for the Compensation of Sensor Noise and Time Delay
### Comparison of Two Methods of Exponential Weight  
This work is inspired by the knowledge of information theory about information entropy and based on the consideration that when the realistic measurement is mixed with large noise, some particles that are likely to represent the true state may be removed from the generic particle filter. Information entropy represents the degree of uncertainty, and the largest entropy means the largest degree of uncertainty in the system. Among all possible probabilistic models (distributions), the model with the largest entropy is the best model. When the uncertainty in the system is the largest, that is, when any information in the system is unknown, no assumption is made about any unknown information, and the unknown information is treated with an equal probability. Considering a dataset \(T=\left\{(x_{1},y_{1}),\cdots,(x_{n},y_{n})\right\}\), where \(x_{i}\) represents the value of the \(i\)th sample. At this time, the maximum entropy model is  
\[P(y_{i}=k|x_{i})=\frac{exp(w_{k}x_{i})}{\sum_{k=1}^{K}exp(w_{k}x_{i})}, \tag{20}\]  
where \(k\) represents the \(k\)th category, \(y_{i}\) represents the label value of the \(i\)th sample, and \(w_{k}\) represents the parameter corresponding to the \(k\)th category, indicating the probability that the \(i\)th sample belongs to the \(k\)th category. This is usually used for multi-classificationproblems. Putting it into the particle filter algorithm, it can be considered as that if the measurement affected by large noise is available, then the posterior distribution with the largest entropy is the best model, that is, to seek the sampling particles that are most likely to represent the real state. Corresponding to the above dataset, the problem to find the best posterior distribution can be illustrated as follows. ```
Input:\(\{x_{t-1}^{i},\hat{\alpha}_{t-1}^{i}\}_{i=1}^{N},y_{t}\) Output:\(\{x_{t}^{i},\hat{\alpha}_{t}^{i}\}_{i=1}^{N}\)  Generate the initial \(N\) particles \(x_{0}^{i}\) from its distribution, and set its weight as \(\hat{\omega}_{0}^{i}=1/N\) Loop process: while\(t\geq 1\)do  Set the normalization sum as \(\omega_{sum}=0\) for\(i=1,\cdots N\)do  draw samples from \(x_{t}^{i}\sim q(x_{t}^{i}|x_{t-1}^{i},y_{t})\)  assign weight \(\omega_{t}^{i}\) according to Equation (3) and calculate \(|res_{t}^{i}|\), record the number \(num_{t}\) of particles outside \(3\sigma\) range endfor Particle weight adjustment: if\(num_{t}>prop*N\)then for\(i=1,\cdots N\)do if\(|res_{t}^{i}|>3\sigma\)then \(\widetilde{\omega}_{t}^{i}=exp(\omega_{t}^{i})\) else \(\widetilde{\omega}_{t}^{i}=\omega_{t}^{i}\) endif  Accumulate the normalization sum as \(\omega_{sum}=\omega_{sum}+\widetilde{\omega}_{t}^{i}\) endfor endif Normalize exponential weights and absolute weights Comprehensively: for\(i=1,\cdots N\)do \(\hat{\omega}_{t}^{i}=\widetilde{\omega}_{t}^{i}/\omega_{sum}\) endfor State estimation and output prediction:  Estimate state according to Equation (4), and predict output according to Equations (6) and (14) Resample particles: if\(\hat{N}_{eff}<N_{threshold}\)then  Resample \(N\) particles with replacement for\(i=1,\cdots N\)do \(\omega_{t}^{i}=1/N\) endfor endif endwhile
```  
**Algorithm 1** Particle filter with weight adjustment. At the current time \(t\), regard \(T=\{(y_{t},x_{t}^{1}),(y_{t},x_{t}^{2}),\cdots,(y_{t},x_{t}^{N})\}\) as a dataset, where \(x_{t}^{j}\) is the sampled particles at time \(t\), and \(y_{t}\) is the measurement at current time. Since the measurement is the only determined one, it can be seen as a correspondance of \(x_{i}=1\) in Equation (20), so the value of \(y_{t}\) in Equation (21) can be set as \(y_{t}=1\). The number of categories \(K\) is the number of sampled particles \(N\). The parameter \(w_{k}\) corresponds to the particle weight \(\omega_{t}^{j}\).