I have the following ESC settings.
I did Autotune again, the values for pitch increased considerably, for roll stayed the same:
I have the following ESC settings.
I did Autotune again, the values for pitch increased considerably, for roll stayed the same:
I did another test flight with new Autotune values, as expected, it is unstable in horizontal flight and on verge of loosing control on descent especially in Loiter Mode, but slightly better than the previous Autotune flight.
https://www.ecoterrenos.cl/00000021.BIN
Again, there were moments where Loiter Mode produced “Pilot” induced oscillations (PIO), where FC requests desired roll which changes quickly and out of phase with real roll and which basically “rocks the boat” towards complete loss of control (can easily be seen on the ATT graph towards the end of the flight). I am not sure if there are any parameters for Loiter Mode adjustment, but it could be a good idea to implement them for modification by the user, because in my particular case, Alt Hold is about twice as safe as Loiter.
After that I did again AUTOTUNE, and this time, the roll axis PIDs also increased:
I have not done a test flight with the new parameters, but from the looks of it, it would improve handling, but it would not be better than I have achieved using manual trial and error method…
So I think I can not do anything else, I do not see where the problem could be.
Yes, one can try to change the Notch Filter to RPM probably, but still I have my doubts that it would do any good. I am not sure if ESC PWM could have an impact, going down to 24 KHz maybe, but not sure at all.
When flying straight, one can hear that the motor sound sometimes drops down for an instant considerably, but the copter does not change significantly its attitude. Maybe the inertia of the props is somehow too big, and the copter continues on autorotation, like a helicopter, I do not know. On the other hand, the step response from 0 to 1.0 on previous flights was about 0.1 seconds, which I assume is a good value for this copter size.
The PIDs required for a stable flight seem to be quite different for hover and descent. When descending, I have a current of about 8…10 A, for hover 12 A, when climbing 14…16 A. The copter is always very stable when climbing.
Just one thing, I have ESC brake turned off, not sure if this could have some impact? But usually the brake start working when the PWM is zero, but in this case, the motors never turn off, so no brake would be applied anyway.
So I am here without any further ideas.
I will try two more things: I will use MediumHigh Timing instead of MediumLow, and also fly with 2000 grams instead of 2500 grams. In both cases I will do an Autotune to see if it affects the PID values. I somehow begin to suspect that at low RPM/Low power setting the motor torque is much lower, i.e. it possibly accelerates much slower than at higher RPM.
Had a lot of wind (15…25 km/h), so not sure if it was meaningful. Medium high setting increase current by about 5 %.
Autotune did not save somehow the values…
from .bin file they seem to be:
0.0925 0.006 14
0.0493 0.0071 35
Almost not flyable.
Tried flying at 2000 grams. The wind died and the Autotune gave me this:
Seemed to be rather stable in all flight phases. Will try to log data to get Step Response for the different flight phases.
I did two test flights and in both something happened with logging. For the second short flight I got the log, but the data necessary for Step Response was not there, and when I checked dropped messages, there were 1.5M… But MP opened the file and the attitude seems to be included.
But basically, when flying with 2000 grams, the copter behaved very well in all phases, including descent and including descent in Loiter Mode.
When flying with 2250 grams, the copter behaved similarly, EXCEPT FOR LOITER MODE IN DESCENT, where again there were PIOs brought about by the FC.
My preliminary conclusion is that something prevents correct setting up at higher weights. However, the motors have a lot of extra power, the Hover Throttle is around 0.2, so the copter should easily be flown and set up up to 4 kg.
Any Ideas as what to do?
I decided to restart manual tuning for a slightly lower weight, but I think I will be going in circles…
I was very surprised at the step responses which obtained with autotune PIDs…
Descent at 2250 grams, roll:
Í checked the hover, and climb, the graps llok very similar, i.e. there were no differences between climb and hover, like it was before with 2500 grams
OK. I think I have solved the problem, or at least I arrived at PIDs which work very well…
I have one suspect which was preventing from properly setting up the PIDs - Motor timing. I tried MediumLow, MediumHigh, and finally Medium.
After that the step response became much more stable to different flight phases, altitude, and to a lesser extent, weight, i.e. there were no noticable differences in graphs for the different parameters, like altitude, climb, descent, fly forward or hover. I am not 100% sure it is due to motor timing, but there is a good chance it ws one of the most important factors.
The strange thing for me is that higher timing, MediumHigh, which should provide a much more responsive motor, did not seem to change significantly the overall respnse compared to MediumLow.
During the day I havee manually tuned the copter for 1950 grams and for 2450 grams.
Best PIDs for 1950 grams:
Best PIDs for 2450 grams:
I was trying very hard to down the copter in AltHold mode, jerking the stick like crazy in different flight phases, in climb, descent, hover, flight forward, with climb or descent. Overall feeling was almost perfect.
I still have issues with LOITER/POSHOLD mode. It is much less stable in vertical high rate descent (at 4.2 m/s). When descending with slight forward motion, the stability is much better.
I decided to reduce some values in the hope that they would affect the LOITER behaviour:
PSC_VELZ_P 2.5, was 5.0
PSC_VELXY_P 1 was 2
PSC_VELXY_I 0.5 was 1
PSC_VELXY_D 0.25 was 0.5
Overall, the impression is that it improved LOITER behaviour.
Descent up to 1.5 m/s - stable
Descent 1.5 …2.5 m/s - some slight wobble, but OK
Descent 2.5 …4.3 m/s - more wobble, seems still OK, but worrysome.
Hey, good news!
Usually with Arucopter you have the same P and I rate values, but if it works it works.
Also you should try to settle on one set of PIDs that work for a variety of weights, or the minimum weight really, then just change the ACCEL values down to suit increased weight.
or you can just guess a bit, the ATC_ACCEL values are not that sensitive to single digits and decimal places, and can usually be rounded to the nearest thousand or hundred.
I was looking at the graphs, and usually there was a soft overshoot to 1.1 with the line then tending to go down to 0.85, I though that since the I term is the “slow” acting stabilizer, I pushed it up compared to P term, and the line seems to have become better, stabilizing at 0.95. One the other hand, if I tried to pump up both P and I, there was a point where oscillations began to show up.
I will try to play around with ACCEL values, and in fact the PIDs which I obtained for 1950 grams produced step response maybe 10…15 % lower for 2450 grams (like it was reaching 1.05 falling back to 0.95 with 1950 grams, and became 0.95…0.85 with 2450 grams. So most probably that was very flyable. On previous occasions I was getting like 0.5.
Next few days I will run some higher altitude tests (in fact, today I tried flyint at 1000 meters with 1950 grams, and the step response was exactly the same as at altitude of 0 meters.
Roll: Some of the many, I do not remember which…
Pitch:
This one to me is almost perfect Roll response (in my noob understanding):
I have to try high altitude flights, then I will try to push up a little bit PIDs even more till I start get oscillations.
I-term is the slow acting stabiliser, as you say, but I view it as more long term than each and every attitude change. I think of it more as a modifier for some external effect like weight imbalance or wind. (it does actually act with every attitiude change, that’s just my interpretation - I’m OK with being corrected). As such it’s usually kept as the same value as P-term. Arducopter acts slightly differently and is tuned differently to Betaflight for example.
D-term is probably what you want to adjust to keep the P-term in check. Be careful with D though → going a fraction too far can have exponentially bad results. Check motor temperatures, and you can hear a mechanical sound from the motors if D-term is too high and there’s high frequency oscillations.
D-term is typically 1/16th to 1/20th of P-term, but this is only a rough guide, like a starting point if you had to guess, and not a real rule. Yaw is a different bucket of worms but much less critical than pitch and roll.
I have heard the D-term screeching during the setup, and you could see like two or three oscillations on some of the graph which I believe were due to the D-term too high. It seems that increasing I term requires less D-term than increasing P term.
Overall, it seems that I term still makes the response somewhat sharper, so increasing I term seems to change the reponse in the 0,2…0.5 second range, but the wobble during the descents is also rather low frequency, so it could well be that the I term would still be fast enough to help in the overall stabilization.
It is only the descent which is by far the most complicated. It could be that it is due to the very big props (relative to the weight), and prop wash destabilization is therefore much higher. But I am not sure. With 13 props the setup was much easier, they were much more forgiving.
Thanks a lot for the help!!!
I am still having issues.
I have discovered that with the settings I have, I get in some conditions rather high frequency oscillations which probably are due to high D-term. They have amplitude of 1º and 7 Hz, very stable. They seem to occur during high speed descent and slow forward flying at about 30 km/h.
I am not sure if they are dangerous. However, if I try to reduce the PIDs, like when I changed D term from 0.09 to 0,07, and PI from 140 to 120, the overall feeling was that instability during decents became worse.
On this graph you can see that oscillations appear and die at certain speed (and always in descent):
I tried to reduce the MAX ACCEL from 70000 to 40000, that moved the speed at which oscillations tend to occur during descent from around 35…40 to 50…60 km/h.
There seems to be like some resonance frequency. Now, the frame is extremely sturdy, you can not twist arms at all, so I doubt that this comes from the frame rigidity.
PS: Did a Liion battery test flight (6S4P Samsung35E, with capacity decreased by 10 % due to old age), slow flying at about 30…35 km/h gives the best hover time, it stayed in the air for 67 minutes, with some 5 % energy left, so it has a max hover time of 70 minutes and a range of 40 km. when flying slowly. With new batteries that would increase to about 75 minutes… It is not bad, but I expected more. I think that RCTimer motors suck, I will order SunnySky 3508-700 and will try from there once more. I somehow have a feeling that the problems I have are partially related to motors, and their response. It could be that if I use higher RPM smaller props, I will get a more stable response. The higher Kv mogtors are usually slightly less efficient, but my guess is that Sunnysky 700 kV will outperform by far the RCTimer 350 kV motors.
Not sure if I should try setting the
ATC_RAT_RLL_SMAX
ATC_RAT_PIT_SMAX