Simulation and Control Design of a Midrange WPT Charging System for In-Flight Drones

: Drones, or unmanned aerial vehicles (UAVs), have emerged as an indispensable tool across numerous industries due to their remarkable versatility, efﬁciency


Introduction
The use of unmanned aerial vehicles (UAVs), also known as drones, has transformed various industries such as power inspection, agriculture, border patrol, search and rescue missions. Nonetheless, the ability of drones to operate for extended periods of time remains constrained by the limited endurance of their batteries. The low power density of the batteries necessitates larger and heavier batteries, which diminishes the drones' mobility and agility [1,2].
To mitigate this constraint, researchers are investigating the feasibility of implementing wireless charging systems to extend the duration and the charging range for this type of aerial vehicle. The wireless charging approach eliminates the need for physical connections between the charging station and the mobile receiver, providing a more flexible and agile solution that reduces downtime during battery recharging [3].

Related Works
The development of wireless charging systems for UAVs is currently an area of significant research interest, with the potential to significantly enhance the operational capabilities of these vehicles in various industries. As technology advances, wireless charging systems offer a promising approach to surmounting the battery power density constraint and promoting the widespread adoption of UAVs [4,5].
The magnetic coupling mechanism has become increasingly popular for wireless power transfer in unmanned aerial vehicles due to its higher efficiency and effectiveness.
Among the different types of magnetic couplers used in UAVs, face-to-face parallel magnetic couplers have gained widespread acceptance due to their simple geometric structure [6]. However, these couplers are still prone to magnetic flux leakage through the UAV's body, which can result in electromagnetic interference. To overcome this limitation, researchers have proposed replacing the anti-collision frame with a receiving coil that is designed to fit the UAV's structure and is easy to install [7]. Nevertheless, this type of coupling mechanism may also result in magnetic flux leakage and electromagnetic interference [8,9]. To enhance coupling ability, some studies [10,11] have suggested moving the receiving coil from the anti-collision frame to the belly of the UAV fuselage to reduce the air gap between the transmitter and receiver. Despite the potential benefits of this approach, it too can result in magnetic flux leakage and electromagnetic interference. Likewise, an onboard magnetic integration-based system has been developed utilizing a compact and lightweight receiver (Rx) integrated with compensation coils and an asymmetrical transmitter (Tx) coil to enable efficient and stable drone wireless charging [12]. Although the system demonstrates stability throughout a wide range of lateral misalignment situations, the study does not consider the in-flight charging scenario because the achieved misalignment tolerance is not multi-axial.
Comparably, the researchers in [13] employed a composite interval-acted parallel-and vertical-flux throw, orthogonal two-dimensional flux pick-up. The system can achieve a successful power delivery of 325 W with a system efficiency of 86%; however, the drone has to land on the charging platform, which restricts its mobility while charging.
Therefore, researchers and engineers need to adopt the beamforming method, which allows the concertation of the magnetic field in a specific desired position or trajectory to achieve a genuine on-flight charging technology.
As a solution for the problems that face WPT for UAVs, several papers investigate the design enhancement for the drones' receiving coil, which is dependent on the type of drone and its landing gear. Different receiving coil designs for various landing gear configurations were proposed [14]. However, all the proposed techniques are only feasible if the drone is supposed to land on the charging board; hence, the in-flight charging concept is not achievable.
Furthermore, the two-dimensional planar WPT system commonly used in current wireless charging approaches for UAVs and electronic devices like smartphones and laptops suffers from limited mobility freedom and misalignment tolerance. The research in [15] introduces a quadrilateral overlapping coupling coil design. The proposed coil demonstrates strong anti-offset capabilities, yet the proposed design does not examine the receiver in full 3D movement, and the alignment flexibility is restricted to one dimension.
The need for the receiving coil to be precisely aligned with the transmitting coil decreases convenience and may lead to reduced charging efficiency or even failure to charge altogether when the receiving device is in a fast dynamic motion.
To overcome these limitations, researchers have proposed various omnidirectional WPT technology, which provides better location robustness, safety, reliability, and environmental cordiality. This technology aims to increase the flexibility of charging, allowing for greater freedom in positioning the receiver and transmitter coils while maintaining a high level of efficiency. Omnidirectional WPT has gained significant attention from researchers worldwide due to its potential to address the limitations of planar WPT and improve the overall user experience [16].
Ongoing research in omnidirectional WPT continues to explore new approaches and techniques that can improve the charging performance and facilitate the wider adoption of this promising technology [17][18][19]. The authors in [20] propose an omnidirectional power transfer system that uses three-phase tubular coils as a transmitter and a circular coil as a receiver, with a three-phase half-bridge inverter and an inductor-capacitor capacitor-series (LCC-S) compensated topology to maintain a stable voltage reception. Although the system exhibits high received voltage stability even under angular misalignment of the receiver, the device must be inside the transmitting tube, which will constrain the receiver's mobility.
To overcome the mobility issue in planar coils, a 3D omnidirectional WPT system was proposed in [21]; the planar WPT system can offer omnidirectional charging for consumer electronic devices like mobile phones and earphones. The system consists of three sets of planar coils that generate magnetic fields in multiple dimensions, enabling charging from any position or orientation. Furthermore, the proposed coil structure is designed to ensure efficient decoupling. A LCCL-LC resonant converter is employed to maintain a consistent output voltage gain at the resonant frequency. The results demonstrate the uniform distribution of the magnetic field in all directions at a frequency of 6.78 MHz. When charging a 5 W portable device, the output voltage ranges from 16 to 24 V, with an overall efficiency of 70-72.5% when considering misalignment along the x and y axes, whereas the efficiency remains within the range of 28-53% for angular misalignment. As we can notice, the proposed model exhibits a significant drop in WPT efficiency especially under angular misalignment due to the fact that non-controlled omnidirectional WPT distributes the magnetic field equally along the transmitter range. Thus, the magnetic leakage is maximized when the misalignment is significant. Furthermore, it is important to note that the current research does not specifically consider the intricate aspect of continuous threedimensional (3D) charging for the receiver, particularly in scenarios where the receiver is in motion. This dynamic charging scenario adds an additional layer of complexity, as the receiver may be moving and changing its position and orientation in real time. Incorporating the dynamics of a moving receiver into the design and optimization of the wireless power transfer system would require specialized techniques and algorithms to ensure efficient and uninterrupted charging under varying motion conditions [22].
Similarly, another research study employs a reticulated planar transmitter that generates a three-dimensional rotating magnetic field using four interleaved meander coils. Additionally, the planar single-coil receiver and the excitation current modulation strategy based on phase-shift control is used to achieve free-positioning omnidirectional wireless power transfer [23]. The system can power multi-receivers at the same time with an accepted misalignment tolerance. Nonetheless, the adopted rotating magnetic field technique deteriorates the efficiency of the transferred power due to magnetic leakage. Furthermore, the receiver is moving only in the 2D plane, and the scenario of 3D mobility is not considered. Likewise, a non-identical control technique was proposed in [24] to produce a rotating magnetic field based on three pairs of orthogonal transmitters (Txs) and (RPs) which serve as three independent power channels. Although the proposed setup can maintain high efficiency when the receiver rotates around the transmitter on the (x, y) plane and the adopted control technique is simple to implement, the generation of the rotating magnetic field still has a continuous consumption of power; hence, the efficiency of the system can be optimized. Furthermore, it is possible to reduce the number of the transmitting coil by using the controlled omnidirectional magnetic field technique. Also, it is worth mentioning that the receiver movement is examined in the 2D plane, so it is possible to extend the movement to a 3D trajectory, focusing on the receiver's velocity to develop a controlled omnidirectional magnetic field technique that can track the exact receiver position, such as a hovering drone scenario.
Another system was proposed in [25] based on the dynamic-predicted CC control method for in-flight drone wireless charging. The research addresses the challenges faced during drone charging and how the method involves primary-side control without communication. The technique can improve the real-time response for maximizing the transferred power when the receiver is subjected to lateral misalignment, which means that the drone movement is simulated on the 2D plane only, and using one coil as a transmitter will not ensure a true misalignment tolerance when the drone is hovering. In this paper, we propose a modelling technique based on the mutual coupling functions in terms of the receiver trajectory for three orthogonal transmitting coils. The model can simulate any given hovering trajectory in the 3D space taking into consideration the drone wobbles caused by the unfavorable environmental factors. The velocity of this unstable movement introduced during the drone hovering is also taken into consideration in the control modeling. Furthermore, the proposed model establishes a relation between the aforementioned drone dynamics with the total input power of the system, thus allowing a comprehensive perception of the WPT process for moving targets. Nevertheless, the model is also employed to design the control closed loop to maximize the transferred power when the drone is hovering without any given feedback from the receiving end.
The proposed control technique in this work is extremum-seeking control (ESC), which lies under the adaptive control paradigm. It is a real-time optimization method that adjusts the control input of the system to achieve a desired performance objective, which is typically the maximization or minimization of a cost function [26]. The adaptive aspect of ESC comes from its ability to learn the optimal control input online by continuously adjusting the control parameters based on feedback from the system. Therefore, ESC can be considered a specific type of adaptive control that is designed for real-time optimization.
The novelty of this work lies in developing a model which can simulate an exact flying drone trajectory and its impact on the total input power of the system. In addition, we propose a solution for power maximization using the multiparameter extremum-seeking control technique. It is possible to control the three transmitting coils' currents to focalize the magnetic field along the drone's trajectory without any feedback, which will ensure maximized wireless charging for in-flight vehicles.
The noteworthy aspects of this work include its contribution to the following: • The development of the modeling methodology for wireless dynamic charging systems by integrating the receiver trajectory and velocity in the model.

•
Introducing the concept of the positioning mutual coupling function for the receiver trajectory; thus, it is possible to simulate a genuine continuous trajectory for UAVs and link it to the systems' total input power consumption.

•
As a consequence, the control design phase based on the developed comprehensive model is enhanced significantly.

•
The development of a multiparameter discrete ESC algorithm for a 3D omnidirectional WPT system to perform real-time magnetic tracking for the drone's hovering trajectory to maximize the power transfer.
The rest of the paper is presented as follows. In the Section 3, we provide the mathematical modeling steps for the hovering drone trajectory equations in terms of the mutual coupling values of the system represented as the model's dynamics. Thereafter, we formulate the input power objective function which incorporates the receiver movement and the electric parameters of the system as the comprehensive model. The Section 4 explains the control theory method as well as the control design phase. The Section 5 validates the controller performance using a real-time simulation where the control algorithm is compiled on the digital signal processor (DSP) F28379D. The simulation results of the closed loop maximized power are presented and analyzed for varied drift drone's angle values, regarding the response time and the tracking error angle. Finally, the research is summarized as quantified findings in the last section.

System Modeling
The proposed scenario for the drone movement in this paper is a hovering motion. The aerial vehicle approaches the charging system with an azimuthal angle α that starts from 45 • ; then, it gradually increases its oscillation to reach a maximum drift angle of 65 • which varies from 10 • to 75 • , while the elevation angle is fixed at 45 • and the distance varies from 0.5 to 0.2 m. Figure 1 provides more illustration of the proposed hovering scenario. which varies from 10° to 75°, while the elevation angle is fixed at 45° and th varies from 0.5 to 0.2 m. Figure 1 provides more illustration of the proposed scenario. As we can notice, the amplitude A of the sine wave azimuthal angle α in ponentially with respect to time, while the frequency T w is set to be constan bias, d is a variable distance from 0.5 to 0.2 m represented with a linear functio is the slope, and c is the intercept. The time needed for the drone to finish thi sequence is set to be 2 s.
Using Equation (1), the trajectory Γ is represented in a blue dotted line in

The Derivation of the Time-Variant Mutual Coupling Functions for a Hovering D jectory
Based on the set of equations in (1), the mutual coupling values for the t mitting coils regarding the drone's receiving coil are calculated using Ansys so each time iteration, the receiver has a specific position from the trajectory Γ w sponds to the three mutual coupling values Mx, My and Mz for the coils X, Y spectively, resulting in three mutual coupling functions: Fx, Fy and Fz.
By observing the trajectory Γ in Figure 1, we can notice its impact on t coupling values.
At the beginning, the distance is large; thus, the mutual coupling values fo coils are small. As the drone distance decreases, the mutual coupling values o receiving coils increase. However, the drone's oscillation affects only the mutua To include the velocity parameter in this study, we represent the drone's trajectory equations in the spherical coordinates in terms of the time variable t as follows: As we can notice, the amplitude A of the sine wave azimuthal angle α increases exponentially with respect to time, while the frequency ω T is set to be constant, b is the bias, d is a variable distance from 0.5 to 0.2 m represented with a linear function where a is the slope, and c is the intercept. The time needed for the drone to finish this hovering sequence is set to be 2 s.
Using Equation (1), the trajectory Γ is represented in a blue dotted line in Figure 1.

The Derivation of the Time-Variant Mutual Coupling Functions for a Hovering Drone Trajectory
Based on the set of equations in (1), the mutual coupling values for the three transmitting coils regarding the drone's receiving coil are calculated using Ansys software. For each time iteration, the receiver has a specific position from the trajectory Γ which corresponds to the three mutual coupling values M x , M y and M z for the coils X, Y and Z, respectively, resulting in three mutual coupling functions: Fx, Fy and Fz.
By observing the trajectory Γ in Figure 1, we can notice its impact on the mutual coupling values.
At the beginning, the distance is large; thus, the mutual coupling values for the three coils are small. As the drone distance decreases, the mutual coupling values of the three receiving coils increase. However, the drone's oscillation affects only the mutual coupling values of the coils X and Y, as it is shown in Figure 2a,b, because the elevation angle φ is considered to be fixed at 45 • , which explains the exclusive exponential growth in the mutual coupling value M z unlike the remaining two, M x and M y . In Figure 2a, the dataset Mx represented in black stars contains the Ansys simulation results, as mentioned earlier, whereas the red line is the calculated mutual coupling function for the coil X. We can notice how the mutual coupling values of Mx are growing exponentially along the whole time period, while the oscillation occurs between 1.5 and 2 s. Thus, we can assume the existence of a function Fx which consists of an exponential and sinusoidal combination that can represent a good fit for the dataset Mx. Similarly, for Figure 2b, the mutual coupling values of My for the coil Y represented in the green line have the same pattern as Mx with a slight phase shift in the oscillation, while the blue line in Figure 2c represents the Mz dataset for the coil Z.
Thus, based on this analogy, we define the mutual coupling functions: In Figure 2a, the dataset M x represented in black stars contains the Ansys simulation results, as mentioned earlier, whereas the red line is the calculated mutual coupling function for the coil X. We can notice how the mutual coupling values of M x are growing exponentially along the whole time period, while the oscillation occurs between 1.5 and 2 s. Thus, we can assume the existence of a function Fx which consists of an exponential and sinusoidal combination that can represent a good fit for the dataset M x . Similarly, for Figure 2b, the mutual coupling values of M y for the coil Y represented in the green line have the same pattern as M x with a slight phase shift in the oscillation, while the blue line in Figure 2c represents the M z dataset for the coil Z. Thus, based on this analogy, we define the mutual coupling functions: The weights A x , a x , B x , b x . . .. . .. . .b z of the three mutual coupling functions in (2) are optimized using the nonlinear least squares method to enhance the fit goodness. The red, green and blue curves in Figure 2 represent the calculated mutual coupling functions in Equation (2) for the coils X, Y and Z, respectively, while the black dotted curves represent the dataset of the mutual coupling values simulated by ANSYS software: M x , M y , and M z .
Additionally, each figure of the regression phase contains a residual plot to visualize the fit goodness.
From Table 1, we can conclude that these evaluation metrics suggest that the regression model in Equation (2) fits the data very well, and it can be used to make accurate predictions and draw meaningful conclusions about the relationship between the time variation and mutual coupling functions when the drone is hovering along the proposed trajectory Γ.

The System's Input Power Formula
By optimizing the global input power formula of the 3DWPT system, it is possible to maximize the charging process without drone feedback, which provides more flexibility when transferring power.
However, the derived input power formula must incorporate the drone's trajectory mutual coupling functions so that the system's model can simulate the drone-hovering scenario accurately.
The transmitting end consists of three orthogonal coils X, Y and Z and its selfinductance values are L x , L y , and L z , respectively, while the receiving coil is represented by the drone drawing, as shown in Figure 1, and its self-inductance value is L λ .
All coils are identical: each of the three transmitting coils represents a resonator circuit by adding the capacitors C x , C y , and C z in series with the coils' resistors R x , R y and R z , while the receiver's capacitor and self-resistor are C λ and R λ . Figure 3 depicts the electrical circuit for the 3DWPT system.
The currents flowing in the coils X, Y, and Z as well as the receiving coil are i x , i y , i z and i λ , respectively. Meanwhile, M x , M y , and M z are the mutual inductance values between the receiver and the transmitting coils X, Y and Z, respectively. All three transmitting coils are connected to a common DC source through a full-bridge MOSFET inverter, which is used in the current amplitude's modeling.
The electric equations of the 3DWPT model can be represented using Kirchhoff's second law as follow:   By substituting (6) into (3), we can obtain the electric equations of the 3DWPT sys in terms of the magnetic angles: The magnetic field generated from a current flowing in a circular wire is defined by Biot-Savarat law as follows: By placing the center of the three transmitting orthogonal coils at the origin of the xyz plane and knowing that the magnetic field is always perpendicular to the coil plane, we can conclude that the plane's unity vectors, the current flowing in the transmitting coils and the magnetic components of B have shared the same vectorial directions. Hence, it is possible to express the total magnetic field resultant B of the transmitting end as a vectorial summation by Equation (5) [27] as follows: From Equation (5), we can deduce that both the magnetic field and the current resultants share the same direction as their components; according to [28], it is possible to control the magnetic field resultant direction by controlling the coils' current amplitudes. Figure 4a visualizes the magnetic vectors B x , B y and B z produced by the current i x , i y , i z flowing on the coils X, Y, and Z, respectively, while θ and β are the magnetic angles which direct the magnetic field resultant B in the spherical coordinates. On the other hand, Figure 4b represents the drone's position spherical coordinates. By taking the original of the plane as the center of the three orthogonal coils, α and φ are the azimuthal angle and the elevation angle of the drone's position, while d is the distance between the plane origin and the drone. It is clear from Figure 4 that if we render the values of the magnetic angles equal to the position angles, it is possible to direct the magnetic field resultant to the exact location of the drone, hence maximizing the wireless power transfer efficiency.  By substituting (6) into (3), we can obtain the electric equations of the 3DWPT system in terms of the magnetic angles: Since both the electric and the magnetic vectors share the same angles as demonstrated in Equation (5) and shown in Figure 4, we can modulate the coils' current amplitudes in terms of the magnetic angles using the following control law: By substituting (6) into (3), we can obtain the electric equations of the 3DWPT system in terms of the magnetic angles: I sin β cos θ R x + jwL x + 1 jwC x − jwM z i l = U x I sin β sin θ R y + jwL y + 1 jwCy − jwM y i l = U x I cos β R z + jwL z + 1 jwC z − jwM z i l = U z i l R l + R L + jwL l + 1 jwC l − jwM x I sin β cos θ −jwM y I sin β sin θ − jwM z I cos β = 0 (7) From (7), we can derive the load current expression as follows: i l = jwM x I sin β cos θ+jwM y I sin β sin θ+jwM z I cos β R l +R L +jX l = jwI(M x sin β cos θ+M y sin β sin θ+M z cos β) R l +R L +jX l Thus, the load power expression is obtained using (8): where: Therefore, the load power expression becomes: Since the proposed charging system is noncollaborative with the drone, the controller feedback needs to be on the transmitting end; thus, we drive the input power formula as follows: P in = P los1 + P los2 + P los3 + P los4 + P L where: Thus, the input power expression becomes: Since the three transmitting coils are identical, their self-resistors are equal to R; therefore, by substituting (10) into (13), the final input power expression is obtained in (14).
(M x sin β cos θ + M y sin β sin θ+M z cos β) 2 (14) By substituting the mutual coupling coefficients of the drone's trajectory mutual coupling functions in Equation (2), we obtain a comprehensive system model that gives controlling access to the magnetic field resultant through the input parameters angles θ and β. Additionally, it incorporates the drone movement trajectory. Thus, it is possible to simulate any chosen drone dynamic and observe its impact on the input power measurement as demonstrated in the following equation: Using (15), the input power plots of the drone trajectory in Equation (1) are visualized in Figure 5: Since the three transmitting coils are identical, their self-resistors are equal to R; therefore, by substituting (10) into (13), the final input power expression is obtained in (14).
By substituting the mutual coupling coefficients of the drone's trajectory mutual coupling functions in Equation (2), we obtain a comprehensive system model that gives controlling access to the magnetic field resultant through the input parameters angles and . Additionally, it incorporates the drone movement trajectory. Thus, it is possible to simulate any chosen drone dynamic and observe its impact on the input power measurement as demonstrated in the following equation: Using (15), the input power plots of the drone trajectory in Equation (1) are visualized in Figure 5: When rotating the magnetic field resultant from 0 to 2π, we can notice that the input power reaches the maximum when the magnetic resultant intersects with the exact position of the drone, in this case (α = 10°, d = 0.2 m) and (α = 76°, d = 0.21 m). Moreover, the input power maximum of the 3DWPT system is also affected by the drone's distance, The closer we get to the transmitter, the greater the increase in the maximum available input When rotating the magnetic field resultant from 0 to 2π, we can notice that the input power reaches the maximum when the magnetic resultant intersects with the exact position of the drone, in this case (α = 10 • , d = 0.2 m) and (α = 76 • , d = 0.21 m). Moreover, the input power maximum of the 3DWPT system is also affected by the drone's distance, The closer we get to the transmitter, the greater the increase in the maximum available input power. Figure 5 shows the input power difference between each drone distance in red and light blue colors.
It is worth mentioning that the input power reaches its great maximum when the drone is coupled equally with the three transmitting coils, which means directing the resultant toward the center of the first quarter (θ = β = 45 • ) when the drone is located at the spherical coordinates (α = φ = 45 • ).
In addition to Figure 6, we provide a video file that shows the animated results of the maximum input power path for the proposed drone trajectory Γ.
Energies 2023, 16, x FOR PEER REVIEW 12 Figure 6. The maximum input power for the drone's trajectory Γ. Figure 6 shows the maximized input power direction when the drone is hove according to the trajectory Γ. When rendering the magnetic angles equal in value to position angles, we can direct the magnetic field resultant toward the exact drone posi The maximum input power path provided in the Supplementary Video File foll the exact trajectory Γ: at the beginning of the drone sequence, the input power plot re sented by the small dumbbell shape start with a minimum value because the distan at the largest. Soon after, when the drone comes closer to the transmitter while oscilla we can notice how the input power peak is growing and shifting to the exact drone's jectory.
From this section, we can conclude that the provided model in (15) can simulate drone's movement impact on the system's total input power measurement. Thus, emp ing this model in the control design phase will ensure an accurate tuning process for controller's parameters.

The Extremum-Seeking Control Implementation for the 3DWPT System
The extremum-seeking control algorithm is considered a non-model-based adap  Figure 6 shows the maximized input power direction when the drone is hovering according to the trajectory Γ. When rendering the magnetic angles equal in value to the position angles, we can direct the magnetic field resultant toward the exact drone position.
The maximum input power path provided in the Supplementary Video File follows the exact trajectory Γ: at the beginning of the drone sequence, the input power plot represented by the small dumbbell shape start with a minimum value because the distance is at the largest. Soon after, when the drone comes closer to the transmitter while oscillating, we can notice how the input power peak is growing and shifting to the exact drone's trajectory.
From this section, we can conclude that the provided model in (15) can simulate the drone's movement impact on the system's total input power measurement. Thus, employing this model in the control design phase will ensure an accurate tuning process for the controller's parameters.

The Extremum-Seeking Control Implementation for the 3DWPT System
The extremum-seeking control algorithm is considered a non-model-based adaptive control method, which is used when the system is complicated and necessitates a nonlinear control action to optimize the input so that the output is extremized. Unlike other nonmodalbased control methods such as neural networks, the ESC provides an excellent alternative in terms of computational resources and efficiency [29].
We can fit the dilemma of the power transfer maximization for an unknown drone position into an optimization problem that can be solved using the extremum-seeking control technique to find the maximum input power regardless of the drone's trajectory.
We define the objective function based on the derived function model in (15): where λ is the parametric vector of the system's inputs, λ = [θ β] T , and the functions F M x (t), F M y (t) and F M z (t) represent the dynamic map of the system as the drone movement is reflected in the mutual coupling terms, while f (λ) represents the system output, which is the input power P in .
Any vector function f (λ) with a quadratic extremum at λ * can be approximated by the following equation: where λ * (t) is the optimal value of the input that renders the objective function f (λ) equal to its maximum f * (t), while P is a gain matrix such that P l×l = P T < 0. According to (17), by modulating the input vector λ using a sinusoidal perturbation signal, we can predict the direction of the objective function maximum f * (t), thus maximizing the output by tunning λ and making it equal to λ * .
The following scheme explains further the adopted method to achieve a real-time update for the input parameters to track the maximum input power for a plant with dynamics.
The controller starts to search for the optimum input values that maximize the objective function regardless of the mobility behavior of the drone. Since the power transfer is omnidirectional, the magnetic field angles control process is run only in the first half of the spherical coordinates. Consequently, it will cover the other remaining half.
The modulated signal is formed by adding the currently estimated parameter to the sinusoidal perturbation signal. Thus, the objective function becomes perturbed with the same or difference in phase as the modulation signal. Multiplying the perturbed objective function by the demodulation signal yields a positive or negative signal. Integrating this positive or negative signal leads to an increase or decrease in the value of λ, thereby moving it closer to the peak of the objective function f (λ).
The diagram in Figure 7 summarize the used control algorithm to maximize the input power for a 3DWPT system.
The design of the control loop is real-time simulated on the targeted hardware LAUNCHXL-F28379D Board; thus, it is necessary to adopt the discrete design steps as it is shown in the following scheme: As shown in the above figure, we keep the same plant model and discretize the control loop to implement it in the target hardware board; the high-pass filters z−1 z+h are designed such that 0 < h < 1. The modulation frequency ω should be high enough to track the receiver's velocity, while a is its amplitude, and δ is the learning rate, which defines how fast the controller will converge to the extremum. All the control parameters mentioned above are designed so that the close loop always has a stable response and satisfies the convergence conditions in [30]. same or difference in phase as the modulation signal. Multiplying the perturbed objective function by the demodulation signal yields a positive or negative signal. Integrating this positive or negative signal leads to an increase or decrease in the value of λ , thereby moving it closer to the peak of the objective function ( ) The diagram in Figure 7 summarize the used control algorithm to maximize the input power for a 3DWPT system. The design of the control loop is real-time simulated on the targeted hardware LAUNCHXL-F28379D Board; thus, it is necessary to adopt the discrete design steps as it is shown in the following scheme:

The ESC Step Response for a Static Position
All the provided results in this section are based on the discreet ESC model presented in Figure 8: the control model is built on the LAUNCHXL-F28379D Board as a C program using the Simulink external mode. As shown in the above figure, we keep the same plant model and discretize the control loop to implement it in the target hardware board; the high-pass filters are designed such that 0 < h < 1. The modulation frequency ω should be high enough to track the receiver's velocity, while a is its amplitude, and δ is the learning rate, which defines how fast the controller will converge to the extremum. All the control parameters mentioned above are designed so that the close loop always has a stable response and satisfies the convergence conditions in [30].

The ESC Step Response for a Static Position
All the provided results in this section are based on the discreet ESC model presented in Figure 8: the control model is built on the LAUNCHXL-F28379D Board as a C program using the Simulink external mode.
When applying a step signal on the input's model in Figure 8, the step response of the system's closed loop will identify the response time, the stability state as well as the behavior of the controller under extreme input variation. We introduce a step signal in the input at t = 1.33 s, which causes the receiver angle α to vary instantly from 45° to 50°, where the distance is at 0.3 m and the elevation angle is 45°. Figure 9 illustrates the relationship between time, distance and the physical angle α of the drone position. Figure 10 shows how the controlled magnetic angles and converge to the exact position angles α and of the drone. The ESC searched angles converge to the desired set point angle in a 20 ms response time and stably reach a stationary state.
When placing the drone at the position of the instant t = 1.33 s, the input power is maximized in 2 ms response time and reaches a stationary state with negligent steadystate error as it is shown in Figure 11. When applying a step signal on the input's model in Figure 8, the step response of the system's closed loop will identify the response time, the stability state as well as the behavior of the controller under extreme input variation.
We introduce a step signal in the input at t = 1.33 s, which causes the receiver angle α to vary instantly from 45 • to 50 • , where the distance is at 0.3 m and the elevation angle φ is 45 • . Figure 9 illustrates the relationship between time, distance and the physical angle α of the drone position. Figure 10 shows how the controlled magnetic angles θ and β converge to the exact position angles α and φ of the drone. The ESC searched angles converge to the desired set point angle in a 20 ms response time and stably reach a stationary state.   When placing the drone at the position of the instant t = 1.33 s, the input power is maximized in 2 ms response time and reaches a stationary state with negligent steady-state error as it is shown in Figure 11.
Energies 2023, 16, x FOR PEER REVIEW Figure 11. The input power closed-loop step response.

The ESC Power Maximization for a Drone-Hovering Movement
The used trajectory for simulating the drone-hovering movement consists of s coupled motions, an oscillating angular motion and a linear motion. We can obser the angular velocity of the drone is increasing with time because the azimuthal a range is expanding with time; thus, we have an accelerated movement from 0.5 to almost a constant linear motion from 0 to 0.5 s.
The overall drone velocity along the trajectory Γ is the summation of both the a and linear velocity.
The velocities are calculated based on the first derivations of the trajectory equ in (1) and converted to meters per second.
From Figure 12, it is observable that the velocity of the drone ranges from al m/s and accelerates to 8 m/s; the fluctuation between the negative and positive va the graph indicates the direction of drone movement. While we can notice that a sp 8 m/s is conceded as a moderate velocity for hovering around some locations, on th hand, the reason behind the choice of this high wobbling velocity is to simulate a scenario of external disturbances and aerial perturbations. Figure 13 shows the results of the real-time closed-loop simulation o LAUNCHXL-F28379D Board. The ESC algorithm-generated magnetic angles trac fectly the angular positions of the drone with a minor static error and a response t 2 ms.
The input power closed-loop response in Figure 14 depicts the maximization objective function with a neglected tracking error between the calculated extremum power in a black dotted line and the maximized output of the ESC in purple color.
The input power graph interprets the movement of the drone along the trajec the input power of the system is at a lower value when the distance between the and the transmitter is at the largest.
Then, afterwards, we observe an exponential increase in the input power with oscillation until it reaches a value of 12 W.
We can conclude that the decrease in the drone distance overwhelms the sm Figure 11. The input power closed-loop step response.

The ESC Power Maximization for a Drone-Hovering Movement
The used trajectory for simulating the drone-hovering movement consists of several coupled motions, an oscillating angular motion and a linear motion. We can observe that the angular velocity of the drone is increasing with time because the azimuthal angle α range is expanding with time; thus, we have an accelerated movement from 0.5 to 2 s and almost a constant linear motion from 0 to 0.5 s.
The overall drone velocity along the trajectory Γ is the summation of both the angular and linear velocity.
The velocities are calculated based on the first derivations of the trajectory equations in (1) and converted to meters per second.
From Figure 12, it is observable that the velocity of the drone ranges from almost 1 m/s and accelerates to 8 m/s; the fluctuation between the negative and positive values in the graph indicates the direction of drone movement. While we can notice that a speed of 8 m/s is conceded as a moderate velocity for hovering around some locations, on the other hand, the reason behind the choice of this high wobbling velocity is to simulate a harsh scenario of external disturbances and aerial perturbations. Figure 13 shows the results of the real-time closed-loop simulation on the LAUNCHXL-F28379D Board. The ESC algorithm-generated magnetic angles track perfectly the angular positions of the drone with a minor static error and a response time of 2 ms.
The input power closed-loop response in Figure 14 depicts the maximization of the objective function with a neglected tracking error between the calculated extremum input power in a black dotted line and the maximized output of the ESC in purple color.
The input power graph interprets the movement of the drone along the trajectory Γ; the input power of the system is at a lower value when the distance between the drone and the transmitter is at the largest.
Then, afterwards, we observe an exponential increase in the input power with small oscillation until it reaches a value of 12 W.
We can conclude that the decrease in the drone distance overwhelms the small azimuthal angular shift misalignment in terms of the input power increase. Nevertheless, the designed ESC algorithm can maximize the transferred power for a hovering drone velocity of 8 m/s without any feedback.       The receiver velocity Not provided Not provided 8 m/s

Conclusions
In this study, we have presented a comprehensive modeling approach for a mid in-flight wireless transfer charging system for drones. Furthermore, we propose a tiparameter discrete ESC control algorithm to maximize the input power for a mode rapid and oscillating hovering trajectory where the linear velocity of the drone rea m/s. The real-time simulation results generated by the DSP hardware show a high tr accuracy of the drone position with a stable response time of 2 ms. The designed con always maintains the input power on its variable maximum depending on the d position in the trajectory Γ, which varies from 0.3 to 12 W.

Conclusions
In this study, we have presented a comprehensive modeling approach for a midrange in-flight wireless transfer charging system for drones. Furthermore, we propose a multiparameter discrete ESC control algorithm to maximize the input power for a moderately rapid and oscillating hovering trajectory where the linear velocity of the drone reaches 8 m/s. The real-time simulation results generated by the DSP hardware show a high tracking accuracy of the drone position with a stable response time of 2 ms. The designed controller always maintains the input power on its variable maximum depending on the drone's position in the trajectory Γ, which varies from 0.3 to 12 W.
Based on this study, the validity and the feasibility of the proposed in-flight wireless charging system is tested through a hovering scenario where the drone flies around the transmitter at a distance of 0.3 m. Furthermore, we introduce a drift in the azimuthal angle to simulate the instability of flight performance factors such as wind and sensors accuracy. The results demonstrate the reliability of the wireless charging system, showcasing its ability to provide a convenient and reliable charging solution for in-flight drone wireless charging systems. This study contributes to the advancement of wireless power transfer systems and offers valuable insights for future research and development in the field.
Supplementary Materials: The following supporting information can be downloaded at: https: //www.mdpi.com/article/10.3390/en16155746/s1; Video S1: The animated results of the maximum input power path.