![]() ![]() Mode dependent feedforwards (ff) - e.g.# Combined Position and Velocity Controller Diagram Vertical P gain set via parameter MPC_Z_P.Horizontal P gain set via parameter MPC_XY_P.This differs from the maximum desired speed MPC_XY_CRUISE (autonomous modes) and MPC_VEL_MANUAL (manual position control mode). This parameter sets the maximum possible horizontal velocity. The commanded velocity is saturated to keep the velocity in certain limits.Simple P controller that commands a velocity.Vertical gains set via parameter MPC_Z_VEL_P_ACC, MPC_Z_VEL_I_ACC and MPC_Z_VEL_D_ACC.Horizontal gains set via parameter MPC_XY_VEL_P_ACC, MPC_XY_VEL_I_ACC and MPC_XY_VEL_D_ACC.The commanded acceleration is NOT saturated - a saturation will be applied to the converted thrust setpoints in combination with the maximum tilt angle.The integrator includes an anti-reset windup (ARW) using a clamping method.Implementation details can be found in PositionControl.cpp and ControlMath.cpp. Saturate thrust_xy with (MPC_THR_MAX^2 - thrust_z^2)^0.5.Compute required vertical thrust ( thrust_z).Thrust saturation is done after computing the corresponding thrust:. ![]() Converted acceleration setpoints will be saturated and prioritized in vertical and horizontal thrust.The acceleration setpoints generated by the velocity controller will be converted to thrust and attitude setpoints.# Multicopter Acceleration to Thrust and Attitude Setpoint Conversion When tuning this controller, the only parameter of concern is the P gain.The controller is implemented from this article (opens new window).The attitude controller makes use of quaternions (opens new window).Stretch X is often preferred by drone racers, as they need more stability on the pitch axis to be able to control the drone at high speeds.Gyro data > apply calibration parameters > remove estimated bias > notch filter ( IMU_GYRO_NF0_BW and IMU_GYRO_NF0_FRQ) > low-pass filter ( IMU_GYRO_CUTOFF) > vehicle_angular_velocity ( filtered angular rate used by the P and I controllers) > derivative -> low-pass filter ( IMU_DGYRO_CUTOFF) > vehicle_angular_acceleration ( filtered angular acceleration used by the D controller) In the stretch X frame, the tighter angle is the front of the drone, whereas in the wide X frame the wider angle is the front. The difference between the wide and stretch X frames is the direction that you indicate as front or forward. Stretch X: If you take the wide X frame and rotate it 90 degrees, you'll get the stretch X.Since the front arms have more space between them, you can align the camera in a way that the motors or their propellers don't get in the way of your shot, giving you a clear view. This frame's wider body allows you to install more modules in the center. Wide X: An X frame but with the arms widened in one axis, making it wider than the true X.True X: This frame is completely symmetrical and offers equal stability on all axes as the distance between the arms is equal.Related: How Many Motors Should a Drone Have? This coupling theoretically decreases the control you can have over the drone but means less fragility since if you ever crash the drone in any direction, the impact will be absorbed by two arms instead of one.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |