## 4 Optimization of Adaptive Control Parameters for Permanent Magnet Synchronous Motors
### Partial Sample Shannon Entropy Evaluation
\[M=\{x_{1},x_{2},x_{3},\ldots,x_{n}\},n=1,2,3\ldots \tag{44}\]  
We process the data ensemble by arranging \(x_{1}\), \(x_{2}\), \(x_{3}\), \(\ldots\), \(x_{\text{n}}\) in ascending order to obtain the corresponding data ensemble \(M_{\text{i}}\) as depicted in Equation (45), where \(x_{(1)}\) and \(x_{(\text{n})}\) represent the minimum and maximum values in the sample data. \[\left\{ \begin{array}{l}M_{i}=\left\{x_{(1)},x_{(2)},x_{(3)},\ldots,x_{(n)} \right\}\\ x_{(1)}\leq x_{(2)}\leq x_{(3)}\leq\ldots\leq x_{(n)}\end{array} \right. \tag{45}\]  
In Equation (46), \(S_{i}\) represents the range intervals created using the maximum value \(x_{(1)}\) and the minimum value \(x_{(n)}\), where \(l\) denotes the number of range intervals and \(i\) indicates the number of intervals. To avoid excessive data accumulation and dispersion, this study uses \(l=20\). Consequently, 20 numerical intervals (\(S_{0}\), \(S_{1}\), \(\ldots\), \(S_{19}\)) are calculated, from which \(S_{i}\) can be generated. \[\left\{ \begin{array}{l}S_{i}=\left[x_{(1)}+i\frac{x_{(n)}-x_{(i)}}{l},x_{(1 )}+(i+1)\frac{x_{(n)}-x_{(i)}}{l}\right]\\ l=20,i=0,1,2,\ldots,19\end{array} \right. \tag{46}\]  
As depicted in Equation (47), we determine the number of data points falling within different intervals \(S_{\text{i}}\) by compiling the program, denoting this number as \(K_{\text{i}}\), and defining \(P_{\text{i}}\) as the ratio of \(K_{\text{i}}\) to the total number of intervals. Utilizing these values, we derive the entropy value of the data in this experiment, denoted as \(H_{\text{i}}\). \[\left\{ \begin{array}{l}P_{i}=\frac{K_{\text{i}}}{n}\\ H_{i}=-P_{i}\cdot\log P_{i}\end{array} \right. \tag{47}\]  
In this paper, relying on the computed entropy value, the PSSEE evaluation algorithm is introduced as depicted in Equation (48), where \(Z_{\text{i}}\) represents the standardized score of each \(H_{\text{i}}\), \(H_{\text{mea}}\) denotes the mean value of all \(H_{\text{i}}\), and \(\delta\) signifies the standard deviation of \(H_{\text{i}}\). \[\left\{ \begin{array}{l}H_{mea}=\frac{\sum_{i=0}^{i=19}H_{i}}{20}\\ Z_{i}=\frac{|H_{i}-H_{mea}|}{\sigma_{H}}\end{array} \right. \tag{48}\]The PSSEE torque evaluation method introduced in this study offers a more comprehensive analysis of motor torque by transforming irregular torque outputs into a smoother, more interpretable curve. Conventional torque graphs primarily allow for a visual estimation of peak torque values. In contrast, the PSSEE method enables precise quantification of cumulative torque output across sampling intervals. A reduction in entropy reflects a lower concentration of torque in a given interval, suggesting a more even torque distribution and a reduction in peak torque. The optimization goals of this research focus on minimizing motor peak speed and peak torque. When the peak torque and speed outputs of two optimization algorithms are similar, the PSSEE method can be utilized to analyze torque accumulation and identify the superior algorithm. At this stage, the primary focus of optimization is to reduce torque output entropy while simultaneously considering peak speed to determine the most effective algorithm. The conventional Shannon entropy method typically denotes the uncertainty within a dataset, wherein the entropy value escalates with increasing system uncertainty. However, it fails to delineate the level of data aggregation within a specific interval. Hence, this paper introduces the PSSEE evaluation method. Additionally, the PSSEE assessment method offers several advantages. Firstly, PSSEE exhibits enhanced resilience against interference compared to the classical Shannon entropy method, thereby preserving the intuitive and valid nature of output results, particularly when handling extensive datasets. Secondly, the PSSEE evaluation method boasts simplicity in compilation and demands lower hardware requirements in contrast to the traditional Shannon entropy method.