Skip to content

Commit

Permalink
Merge pull request #1442 from bitcraze/rik/bl_mass
Browse files Browse the repository at this point in the history
Update brushless platform defaults
  • Loading branch information
gemenerik authored Dec 9, 2024
2 parents 9c9e7e0 + dbad112 commit 59fa2f6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions docs/functional-areas/sensor-to-control/controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Check the implementation details in `position_controller_pid.c` in `positionCont

## Mellinger Controller

_**Note:** This controller relies on the platform mass for its calculations. Ensure the platform mass is updated in [the firmware's platform defaults](https://github.com/bitcraze/crazyflie-firmware/tree/master/src/platform/interface) whenever the setup changes._

Conceptually the Mellinger controller is similar to the cascaded PID controller, i.e. there is an attitude controller (running at 250 Hz) and a position controller (running at 100 Hz). The main difference to the cascaded PID controller is how errors are defined and how the position error is translated into desired attitude setpoints. Like the cascaded PID, this is a reactive geometric controller that uses the mathematical property of differential flatness. Details are given in the following scientific publication:

```
Expand All @@ -82,6 +84,8 @@ https://doi.org/10.2514/1.G001490

## Brescianini Controller

_**Note:** This controller relies on the platform mass for its calculations. Ensure the platform mass is updated in [the firmware's platform defaults](https://github.com/bitcraze/crazyflie-firmware/tree/master/src/platform/interface) whenever the setup changes._

Details of this controller are in the following scientific publication:

```
Expand All @@ -93,6 +97,8 @@ https://doi.org/10.3929/ethz-a-009970340

## Lee Controller

_**Note:** This controller relies on the platform mass for its calculations. Ensure the platform mass is updated in [the firmware's platform defaults](https://github.com/bitcraze/crazyflie-firmware/tree/master/src/platform/interface) whenever the setup changes._

Conceptually the Lee controller is similar to the cascaded PID controller, i.e. there is an attitude controller (running at 250 Hz) and a position controller (running at 100 Hz). The main difference to the cascaded PID controller is how errors are defined and how the position error is translated into desired attitude setpoints. Like the cascaded PID, this is a reactive geometric controller that uses the mathematical property of differential flatness. Compared to the Mellinger controller, a different angular velocity error and higher-order terms in the attitude controller are used. Details including a stability proof are given in the following scientific publication:

```
Expand Down
8 changes: 4 additions & 4 deletions src/platform/interface/platform_defaults_cf21bl.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
#define DEFAULT_SYSTEM_SHUTDOWN_TIMEOUT_MIN 5

// Drone physical constants
// m
#define ARM_LENGTH 0.046f
// kg
#define CF_MASS 0.030f
#define ARM_LENGTH 0.050f // m
// Default: Crazyflie 2.1 Brushless with propeller guards, 350mAh battery, and Lighthouse deck.
// Update this value with the mass of your specific setup if different.
#define CF_MASS 0.0393f // kg

// Default PID gains
#define PID_ROLL_RATE_KP 200.0
Expand Down

0 comments on commit 59fa2f6

Please sign in to comment.