# Advanced Cooperative Formation Control in Variable-Sweep Wing UAVs via the MADDPG-VSC Algorithm
## 2 Dynamics Analysis of the Variable-Sweep Wing UAV
### Multi-Rigid-Body Dynamic Model
Consequently, the calculation of additional forces can be further simplified as follows:  
\[\mathbf{F}_{s}=2m_{1}\left[-\ddot{l}_{1x}+\omega_{y}^{2}l_{1x}+2\omega_{y}\dot{l}_ {1x}+\dot{\omega}_{y}l_{1x}\right] \tag{5}\]  
where \(l_{1x}\) represents the position of the left swept wing, \(\dot{l}_{1x}\) represents its rotational velocity, and \(\ddot{l}_{1x}\) represents its rotational acceleration. \(\omega_{y}\) represents the angular velocity of the centroid point of the deformable wing rotating about the origin point \(O_{b}\) of the fuselage coordinate system, and \(\dot{\omega}_{y}\) represents the angular acceleration of the centroid point of the deformable wing rotating about the origin point \(O_{b}\) of the fuselage coordinate system. The factor of 2 accounts for the symmetrical contribution of the left and right wings, assuming they generate identical additional forces. The forces generated by the fuselage are considered negligible in this context due to the dominance of the wing dynamics in the overall behavior. The simplified expression highlights the important longitudinal force components and their impact on dynamic behavior. The moment \(\mathbf{H}_{o_{b}}\) about the origin \(O_{b}\) can be expressed as the integral of the cross product of position and velocity, as follows:  
\[\mathbf{H}_{o_{b}i}\equiv\int\left(\mathbf{l}_{i}^{*}\times\mathbf{v}_{i}^{*}\right)dm_{i }^{*}\quad(i=1,2) \tag{6}\]  
where \(\mathbf{l}_{i}^{*}\) represents the vector radius of \(O_{b}\), and \(\mathbf{v}_{i}^{*}\) represents the velocity in the inertial coordinate system. The time derivative of the moment can be computed to reflect the dynamic changes in response to morphing actions, as follows:  
Figure 1:0  
where \(M_{o_{i}}\) represents the external torque applied to each wing around \(O_{b}\), and \(\dot{l}_{i}\) represents the time derivative of the position vector of the wing. (6) Dynamic equilibrium of the system  
In a state of force and moment equilibrium, the longitudinal dynamic equations for the variable-sweep wing UAV can be expressed as follows:  
\[\left\{ \begin{aligned} &\text{Tcos}\,\alpha-\mathbf{D}-\mathbf{\mathsf{Gsin}}\, \vartheta+F_{p_{x}}\text{cos}\,\alpha+F_{p_{z}}\text{sin}\,\alpha=m\frac{d\mathbf{ v}}{dt}\\ &\text{Tsin}\,\alpha+\mathbf{L}-\mathbf{\mathsf{Gcos}}\,\vartheta+F_{p_{z} }\text{sin}\,\alpha-F_{p_{z}}\text{cos}\,\alpha=m\mathbf{v}\frac{d\mathbf{v}}{dt}\\ &\qquad\qquad\qquad\left(l_{1y}+l_{2y}\right)\frac{d\omega_{y}}{dt }=M_{\text{SG}}+M_{\text{SD}}\end{aligned} \right. \tag{8}\]  
where \(\alpha\) represents the angle of attack, and \(\vartheta\) represents the pitch angle. \(\mathbf{D}\) represents the drag force acting on the UAV, defined as \(\mathbf{D}=C_{d}qS_{\text{ref}}\), where \(C_{d}\) is the drag coefficient, and \(q\) is the dynamic pressure, calculated as \(q=\frac{1}{2}\rho v^{2}\), with \(\rho\) representing the air density and \(v\) indicating the velocity. \(S_{\text{ref}}\) is the reference area. \(\mathbf{L}\) represents the lift force of the UAV, defined as \(\mathbf{L}=C_{l}qS_{\text{ref}}\), where \(C_{l}\) is the lift coefficient. \(I_{1y}\), and \(I_{2y}\) represent the momentsof inertia along the \(y\)-axis for the left and right wings, respectively. \(M_{SG}\) represents the moment due to gravitational force along the radius vector, multiplied by the moment arm. \(M_{SD}\) represents the moment due to aerodynamic resistance. Relationship between sweep angle and moment  
To specifically analyze the effect of the sweep angle on the system's dynamics, the relationship between the sweep angle and the geometric configuration of the wings can be expressed as  
\[l_{1x}=a_{p}\sin\Lambda \tag{9}\]  
This equation links the geometric configuration of the wings to the angular changes in the sweep angle \(\Lambda\), providing a basis for calculating specific aerodynamic forces and moments. The term \(a_{p}\) is a constant related to the wing's shape.