Introduction

The RamAirKite is based on ModelingToolkit, which allows to define the differential algebraic equations in symbolic form. It does not use a KCU. Instead, the kite is controlled from the ground (e.g. a ship) using three winches and four tethers.

Private enumerations

KiteModels.SegmentTypeType
SegmentType `POWER` `STEERING` `BRIDLE`

Type of segment.

Elements

  • POWER: Belongs to a power line
  • STEERING: Belongs to a steering line
  • BRIDLE: Belongs to the bridle
source
KiteModels.DynamicsTypeType
DynamicsType `DYNAMIC` `STATIC` `KITE` `WINCH`

Enumeration of the models that are attached to a point.

Elements

  • DYNAMIC: Belongs to a dynamic tether model
  • STATIC: Belongs to a static tether model
  • KITE: Rigid body
  • WINCH: Winch
source

Private types

KiteModels.PointType
mutable struct Point

A normal freely moving tether point.

  • idx::Int16

  • pos_b::StaticArraysCore.MVector{3, Float64}

  • pos_w::StaticArraysCore.MVector{3, Float64}

  • type::KiteModels.DynamicsType

source
KiteModels.PulleyType
mutable struct Pulley

A pulley described by two segments with the common point of the segments being the pulley.

  • idx::Int16

  • segments::Tuple{Int16, Int16}

  • type::KiteModels.DynamicsType

  • sum_length::Float64

source
KiteModels.SegmentType
mutable struct Segment

A segment from one point index to another point index.

  • idx::Int16

  • points::Tuple{Int16, Int16}

  • type::KiteModels.SegmentType

  • l0::Float64

  • diameter::Float64

source
KiteModels.TetherType
struct Tether

A set of segments making a flexible tether. The winch point should only be part of one segment.

  • idx::Int16

  • segments::Vector{Int16}

  • winch_point::Int16

source
KiteModels.WinchType
mutable struct Winch

A set of tethers or just one tether connected to a winch.

  • idx::Int16

  • model::AbstractWinchModel

  • tethers::Vector{Int16}

  • tether_length::Float64

source
KiteModels.KitePointGroupType
struct KitePointGroup

Set of bridle lines that share the same twist angle and trailing edge angle.

  • idx::Int16

  • points::Vector{Int16}

  • fixed_index::Int16

  • chord::StaticArraysCore.MVector{3, Float64}

  • y_airf::StaticArraysCore.MVector{3, Float64}

  • type::KiteModels.DynamicsType

source
KiteModels.PointMassSystemType
struct PointMassSystem

A discrete mass-spring-damper representation of a kite system, where point masses connected by elastic segments model the kite and tether dynamics:

  • points::Vector{Point}: Point masses representing:
    • Kite attachment points
    • Dynamic bridle/tether points
    • Fixed ground anchor points
  • groups::Vector{KitePointGroup}: Collections of points that move together, according to kite deformation (twist and trailing edge deflection)
  • segments::Vector{Segment}: Spring-damper elements between points
  • pulleys::Vector{Pulley}: Elements that redistribute line lengths
  • tethers::Vector{Tether}: Groups of segments with a common unstretched length
  • winches::Vector{Winch}: Ground-based winches that control the tether lengths

See also: Point, Segment, KitePointGroup, Pulley

source

Private functions

KiteModels.create_sys!Function
create_sys!(s::RamAirKite, system::PointMassSystem, measure::Measurement; 
           init_Q_b_w, init_kite_pos, init_va_b) -> Tuple

Create the complete ODE system for the ram air kite model by combining force equations, aerodynamic equations, differential equations and scalar equations.

The system is built up in stages:

  1. Force equations for springs, drag and pulleys
  2. Linearized aerodynamic equations using VSM
  3. Differential equations for kinematics and dynamics
  4. Scalar equations for angles and derived quantities

Arguments

  • s::RamAirKite: The kite system state object
  • system::PointMassSystem: The point mass representation of the kite system
  • measure::Measurement: Initial measurement data
  • init_Q_b_w: Initial quaternion orientation of kite body frame relative to world frame
  • init_kite_pos: Initial kite position vector in world frame
  • init_va_b: Initial apparent wind velocity vector in body frame

Returns

Tuple containing:

  • sys::ODESystem: The complete ModelingToolkit ODE system
  • defaults::Vector{Pair{Num,Real}}: Default values for state variables
  • guesses::Vector{Pair{Num,Real}}: Initial guesses for solver
source
KiteModels.diff_eqs!Function
diff_eqs!(s, eqs, defaults; kwargs...)

Generate the differential equations for kite dynamics including quaternion kinematics, angular velocities and accelerations, and forces/moments.

Arguments

  • s::RamAirKite: The kite system state
  • eqs: Current system equations
  • defaults: Default values for variables
  • tether_kite_force: Forces from tethers on kite
  • tether_kite_moment: Moments from tethers on kite
  • aero_force_b: Aerodynamic forces in body frame
  • aero_moment_b: Aerodynamic moments in body frame
  • ω_b: Angular velocity in body frame
  • R_b_w: Body to world rotation matrix
  • kite_pos: Kite position vector
  • kite_vel: Kite velocity vector
  • kite_acc: Kite acceleration vector
  • init_Q_b_w: Initial quaternion orientation
  • init_kite_pos: Initial kite position
  • steady: Whether in steady mode

Returns

Tuple of updated equations and defaults

source
KiteModels.reinit!Function
reinit!(s::RamAirKite; prn=true, precompile=false) -> Nothing

Reinitialize an existing kite power system model with new state values.

This function performs the following operations:

  1. If no integrator exists yet:
    • Loads a serialized ODEProblem from disk
    • Initializes a new ODE integrator
    • Generates getter/setter functions for the system
  2. Converts measurement data to quaternion orientation
  3. Initializes the point mass system with new positions
  4. Sets initial values for all state variables
  5. Reinitializes the ODE integrator
  6. Updates the linearized aerodynamic model

This is more efficient than init! as it reuses the existing model structure and only updates the state variables to match the current measure.

Arguments

  • s::RamAirKite: The kite power system state object
  • prn::Bool=true: Whether to print progress information

Returns

  • Nothing

Throws

  • ArgumentError: If no serialized problem exists (run init_sim! first)
source
KiteModels.scalar_eqs!Function
scalar_eqs!(s, eqs, measure; R_b_w, wind_vec_gnd, va_kite_b, kite_pos, kite_vel, kite_acc)

Generate equations for scalar quantities like elevation, azimuth, heading and course angles.

Arguments

  • s::RamAirKite: The kite system state
  • eqs: Current system equations
  • measure::Measurement: Current measurement data
  • R_b_w: Body to world rotation matrix
  • wind_vec_gnd: Ground wind vector
  • va_kite_b: Apparent wind velocity in body frame
  • kite_pos: Kite position vector
  • kite_vel: Kite velocity vector
  • kite_acc: Kite acceleration vector

Returns

  • Updated system equations including:
    • Heading angle from x-axis
    • Elevation angle
    • Azimuth angle
    • Course angle
    • Angular velocities and accelerations
source
KiteModels.linear_vsm_eqs!Function
linear_vsm_eqs!(s, eqs; aero_force_b, aero_moment_b, group_aero_moment, init_va_b, twist_angle, va_kite_b, ω_b)

Generate linearized aerodynamic equations using the Vortex Step Method (VSM). Uses linearization around current operating point to approximate aerodynamic forces and moments. The Jacobian is computed using the VSM solver.

Arguments

  • s::RamAirKite: The kite system state
  • eqs: Current system equations
  • aero_force_b: Aerodynamic forces in body frame
  • aero_moment_b: Aerodynamic moments in body frame
  • group_aero_moment: Aerodynamic moments per group
  • init_va_b: Initial apparent wind velocity
  • twist_angle: Twist angles per group
  • va_kite_b: Apparent wind velocity in body frame
  • ω_b: Angular velocity in body frame

Returns

  • Updated system equations including linearized aerodynamics:
    • Force and moment calculations
    • Group moment distributions
    • Jacobian matrix for state derivatives
source
KiteModels.force_eqs!Function
force_eqs!(s, system, eqs, defaults, guesses; kwargs...)

Generate the force equations for the kite system including spring forces, drag forces, pulley dynamics and winch forces.

Arguments

  • s::RamAirKite: The kite system state
  • system::PointMassSystem: The point mass representation
  • eqs: Current system equations
  • defaults: Default values for variables
  • guesses: Initial guesses for variables
  • R_b_w: Body to world rotation matrix
  • kite_pos: Kite position vector
  • kite_vel: Kite velocity vector
  • wind_vec_gnd: Ground wind vector
  • group_aero_moment: Aerodynamic moments per group
  • twist_angle: Twist angles per group
  • steady: Whether in steady mode

Returns

Tuple containing:

  • Updated equations
  • Updated defaults
  • Updated guesses
  • Tether forces on kite
  • Tether moments on kite
source