How to methodically configure and tune any ArduCopter

Arducopter 4.5.7

I do not know the internal works of Ardupilot in as far as loop frequency is concerned, but due to much larger inertia and much slower roll-pitch accelerations I am quite sure that a bigger copter can fly with much less computing power.

If you think about the race drones which can do 3 or more rolls in a second, it is not the same as big sized one… But I feel that setting up bigger ones is much more complicated, exactly because of the inertia (not only in copter mass, but also because props are big, possibly spinning up or down much slower, etc.) I had very big issues with Yaw with the QUAD VTOL, it was painfully slow, and I still will have to work it out.

This is the copter I have now…

And this one I have lost.

The one I have lost had also vibration issues because of the slender arms, I had rather high Vibe values, I made a foam support for the FC, that reduced the vibes by 50 % but still they were high, especially at high speeds.

For the new build, I used a 30 mm tube (too big, but no smaller ones were locally available). The main board is actually balsa encapsulated from all sides in carbon fiber and fiberglass, extremely lightweight and extremely rigid.

The new built also used RCtimer motors instead of the Sunnysky 3508. The preliminary tests with the first copter gave me flight times of about 80 minutes on liion. It could fly about 40 km. RCtimer seems to be 10 %…15 % less, but again, it was the only thing I could get locally fast after the crash.

For the new built I have not used the foam cushions for FC because I thought that the vibe values I got are not that high. I am pretty sure if I put it onj foam, I can get a reduction of 50 %.

The dry weight of the second one is 1170 grams, of which 600 grams are for motors and props, and another 150 grams for electronics. The frame itself weighs 450 grams.

The idea is to carry a battery of about 1300…2000 grams, and the whole design idea is to have a long range, long endurance, high altitude copter for fllying in high mountains (up to 7000 m).

I think you are comparing flight stack A with 5" propeller to flight stack B with 16" propeller, which is not a valid comparison.

If you compare flight stack A under a 5" drone to a 16" drone, maybe it is a more valid comparison.

I know that these things are quite different. To gain some experience I started with the 5 inch drones, and crashed them a few times initially, especially during learning the ACRO mode. But the setup was never at fault, except for the firsts build where I misjudged the importance of vertical CG, and the copter tended sometimes to flip on its own during braking maneuvers.

Here is documentation for the use case where you change a vehicle component: Ardupilot Methodic Configurator use cases | MethodicConfigurator

Hi again and sorry to bother everyone…

I restarted the whole setup process from scratch, slowly, and I am still getting results which are not the best…

First, I have rechecked and reset the Notch filter. I was not able to find exact information how to choose parameters for the notch filter, but I assume that the general idea is to reduce the noise, aka to pull the filtered lines down. I had two frequencies, one at 50 Hz for the Z axis, and another at 100 Hz for XY axis, and harmonics of the 100 Hz (200 Hz). Since the 50 Hz and 100 Haz coincide as harmonics, I decided to use just one notch filter and set up 1,2, and 4 harmonics. I hope this is correct.


Second, I have rerun the AUTOTUNE on pitch and roll axis. Here I got a very strange issue. On the first try, the Autotune did not modify the Roll Axis, but with Pitch Axis, it reduced the D term close to zero and Pitch Angle Error was reduced from 9 to 3, making the copter almost unflyable, very mushy.

I did not change any parameters and tried to redo AUTOTUNE. On the second run, it was more or less succesful. Before the Autotune I had values like
ROLL 0.05 0.05 0.005
PITCH 0.08 0.08 0.005

After autotune I got
ROLL 0.05 0.05 0.005
PITCH 0.05 0.05 0.005

Autotune was run at aggresiveness of 0.09

So, good news is that the two sets are more or less similar, which what should be expected from geometry and weight of the copter.

The bad news is that the copter is not 100 % stable.
It exhibits the same problem as before:
When hovering, it is pretty rock solid
When flying above 30 km/h it has this slight wobble in pitch.
When descending, it wobbles slightly, but I am not sure if this should be expected anyway.
When entering Loiter mode it gets really bad, especially on descent. There I feel that it is bound to fail sooner or later.

Now, I have run the Ardupilot PID tool, and from my understanding (I maybe wrong) that the copter needs higher P values.

Below are the two graphs for Roll and Pitch Step


When I was flying with pitch PID as 0.08 0.08 0.005, the blue line was almost reaching 1 (I can not find the log file after so many test flights), and the behaviour of the copter in the pitch axis seemed to be much better.

BUT, Autotune seems to want to reduce the PI values significantly, to 0.05, so I am not sure what to do here…

Should I increase the PI values for both pitch and roll from 0.05 to 0.08?

Here is the pitch graph which shows the small oscillations during level flight… The amplitude seems to be around 1º

There is another interesting thing, when I increase the scale, there is visible very high frequency, very low amplitude vibration, not sure if it is normal and whether one should try to do something about it:

When you use the ArduPilot methodic configurator software it automatically opens the relevant notch filter documentation once you get to that step.

It guides you in the correct sequence of steps and automatically presents you the relevant documentation for the current step.

Why are you having a hard time finding the documentation? Are you still searching manually? Yes, searching manually was required before the ArduPilot methodic configurator was created. But now it is no longer needed.

And guessing the correct order of steps is also no longer needed.

Why did you skip quicktune?

I believe I can not run LUA scripts due to F405 processor

I followed the setup process step by step, but I want to understand the process, not just blindly setup. I also am worried a little bit about what is automatically modified, so I want to recheck manually what I and configurator are doing… So I was doing each configurator step, comparing the valaues it suggests and manually uploading them to the FC.

And for automatic tuning I have to rely on Autotune for the automatic process, and so far it seems that I am getting problems.

Use of F405 versus F7 processor is not because of the financial issues, I just did not know that I may get issues with LUA scripts. I can easily buy F7, but it will take a couple of weeks to arrive.

I also believe that some issues I am having are due to something “else”, because I have setup quite easily a couple of copters before.

The dismal LOITER behaviour is one thing which really surprises me, I have never seen this.

Should be H7 series chipset. LUA script requirements, take a look. Quiktune uses LUA script.

OK. I missed that one F7 versus H7…

I tried to modify the LOITER acceleration values, lowering them all from 500 to 150, but still without any luck, the copter is extremely unstable in LOITER mode… And that is something I am not understanding at all. In ALTHOLD it has its small details, but flies and hovers relatively well…

The loiter seems to exhibit typical Pilot Induced Oscillations… But I am not sure which parameter should be modified to reduce the sharpness response in Loiter Mode, there seems to be none. The graph below is with accelertions fo 500. Somehow the changes of accelerations to 150 were not written to FC!!! Now, I have repeatd the test with 150 acceleration values. The LOITER performance improved, but still is far from usable.

I got the feeling that automated tools are focused on a certain type of copters (small ones).

I decided to use trial and error method increasing PID values until I get oscillations and got what looks to me a much more flyable setup.

From 0.05 0.05 0.005 (AUTOTUNE results) I went up to 0.95 1.1 0.009 for both pitch and roll.

So far, the behaviour seems to be much more stable:
forward flying oscillations almost disappeared in Althold Mode
downward flying at 4.2 m/s seems to be very stable and when applying power, no wobbling tendency can be observed.
Loiter Mode also improved a lot, no oscillations in forward flying or in descent can be observed (it is still with very low acceleration values of 1.5 m/s2, I have to check how it would behave wuth 5 m/s2).

Key question: why AUTOTUNE with aggresiveness of 0.09 sets PIDs 50 % lower than I have set? I doubt that Qtune would be much different? How to verify tht the values I have set are safe and good?

Roll:

Pitch:

My feeling is that I have to reduce a little bit the D, and possibly P, especially in roll, but would like to hear any solid opinion, not just follow the autoconfigurator… a few posts above there are two step graphs of the Autotune PIDs

That is also possible, first read the step-by-step tuning guide in it’s entirety then read the “what”, “why” and “why_now” fields of each file in the configuration sequence and then read the development process documentation

Thank you for that. I also check it, @Yuri_Rage also checked it, and other users did it as well. The result so far is: It only changes the parameters it displays. If it does not show that it will change a parameter, then it will not change it. I have users with 400Kg copters that trust it. They also tested it. The results is WYSIWGC “What you see is what gets changed”. And there is always the magic “show only changed parameters” checkbox.

As for all your questions regarding autotune the answer is:
Autotune requires certain pre-conditions (well documented in the autotune documentation) to be able to perform correctly.

You can not expect it to deliver correct results in high wind situations for example.

Thanks for testing it, it’s one more user that finds that the software performs as expected and only changes the parameters it is supposed to change. I would have preferred if you actually had pressed the “upload” button and saved yourself the trouble, but thanks.

Wind and/or vibrations.

Qtune paves the way so that autotune can work safer and faster.
One does not replace the other. Both have their place.

For that you need a mathematical model of the entire system, then you need to validate that model. And once that is done, you can analytically prove that the PIDs are both safe and good.

I think I have read and read several times the step by step tuning guide and followed it pretty closely, except for the lua script, but then there is the alternative method of manual tuning suggested. I thought that Autotune would do basically the same thing as manual tuning.

The autotune preconditions were met as far as I can see.

If you compare the Autotune and manually reached PIDs, you can see that Autotune provides a very flat, stable response, but which unfortunately seems to be insufficient to achieve stable flight. The manual PIDs seem to have oscillations as seen on Step response, but the copter performs much much better overall. I kind of begin to think if it mkay not be related to big, heavy props. When I initially put the 13 x 5 props which weigh only 15 grams, the copter flew immediately well, and autotune produced pretty consistent results. When I changed to 16 x 5.5 props which weigh 27 grams immediately I began running into problems. So I am not sure if it could be due to too heavy prop where the motor has more problems in accelerating it.

Not sure if I should mount the FC on foam. The Vibe values I got seem to be pretty low so as not to require additional vibration protection.

I ordered a different set of motors, Sunny Sky 3508-700 which would work with a much smaller prop. They are slightly less efficient than the 3508-380 I used for the build I lost and probably about the same as RCtimers 3510-350 I am using right now.

I think you are already interpreting the PID step response correctly:

  • The faster the response the better
  • The static error should be zero
  • The overshoot should be small

As to the prop size, most of it`s effects are taken into consideration on step 11. BTW did you see: Ardupilot Methodic Configurator use cases | MethodicConfigurator ? It explains what you do after changing prop size.