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.SegmentType
— TypeSegmentType `POWER` `STEERING` `BRIDLE`
Type of segment.
Elements
- POWER: Belongs to a power line
- STEERING: Belongs to a steering line
- BRIDLE: Belongs to the bridle
KiteModels.DynamicsType
— TypeDynamicsType `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
Private types
KiteModels.Point
— Typemutable 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
KiteModels.Pulley
— Typemutable 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
KiteModels.Segment
— Typemutable 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
KiteModels.Tether
— Typestruct 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
KiteModels.Winch
— Typemutable struct Winch
A set of tethers or just one tether connected to a winch.
idx::Int16
model::AbstractWinchModel
tethers::Vector{Int16}
tether_length::Float64
KiteModels.KitePointGroup
— Typestruct 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
KiteModels.PointMassSystem
— Typestruct 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 pointspulleys::Vector{Pulley}
: Elements that redistribute line lengthstethers::Vector{Tether}
: Groups of segments with a common unstretched lengthwinches::Vector{Winch}
: Ground-based winches that control the tether lengths
See also: Point
, Segment
, KitePointGroup
, Pulley
Private functions
KiteModels.create_sys!
— Functioncreate_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:
- Force equations for springs, drag and pulleys
- Linearized aerodynamic equations using VSM
- Differential equations for kinematics and dynamics
- Scalar equations for angles and derived quantities
Arguments
s::RamAirKite
: The kite system state objectsystem::PointMassSystem
: The point mass representation of the kite systemmeasure::Measurement
: Initial measurement datainit_Q_b_w
: Initial quaternion orientation of kite body frame relative to world frameinit_kite_pos
: Initial kite position vector in world frameinit_va_b
: Initial apparent wind velocity vector in body frame
Returns
Tuple containing:
sys::ODESystem
: The complete ModelingToolkit ODE systemdefaults::Vector{Pair{Num,Real}}
: Default values for state variablesguesses::Vector{Pair{Num,Real}}
: Initial guesses for solver
KiteModels.diff_eqs!
— Functiondiff_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 stateeqs
: Current system equationsdefaults
: Default values for variablestether_kite_force
: Forces from tethers on kitetether_kite_moment
: Moments from tethers on kiteaero_force_b
: Aerodynamic forces in body frameaero_moment_b
: Aerodynamic moments in body frameω_b
: Angular velocity in body frameR_b_w
: Body to world rotation matrixkite_pos
: Kite position vectorkite_vel
: Kite velocity vectorkite_acc
: Kite acceleration vectorinit_Q_b_w
: Initial quaternion orientationinit_kite_pos
: Initial kite positionsteady
: Whether in steady mode
Returns
Tuple of updated equations and defaults
KiteModels.reinit!
— Functionreinit!(s::RamAirKite; prn=true, precompile=false) -> Nothing
Reinitialize an existing kite power system model with new state values.
This function performs the following operations:
- If no integrator exists yet:
- Loads a serialized ODEProblem from disk
- Initializes a new ODE integrator
- Generates getter/setter functions for the system
- Converts measurement data to quaternion orientation
- Initializes the point mass system with new positions
- Sets initial values for all state variables
- Reinitializes the ODE integrator
- 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 objectprn::Bool=true
: Whether to print progress information
Returns
Nothing
Throws
ArgumentError
: If no serialized problem exists (runinit_sim!
first)
KiteModels.scalar_eqs!
— Functionscalar_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 stateeqs
: Current system equationsmeasure::Measurement
: Current measurement dataR_b_w
: Body to world rotation matrixwind_vec_gnd
: Ground wind vectorva_kite_b
: Apparent wind velocity in body framekite_pos
: Kite position vectorkite_vel
: Kite velocity vectorkite_acc
: Kite acceleration vector
Returns
- Updated system equations including:
- Heading angle from x-axis
- Elevation angle
- Azimuth angle
- Course angle
- Angular velocities and accelerations
KiteModels.linear_vsm_eqs!
— Functionlinear_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 stateeqs
: Current system equationsaero_force_b
: Aerodynamic forces in body frameaero_moment_b
: Aerodynamic moments in body framegroup_aero_moment
: Aerodynamic moments per groupinit_va_b
: Initial apparent wind velocitytwist_angle
: Twist angles per groupva_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
KiteModels.force_eqs!
— Functionforce_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 statesystem::PointMassSystem
: The point mass representationeqs
: Current system equationsdefaults
: Default values for variablesguesses
: Initial guesses for variablesR_b_w
: Body to world rotation matrixkite_pos
: Kite position vectorkite_vel
: Kite velocity vectorwind_vec_gnd
: Ground wind vectorgroup_aero_moment
: Aerodynamic moments per grouptwist_angle
: Twist angles per groupsteady
: Whether in steady mode
Returns
Tuple containing:
- Updated equations
- Updated defaults
- Updated guesses
- Tether forces on kite
- Tether moments on kite