Skip to content

Add abstract winch model #103

@ufechner7

Description

@ufechner7

Current definition, but not yet in this package:

abstract type AbstractWinchModel end
const AWM = AbstractWinchModel
"""
    mutable struct AsyncMachine

Model of a winch with an async generator and a gearbox.
"""
@with_kw mutable struct AsyncMachine <: AbstractWinchModel @deftype Float64
    set::Settings
    "nominal motor voltage"
    u_nom = 400.0/sqrt(3)
    "rated synchronous motor speed [rad/s]"
    omega_sn = 1500 / 60 * 2π
    "rated nominal motor speed [rad/s]"
    omega_mn = 1460 / 60 * 2π
    "rated torque at nominal motor speed [Nm]"
    tau_n = 121
    "Rated maximum torque for synchronous motor speed [Nm]"
    tau_b = 363
    "minimal speed of the winch in m/s. If v_set is lower the brake is activated."
    v_min = 0.2
    "linear acceleration of the brake [m/s²]"
    brake_acc = -25.0
    "if the brake of the winch is activated"
    brake::Bool = true;
    "last set speed"
    last_set_speed = 0.0;
end
"""
    mutable struct TorqueControlledMachine

Model of a winch with an torque controlled generator and a gearbox.
"""
@with_kw mutable struct TorqueControlledMachine <: AbstractWinchModel @deftype Float64
    set::Settings
    "winch speed controller"
    wcs::WinchSpeedController
    "minimal speed of the winch in m/s. If v_set is lower the brake is activated."
    v_min = 0.2
    "linear acceleration of the brake [m/s²]"
    brake_acc = -25.0
    "if the brake of the winch is activated"
    brake::Bool = true;
    "last set speed"
    last_set_speed = 0.0;
end

And in the pull request system-structure:

"""
    mutable struct Winch

A set of tethers (or a single tether) connected to a winch mechanism.

$(TYPEDFIELDS)
"""julia
mutable struct Winch
    const idx::Int16
    const tether_idxs::Vector{Int16}
    tether_len::Union{SimFloat, Nothing}
    tether_vel::SimFloat
    tether_acc::SimFloat
    set_value::SimFloat
    brake::Bool
    const force::KVec3
    gear_ratio::SimFloat
    drum_radius::SimFloat
    f_coulomb::SimFloat
    c_vf::SimFloat
    inertia_total::SimFloat
    friction::SimFloat
end

We should define a base type with a common set of fields and/or methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions