{'fraction_non_alphanumeric': 0.03518166349714743, 'fraction_numerical': 0.00935842258032229, 'mean_word_length': 4.183657587548638, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A constraint-free flight simulator package for airborne wind energy systems

The LAgrangian Kite SimulAtor (LAKSA) is a freely available software for the dynamic analysis of tethered flying vehicles, such as kites and fixed-wing drones, applied to airborne wind energy generation. This software comprises four simulators. The one, two and four-line simulators, which consider flexible but inelastic tethers, are based on minimal coordinate Lagragian formulations and can be used for the analysis of fly and ground generation systems, kite-based traction systems, and kitesurfing applications, respectively. The configuration of the mechanical system in the fourth simulator can be defined by the user, who can select the number of flying vehicles and the properties of the elastic and flexible tethers linking them. In all the software tools, the kites or tethered fixed-wing drones are represented as rigid bodies and the dynamic equations of the tether-bridle-vehicle systems, together with the user-defined and time-dependent control variables, are solved self-consistently. Academic and research analysis can take advantage of the modularity of the simulators and their inputs and outputs interfaces, which follow a common and user-friendly architecture.


Introduction
Airborne wind energy (AWE) researchers have developed during the last decade several numerical tools for the simulation of AWE systems. Some of them have been shared with the research community [1,2,3,4] and constitute valuable open-access resources in the field. Among them, the numerical tools aimed at the dynamics and control of airborne systems are of particular importance because of their use during the preliminary and detailed design phases. Moreover, the analysis of optimal control laws and the implementation of real-time closed-loop controls depend heavily on dynamic analysis. A particular challenge for a flight simulator of tethered flying vehicles is the modeling of the tether. Although a straight-line tether model is accurate enough when the tension is large if compared to the aerodynamic and gravitational loading of the tether, tether sagging cannot be neglected during launching and landing, or during the retraction of the kite within a pumping cycle [5,6]. Multi-particle simulators, which are based on lumped-masses connected by springs and dampers, can be easily implemented but they typically yield to a stiff set of ordinary differential equations due to the high value of the tether Young's modulus. For these reasons, multi-particle models are convenient for the simulation of complex system involving several kites and tethers. On the other hand, by modeling the tether as a set of inelastic and jointed rods, the fast longitudinal oscillations are removed, although this introduces geometrical constraints. A classical mechanics formulation yields to a mixed system of ordinary differential equations and nonlinear algebraic constraints. For these reasons, many AWE flight simulators have used minimal coordinate Lagrangian formulation [7,8,9,10,11,12].
Following previous considerations, we developed a software tool named LAgrangian Kite SimulAtors (LAKSA) with several simulation modules. Besides using a minimal coordinate approach, the kite or fixed-wing drone are modeled as rigid bodies, instead of single point mass as frequently found in AWE simulators. This work presents for the first time the architecture of LAKSA (Sec. 2) and a new module named KiteSurf that mimics the dynamics of a four-line kite (Sec 3). Some capabilities of KiteSurf are shown in Sec. 4, where simulation results of pull-up and steering maneuvers are discussed. Section 5 summarizes the conclusions of the work.

General description of LAKSA
LAKSA is a set of Matlab ® functions aimed at academic and research activities on AWE systems.
The code, which is freely available from a public repository [13], includes four modules: (i) KiteFlex is a simulator of fly-and ground-generation AWE systems. The mechanical system comprises a tethered vehicle with or without rotors, equipped with a time-varying bridle made of three lines, and attached to the ground by an inelastic and flexible tether. A detailed description can be found in Refs. [14] and [15]. In addition to LAKSA, a parallelized Fortran version of this code has been developed by the authors. (ii) KiteAcrobat considers a two-line kite and aims at kite traction applications such as cargo ships pulling [12]. (iii) KiteSurf simulates the dynamics of four-line kites. Besides kite surf applications, the simulator mimics the experimental setup developed at UC3M [16]. Therefore, the simulator is also connected with AWE applications because it is an important element in the aerodynamic parameter identification algorithm for kites and drones. A sketch of the mechanical system is shown in the left panel of Fig. 1. (iv) KiteElastic is a flight simulator of several tethered vehicles linked by elastic and flexible tethers. It can be used to study the dynamics of AWE systems based on a train of kites or multi-drone configurations.
The first three modules are based on a minimal coordinate Lagrangian formulation because they involve inelastic tethers. The equations of motion of KiteElastic were derived by using a classical mechanics formulation. For all of them, the equations of motion are ordinary differential equations without any algebraic constraints. This work is mainly focussed on KiteSurf because the equation of motion of this module has not been presented before. Moreover, since it combines inelastic and elastic tethers, it illustrates the most important feature of LAKSA's methodology. The right panel of Fig. 1 displays the flow chart of LAKSA and highlights its modular architecture. For either of the four simulators the user inputs and outputs are the same. The inputs include the initial conditions of the system, its physical parameters, and the control laws. After integrating the equations of motion numerically, the simulation outputs can be obtained in a two-step procedure. Firstly, the time history of the state vector is post-processed to get all the relevant quantities such as the position and velocity of the vehicle and the tethers, Euler angles, tether tensions, and aerodynamic forces and torques. Secondly, a call to a function allows to create plots with the results of the simulations.
This architecture eases the interpretation of the results and avoids the interaction of the user with certain complex features of the codes. The use of dimensionless parameters and a minimal coordinate approach are very convenient from a numerical point of view [7,8,9,10,11,12], but they make harder the physical understanding of the results. Such a drawback is solved by  the proposed flow chart, because the user only interacts with physical parameters and standard state variables.
All LAKSA simulators share the same independent module for the computation of the aerodynamic forces and torques. Such a modular architecture is compatible with future updates and alternative aerodynamic models. In LAKSA, the extended state vector, y, of the simulators is governed by a set of ordinary differential equations where τ is a dimensionless time whose definition depends on the specific LAKSA s module.
Equation (1) is not coupled with algebraic constraints imposed by the tethers because a Lagrangian formulation with minimal coordinate approach is used. The control vector u c depends on the particular simulator and it can include the lengths of the tether and the bridle lines, the torque of the motor controllers of the rotors, and the position of the control bar. It is remarkable that LAKSA computes self-consistently the dynamics of the system, i.e. without empirical or heuristic laws linking variables. This allows to simulate rigorously reel-in, reel-out, take-off, and landing manoeuvres. The next section presents the explicit derivation of Eq. (1) for a four-line kite system.

KiteSurf: a Lagrangian Four-Line Kite simulator
KiteSurf comprises a power kite of mass m k , chord c, span b, and surface S, four lines, and a control bar (see Fig. 1). The two lines that connect points A ± of the leading edge of the kite with the mobile point O E are massless, inelastic, straight, and have constant lengths L l . Another tether with the same properties but length L s joins O E with O EF , which is the origin of an inertial frame S EF linked to the ground, axes y EF and x EF spanning the flat ground and z EF pointing downwards. The other two lines of the kite have tips at points B ± of the trailing edge and at the ends of the control bar, C ± . These two lines are modeled as massless, straight, elastic, and with unstretched length L t . These tethers need to be elastic because four inelastic tethers would yield an over-constrained system (similar to a chair with four legs). An alternative approach would be a flexible kite with four rigid tethers, but the computational cost and complexity of the simulator would increase notably.
An important geometric element of the model is the plane named Π, and defined by the three points A ± and O E . Obviously, the two inelastic tethers and the segment A + − A − form an isosceles triangle that belongs to Π. For convenience, we will use a dot to denote derivatives with respect to the dimensionless time τ = t g/L l , and sine and cosine of an angle α will be written as sα and cα, respectively. Upper and lower case letters refer to variables with and without dimensions. For instance, the wind velocity is written as Figure 1 also shows some auxiliary frames of reference. S E is a non-inertial frame with origin at O E and axes parallel to S EF . S 1 has its origin at O E and axis y 1 and z 1 spanning the Π-plane. The orientation with respect to S E of the normal direction to Π, i.e. x 1 , is given by angles ϕ and γ, as shown in the left panel of Fig. 1. We also use a frame S 2 with origin at the middle point of segment A + − A − , axes x 2 and z 2 spanning the plane of symmetry of the kite, z 2 pointing to O E , and x 2 parallel to x 1 . The angle η between axes y 1 and y 2 orients S 2 with respect to S 1 . The last auxiliary system is the body frame S B that, for clarity, is not shown in Fig. 1. It has its origin at the center of mass G. Axes x B and z B span the plane of symmetry of the kite, and z B pointing downwards. The relative orientation of S B with respect to S 2 is defined by the angle θ between x 2 and x B . The S B -coordinates of the attachment points are and the components of the tensor of inertia about the center of mass G reads with ι x , ι y , ι z , and ι xz some dimensionless constants. More detailed information about these auxiliary frames of references, such as dedicated figures, rotation matrices to relate vector components, and the normalized angular velocities ω 1E =φk E +γj 1 , ω 21 =ηi 2 , and ω B2 =θj B , are available in Ref. [12]. The massless and straight tether linking O EF and O E is in the Π-plane because its tension should compensate exactly the resultant of the forces in the inelastic tethers. However, it does not bisect, in general, the angle made by the two inelastic tethers at O E . Such a situation, i.e. points O EF , O E and O 2 belonging to the same line, only occurs when the tensions in the inelastic tethers are equal. For this reason, we introduce a frame S 3 with origin at O 3 = O 2 , axis x 3 = x 2 , and axis z 3 always aligned with the tether of length L s . We will denote χ the angle between y 3 and y 2 (see inset in Fig. 1). The rotation matrix that relates vector components in and the angular velocity of S 3 with respect to S 2 is Ω 32 = g/L l ω 32 = g/L lχ i 2 .
The mechanical system has five degrees of freedom that we gather in the state vector Besides anchoring the kite to the ground, the tether of length L s also serves as a guideway, because it passes through a hole drilled at the middle point C 0 of the control bar (see inset of Fig. 1). The pilot can move the control bar between the depower and power stopper balls, which are located at distances L ds and L ps from points O E and O EF , respectively. Instead of the distance D cb between point C 0 and the power stopper ball, our model uses the dimensionless power ratio [3] u This variable is convenient because it varies from zero to one when the control bar is moved from the depower to the power stopper balls. The second control variable of the model is the angle ν between the bar and axis y 3 , which is used for steering the kite. For simplicity, we will restrict the analysis to the case in which the control bar is contained in the Π-plane. This hypothesis can be removed easily by adding the angle of the bar out of the Π plane to the control vector. Therefore, our control vector is given by The position of the center of mass of the kite as a function of the state vector reads with = 1 − y 2 A and s ≡ L s /L l . Writing R G ≡ L l r G , the normalized absolute velocity reads where we used Coriolis theorem. Since ω EF E = 0, because the axes of S E and S EF are parallel, one has ω 3EF = (χ +η) i 2 +φk E +γj 1 , ω 2EF =ηi 2 +φk E +γj 1 and ω BEF = θj B +ηi 2 +φk E +γj 1 . Substituting these angular velocities in Eq. (8), yields the following formula for the and Matrix Υ 0 recovers the result of Ref. [12] when the inelastic tethers have equal length, while Υ 1 represents the contribution due to the tether of length L s . The absolute angular velocity of the kite Ω BEF = Ω BE coincides with the one found in Ref. [12]. Its S B -components are The normalized Lagrangian of the system L = E k − U p , involves the normalized kinetic and potential energies of the kite. The former is E k = (v 2 G + 1 2 ω T BE · ι G · ω BE )/2. From Eqs. (9) and (12), one finds The aerodynamic force F A and moment M A about the center of mass and the tension F ± and the torque M ± of the elastic tethers attached to B ± appear in the generalized forces with The explicit forms of tensions f ± and torques m ± of the elastic tethers are given in Appendix A. Regarding the aerodynamic force and torque, we used the following model where v A = v G − v w is the normalized aerodynamic velocity, µ ≡ ρSL l /2m k , b = b/L l , c = c/L l , p = P b/2V T , q = Qc/V T , r = Rb/2V T , ρ the air density, V T a reference velocity, and b and c the kite span and chord, respectively. The angle-of-attack and sideslip angle in Eqs. (16) and (17) are given by All the coefficients in Eqs. (16) and (17), such as C x0 , C zα , C lβ , etc, are the stability derivatives [17] of the kite, and they were obtained by using basic preliminary engineering methods. Due to the actual lack of knowledge on kite's aerodynamics, we assumed that they are constant, thus yielding a first aerodynamic model suitable for qualitative analysis. The term C nδt δt, with where f k and m k are the S B -components of the forces and moments. After introducing the extended state vector y = [x sẋs ], Eq. (20) can be written as a first order system like Eq. (1). Similar procedures have been used in Refs. [12] and [14,15] for finding the equations of motions of KiteAcrobat and KiteFlex, respectively.

Simulation Results
Interested readers can find a plethora of simulation results by running the example files that are available from the open access repository [13]. They include reel-in maneuvers, periodic figureof-eight trajectories, stability analyses of equilibrium states, and steering maneuvers, among others. After running these examples, LAKSA generates a movies and several plots with relevant information such as the evolution of the kite position and velocity, control laws, tether tensions, angle of attack and sideslip angles, and aerodynamic forces. We now explain the most important features of this software by discussing two examples of KiteSurf. As shown in the right panel of Fig. 1, the user inputs include the physical parameters, the control laws and the initial conditions. The physical parameters in our KiteSurf's simulations are given in Tables 1 and 2, and they were used to simulate symmetric pull-up and steering maneuvers. These parameters and maneuvers correspond with the experimental setup and results presented in Ref. [16]. We considered a four-line Cabrinha Swithblade inflatable kite with five inflatable struts. Although a quantitative agreement is not possible due to the lack of an accurate aerodynamic model, the simulation results are in a very good qualitative agreement with the experimental data.
For the pull-up maneuver, we took a symmetric equilibrium state of the kite as initial condition and increased the power ratio from 0.5 to 0.75 with zero deflection of the control bar [see Panel (a) in Fig. 3]. The trajectory of point G and the evolutions of the pitch angle and pitch angular velocity component of the kite, displayed in panels (b) and (c), reveals that the center of mass of the kite does not move significantly and the kite rotates while increasing its pitch angle. As a consequence, the angle of attack of the kite increases (not shown) and the 8 1234567890 ''""   . This dynamic response of the kite, and the linear variation of the tether tension with the power ration, agrees qualitatively with the behavior showed in Ref. [16].
For the steering maneuver we also used as initial condition a symmetric equilibrium state of the kite, but now the power ratio was kept constant and the deflection angle of the kite was varied periodically [see panel (e)-(h)]. The control law for ν(τ ) showed in panel (e) was generated with a PID controller, which makes the kite to follow a target trajectory with a sinusoidal variation of its lateral displacement. The long term behavior of the kite, i.e. the one obtained after letting the kite evolves from the equilibrium state towards a final periodic motion, is close to the one found in the experiments of Ref. [16]: the altitude of the periodic motion varies slightly [panel (f)] and the dominant components of the angular velocity are P and R (yaw and roll). Interestingly, in the simulations and the experiments, there is a time shift between the maximum of R and the minimum of P and the former appears latter in the cycle. As expected, panel (h) shows that the tether tension at point B + is greater (smaller) than the one at B − for positive (negative) values of ν.

Conclusions
This work presented a general description of LAKSA, a freely available software for the simulation of tethered vehicles such as kites and fixed-wing drones with application to airborne 9 1234567890 ''""

Appendix A. Modeling of elastic tethers in KiteSurf
Each elastic tether of diameter d t , cross section A t = πd 2 t /4, Young's modulus E t , natural length L t , and friction coefficient F t is substituted by a massless spring and a damper. The tension force upon the kite the reads with K = E t A t /L t the equivalent stiffness of the spring, and L ± (t) ≡| C ± B ± | the distance between points C ± of the control bar and the kite's attachment points B ± . After introducing the dimensionless parameters ζ = L l /L t , f t ≡ F t g/L l , κ = E t A t /m k g, and the elongation ± = ζL ± /L l − 1, the normalized tether tension and moments due to the elastic tethers are In order to find the dependence of these forces with the extended state vector, we first write vector C ± B ± as a function of the state vector variables as follows where CB = L CB /L l is the normalized length of the control bar, and d ≡ L ds /L l +u p (L s −L ds − L ps )/L l the normalized distance between O E and C 0 . Such a distance depends on the control vector through the power ratio u p . For convenience we introduce the parameters x BA ≡ x B − x A and z BA ≡ z B − z A , and write Eq. The square of the ratio L ± (t)/L l appearing in the elongation ± = ζL ± /L l − 1 reads and the time derivative of the elongation iṡ ± = ζ L/L l dḋ ± CB 2 (ν +χ) c (ν + χ) + y B CB 2 (ν +χ) s (ν + χ) ± dχcχ ±ḋsχ withḋ =u p (L s − L ds − L ps )/L l .