Skip to content

Commit

Permalink
add param fig
Browse files Browse the repository at this point in the history
  • Loading branch information
ufechner7 committed Mar 16, 2024
1 parent b100251 commit 46da5c2
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions test/test_speedcontroller2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ using Timers; tic()
# Input: A varying wind speed. Implements the simulink block diagram, shown in
# docs/speed_controller_test2.png
using KiteControllers, Plots, BenchmarkTools
inspectdr()
InspectDR.defaults.xaxiscontrol_visible = false

wcs = WCSettings()

Expand Down Expand Up @@ -51,14 +49,10 @@ else
end
end

p1=plot(TIME, V_WIND, label="v_wind [m/s]", width=2, xtickfontsize=12, ytickfontsize=12, legendfontsize=12)
plot!(TIME, V_RO, label="v_reel_out [m/s]", width=2, xtickfontsize=12, ytickfontsize=12, legendfontsize=12)
plot!(TIME, V_SET_OUT, label="v_set_out [m/s]", width=2, xtickfontsize=12, ytickfontsize=12, legendfontsize=12)
plot!(TIME, ACC, label="acc [m/s²]", width=2, xtickfontsize=12, ytickfontsize=12, legendfontsize=12)
plot!(TIME, FORCE*0.001, label="force [kN]", width=2, xtickfontsize=12, ytickfontsize=12, legendfontsize=12)

pIDR = display(p1) # Display with InspectDR and keep plot object
resize!(pIDR.wnd, 1200, 700) # Resize GTK window directly
include("plot.jl")
plotx(TIME, V_WIND, V_RO, V_SET_OUT, ACC, FORCE*0.001;
labels=["v_wind [m/s]", "v_reel_out [m/s]", "v_set_out [m/s]", "acc [m/s²]", "force [kN]"],
fig="test_speedcontroller2")

println("Max iterations needed: $(wcs.iter)")
if BENCHMARK println("Average time per control step: $(mean(b.times)/SAMPLES/1e9) s") end
Expand Down

0 comments on commit 46da5c2

Please sign in to comment.