Methodicconfigurator

Latest version: v0.6.1

Safety actively analyzes 630305 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

4.5

If the battery got depleted before Autotune completion, change the initial PID parameters as shown in the table below:

|PID parameter name|PID parameter value based on the ATUN field|
|:-|:-|
|-|ATUN.Axis=2|
|ATC_RAT_YAW_P|ATUN.RP|

3.2

Use the `.bin` log from the first flight to set the parameters described on the `19_throttle_controller.param` file. Edit it with a text editor to meet your needs and in Mission Planner while connected to the vehicle [select *Compare Params*, review the changes and press *Continue* followed by *Upload Params*](https://ardupilot.org/planner/docs/mission-planner-configuration-and-tuning.html#full-parameter-list).

4. Second flight: MagFit

Now that the Harmonic Notch filter and the throttle controller are configured, the second flight will be safer.
This flight will be used to calibrate the compass during a realistic operation scenario in the air.

[Inflight MagFit calibration](https://ardupilot.org/copter/docs/common-magfit.html#using-mavexplorer-s-integrated-magfit-utility)

Follow these steps:

1. Download the `copter-magfit-helper.lua` and `advance-wp.lua` scripts from [Scripted MagFit flightpath generation](https://discuss.ardupilot.org/t/scripted-magfit-flightpath-generation/97536) and put them on the micro SDCard's `APM/scripts` folder
1. Activate MagFit by downloading the [22_inflight_magnetometer_fit_setup.param parameter file](diatone_taycan_mxc/params/22_inflight_magnetometer_fit_setup.param) to your PC, edit it with a text editor to meet your needs and in Mission Planner while connected to the vehicle [select *Compare Params*, review the changes and press *Continue* followed by *Uploadd Params*](https://ardupilot.org/planner/docs/mission-planner-configuration-and-tuning.html#full-parameter-list)
1. Perform the MagFit figure-eight flight and land
1. Download the latest `.bin` dataflash log file from the micro SDcard's `/APM/LOGS` folder
1. Load it into MAVExplorer using the command line: `MAVExplorer.py filename.bin` or into the [ArduPilot MAGFit in flight compass calibration](https://firmware.ardupilot.org/Tools/WebTools/MAGFit/) using an internet browser.
1. Select the area where the multicopter performed the Figure eight (exclude the takeoff and landing flight sections)
1. Perform the MagFit calculations. In our case, we got the [23_inflight_magnetometer_fit_results.param parameter file](diatone_taycan_mxc/params/23_inflight_magnetometer_fit_results.param)
1. Upload the tool-generated `.param` file, not ours, to the vehicle.

![MagFit results](magfit_1.png)

After that repeat the steps described in [2.12 ArduPilot Hardware Report](212-ardupilot-hardware-report).
The report should now look like this:

![Hardware-Report after MagFit](hardware_report_magfit.png)


5. Third flight: Evaluate the aircraft tune - part 1

Follow the first part of [evaluating the aircraft tune](https://ardupilot.org/copter/docs/evaluating-the-aircraft-tune.html#evaluating-the-aircraft-tune).

After landing take a look at the `RATE.*out` values in the `.bin` log file, they all should be below 0.1.

Download the [26_evaluate_the_aircraft_tune_ff_disable.param parameter file](diatone_taycan_mxc/params/26_evaluate_the_aircraft_tune_ff_disable.param), and in Mission Planner while connected to the vehicle [select *Compare Params*, review the changes and press *Continue* followed by *Upload Params*](https://ardupilot.org/planner/docs/mission-planner-configuration-and-tuning.html#full-parameter-list).


6. Fourth flight: Evaluate the aircraft tune - part 2

Follow the second part of [evaluating the aircraft tune](https://ardupilot.org/copter/docs/evaluating-the-aircraft-tune.html#evaluating-the-aircraft-tune).

After landing take a look at the `RATE.*out` values in the `.bin` log file, they all should be below 0.1.

Download the [27_evaluate_the_aircraft_tune_ff_enable.param parameter file](diatone_taycan_mxc/params/27_evaluate_the_aircraft_tune_ff_enable.param), and in Mission Planner while connected to the vehicle [select *Compare Params*, review the changes and press *Continue* followed by *Upload Params*](https://ardupilot.org/planner/docs/mission-planner-configuration-and-tuning.html#full-parameter-list).


7. [Autotune flight(s)](https://ardupilot.org/copter/docs/autotune.html)

The Autotune is an automated iterative process:

1. It changes the parameter values of the attitude PID controllers
1. Tests the [overshoot and settling-time](https://aleksandarhaber.com/transient-response-specifications-peak-time-settling-time-rise-time-and-percent-overshoot/) of the control loop using the new PID values
1. If they are within the desired requirements, the process is over. If not, it gets repeated from the beginning

If the battery gets depleted before you can complete the Autotune flight(s), download the latest `.bin` log file from the micro SDCard directory `/APM/LOGS`.
Take a look at the `ATUN` messages.
They show how the PID values change over time.
You should use the latest PID values from the `ATUN` messages to set the starting point of your next PID Autotune with a fresh battery.
But be careful, **these new PID values might be unstable and cause your vehicle to crash**.
To be on the safe side perform the third and fourth flights again according to the instructions above.
This way, the Autotune will restart from the partially optimal values it found before the battery got depleted, instead of starting from scratch.

An example of the relevant `ATUN` message data of an interrupted yaw Autotune `.bin` dataflash log is depicted below:

![interrupted yaw Autotune ATUN messages](mp_autotune_yaw1.png)

The correspondence between the PIDs' initial values and the `ATUN` message fields is shown in the respective tables for each of the four Autotune axes in the sections below.

The tune of the vehicle must be done in the vehicle's most agile configuration.
That is, the vehicle will be at its minimum take-off weight with fully charged batteries.

This is why we will do Autotune with multiple flights, one axis per flight.

Typically the [quality of the Autotune results for each axis is proportional to the value](https://www.youtube.com/watch?v=1sCskKQIdeg) of the `ATC_ANG_RLL_P`, `ATC_ANG_PIT_P`, and `ATC_ANG_YAW_P` parameters for their respective axis.
Also the higher the values, the tighter the tune.
If you get low values, improve the hardware and revisit the previous sections to further reduce the vibrations.

Autotuning in low-wind conditions is desirable, but if that is not possible you can increase the `AUTOTUNE_AGGR` parameter value to 0.110 or even 0.120.
That is a workaround and will not produce as good results as low-wind conditions autotune.

We set up the autotune as a flight mode, and as such it will use the underlying `ALTHOLD` flight mode.
If you want to use the `LOITER` flight mode as the underlying mode during autotune you need to [set an RC channel function switch to autotune](https://ardupilot.org/copter/docs/autotune.html#setup-before-flying-in-autotune-mode).

Roll axis

1. Download the [28_autotune_roll_setup.param parameter file](diatone_taycan_mxc/params/28_autotune_roll_setup.param) to your PC and upload it to the flight controller.
It will activate the roll axis Autotune.
1. Outdoors on a non-windy day (or indoors in a big warehouse like we at IAV do) take off and fly in either [`AltHold`](https://ardupilot.org/copter/docs/altholdmode.html) or `Loiter` flight mode.
1. At about 2 meters high, select `Autotune` flight mode in the RC transmitter to engage Autotune.
1. Use the RC transmitter sticks to correct the vehicle position if it gets too high, too low or too close to obstacles.
1. Once the Autotune is completed, land and disarm the vehicle without changing the flight mode.

You should get something like the [29_autotune_roll_results.param parameter file](diatone_taycan_mxc/params/29_autotune_roll_results.param)

The autotune might have found a poor solution, here are some indicators of a poor tune:

3.1

Load the `.bin` log from the first flight onto the [online Ardupilot Filter Review tool](https://firmware.ardupilot.org/Tools/WebTools/FilterReview/)
Follow the [instructions from Peter Hall on his Blog Post](https://discuss.ardupilot.org/t/new-fft-filter-setup-and-review-web-tool/102572) to configure the Harmonic Notch filter(s).

The graph below is a bode diagram of the gyro signals before and after the low-pass and Harmonic Notch filters.
As you can see, the filters remove most of the vibration noise from the gyro sensors.

![Filter IMU1](filter_imu.png)

Below is the configuration we used.

![Filter Configuration](filter_konfiguration.png)

In our case, we got the [18_notch_filter_results.param parameter file](diatone_taycan_mxc/params/18_notch_filter_results.param). Edit it with a text editor to meet your needs and in Mission Planner while connected to the vehicle [select *Compare Params*, review the changes and press *Continue* followed by *Upload Params*](https://ardupilot.org/planner/docs/mission-planner-configuration-and-tuning.html#full-parameter-list).

Load the `.bin` log from the first flight onto the [online Ardupilot Log Viewer](https://plotbeta.ardupilot.org/) or into Mission Planner.
Take a look at the `VIBE.VibeX`, `VIBE.VibeY`, `VIBE.VibeZ` graphs they [all should be below 15](https://ardupilot.org/copter/docs/common-measuring-vibration.html)

According to common ArduPilot forum knowledge, and quoting xfacta:

- Vibrations over 30 are very bad
- Vibrations over 20 are causing issues even if you don't know it yet
- Vibrations over 15 are in a grey area - it could go either way - check clipping, it must be zero
- Vibrations below 10 are good

Now upload the `.bin` log to the [Hardware-Report Tool](https://firmware.ardupilot.org/Tools/WebTools/HardwareReport/) once again to check CPU load and loop times, which in our case look like this:

![Hardware-Report CPU load](hardware_report_cpu_load.png)
![Hardware-Report CPU loop times](hardware_report_loop_times.png)

2.17

Configure the gyro noise reduction notch filters with a estimation of the operation parameters as described on the [17_notch_filter_setup.param parameter file](diatone_taycan_mxc/params/17_notch_filter_setup.param).
Edit it with a text editor to meet your needs and in Mission Planner while connected to the vehicle [select *Compare Params*, review the changes and press *Continue* followed by *Upload Params*](https://ardupilot.org/planner/docs/mission-planner-configuration-and-tuning.html#full-parameter-list).
The estimation will be improved after the first flight.


3. First flight: Motor Thrust Hover and Harmonic Notch data collection

For more detailed information visit the [First flight](https://ardupilot.org/copter/docs/flying-arducopter.html)

Test the initial setup on the ground in [stabilize flight mode](https://ardupilot.org/copter/docs/stabilize-mode.html) by using as little RC transmitter throttle as possible without taking off.
At this sweet spot, inspect all axes (roll, pitch and yaw) by providing small RC transmitter stick inputs.
If the multicopter behaves correspondingly, the setup is good to go.

After some careful test maneuvers switch to `ALTHOLD` and hover for 30 to 40 seconds one to two meters above the ground. Land and disarm.

Immediately check for hot motors.
If the motors are too hot, check the `.bin` dataflash log, high or oscillating `RATE.*out` values indicate which PID gain you should reduce to remove the output oscillations causing the motors to heat up.

2.16

Read and follow [ArduPilot's Remote ID setup instructions](https://ardupilot.org/copter/docs/common-remoteid.html).
You might have to [build OpenDroneID firmware for production](https://ardupilot.org/dev/docs/opendroneid.html).
Edit the `16_remote_id.param` file with a text editor to meet your needs and in Mission Planner while connected to the vehicle [select *Compare Params*, review the changes and press *Continue* followed by *Upload Params*](https://ardupilot.org/planner/docs/mission-planner-configuration-and-tuning.html#full-parameter-list).

2.15

If you have a very small, or a very large vehicle that requires non-default PID values for a safe flight, change them in the [15_pid_adjustment.param parameter file](diatone_taycan_mxc/params/15_pid_adjustment.param)
Usually, smaller vehicles require lower than default PID rate values.
Larger vehicles usually require higher than default PID rate values.

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.