Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helicopter main rotor rpm control #24096

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Helicopter main rotor rpm control #24096

wants to merge 11 commits into from

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Dec 11, 2024

Solved Problem

PX4 currently has no support to control the main rotor's RPM on the autopilot. This should in my eyes be avoided and an ESC with RPM control used if possible but in the following cases that's not so easily possible:

  • Cheap RC helicopters where the ESC cannot do this and just has a plug for rpm feedback pulses and a duty cycle signal input.
  • More complex helicopters where you have two motors with a freewheel for redundancy. There each motor needs an ESC and even if they do rpm control you somehow need to make sure the load is shared equally in the normal use case. Then it can make sense to do the rpm control on the autopilot directly and control both ESCs with a command producing roughly the same load.
  • If a separate e.g. more accurate rpm sensor is used which cannot be hooked up as telemetry for the ESC. Note this is also the case if you have any freewheel between motor and rotor.

Solution

Following up on #23931 and #24041 we now have the pieces to do a clean helicopter rpm controller for the main rotor.

Changelog Entry

Feature: Helicopter main rotor rpm control

Test coverage

We successfully used the version in the first commit on a real helicopter before it was ported and changed again to clean up and improve for this pull request. We'll follow up with more improvements and new bench tests.

Context

To be added from bench test results.

@MaEtUgR MaEtUgR force-pushed the helicopter-rpm-control branch 2 times, most recently from ed0129a to 317bc0b Compare December 16, 2024 17:39
Copy link

github-actions bot commented Dec 16, 2024

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 1864 byte (0.09 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.1% +1.82Ki  +0.1% +1.82Ki    .text
  [NEW]    +640  [NEW]    +640    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
   +17%    +360   +17%    +360    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW]    +252  [NEW]    +252    ../../src/lib/pid/PID.cpp
  +0.1%    +226  +0.1%    +226    [section .text]
  +0.1%    +211  +0.1%    +211    ROMFS/nsh_romfsimg.c
  +0.4%    +112  +0.4%    +112    ../../src/lib/parameters/parameters.cpp
  +0.3%     +64  +0.3%     +64    ../../src/modules/commander/Commander.cpp
   +60%     +12   +60%     +12    msg/topics_sources/rover_mecanum_status.cpp
  +0.1%      +4  +0.1%      +4    ../../src/modules/ekf2/EKF/yaw_estimator/EKFGSF_yaw.cpp
  +0.2%      +3  +0.2%      +3    ../../src/systemcmds/ver/ver.cpp
 -12.5%      -4 -12.5%      -4    msg/topics_sources/rpm.cpp
  -0.1%      -8  -0.1%      -8    ../../src/modules/control_allocator/ControlAllocator.cpp
 -28.6%      -8 -28.6%      -8    msg/topics_sources/rc_parameter_map.cpp
+0.2% +3.84Ki  [ = ]       0    .debug_abbrev
  [NEW] +1.15Ki  [ = ]       0    ../../src/lib/pid/PID.cpp
   +11%     +56  [ = ]       0    ../../src/lib/version/version.c
  +4.9%    +144  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW] +2.50Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
+0.1%    +200  [ = ]       0    .debug_aranges
  [NEW]     +56  [ = ]       0    ../../src/lib/pid/PID.cpp
  -5.0%      -8  [ = ]       0    ../../src/lib/version/version.c
  +0.9%      +8  [ = ]       0    ../../src/modules/commander/Commander.cpp
   +11%     +24  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW]    +120  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
+0.1%    +560  [ = ]       0    .debug_frame
+0.2% +54.3Ki  [ = ]       0    .debug_info
  +0.1%     +24  [ = ]       0    ../../src/drivers/batt_smbus/batt_smbus.cpp
  +0.1%     +24  [ = ]       0    ../../src/drivers/cdcacm_autostart/cdcacm_autostart.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/distance_sensor/lightware_laser_i2c/lightware_laser_i2c.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/dshot/DShot.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/heater/heater.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/lights/rgbled/rgbled.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/lights/rgbled_is31fl3195/rgbled_is31fl3195.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/lights/rgbled_lp5562/rgbled_lp5562.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/lights/rgbled_ncp5623c/rgbled_ncp5623c.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/osd/msp_osd/msp_osd.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/power_monitor/ina226/ina226.cpp
  +0.1%     +24  [ = ]       0    ../../src/drivers/power_monitor/ina226/ina226_main.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/power_monitor/ina228/ina228.cpp
  +0.1%     +24  [ = ]       0    ../../src/drivers/power_monitor/ina228/ina228_main.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/power_monitor/ina238/ina238.cpp
  +0.1%     +24  [ = ]       0    ../../src/drivers/power_monitor/ina238/ina238_main.cpp
  +0.1%     +24  [ = ]       0    ../../src/drivers/power_monitor/pm_selector_auterion/PowerMonitorSelectorAuterion.cpp
  +0.1%     +24  [ = ]       0    ../../src/drivers/pwm_out/PWMOut.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/px4io/px4io.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/rc/crsf_rc/CrsfRc.cpp
 -99.6% +53.9Ki  [ = ]       0    [173 Others]
+0.1% +5.81Ki  [ = ]       0    .debug_line
  +0.3%     +66  [ = ]       0    ../../src/lib/parameters/parameters.cpp
  [NEW] +1.19Ki  [ = ]       0    ../../src/lib/pid/PID.cpp
  -1.3%     -25  [ = ]       0    ../../src/lib/version/version.c
  +0.3%     +87  [ = ]       0    ../../src/modules/commander/Commander.cpp
   +16%    +905  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW] +3.61Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
  +0.1%     +13  [ = ]       0    ../../src/modules/control_allocator/ControlAllocator.cpp
  -0.5%      -6  [ = ]       0    task/task_cancelpt.c
+0.1% +6.97Ki  [ = ]       0    .debug_loc
  -0.1%     -15  [ = ]       0    ../../src/drivers/px4io/px4io.cpp
  +0.2%     +15  [ = ]       0    ../../src/drivers/rc/crsf_rc/CrsfRc.cpp
  +0.0%     +13  [ = ]       0    ../../src/drivers/uavcan/uavcan_main.cpp
  -0.0%     -10  [ = ]       0    ../../src/drivers/uavcan/uavcan_servers.cpp
  +0.1%     +15  [ = ]       0    ../../src/lib/battery/battery.cpp
  -0.1%     -15  [ = ]       0    ../../src/lib/collision_prevention/CollisionPrevention.cpp
  +0.1%     +16  [ = ]       0    ../../src/lib/mixer_module/mixer_module.cpp
  -0.2%     -52  [ = ]       0    ../../src/lib/parameters/parameters.cpp
  [NEW]    +516  [ = ]       0    ../../src/lib/pid/PID.cpp
  -0.2%     -15  [ = ]       0    ../../src/lib/rtl/rtl_time_estimator.cpp
  -0.1%     -15  [ = ]       0    ../../src/modules/airspeed_selector/airspeed_selector_main.cpp
  +0.2%     +15  [ = ]       0    ../../src/modules/camera_feedback/CameraFeedback.cpp
  +0.9%    +387  [ = ]       0    ../../src/modules/commander/Commander.cpp
  +0.4%     +15  [ = ]       0    ../../src/modules/commander/HealthAndArmingChecks/checks/accelerometerCheck.cpp
  +0.6%     +15  [ = ]       0    ../../src/modules/commander/HealthAndArmingChecks/checks/baroCheck.cpp
  +0.3%     +15  [ = ]       0    ../../src/modules/commander/HealthAndArmingChecks/checks/batteryCheck.cpp
  +0.1%     +15  [ = ]       0    ../../src/modules/commander/HealthAndArmingChecks/checks/estimatorCheck.cpp
  +0.4%     +15  [ = ]       0    ../../src/modules/commander/HealthAndArmingChecks/checks/gyroCheck.cpp
  +0.2%     +15  [ = ]       0    ../../src/modules/commander/HealthAndArmingChecks/checks/magnetometerCheck.cpp
  +0.3%     +15  [ = ]       0    ../../src/modules/commander/ModeManagement.cpp
 -99.7% +6.04Ki  [ = ]       0    [21 Others]
+0.2% +2.52Ki  [ = ]       0    .debug_ranges
  +0.4%     +56  [ = ]       0    ../../src/lib/parameters/parameters.cpp
  [NEW]     +64  [ = ]       0    ../../src/lib/pid/PID.cpp
  -2.6%      -8  [ = ]       0    ../../src/lib/version/version.c
  +0.2%     +24  [ = ]       0    ../../src/modules/commander/Commander.cpp
   +39%    +784  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW] +1.42Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
  -0.1%      -8  [ = ]       0    ../../src/modules/control_allocator/ControlAllocator.cpp
  +0.4%    +208  [ = ]       0    [section .debug_ranges]
  +1.5%      +1  [ = ]       0    task/task_cancelpt.c
+0.1% +3.94Ki  [ = ]       0    .debug_str
  +0.2%     +99  [ = ]       0    
  -3.1%      -5  [ = ]       0    ../../platforms/nuttx/src/px4/common/print_load.cpp
  +0.1%     +43  [ = ]       0    ../../src/drivers/batt_smbus/batt_smbus.cpp
  [NEW]     +45  [ = ]       0    ../../src/lib/pid/PID.cpp
  +0.0%     +24  [ = ]       0    ../../src/modules/commander/Commander.cpp
   +63%    +980  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW]    +276  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
  +8.0% +2.52Ki  [ = ]       0    ../../src/modules/control_allocator/ControlAllocator.cpp
  +0.0%     +33  [ = ]       0    ../../src/modules/flight_mode_manager/FlightModeManager.cpp
  -0.2%     -24  [ = ]       0    ../../src/modules/mc_att_control/mc_att_control_main.cpp
  -0.2%      -9  [ = ]       0    ../../src/modules/sensors/vehicle_imu/VehicleIMU.cpp
  -0.6%      -1  [ = ]       0    msg/topics_sources/rover_ackermann_status.cpp
  +0.0%      +3  [ = ]       0    src/modules/flight_mode_manager/FlightTasks_generated.cpp
  -0.0%     -10  [ = ]       0    src/modules/mavlink/modules__mavlink_unity.cpp
+1.0%      +2  [ = ]       0    .shstrtab
+0.1%    +502  [ = ]       0    .strtab
  [NEW]     +96  [ = ]       0    ../../src/lib/pid/PID.cpp
  -8.1%     -32  [ = ]       0    ../../src/lib/version/version.c
  +2.0%     +78  [ = ]       0    ../../src/modules/commander/Commander.cpp
  +8.5%     +96  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW]    +183  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
  +1.2%      +9  [ = ]       0    ../../src/modules/control_allocator/ControlAllocation/ControlAllocationPseudoInverse.cpp
  +0.1%     +72  [ = ]       0    [section .strtab]
+0.1%    +688  [ = ]       0    .symtab
  +2.5%     +16  [ = ]       0    ../../src/drivers/magnetometer/st/iis2mdc/iis2mdc.cpp
  +2.3%     +16  [ = ]       0    ../../src/drivers/uavcan/libdronecan/libuavcan/src/transport/uc_can_io.cpp
  [NEW]    +176  [ = ]       0    ../../src/lib/pid/PID.cpp
  -7.0%     -64  [ = ]       0    ../../src/lib/version/version.c
  +0.7%     +32  [ = ]       0    ../../src/modules/commander/Commander.cpp
   +24%    +144  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW]    +240  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
  +3.2%     +16  [ = ]       0    ../../src/modules/control_allocator/ControlAllocation/ControlAllocationPseudoInverse.cpp
  +0.9%     +16  [ = ]       0    ../../src/modules/control_allocator/ControlAllocator.cpp
  -0.9%     -16  [ = ]       0    ../../src/modules/flight_mode_manager/tasks/Auto/FlightTaskAuto.cpp
  +0.3%     +16  [ = ]       0    ../../src/modules/fw_pos_control/FixedwingPositionControl.cpp
  +0.2%     +96  [ = ]       0    [section .symtab]
-11.0% -1.82Ki  [ = ]       0    [Unmapped]
+0.2% +79.3Ki  +0.1% +1.82Ki    TOTAL

px4_fmu-v6x [Total VM Diff: 1696 byte (0.09 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.1% +1.66Ki  +0.1% +1.66Ki    .text
  [NEW]    +640  [NEW]    +640    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
   +17%    +360   +17%    +360    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW]    +252  [NEW]    +252    ../../src/lib/pid/PID.cpp
  +0.1%    +230  +0.1%    +230    [section .text]
  +0.1%    +183  +0.1%    +183    ROMFS/nsh_romfsimg.c
  +0.3%     +64  +0.3%     +64    ../../src/modules/commander/Commander.cpp
   +60%     +12   +60%     +12    msg/topics_sources/rover_mecanum_status.cpp
  +0.1%      +4  +0.1%      +4    ../../src/modules/ekf2/EKF/yaw_estimator/EKFGSF_yaw.cpp
  +0.2%      +3  +0.2%      +3    ../../src/systemcmds/ver/ver.cpp
 -12.5%      -4 -12.5%      -4    msg/topics_sources/rpm.cpp
  -0.1%      -8  -0.1%      -8    ../../src/modules/control_allocator/ControlAllocator.cpp
 -28.6%      -8 -28.6%      -8    msg/topics_sources/rc_parameter_map.cpp
  -0.1%     -32  -0.1%     -32    ../../src/lib/parameters/parameters.cpp
+0.2% +3.84Ki  [ = ]       0    .debug_abbrev
  [NEW] +1.15Ki  [ = ]       0    ../../src/lib/pid/PID.cpp
   +11%     +56  [ = ]       0    ../../src/lib/version/version.c
  +4.9%    +144  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW] +2.50Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
+0.1%    +200  [ = ]       0    .debug_aranges
  [NEW]     +56  [ = ]       0    ../../src/lib/pid/PID.cpp
  -5.0%      -8  [ = ]       0    ../../src/lib/version/version.c
  +0.9%      +8  [ = ]       0    ../../src/modules/commander/Commander.cpp
   +11%     +24  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW]    +120  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
+0.1%    +548  [ = ]       0    .debug_frame
+0.2% +53.6Ki  [ = ]       0    .debug_info
  +0.1%     +24  [ = ]       0    ../../src/drivers/cdcacm_autostart/cdcacm_autostart.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/distance_sensor/lightware_laser_i2c/lightware_laser_i2c.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/dshot/DShot.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/heater/heater.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/lights/rgbled/rgbled.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/lights/rgbled_is31fl3195/rgbled_is31fl3195.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/lights/rgbled_lp5562/rgbled_lp5562.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/lights/rgbled_ncp5623c/rgbled_ncp5623c.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/osd/msp_osd/msp_osd.cpp
  +0.1%     +24  [ = ]       0    ../../src/drivers/power_monitor/ina226/ina226.cpp
  +0.1%     +24  [ = ]       0    ../../src/drivers/power_monitor/ina226/ina226_main.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/power_monitor/ina228/ina228.cpp
  +0.1%     +24  [ = ]       0    ../../src/drivers/power_monitor/ina228/ina228_main.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/power_monitor/ina238/ina238.cpp
  +0.1%     +24  [ = ]       0    ../../src/drivers/power_monitor/ina238/ina238_main.cpp
  +0.1%     +24  [ = ]       0    ../../src/drivers/power_monitor/pm_selector_auterion/PowerMonitorSelectorAuterion.cpp
  +0.1%     +24  [ = ]       0    ../../src/drivers/pwm_out/PWMOut.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/px4io/px4io.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/rc_input/RCInput.cpp
  +0.0%     +24  [ = ]       0    ../../src/drivers/uavcan/actuators/esc.cpp
 -99.6% +53.1Ki  [ = ]       0    [162 Others]
+0.1% +5.72Ki  [ = ]       0    .debug_line
  -0.1%     -29  [ = ]       0    ../../src/lib/parameters/parameters.cpp
  [NEW] +1.19Ki  [ = ]       0    ../../src/lib/pid/PID.cpp
  -1.3%     -25  [ = ]       0    ../../src/lib/version/version.c
  +0.3%     +87  [ = ]       0    ../../src/modules/commander/Commander.cpp
   +16%    +905  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW] +3.61Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
  +0.1%     +13  [ = ]       0    ../../src/modules/control_allocator/ControlAllocator.cpp
  +0.0%      +1  [ = ]       0    ../../src/modules/flight_mode_manager/tasks/Orbit/FlightTaskOrbit.cpp
  -0.4%      -5  [ = ]       0    task/task_cancelpt.c
