# Optimal Placement of Vibration Sensors for Industrial Robots Based on Bayesian Theory
## 2 Sensor Placement Method
### Optimal Sensor Placement Based on Bayesian
#### 2.4.2 Optimal Sensor Placement for Industrial Robots Based on Information Gain  
The optimal sensor placement problem is to find the sensor position that can obtain the most information about the joint position. The information gain can be measured by the Kullback-Leibler divergence between the prior distribution and the posterior distribution.  
\[u(s,V_{t}):=\int\limits_{R}p(r|V_{t},s)\ln\frac{p(r|V_{t},s)}{p(r)}dr \tag{10}\]  
The utility function is maximized by determining the optimal sensor placement, defined as the expected value of the Kullback-Leibler divergence over all possible measurements.  
\[U(s):=E_{y|s}[u(s  
When \(i=1,\ldots,N_{r}\), the integral of \(R\) is approximated by point \(r^{i}\). The evaluation function is rewritten as follows:  
\[U(s)\approx\sum\limits_{i=1}^{N_{r}}p\left(r^{i}\right)\int\limits_{Y}p(V_{t}|r,s)\ln\frac{p(V_{t}|r,s)}{p(V_{t}|s)}dV_{t} \tag{17}\]  
Monte Carlo sampling can be used to estimate the above evaluation function.  
\[U(s)\approx\sum\limits_{i=1}^{N_{r}}\sum\limits_{j=1}^{N_{V_{t}}}\frac{p(r^{ i})}{N_{V_{t}}}[\ln p(V_{t}^{i,j}|r^{i},s)-\ln(p(V_{t}^{i,j}|s)] \tag{18}\]  
where \(N_{V_{t}}\) is the number of initial layouts of vibration sensors.  
Thus far, the sensor placement evaluation function that can be expressed by a known mathematical formula has been obtained, which can be recorded as follows:  
\[U(s)=\sum\limits_{i=1}^{N_{r}}\sum\limits_{j=1}^{N_{V_{t}}}\frac{p(r^{i})}{N_ {V_{t}}}[\ln p(V_{t}^{i,j}|r^{i},s)-\ln(\sum\limits_{k=1}^{N_{r}}p(r^{k})p(V_ {t}^{ij}|r^{k},s)] \tag{19}\]  
After obtaining the evaluation function, the theoretical derivation of the sensor optimal placement model was completed. Then, the initial placement points need to be imported to calculate the corresponding optimal placement. In practical applications, due to the large number of sensor locations, it is unrealistic to calculate the evaluation function of all kinds of combinations of different numbers. While it is not easy to obtain the optimal global solution by using optimization algorithms such as genetic algorithms, the number of optimizations needs to be given, that is, the super parameters. In this case, a more efficient method should be considered for multi-point optimization.  
Since the evaluation function of the optimization system has been given, and the data collection of sensors can be considered independent of each other, the heuristic sequential sensor placement method is considered, and the evaluation function is used to arrange the sensors iteratively, one sensor at a time. Firstly, the maximum evaluation function value of each initial location is obtained under the real speed and theoretical speed, and the corresponding initial location is the best location \(s_{1}\) of the first sensor. By using the heuristic sequential placement method, the first sensor's optimal placement \(s_{1}\) and the remaining initial sensor placement are combined to obtain the placement combination \((s_{1},s_{i})\). The maximum evaluation function values of different combinations of distribution points are calculated, respectively, and the corresponding combination of distribution points is the optimal combination of distribution points, and the second sensor's optimal placement \(s_{2}\) is obtained, then, \(s_{1}\) and \(s_{2}\) are combined with the remaining points to obtain the distribution point combination \((s_{1},s_{2},s_{i})\). The maximum evaluation function values of a different combination of sensor points are calculated, respectively, and the corresponding combination \((s_{1},s_{2},s_{i})\) of sensor points is taken as the optimal combination of sensor points to get the third optimal combination of sensor points, and the third sensor optimal distribution point 3 is obtained. The above steps are repeated until the optimal number of sensors reaches the preset number or the difference between the current evaluation function value and the previous evaluation function value is less than the set threshold; then, the optimal sensor points are obtained.