I’ve done some initial test flights of an OMP M4 (Pixhawk 6c Mini) and I’d like a second opinion before I start autotune. Here’s the log:
(Note, it was windy during this test, but in previous flights with ideal wind it hovers more or less in place)
A couple specific questions:
I’ve set up the notch filter using the throttle, rather than the RPM from the ESC. When I tested the RPM on the bench it seemed to work fine, but in flight the numbers don’t seem steady enough. I’m using the ESC governor (50% - 2000 rpm) and it seems to be stable. I set up the filter using the same methodology I would have for a quad using the filter webtool. Looks good to me, but I’m open to comment.
The OMP instructions suggest -5/+12 for a pitch range for “hover” or non-aerobatic flying so I’ve set up min and max based on that. It seems okay to me, but I can’t shake the idea that -5 is too much for the min angle. I’ve set LANDING_MIN to -2. I haven’t seen any behavior to make me think there’s an issue so if this is all in my head then let me know.
The tail does wag back and forth in flight but I’m assuming that will get cleaned up in tuning.
I’m open to any comments or suggestions before I start tuning. I’d like to try the auto tune method.
The RPM feedback looks bad, I would suggest to set a static notch instead centered at 33.3 Hz.
Looking at FFT it seems that 2/rev and Z accel are quite high. Is the rotor tracking perfectly tuned? I understand on small and very rigid rotors is difficult to track to perfect equality, but I would spend some time and check if something better would be achievable.
This range looks fine to me. I run -6 /+12 on my Protos 380, handling is perfect.
More of a discussion question: Given the fixed throttle setting on this heli is there any real difference between using a static filter versus a throttle based filter? Do you see an advantage to using the static filter? I’m guessing it would use fewer CPU resources.
I didn’t notice anything obvious in flight but I’m going to try to do some manual tracking on the bench and see if I can improve it.
I believe the throttle based filter slides along with throttle (so collective movement in our case) - not the RSC output. That’s why I thought a static notch might be a more appropriate choice, you want it at the rotor frequency.
That makes sense. It never occurred to me that the filter would chase the collective. That’s no use. I’ll update to the static filter and go from there. Thanks again!
I’ve been slowly picking away at the tuning for this M4. So far so good, I think. If I could get a second opinion on that I’d appreciate it.
For both pitch and roll I need to do a second attempt as the first attempt gave me a zero D value. I followed the instructions in the wiki to manually re-set the D and try again.
The roll failed the first couple of times I tried so I ended up increasing the AUTOTUNE_FRQ_MAX to 100 per the wiki and that seemed to allow the auto tune to proceed. The pitch was done with the default of 70.
To be fair, the other than some tail wag, the heli has been flying very well in Alt-hold on the pre-tune defaults. I’ve been having fun just zooming around like that waiting for a stretch of good conditions to try autotune.
The peak is already at a gain of 1.7 with a frequency of 36 rad/s. So this didn’t give the autotune function much leeway to tune up the rate P gain. I would suggest using the PID notch filters to flatten out the peak and provide some room to get rate P and rate D gain. I would suggest the following settings
FILT1_TYPE 1
FILT1_NOTCH_FREQ 5.7
FILT1_NOTCH_Q 2
FILT1_NOTCH_ATT 6
ATC_RAT_PIT_NEF 1
ATC_RAT_PIT_NTF 1
You can run through AUTOTUNE of the pitch rate p and rate d test. This time set the AUTOTUNE_GN_MAX to 1.4 and set the pitch rate P and rate D gains to zero before running autotune. Hopefully it will be able to tune the rate p and d gains a little higher.
Now on to the roll axis. It was surprising that your roll axis did not have any peak to the frequency response gain plot (shown below).
The autotune was not able to tune the D gain very much but it took the P gain up until it hit the 1.8 response gain. Since your roll axis frequency response is much flatter, I would say that we can make a judgement call and tune up the rate D gain a little and pull back on the Rate P gain. Looking at the table of values it tested and the corresponding response gains. I would suggest the following
ATC_RAT_RLL_D 0.00024
ATC_RAT_RLL_P 0.045
I am shooting for a response gain of 1.4. No need to do the autotune again for roll axis.
For the yaw axis, I noted some unusual behavior with my t-rex 500 when performing the yaw axis tuning. The roll and pitch axes really coupled up when it was sweeping the yaw axis meaning the aircraft was rolling and pitching quite a bit with the yaw inputs. I believe that this is due to the velocity feedback. So if this happens, you can stop the tuning and set the AUTOTUNE_VELXY_P to 0.05. That should help reduce the interaction.
Thanks a lot @bnsgeyer ! That’s a great help. I will apply the changes you’ve suggested and re-do the pitch tune.
Can you tell me how you came to the notch filter setting of 5.7? On the multi rotor side that sounds really low for a filter, so I’m curious to learn how to figure that out? And if it’s based on previous experience I’ll take that too!
Weather and life will keep me from testing this till next week but I’ll report back any findings. Thanks again!
Maybe I can give some help on this- hopeful to not interfere with Bill’s job.
In the results plot you have the peak with progressively increasing omega which comes at around 36 radiants per second.
Now, from periodic functions math, omega is equal to 2*pi divided by the period of the obscillation.
Remembering that the period is equal to 1 divided by the frequency (in Hz) and re-arranging equations you come to the final result of ~ 5.73 Hz .
The notch filters on multirotors from what I understand address vibrations from the motors. We do the same thing for heli’s but it is the rotor which is the prinary source of vibrations. However in both cases, the INS notch filter is used to address those vibrations.
What I am doing in this case is trying to reduce the oscillation caused by the rotor interacting with the body dynamics of the heli. Multi’s don’t have this issue because of the more rigid propellers. Heli’s rely on the flapping of the flexible blades for control.
@Ferrosan Thanks for the formula. That helps to see the mechanics.
@bnsgeyer Great explanation! On Multi’s there is the idea that a filter so low (I’ve seen it mentioned below 20 or 25hz) would interfere with the fundamental control loop. I’m assuming it has something to do with the rigidity of one system vs the other, but is there a quick explanation to why that isn’t an issue here? Or is the filter you recommend too targeted?
Yes the notch filter can affect control loops but the problem with heli’s is that the lightly damped response shown by the peak in the pitch graph keeps you from getting a better tune. So unlike using notch filters for rotor noise where you use high attenuation like 20db or more. I use a low attenuation in this case to just control the lightly damped mode and allow better tuning of the rate P and rate D gains.
So I got a window of time and weather and I forged ahead. Hopefully not too far out of control.
I made the suggestions you shared and did the pitch rate PD tune again. The first attempt again returned a D of zero so I pulled the value from the log and tried again. Here is the result:
I followed up with a flight in loiter and tried out RTL. No surprises. Loiter seems to fly like loiter. (aka: it’s more fun in stab or alt-hold, but works as expected in loiter)
Question1: Once in loiter I did notice some minor intermittent oscillations in pitch and roll. I also noticed that the tuning maxed the Roll and Yaw Angle P both at 10, and the roll angle P is 8.8. Would high angle P cause the minor oscillations? I never tried loiter before the tuning was finished so I can’t compare.
Question2: When using autotune to check the values after the tune (finish tune - switch to alt-hold - switch back to autotune) what flight mode is that based on? The winds were really light be variable today and at moments I felt like it was holding position, and at others it didn’t.
Thanks for all your help and hard work to get the trad heli working so well!