Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/simple_3l_control.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 0 additions & 12 deletions src/KPS4_3L.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading