# Design and Optimization of Non-Coplanar Orbits for Orbital Photovoltaic Panel Cleaning Robots
## 2 Construction of Models
### Smoothing Processing Model  
The trajectory-solving process incorporates data from three phases, with the translational transformation trajectory during a single work cycle being fixed, i.e., the walking trajectory of the cleaning robot along the edge of the PV panel, while the trajectory during the spanning motion stage is non-coplanar. Consequently, abrupt changes in the connection between these trajectories are unavoidable, which can adversely affect the robot's operation. Therefore, it is essential to smooth the trajectories during the spanning motion to achieve the goal of seamlessly splicing the two translational trajectories. To obtain a smooth trajectory for the cleaning robot during the spanning motion phase, this paper employs Bezier curves to smooth non-coplanar trajectories. The general form of a Bezier curve is as follows:  
\[B(t)=\sum_{i=0}^{n}P_{i}\cdot B_{i,n}(t), \tag{5}\]  
where \(n\) is the order of the curve, \(P_{i}=(0,1,2,\ldots,n)\) denotes the position of the \((i+1)\)-th control point of the Bezier curve, and \(t\) is a parameter that varies within the range [0, 1]. \(B_{i,n}(t)\) is referred to as the Bernstein basis function and is defined as follows:  
\[B_{i,n}(t)=C_{n}^{l}t^{i}(1-t)^{n-i}, \tag{6}\]  
where \(C_{n}^{l}=n!/(\hat{n}(n-i)),i=1,2,\ldots,n\), denotes the polynomial coefficients.  
Because Bezier curves possess excellent shape control capabilities, they are widely utilized in curve modeling. In practical engineering applications, third-order Bezier curves are the most common and can satisfy the requirements of most projects. Therefore, this paper adopts the third-order Bezier curve for trajectory smoothing. These curves are defined by four control points: \(P_{i,0}\), \(P_{i,1}\), \(P_{i,2}\), and \(P_{i,3}\). The parameter equations are as follows:  
\[B(t)=(1-t)^{3}P_{i,0}+3t(1-t)^{2}P_{i,1}+3t^{2}(1-t)P_{i,2}+t^{3}P_{i,3}, \tag{7}\]  
In order to achieve smooth splicing of the two translational trajectories, the constraint equations for control points \(P_{i,1}\) and \(P_{i,2}\) are as follows:  
\[\begin{cases}P_{i,1}=P_{i,0}+r_{i,1}n_{1}\\ P_{i,2}=P_{i,3}-r_{i,2}n_{2},\end{cases}, \tag{8}\]  
where \(i=1,\ 2\) denotes Bezier curve 1 and Bezier curve 2, \(r_{i,1}\) and \(r_{i,2}\) are the scale parameters of the control points, and \(n_{1}\) and \(n_{2}\) are the tangent vectors at points \(P_{i,0}\) and \(P_{i,3}\), respectively. The association of Equations (7) and (8) can be established as follows:  
\[B^{l}(t)=[(1-t)^{3}+3t(1-t)^{2}]P_{i,0}+\left[3t^{2}(1-t)+t^{3}\right]P_{i,3} +3r_{i,1}n_{1}(1-t)^{2}+3r_{i,2}n_{2}t^{2}(1-t), \tag{9}\]  
It unfolds in the following form:  
\[\begin{split} B^{l}_{k}(t)&=[(1-t)^{3}+3t(1-t)^{2}]P _{i,0}(x)+\left[3t^{2}(1-t)+t^{3}\right]P_{i,3}(x)+3r_{i,1}n_{1}(x)(1-t)^{2}-3 r_{i,2}n_{2}(x)t^{2}(1-t)\\ B^{l}_{y}(t)&=[(1-t)^{3}+3t(1-t)^{2}]P_{i,0}(y)+\left[3t^{2}(1 -t)+t^{3}\right]P_{i,3}(y)+3r_{i,1}n_{1}(y)(1-t)^{2}-3r_{i,2}n_{2}(y)t^{2}(1-t )\\ B^{l}_{Z}(t)&=[(1-t)^{3}+3t(1-t)^{2}]P_{i,0}(z)+\left[3t^{2}(1 -t)+t^{3}\right]P_{i,3}(z)+3r_{i,1}n_{1}(z)(1-t)^{2}-3r_{i,2}n_{2}(z)t^{2}(1-t )\\ \end{split}\, \tag{10}\]  
Here, Equation (10) is the Bezier curve equation with two scaling parameters, where \(t\in[0,1]\); by using this equation, the trajectory data points of the spanning motion phase are smoothed.