diff --git a/examples/simple_3l_control.jl b/examples/simple_3l_control.jl index b3ce1c0b0..65ebf68dd 100644 --- a/examples/simple_3l_control.jl +++ b/examples/simple_3l_control.jl @@ -1,11 +1,11 @@ -using Revise, KiteModels, LinearAlgebra +using KiteModels, LinearAlgebra using Base: summarysize using Pkg if ! ("ControlPlots" ∈ keys(Pkg.project().dependencies)) using TestEnv; TestEnv.activate() end -using ControlPlots, StatsBase +using ControlPlots, StatsBase, Revise set = deepcopy(load_settings("system_3l.yaml")) # set.elevation = 71 diff --git a/src/KPS4_3L.jl b/src/KPS4_3L.jl index ef6386cd7..953f7d26b 100644 --- a/src/KPS4_3L.jl +++ b/src/KPS4_3L.jl @@ -555,18 +555,6 @@ function calc_acc_speed(motor::AsyncMachine, tether_vel, norm_, set_speed) end @register_symbolic calc_acc_speed(motor::AsyncMachine, tether_vel, norm_, set_speed) -function WinchModels.calc_acceleration(wm::TorqueControlledMachine, speed, force; set_torque=nothing, set_speed=nothing, use_brake = false) - omega = wm.set.gear_ratio/wm.set.drum_radius * speed - τ = WinchModels.calc_coulomb_friction(wm) * WinchModels.smooth_sign(omega) + WinchModels.calc_viscous_friction(wm, omega) - # calculate tau based on the set_torque - K = 1.0 - tau = set_torque * K - # calculate tau_total based on the friction - tau_total = tau + wm.set.drum_radius / wm.set.gear_ratio * force - τ - # calculate omega_dot_m based on tau_total and the inertia - omega_dot_m = tau_total/wm.set.inertia_total - return wm.set.drum_radius/wm.set.gear_ratio * omega_dot_m -end function calc_acc_torque(motor::TorqueControlledMachine, tether_vel, norm_, set_torque) calc_acceleration(motor, tether_vel, norm_; set_speed=nothing, set_torque, use_brake=false) end