Hi, I am trying to get a tiltrotor VTOL flying at 30% rotor tilt in FW mode. I made the necessary adjustments to prevent the rear motors from shutting off in FW mode (elaborated below). I am still testing in a Gazebo Classic HITL Simulation to ensure everything works fine, and so far I was able to get the aircraft flying steadily in FW mode with 30% tilt, at 50% throttle. However, if I increase the throttle to 70%-100% throttle, the aircraft starts pitching up heavily, subsequently followed by unstable pitch oscillation.
The link to the flight log is: https://review.px4.io/plot_app?log=cea77f67-903c-4c1d-9118-71a4f11a510b
The logs show that the aircraft pitch rate spikes up when 100% throttle up command is given. This suggests that the throttle up command produces a pitch up torque. Any ideas as to what may be causing this?
Several considerations that I have thought about:
- Is there a mismatch between the tiltrotor angle that PX4 assumes and the actual tilted angle in the simulator? The min and max angles for the tilt rotors are set to 0 to 90 deg, so a 30% tilt would equate to a 27 deg tilt. I checked the joint position in the Gazebo plotter and it is accurate.
- Is the actuator position off? I have double checked the actuator positions with respect to the CG in both PX4 actuators setup and Gazebo simulation and can confirm that they are accurate.
- I have tried decreasing the thrust coefficient for the rear motors but it resulted in the aircraft pitching down right after transition, and the pitch up oscillation problem is still there (when throttling up).
- PID Tuning Problem? I tried to tune the PID, but no matter what it still doesn’t solve the initial pitch up moment when throttle up command is given.
- This leads me to think that it may be a control allocator problem? But I can’t see where the problem might be since the control allocator constantly updates the tilt axis and recalculates the actuator effectiveness matrix based on the updated axis.
Thank you very much for your help.
The adjustments to the code that I have made are as follows:
-
Edit mc weights in fw mode
- Edited files:
- PX4-Autopilot/src/modules/vtol_att_control/vtol_type.cpp
- Line 115 – 117:
- Original:
- _mc_roll_weight = 0.0f;
- _mc_pitch_weight = 0.0f;
- _mc_yaw_weight = 0.0f;
- Changed:
- _mc_roll_weight = 0.7f;
- _mc_pitch_weight = 0.7f;
- _mc_yaw_weight = 0.7f;
- Original:
- Line 115 – 117:
- PX4-Autopilot/src/modules/vtol_att_control/vtol_type.cpp
- Edited files:
-
Edit stopped motors mask in Actuator Effectiveness module
- Edited files:
- PX4-Autopilot/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
- Comment out line 186 (in github)
- PX4-Autopilot/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
- Edited files:
-
Edit so that motor outputs don’t directly follow collective_thrust_normalized_setpoint in FW mode
- Edited files:
-
PX4-Autopilot/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp
- Comment lines 147-151 (in github)
-
- Edited files: