diff --git a/data/fc_settings_reelout.yaml b/data/fc_settings_reelout.yaml index 5bfb24cb..f2aefc08 100644 --- a/data/fc_settings_reelout.yaml +++ b/data/fc_settings_reelout.yaml @@ -81,7 +81,9 @@ fc_settings: # guided disk margin of Cabauw 9-10 m/s 0.672/0.677 -> 0.611/0.617, worst 0.506 (Maasvlakte 3.5 m/s, # set by the arc's floor) unchanged. # 2026-10-25: wing drag back to 0, heading_d back to 0.141; lead 1.05 as before the drag. - attractor_lead_time: 1.05 # Lead as flight time, arc = t*v_app/L; 0 = off [s] + # 1.05 -> 1.19 (2026-12-01, retune_guided.jl, target 0.51): on the 2026-11-05 ROM Cabauw 10 m/s flies + # depower 0.382; worst guided disk margin 0.453 -> 0.513, no scenario lower; replays RMS d -1 to +4 %. + attractor_lead_time: 1.19 # Lead as flight time, arc = t*v_app/L; 0 = off [s] reacquire_margin: 6.0 # Global best must beat the in-window best by this [deg] up_loops: false # Up-loops instead of down-loops; down crosses the centre diff --git a/docs/fig8_tuning_log.md b/docs/fig8_tuning_log.md index 3d1c6894..5aa6408a 100644 --- a/docs/fig8_tuning_log.md +++ b/docs/fig8_tuning_log.md @@ -6517,3 +6517,129 @@ row: 3/3 steady, c1 0.1280 ± 0.0004, c2 4.15, delay 0.261 s, v_a 23.7 m/s. The flights at 0.375 give c1 0.1450 against the row's 0.1444 (+0.4 %), delay 0.217 against 0.183 s and c2 4.05 against 3.87; that row rests on one steady flight. The lookup at 0.382 now interpolates to c1 0.140. + +## 2026-11-30 — Replays of the 2026-11-29 scenarios: gravity feed-forward, arc floor, feed-forward + +Each of the 22 scenarios replayed (`replay_paths`, the optimizer not asked) with the live +settings and with one change, so every variant flies the same paths; all 67 runs passed all 10 +criteria. The baseline replays reproduce the scenarios (RMS d within 0.01°, except Cabauw 8 m/s +1.10 against 1.03°). Replay needed one fix: above `startup_wind_ramp_start` it now stops after +the first startup step, which serves the archived final startup path; the ramp's warm steps were +never stored and took the next path from the list (`KeyError: "reply"`). + +RMS d [deg], live settings against `ff_gravity_rate` 0 and against the arc floor as a fixed +8.25° (`attractor_dist_ref_length` 0); change = (live − variant)/variant, power = live/variant − 1: + +| site | v_wind | live | no gravity ff | change | power | fixed 8.25° | change | power | +|--|--:|--:|--:|--:|--:|--:|--:|--:| +| Maasvlakte | 3.5 | 0.61 | 1.04 | −41 % | −0.8 % | 0.66 | −8 % | −0.1 % | +| Maasvlakte | 4 | 0.50 | 0.78 | −36 % | −0.6 % | 0.50 | 0 | +0.2 % | +| Maasvlakte | 5 | 0.61 | 0.77 | −21 % | −0.9 % | 0.59 | +3 % | +0.1 % | +| Maasvlakte | 6 | 0.70 | 0.76 | −8 % | −1.1 % | 0.67 | +5 % | −0.3 % | +| Maasvlakte | 7 | 0.77 | 0.81 | −5 % | −1.0 % | 0.74 | +4 % | −0.2 % | +| Maasvlakte | 8 | 0.78 | 0.92 | −15 % | −2.1 % | 0.81 | −4 % | −0.2 % | +| Maasvlakte | 8.25 | 0.79 | 0.99 | −20 % | −2.2 % | 0.83 | −5 % | −0.2 % | +| Maasvlakte | 8.5 | 0.80 | 1.05 | −24 % | −1.8 % | 0.79 | +1 % | −0.3 % | +| Maasvlakte | 9 | 0.87 | 1.09 | −20 % | −1.4 % | 0.85 | +2 % | −0.2 % | +| Maasvlakte | 10 | 0.93 | 1.26 | −26 % | −1.4 % | 0.93 | 0 | −0.2 % | +| Maasvlakte | 11 | 0.96 | 1.37 | −30 % | −1.6 % | 0.95 | +1 % | −0.2 % | +| Cabauw | 3 | 0.47 | 0.68 | −31 % | +0.1 % | 0.41 | +15 % | −0.1 % | +| Cabauw | 4 | 0.54 | 0.66 | −18 % | −0.1 % | 0.49 | +10 % | −0.1 % | +| Cabauw | 5 | 0.69 | 0.75 | −8 % | −0.2 % | 0.69 | 0 | 0.0 % | +| Cabauw | 5.5 | 0.84 | 0.90 | −7 % | +0.1 % | 0.88 | −5 % | 0.0 % | +| Cabauw | 5.75 | 0.85 | 0.92 | −8 % | −0.3 % | 0.87 | −2 % | −0.1 % | +| Cabauw | 6 | 0.89 | 1.08 | −18 % | 0.0 % | 0.90 | −1 % | −0.1 % | +| Cabauw | 6.25 | 0.95 | 1.20 | −21 % | +0.1 % | 0.97 | −2 % | −0.1 % | +| Cabauw | 7 | 1.01 | 1.35 | −25 % | +0.1 % | 1.03 | −2 % | 0.0 % | +| Cabauw | 8 | 1.10 | 1.57 | −30 % | 0.0 % | 1.13 | −3 % | −0.1 % | +| Cabauw | 9 | 0.99 | 1.44 | −31 % | −0.3 % | 1.00 | −1 % | 0.0 % | +| Cabauw | 10 | 1.04 | 1.56 | −33 % | −0.4 % | 1.04 | 0 | −0.1 % | + +The gravity feed-forward lowers RMS d in all 22 runs, by 5-41 %, at −2.2 to +0.1 % power. The +arc floor ∝ 1/L no longer pays on these paths: lower RMS d in 10 runs, equal in 4, higher in 8 +(by up to 15 % at Cabauw 3 m/s), power within 0.3 %. Its guided disk margin against the fixed +angle was not re-rated. + +Cabauw 5.75 m/s without any feed-forward (`ff_gain` 0 and `ff_gravity_rate` 0): RMS d 1.46° +against 0.85°, max d 4.98° in both, lowest elevation in the settled window 15.5° against 16.3°, +power 24.2 against 24.0 kW. + +## 2026-11-30 — Stability of the 2026-11-29 scenarios: rating ends at the soft stop + +`stability_global.jl` on the 2026-11-29 scenarios rated Maasvlakte 3.5 m/s at α guided 0.364 +(376 m, depower 0.327, v_a 10.1 m/s) and Cabauw 3 m/s at 0.531 (376 m, 0.327). Since +`park_lead_wind_min` 4 m/s (2026-11-29) the parking climb starts only in phase 5 below that +wind, so the soft stop, where the reel-out decelerates and the depower ramps from the +pattern's 0.227 toward `depower_final` 0.35, was rated for the first time. From 4 m/s up parking +starts `park_lead` 6 s earlier and excludes it. `stability_opt_reelout.jl` now ends the rated +window at the soft stop too (`soft_stop_time`, from the logged `l_set` and `v_set`). Maasvlakte +3.5 m/s: 0.691 (278 m); Cabauw 3 m/s: 0.697 (356 m); every other scenario unchanged. + +Worst guided margins, Maasvlakte 0.574-0.702 and Cabauw 0.517-0.697, except Cabauw 10 m/s at +0.453 (235 m, v_a 36.0 m/s, depower 0.382, delay margin 0.266 s): marginal, below the 0.5 of +the 2026-10 tuning. It flies the 0.40 row of the turn-rate table, where the kite responds +slowest; 9 m/s (0.359) holds 0.517. + +## 2026-12-01 — Arc floor ∝ 1/L against a fixed 8.25°: still better, masked by gravity feed-forward and lobe lift + +The replays of 2026-11-30 found the 1/L floor (8.35° at 175 m) neutral against a fixed 8.25° on +the summary RMS d, and 15 % worse at Cabauw 3 m/s. Its case was made on 2026-10-03, one day +before the gravity feed-forward existed. Two causes, tested with 66 more replays of the +2026-11-29 paths (`replay_paths`), each pair differing in the arc only: + +| | 1/L floor lower | equal | higher | range | +|--|--:|--:|--:|--| +| live (gravity ff, `el_offset_wing` 0.5) | 10 | 4 | 8 | −8 to +15 % | +| `el_offset_wing` 0 | 19 | 3 | 0 | −11 to 0 % | +| `ff_gravity_rate` 0 | 22 | 0 | 0 | −28 to −3 % | + +- **Gravity feed-forward.** Without it the PD holds the gravity turn off with a course error, + which the guidance turns into a sag of about `D·u_g/K` below the path, proportional to the arc + `D`. The shorter arc of the 1/L floor at long tethers halves that sag, which is the October + result again (−3 to −28 %). With the feed-forward cancelling gravity, little sag is left to + remove. Without feed-forward, the fixed arc at Maasvlakte 4 m/s fails the 6.5° minimum + elevation; the 1/L floor passes. +- **Lobe lift.** The summary scores d against the optimizer's unlifted path, but the guidance + steers for the path lifted by `el_offset_wing` at the lobes. The tighter arc delivers more of + the lift, and the summary counts it as error. Binned by tether length, the guidance's own d + (`var_01`) to the lifted path is lower with the 1/L floor in almost every 25 m bin, also at + Cabauw 3 m/s (0.24 against 0.32° at 300 m). Without lift the 1/L floor is never worse. + +Guided disk margin (`retune_guided.jl`, `scenario_margins`) of the fixed 8.25° on the same +operating points: identical in 15 of 22 scenarios, whose worst bin is at 235 m or below, where +the two floors are within 0.1° or the lead time sets the arc. Higher with the fixed arc at low +wind (Cabauw 3 m/s 0.775 against 0.697, Maasvlakte 3.5 0.756 against 0.691, 4 0.745 against +0.695), lower at Maasvlakte 5 and 6 m/s (0.655/0.648 against 0.702/0.670, at 155-165 m where 8.25° +is the shorter arc). The worst of 22 is Cabauw 10 m/s at 0.453 with either. + +Kept: the 1/L floor. It tracks the commanded path at least as well in every case, and its +margin cost is confined to the weak winds, which stay above 0.69. + +## 2026-12-01 — `attractor_lead_time` 1.05 -> 1.19 s: Cabauw 10 m/s robust again + +On the 2026-11-29 scenarios the worst guided disk margin was Cabauw 10 m/s, 0.453 at 235 m, +v_a 36 m/s, depower 0.382: the high depower the 2026-11-05 ROM flies there, where the kite +responds slowest. `retune(data; target = 0.51)` (`retune_guided.jl`, the 22 scenarios' +operating points, moves of `heading_p`, `heading_d`, `attractor_dist`, `attractor_lead_time`) +took seven steps, all on the lead time: 1.05 -> 1.19 s, worst α guided 0.453 -> 0.513. The same +lever and nearly the same value as on 2026-10-05 (1.21 s), when the wing drag had the kite fly +this depower. + +Per scenario, α guided rises by 0.03-0.06 wherever the lead time sets the arc and is unchanged +where the 1/L floor does (Cabauw 3 m/s, Maasvlakte 3.5-5 m/s); none falls. Lowest now: Cabauw 10 +m/s 0.513, Cabauw 9 m/s 0.576. + +Replays of the 22 paths (`replay_paths`) with 1.19 s against 1.05 s: all 10 criteria passed in +all 22. RMS d −1 to +4 % (+4 % at Cabauw 8 and 10 m/s, 0 to +1 % at Maasvlakte), power 0 to ++0.3 %, max d 4.93-4.99° unchanged, lowest elevation of the whole run within 0.2° except +Maasvlakte 9 m/s (10.5 -> 11.9°). + +### Re-flown live, 2026-12-01 + +All 22 scenarios re-flown with `build_all_scenarios.jl` (live optimizer, in-flight +re-optimization) with `attractor_lead_time` 1.19 s: all 10 criteria passed in all 22, no startup +retry. Against the 2026-11-29 runs: power −1.1 to +3.0 % (within 0.1 % at Maasvlakte 3.5-6 and Cabauw 3-5 m/s, where the +paths are the same), power ratio 0.88-1.06, RMS d unchanged below 5.5 m/s, at most +0.08° +elsewhere except Cabauw 10 m/s (1.03 -> 1.17°; +4 % in the replay, the rest is the re-optimized +paths). Guided disk margin (`stability_global.jl`) on the new runs: Maasvlakte 0.631-0.743, +Cabauw 0.539-0.731, all robust; worst Cabauw 10 m/s 0.539 at 225 m. diff --git a/docs/src/api/internals.md b/docs/src/api/internals.md index cca9e7f3..9a3d4a59 100644 --- a/docs/src/api/internals.md +++ b/docs/src/api/internals.md @@ -18,6 +18,9 @@ RobustKiteControllers.TO_PARTS RobustKiteControllers.TO_FIELD_PART RobustKiteControllers.MOVED_FC_KEYS RobustKiteControllers.attractor_floor +RobustKiteControllers.park_should_start +RobustKiteControllers.park_start_time +RobustKiteControllers.soft_stop_time RobustKiteControllers.gate_candidate RobustKiteControllers.wants_challenge RobustKiteControllers.set_yaml_fields! diff --git a/docs/src/control_algorithm.md b/docs/src/control_algorithm.md index 0e352332..595ca4eb 100644 --- a/docs/src/control_algorithm.md +++ b/docs/src/control_algorithm.md @@ -83,7 +83,7 @@ approach mode and no controller switching. **The lead.** `attractor_distance` buys phase lead against the steering dead time, but too much lead cuts the corners of the pattern. In the reel-out runs it is not a fixed number: `attractor_distance(fcs, v_app, L)` ([`src/fc_settings.jl`](https://github.com/OpenSourceAWE/RobustKiteControllers.jl/blob/main/src/fc_settings.jl)) sets it each -step to the arc flown in `attractor_lead_time` (1.05 s), `rad2deg(t·v_app/L)`. The arc is +step to the arc flown in `attractor_lead_time` (1.19 s), `rad2deg(t·v_app/L)`. The arc is clamped to `[floor, 2·floor]`. The floor ([`attractor_floor`](@ref RobustKiteControllers.attractor_floor)) is `attractor_dist` scaled by `attractor_dist_ref_length/L`, a fixed arc *length* of 25.3 m (8.35° at 175 m), so the guidance rate it sets no longer drops as the tether grows. With `attractor_lead_time = 0` the diff --git a/examples/stability_opt_reelout.jl b/examples/stability_opt_reelout.jl index 2e649951..d4d57cef 100644 --- a/examples/stability_opt_reelout.jl +++ b/examples/stability_opt_reelout.jl @@ -63,13 +63,14 @@ gravity pole) are read from the last log of `simple_opt_reelout.jl` for the selected project, `output/_opt.arrow` (or the folder given as the input `log_dir`, e.g. an archive): phases 3-5 while the kite is within `attractor_dist` of the path (where `atan(d/D) ≈ d/D` holds; the approach from far off is not linear), up to the start of -the parking climb (`park_start_time`), which flies a fixed course without the guidance, -binned on tether length. Each bin is checked at its lowest, median and highest +the parking climb (`park_start_time`), which flies a fixed course without the guidance, or of +the soft stop (`soft_stop_time`), where the reel-out decelerates and the depower ramps to +`depower_final`, whichever comes first, binned on tether length. Each bin is checked at its lowest, median and highest `v_a`, each with the highest `ω_g` its samples within `WG_VA_BAND` of that `v_a` fly (`ω_g ∝ v_k`, so the bin's highest `ω_g` is flown at its highest `v_a`, not its lowest), and at its lowest and highest depower, both signs of -the gravity pole, and the worst case is reported. A bin the log does not cover is an error: the whole range must be -flown before it can be checked. +the gravity pole, and the worst case is reported. A bin the log does not cover below the length +at the window's end is an error; the bins above it are reported, not rated. The turn-rate table and the course-loop model must both have been identified on the kite the project flies ([`check_model_provenance`](@ref)); otherwise the script stops before rating. @@ -181,9 +182,9 @@ if isfile(summary_file) end sl = load_log(log_name; path = output_path).syslog # On the path only: the guidance is linear for a cross-track error below the attractor's arc distance. -# Not while parking: the climb flies a fixed course of 0 without the guidance, so L_g does not apply; -# it starts `park_lead` seconds before the reel-out ends, still in phase 4. -t_park = something(RobustKiteControllers.park_start_time(fcs, sl; v_wind = SET.v_wind), Inf) +# Not while parking or in the soft stop, where depower ramps to depower_final; whichever starts first. +t_park = min(something(RobustKiteControllers.park_start_time(fcs, sl; v_wind = SET.v_wind), Inf), + something(RobustKiteControllers.soft_stop_time(fcs, sl), Inf)) in_pattern = findall(i -> 3 <= sl.sys_state[i] <= 5 && sl.var_01[i] <= fcs.pattern.attractor_dist && sl.time[i] < t_park, eachindex(sl.sys_state)) isempty(in_pattern) && error("$log_name.arrow never reached the path in phases 3-5.") @@ -371,12 +372,20 @@ println(@sprintf("Phases 3-5 over tether length, %.0f – %.0f m in %d bins; wor v_a (min, median, max) and depower (min, max), each v_a at the highest ω_g flown near it:", l_lo, l_hi, length(edges) - 1)) println(" L [m] n v_a [m/s] depower D [°] ω_g [1/s] bin lag K ", "α inner α guided DM guided α meas. kite") +# Tether length where the rated window ends; the bins above it fly no pattern to rate. +i_stop = findfirst(i -> sl.time[i] >= t_park, eachindex(sl.time)) +l_stop = isnothing(i_stop) ? Inf : Float64(sl.l_tether[i_stop][1]) rows = NamedTuple[] uncovered = Tuple{Float64, Float64}[] +after_stop = Tuple{Float64, Float64}[] for b in 1:length(edges) - 1 local lo, hi = edges[b], edges[b + 1] local idx = findall(l -> lo <= l < hi || (b == length(edges) - 1 && l == hi), log_L) - if isempty(idx) + if isempty(idx) && lo >= l_stop + push!(after_stop, (lo, hi)) + println(@sprintf(" %5.0f-%-5.0f 0 after the soft stop or parking climb", lo, hi)) + continue + elseif isempty(idx) push!(uncovered, (lo, hi)) println(@sprintf(" %5.0f-%-5.0f 0 not flown in the log", lo, hi)) continue @@ -433,8 +442,11 @@ rate_disk_margin("Inner loop", [r.α_inner for r in lin_rows]) α_min = rate_disk_margin("Loop with guidance", [r.α_guided for r in lin_rows]) isnothing(kite_corr_table) || rate_disk_margin("Loop with guidance, measured kite correction", [r.α_measured for r in lin_rows]) -if isempty(uncovered) +if isempty(uncovered) && isempty(after_stop) @info @sprintf("Tether length: the log covers the full range %.0f – %.0f m.", l_lo, l_hi) +elseif isempty(uncovered) + @info @sprintf("Tether length: the log covers %.0f – %.0f m; %d bin(s) above %.0f m are after the soft \ + stop or parking climb, not rated.", l_lo, l_stop, length(after_stop), l_stop) else @error "Tether length: not checked in $(length(uncovered)) of $(length(edges) - 1) bins, \ $(join((@sprintf("%.0f-%.0f m", u...) for u in uncovered), ", ")); the log does not \ diff --git a/notebooks/overview_cabauw.md b/notebooks/overview_cabauw.md index 68339969..fba35b1f 100644 --- a/notebooks/overview_cabauw.md +++ b/notebooks/overview_cabauw.md @@ -1,13 +1,13 @@ | date | time | v_wind | power_ratio | total_time | rt_factor | opt_requests | opts_installed | av_power | min_power | max_power | min_force | av_force | max_force | v_ro_min | v_ro_av | v_ro_max | av_depower | rms_error | success_criteria | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| 2026-11-29 | 14:00:42 | 3.0 | 1.02 | 71.9 | 6.49 | 3 | 3 | 4612 | 3183 | 7199 | 1698 | 2350 | 3225 | 1.42 | 1.95 | 2.27 | 0.227 | 0.47 | all 10 passed | -| 2026-11-29 | 14:01:17 | 4.0 | 1.06 | 26.6 | 6.58 | 3 | 3 | 11673 | 8864 | 15687 | 3550 | 4357 | 5357 | 2.08 | 2.67 | 2.97 | 0.226 | 0.54 | all 10 passed | -| 2026-11-29 | 14:02:43 | 5.0 | 1.05 | 78.3 | 6.65 | 3 | 3 | 23032 | 17309 | 26994 | 5792 | 6737 | 7715 | 2.97 | 3.41 | 3.5 | 0.226 | 0.69 | all 10 passed | -| 2026-11-29 | 14:05:57 | 5.5 | 1.05 | 186.6 | 6.48 | 3 | 3 | 24840 | 21491 | 27440 | 6241 | 7124 | 7843 | 3.34 | 3.49 | 3.5 | 0.244 | 0.84 | all 10 passed | -| 2026-11-29 | 14:07:27 | 5.75 | 1.03 | 82.1 | 6.3 | 3 | 3 | 23995 | 19327 | 26431 | 6098 | 6917 | 7553 | 3.14 | 3.47 | 3.5 | 0.257 | 0.85 | all 10 passed | -| 2026-11-29 | 14:10:21 | 6.0 | 1.01 | 166.9 | 6.09 | 4 | 4 | 24061 | 20951 | 26582 | 6230 | 6918 | 7596 | 3.27 | 3.48 | 3.5 | 0.267 | 0.89 | all 10 passed | -| 2026-11-29 | 14:12:34 | 6.25 | 1.0 | 125.1 | 6.13 | 4 | 4 | 23825 | 20341 | 26197 | 6208 | 6861 | 7487 | 3.22 | 3.47 | 3.5 | 0.276 | 0.95 | all 10 passed | -| 2026-11-29 | 14:13:04 | 7.0 | 0.96 | 22.8 | 6.24 | 4 | 4 | 22283 | 18749 | 24747 | 5835 | 6536 | 7097 | 3.08 | 3.41 | 3.5 | 0.302 | 1.01 | all 10 passed | -| 2026-11-29 | 14:17:42 | 8.0 | 0.94 | 269.9 | 5.95 | 4 | 3 | 21308 | 18014 | 23803 | 5524 | 6355 | 6874 | 3.03 | 3.35 | 3.47 | 0.33 | 1.03 | all 10 passed | -| 2026-11-29 | 14:19:43 | 9.0 | 0.88 | 113.1 | 5.77 | 3 | 3 | 20043 | 16497 | 21964 | 5344 | 6126 | 6563 | 2.91 | 3.27 | 3.46 | 0.358 | 0.99 | all 10 passed | -| 2026-11-29 | 16:04:27 | 10.0 | 0.87 | 178.1 | 3.05 | 3 | 3 | 19262 | 14340 | 21612 | 4936 | 5986 | 6598 | 2.7 | 3.21 | 3.38 | 0.381 | 1.03 | all 10 passed | +| 2026-12-01 | 05:45:56 | 3.0 | 1.02 | 86.2 | 4.96 | 3 | 3 | 4612 | 3184 | 7200 | 1698 | 2350 | 3226 | 1.42 | 1.95 | 2.27 | 0.227 | 0.47 | all 10 passed | +| 2026-12-01 | 05:47:48 | 4.0 | 1.06 | 102.2 | 5.01 | 3 | 3 | 11673 | 8867 | 15707 | 3549 | 4357 | 5364 | 2.08 | 2.67 | 2.97 | 0.226 | 0.54 | all 10 passed | +| 2026-12-01 | 05:49:28 | 5.0 | 1.05 | 90.8 | 5.39 | 3 | 3 | 23037 | 17281 | 26767 | 5780 | 6737 | 7649 | 2.99 | 3.41 | 3.5 | 0.226 | 0.69 | all 10 passed | +| 2026-12-01 | 05:54:57 | 5.5 | 1.05 | 318.7 | 4.99 | 3 | 3 | 25061 | 21128 | 27928 | 6229 | 7185 | 7982 | 3.36 | 3.49 | 3.5 | 0.244 | 0.89 | all 10 passed | +| 2026-12-01 | 05:58:53 | 5.75 | 1.03 | 226.9 | 4.83 | 3 | 3 | 24722 | 21589 | 27172 | 6412 | 7086 | 7765 | 3.32 | 3.49 | 3.5 | 0.256 | 0.88 | all 10 passed | +| 2026-12-01 | 06:04:00 | 6.0 | 1.02 | 298.1 | 4.77 | 4 | 4 | 24269 | 20891 | 26524 | 6326 | 6965 | 7580 | 3.27 | 3.48 | 3.5 | 0.267 | 0.92 | all 10 passed | +| 2026-12-01 | 06:06:54 | 6.25 | 1.0 | 164.3 | 4.7 | 4 | 4 | 23718 | 20648 | 25971 | 6162 | 6833 | 7422 | 3.24 | 3.47 | 3.5 | 0.277 | 0.95 | all 10 passed | +| 2026-12-01 | 06:09:24 | 7.0 | 0.96 | 140.2 | 4.74 | 4 | 4 | 22298 | 18551 | 24716 | 5843 | 6538 | 7085 | 3.06 | 3.41 | 3.5 | 0.302 | 1.02 | all 10 passed | +| 2026-12-01 | 06:11:57 | 8.0 | 0.92 | 143.6 | 4.47 | 4 | 4 | 21068 | 18238 | 23158 | 5604 | 6306 | 6741 | 3.05 | 3.34 | 3.45 | 0.331 | 1.11 | all 10 passed | +| 2026-12-01 | 06:15:19 | 9.0 | 0.89 | 193.3 | 4.56 | 3 | 3 | 20105 | 16825 | 21550 | 5538 | 6134 | 6523 | 2.94 | 3.28 | 3.43 | 0.359 | 1.01 | all 10 passed | +| 2026-12-01 | 06:17:56 | 10.0 | 0.88 | 147.2 | 4.49 | 3 | 3 | 19821 | 17087 | 21539 | 5458 | 6083 | 6563 | 2.96 | 3.26 | 3.42 | 0.381 | 1.17 | all 10 passed | diff --git a/notebooks/overview_maasvlakte.md b/notebooks/overview_maasvlakte.md index be0a4cf1..f5ad57ba 100644 --- a/notebooks/overview_maasvlakte.md +++ b/notebooks/overview_maasvlakte.md @@ -1,13 +1,13 @@ | date | time | v_wind | power_ratio | total_time | rt_factor | opt_requests | opts_installed | av_power | min_power | max_power | min_force | av_force | max_force | v_ro_min | v_ro_av | v_ro_max | av_depower | rms_error | success_criteria | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| 2026-11-29 | 13:45:27 | 3.5 | 0.96 | 108.5 | 5.48 | 3 | 3 | 2016 | 1239 | 3548 | 992 | 1342 | 2050 | 1.02 | 1.48 | 1.78 | 0.227 | 0.61 | all 10 passed | -| 2026-11-29 | 13:46:17 | 4.0 | 1.02 | 33.5 | 6.64 | 3 | 3 | 3343 | 2487 | 4926 | 1532 | 1876 | 2530 | 1.61 | 1.77 | 1.99 | 0.226 | 0.5 | all 10 passed | -| 2026-11-29 | 13:46:58 | 5.0 | 1.06 | 33.1 | 5.95 | 4 | 4 | 6868 | 4960 | 8584 | 2211 | 3058 | 4078 | 1.87 | 2.24 | 2.42 | 0.226 | 0.61 | all 10 passed | -| 2026-11-29 | 13:47:35 | 6.0 | 1.05 | 28.8 | 5.91 | 4 | 4 | 12225 | 9582 | 14496 | 3729 | 4489 | 5240 | 2.23 | 2.72 | 2.97 | 0.226 | 0.7 | all 10 passed | -| 2026-11-29 | 13:48:07 | 7.0 | 1.03 | 24.5 | 6.26 | 4 | 4 | 19482 | 15245 | 22761 | 5020 | 6009 | 6814 | 2.84 | 3.24 | 3.48 | 0.226 | 0.77 | all 10 passed | -| 2026-11-29 | 13:48:39 | 8.0 | 1.01 | 23.6 | 6.34 | 3 | 3 | 24360 | 19813 | 27357 | 5760 | 7010 | 7820 | 3.26 | 3.47 | 3.51 | 0.236 | 0.78 | all 10 passed | -| 2026-11-29 | 13:49:10 | 8.25 | 1.0 | 23.6 | 6.33 | 3 | 3 | 23957 | 19478 | 27050 | 5698 | 6909 | 7732 | 3.23 | 3.47 | 3.53 | 0.244 | 0.79 | all 10 passed | -| 2026-11-29 | 13:52:21 | 8.5 | 1.0 | 183.5 | 3.65 | 3 | 3 | 23869 | 18927 | 27476 | 5550 | 6891 | 7858 | 3.17 | 3.46 | 3.51 | 0.254 | 0.8 | all 10 passed | -| 2026-11-29 | 13:54:43 | 9.0 | 0.97 | 134.8 | 5.78 | 4 | 4 | 23302 | 17964 | 26836 | 5348 | 6764 | 7683 | 3.09 | 3.44 | 3.51 | 0.271 | 0.87 | all 10 passed | -| 2026-11-29 | 13:56:59 | 10.0 | 0.94 | 128.5 | 5.52 | 4 | 4 | 21970 | 16437 | 25763 | 5052 | 6488 | 7422 | 2.94 | 3.38 | 3.51 | 0.296 | 0.94 | all 10 passed | -| 2026-11-29 | 13:59:19 | 11.0 | 0.91 | 131.8 | 5.53 | 4 | 4 | 20894 | 15402 | 24879 | 4830 | 6279 | 7228 | 2.83 | 3.32 | 3.51 | 0.317 | 0.95 | all 10 passed | +| 2026-12-01 | 05:11:45 | 3.5 | 0.96 | 99.6 | 4.64 | 3 | 3 | 2017 | 1254 | 3547 | 992 | 1342 | 2051 | 1.03 | 1.48 | 1.78 | 0.227 | 0.61 | all 10 passed | +| 2026-12-01 | 05:13:23 | 4.0 | 1.02 | 82.8 | 5.21 | 3 | 3 | 3342 | 2487 | 4925 | 1532 | 1875 | 2529 | 1.61 | 1.77 | 1.99 | 0.226 | 0.5 | all 10 passed | +| 2026-12-01 | 05:15:07 | 5.0 | 1.06 | 93.6 | 4.79 | 4 | 4 | 6872 | 4936 | 8604 | 2207 | 3059 | 4081 | 1.87 | 2.24 | 2.42 | 0.226 | 0.61 | all 10 passed | +| 2026-12-01 | 05:17:12 | 6.0 | 1.05 | 114.8 | 4.61 | 4 | 4 | 12224 | 9584 | 14558 | 3726 | 4489 | 5239 | 2.23 | 2.72 | 2.97 | 0.226 | 0.7 | all 10 passed | +| 2026-12-01 | 05:18:51 | 7.0 | 1.03 | 90.0 | 4.69 | 4 | 4 | 19340 | 15756 | 22718 | 5139 | 5986 | 6808 | 2.89 | 3.23 | 3.45 | 0.226 | 0.77 | all 10 passed | +| 2026-12-01 | 05:21:51 | 8.0 | 1.01 | 170.8 | 4.33 | 3 | 3 | 24553 | 20162 | 27775 | 5802 | 7057 | 7940 | 3.27 | 3.48 | 3.52 | 0.237 | 0.73 | all 10 passed | +| 2026-12-01 | 05:25:50 | 8.25 | 1.0 | 228.7 | 2.42 | 3 | 3 | 24339 | 19531 | 27950 | 5703 | 7005 | 7992 | 3.23 | 3.47 | 3.51 | 0.248 | 0.78 | all 10 passed | +| 2026-12-01 | 05:32:17 | 8.5 | 0.99 | 377.9 | 0.82 | 3 | 3 | 23852 | 18857 | 27508 | 5533 | 6889 | 7867 | 3.17 | 3.46 | 3.51 | 0.255 | 0.77 | all 10 passed | +| 2026-12-01 | 05:38:05 | 9.0 | 0.97 | 337.7 | 4.08 | 4 | 3 | 23294 | 18077 | 26873 | 5350 | 6761 | 7693 | 3.1 | 3.44 | 3.51 | 0.271 | 0.83 | all 10 passed | +| 2026-12-01 | 05:40:57 | 10.0 | 0.94 | 162.0 | 4.07 | 4 | 4 | 22011 | 16567 | 25768 | 5067 | 6496 | 7423 | 2.95 | 3.38 | 3.5 | 0.296 | 0.94 | all 10 passed | +| 2026-12-01 | 05:44:13 | 11.0 | 0.91 | 185.1 | 4.11 | 4 | 4 | 20960 | 15551 | 24903 | 4860 | 6293 | 7239 | 2.85 | 3.32 | 3.51 | 0.317 | 0.96 | all 10 passed | diff --git a/src/loop_decisions.jl b/src/loop_decisions.jl index dcd06ed2..15f402b2 100644 --- a/src/loop_decisions.jl +++ b/src/loop_decisions.jl @@ -151,6 +151,26 @@ function park_start_time(fcs, sl; v_wind) return isnothing(i) ? nothing : Float64(sl.time[i]) end +""" + soft_stop_time(fcs, sl) -> Union{Float64, Nothing} + +The time [s] the soft stop of log `sl` latched: the first sample in phases 3-4 at which the +logged length setpoint `var_10` leaves at most `fcs.reelout.reelout_softstop` seconds of +reel-out at the logged speed setpoint `var_11`, the same test the loop latches on. From +there the reel-out decelerates and the depower ramps toward `depower_final`. `nothing` +when the run never latched, or `reelout_softstop` is off. A stop on the lap count +(`n_fig_eight`) is not detected. +""" +function soft_stop_time(fcs, sl) + fcs.reelout.reelout_softstop > 0 || return nothing + i = findfirst(eachindex(sl.time)) do i + v_set = Float64(sl.var_11[i]) + 3 <= sl.sys_state[i] <= 4 && v_set > 0 && + fcs.reelout.reelout_l_max - Float64(sl.var_10[i]) <= v_set * fcs.reelout.reelout_softstop + end + return isnothing(i) ? nothing : Float64(sl.time[i]) +end + """ lap_index_step(last_idx, idx_prev, n_path) -> Int diff --git a/src/startup_path.jl b/src/startup_path.jl index 22b068bb..97b51b68 100644 --- a/src/startup_path.jl +++ b/src/startup_path.jl @@ -45,7 +45,8 @@ wind and steps it up warm by `startup_wind_ramp_step` to the run's: in strong wi kite has to depower far and fly a large figure, an optimum a cold solve from the guess does not reach, while each warm step only moves the previous one a little (measured 2026-11-07 on the 2026-11-05 LEI-V3 ROM: Cabauw 10 m/s failed from every seed cold and -solved through 7, 8, 9, 10 m/s). Only the reply at the run's wind is flown. +solved through 7, 8, 9, 10 m/s). Only the reply at the run's wind is flown. A replay +(`replay_paths`) stops after the first step: it serves the archived run's final startup path. """ function startup_solve(setup, params) tos = setup.tos @@ -58,6 +59,8 @@ function startup_solve(setup, params) inflow_conditions = with_wind(inflow, w0), input_depower = depower_seed(tos, w0)) result, seed_trajectory = startup_solve_at(setup, params0) + # A replay already served the archived run's final startup path; its ramp steps were never stored. + isnothing(setup.opt_chain.replay) || return result, seed_trajectory w = w0 while w < w_target - 1e-9 w = min(w + tos.guess.startup_wind_ramp_step, w_target) diff --git a/test/test_loop_decisions.jl b/test/test_loop_decisions.jl index 95a6c1f9..48a50d63 100644 --- a/test/test_loop_decisions.jl +++ b/test/test_loop_decisions.jl @@ -9,7 +9,7 @@ using Test using RobustKiteControllers import RobustKiteControllers: loop_gain_scale, feedforward_step, blended_depower, stop_depower, final_force_extra, lift_should_start, lap_index_step, reelout_release, reelout_command, - soft_stop_speed, park_should_start + soft_stop_speed, park_should_start, soft_stop_time @testset verbose = true "loop_decisions" begin fcs = FC_Settings(; depower_final = 0.35, depower_final_max = 0.42, depower_final_f_gain = 1e-5, @@ -119,5 +119,15 @@ import RobustKiteControllers: loop_gain_scale, feedforward_step, blended_depower @test !park_should_start(f, 4, 1.5, 360.0; v_wind = 5.0) @test !park_should_start(FC_Settings(f; park_final = false), 5, 0.0, 380.0; v_wind = 5.0) end + + @testset "soft_stop_time" begin + f = FC_Settings(fcs; reelout_softstop = 1.5) + # Length setpoint and speed setpoint per sample; at 2 m/s the stop latches with 3 m left. + sl = (; time = [1.0, 2.0, 3.0, 4.0, 5.0], sys_state = [3, 4, 4, 4, 5], + var_10 = [300.0, 370.0, 376.0, 377.5, 380.0], var_11 = [2.0, 2.0, 2.0, 2.0, 0.0]) + @test soft_stop_time(f, sl) == 4.0 + @test soft_stop_time(FC_Settings(f; reelout_softstop = 0.0), sl) === nothing + @test soft_stop_time(f, merge(sl, (; var_10 = fill(300.0, 5)))) === nothing + end end nothing