+0.1% +7.20Ki  [ = ]       0    .debug_loc
  -0.1%     -15  [ = ]       0    ../../src/drivers/px4io/px4io.cpp
  +0.0%     +15  [ = ]       0    ../../src/drivers/uavcan/uavcan_main.cpp
  +0.0%     +15  [ = ]       0    ../../src/drivers/uavcan/uavcan_servers.cpp
  +0.1%     +16  [ = ]       0    ../../src/lib/mixer_module/mixer_module.cpp
  +0.1%     +50  [ = ]       0    ../../src/lib/parameters/parameters.cpp
  [NEW]    +516  [ = ]       0    ../../src/lib/pid/PID.cpp
  +0.9%    +372  [ = ]       0    ../../src/modules/commander/Commander.cpp
  +0.0%      +1  [ = ]       0    ../../src/modules/commander/HealthAndArmingChecks/checks/externalChecks.cpp
  +0.0%      +2  [ = ]       0    ../../src/modules/commander/failure_detector/FailureDetector.cpp
   +33% +1.95Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  +1.1%     +96  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
  [NEW] +3.40Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
  +0.7%    +186  [ = ]       0    ../../src/modules/flight_mode_manager/tasks/Orbit/FlightTaskOrbit.cpp
  -0.1%     -15  [ = ]       0    ../../src/modules/fw_att_control/FixedwingAttitudeControl.cpp
  +0.0%     +15  [ = ]       0    ../../src/modules/fw_pos_control/FixedwingPositionControl.cpp
  +0.1%     +15  [ = ]       0    ../../src/modules/gyro_calibration/GyroCalibration.cpp
  +0.1%     +15  [ = ]       0    ../../src/modules/mag_bias_estimator/MagBiasEstimator.cpp
  -0.0%     -15  [ = ]       0    ../../src/modules/mc_pos_control/MulticopterPositionControl.cpp
  -0.1%     -15  [ = ]       0    ../../src/modules/navigator/rtl.cpp
  -0.2%     -15  [ = ]       0    ../../src/modules/navigator/rtl_direct.cpp
 -99.9%    +649  [ = ]       0    [10 Others]
+0.2% +2.46Ki  [ = ]       0    .debug_ranges
  [NEW]     +64  [ = ]       0    ../../src/lib/pid/PID.cpp
  -2.6%      -8  [ = ]       0    ../../src/lib/version/version.c
  +0.2%     +24  [ = ]       0    ../../src/modules/commander/Commander.cpp
   +39%    +784  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW] +1.42Ki  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
  -0.1%      -8  [ = ]       0    ../../src/modules/control_allocator/ControlAllocator.cpp
  +0.4%    +208  [ = ]       0    [section .debug_ranges]
  -4.5%      -3  [ = ]       0    task/task_cancelpt.c
+0.1% +3.93Ki  [ = ]       0    .debug_str
  +0.2%     +99  [ = ]       0    
  -3.1%      -5  [ = ]       0    ../../platforms/nuttx/src/px4/common/print_load.cpp
  +0.1%     +43  [ = ]       0    ../../src/drivers/cdcacm_autostart/cdcacm_autostart.cpp
  [NEW]     +45  [ = ]       0    ../../src/lib/pid/PID.cpp
  +0.0%     +24  [ = ]       0    ../../src/modules/commander/Commander.cpp
   +64%    +980  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW]    +276  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
  +8.0% +2.52Ki  [ = ]       0    ../../src/modules/control_allocator/ControlAllocator.cpp
  +0.0%     +11  [ = ]       0    ../../src/modules/flight_mode_manager/FlightModeManager.cpp
  -0.2%     -24  [ = ]       0    ../../src/modules/mc_att_control/mc_att_control_main.cpp
  +0.0%     +12  [ = ]       0    ../../src/modules/navigator/navigator_main.cpp
  -0.1%      -9  [ = ]       0    ../../src/modules/sensors/vehicle_imu/VehicleIMU.cpp
  -0.6%      -1  [ = ]       0    msg/topics_sources/rover_ackermann_status.cpp
  +0.0%      +1  [ = ]       0    src/modules/flight_mode_manager/FlightTasks_generated.cpp
  -0.0%     -10  [ = ]       0    src/modules/mavlink/modules__mavlink_unity.cpp
+0.9%      +2  [ = ]       0    .shstrtab
+0.1%    +502  [ = ]       0    .strtab
  [NEW]     +96  [ = ]       0    ../../src/lib/pid/PID.cpp
  -8.1%     -32  [ = ]       0    ../../src/lib/version/version.c
  +2.0%     +78  [ = ]       0    ../../src/modules/commander/Commander.cpp
  +8.5%     +96  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW]    +183  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
  +1.2%      +9  [ = ]       0    ../../src/modules/control_allocator/ControlAllocation/ControlAllocationPseudoInverse.cpp
  +0.1%     +72  [ = ]       0    [section .strtab]
+0.1%    +688  [ = ]       0    .symtab
   +17%     +16  [ = ]       0    ../../platforms/common/uORB/SubscriptionInterval.cpp
  -1.2%     -16  [ = ]       0    ../../src/drivers/pwm_out/PWMOut.cpp
  +2.3%     +16  [ = ]       0    ../../src/drivers/uavcan/libdronecan/libuavcan/src/transport/uc_can_io.cpp
  [NEW]    +176  [ = ]       0    ../../src/lib/pid/PID.cpp
  -7.0%     -64  [ = ]       0    ../../src/lib/version/version.c
  +0.7%     +32  [ = ]       0    ../../src/modules/commander/Commander.cpp
   +24%    +144  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp
  [NEW]    +240  [ = ]       0    ../../src/modules/control_allocator/ActuatorEffectiveness/RpmControl.cpp
  +3.2%     +16  [ = ]       0    ../../src/modules/control_allocator/ControlAllocation/ControlAllocationPseudoInverse.cpp
  +0.9%     +16  [ = ]       0    ../../src/modules/control_allocator/ControlAllocator.cpp
  -2.1%     -16  [ = ]       0    ../../src/modules/flight_mode_manager/tasks/Orbit/FlightTaskOrbit.cpp
  +0.3%     +16  [ = ]       0    ../../src/modules/fw_pos_control/FixedwingPositionControl.cpp
  +0.2%     +96  [ = ]       0    [section .symtab]
   +33%     +16  [ = ]       0    msg/topics_sources/rpm.cpp
-2.3% -1.66Ki  [ = ]       0    [Unmapped]
+0.2% +78.6Ki  +0.1% +1.66Ki    TOTAL

Updated: 2024-12-19T18:46:40

@MaEtUgR MaEtUgR force-pushed the helicopter-rpm-control branch 2 times, most recently from 29c13d1 to c838adb Compare December 17, 2024 20:03
@MaEtUgR MaEtUgR changed the title [WIP] Helicopter main rotor rpm control Helicopter main rotor rpm control Dec 17, 2024
@MaEtUgR MaEtUgR force-pushed the helicopter-rpm-control branch from c838adb to e49844d Compare December 17, 2024 20:05
@MaEtUgR MaEtUgR marked this pull request as ready for review December 17, 2024 20:06
@MaEtUgR
Copy link
Member Author

MaEtUgR commented Dec 17, 2024

Finally I reached a point where it's clean and working nicely in the bench tests 🎉
Here are some plots of the closed loop.
grafik

@MaEtUgR MaEtUgR force-pushed the rpm-sensing branch 2 times, most recently from e9ea271 to de04cb1 Compare December 18, 2024 17:21
Base automatically changed from rpm-sensing to main December 19, 2024 06:30
@bresch bresch self-requested a review December 19, 2024 09:53
@MaEtUgR MaEtUgR force-pushed the helicopter-rpm-control branch from e49844d to 004364a Compare December 19, 2024 15:29
@MaEtUgR MaEtUgR force-pushed the helicopter-rpm-control branch from 004364a to 0a016df Compare December 19, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants