17 inch quad, cube black, weird yaw and throttle behavior

So, I have looked at the rpm based notch setup guid, and even though I should perfoarm some other testflights before the notch configuration I thaught I would ask you now since you’ll probably be sleeping when I do my tests tomarrow.

I should enable the notch and set it to use ESC telemetry.

INS_HNTCH_ENABLE: 1
INS_HNTCH_MODE: 3

I should not use the second notch (INS_HNTC2_ENABLE)

I should set the scaling to none

INS_HNTCH_REF: 1

The INS_HNTCH_FREQ should be set lower than hover rpm but higher than the INS_ACCEL_FILT.
So I set that after the hover P and I setup.

INS_HNTCH_BW Should be set to half of the INS_HNTCH_FREQ.

The notch options I’m a bit unsure of. I want one notch for each motor frequency, right? But I also want to target the resonance of the frame.

The documentation said to set INS_HNTCH_OPTS to 2 for one notch per motor, but that I also could set it to 4 for faster sampeling. But maybe my FC wont be able to do the fast sampling?

That should I set the OPTS parameter to and are there any other parameter I have forgotten?

I’m also unsertain of what to set the INS_HNTCH_HMNCS parameter to?

Right, don’t.

Yes

Right. But just set the ACCEL Filter to 10Hz

Yes. Don’t use any other options.

Leave it at default for now.

I did a test-flight and looked at the CTUN, Throttle scaled out value, and the throttle at hover was at about 12.5. Is that 12.5%? Because that seems a bit low. These motors, according to T-motor specifications, lift about 1000g (2.2 punds) at 50% throttle. That would be 4000g (8.8 pounds) for the entire drone at 50%.

If the thrust curve would be linear, which it’s not, but it’s linear enough to see that 12.5% at hover is too low. The max pull force according to t-motor is about 10kg (22 pounds) for the entire drone. At 50% it’s 4kg (8.8 pounds) so at 2kg (4.4 pounds) it should be about 25%. I’m at 2.5kg so it should be a bit higher, maybe 30% at hover.

How come it’s this low at hover?

Edit: You use pounds right? Just to make it a bit easier to analyse

Also, the PWM/Dshot value is about 1400 at hove. That would not be 12.5% hover thrust right?

Is should be closer to 40% of the motors max output, right?

Nothing really to see here. A hover throttle value of .1 something is not unusual and one would expect the motor outputs to be in the range that they are.

Ok, thanks

I’ll post a log when I’ve tested the setup with the notch filter active

I’ve made a test-flight using the rpm based notch filter. The quad appears to fly way better on stock PIDs using the new ESC. Although it’s still badly tuned and needs tuning.

I did some more aggressive maneuvers at the end to test vibration and clipping. The third IMU clips alot, about 500 when I do the more aggressive maneuvers. Maybe that could be improved with tuning, But not as bad as before.

Vibration is under 30 except for when I fly more aggressive, but maybe that’s the PIDs. It feels stiff and does small firm oscillation a couple of times when I do a small stick input and than center the stick.

Log file with no filters, INS_LOG_BAT_OPT=1 pre-filter logging
https://drive.google.com/file/d/115KDkh14uQa1hUur_Brq8cH3eRtF8c-r/view?usp=sharing

The filter seems to eliminate most of the noise. Except for a peak at around 100 hertz. It’s not large in ampitude (after filtering) but noticeable compared to the rest of the noise.

Log file with filters active, INS_LOG_BAT_OPT=2 post filter logging
https://drive.google.com/file/d/1ebvKNb8FK2uybs-dvL5ewmJ3W1lv-N2e/view?usp=sharing

Filter settings:

Maybe you could take a look at the logs and see if there is something I need to address before I continue tuning.

Thanks!

Set INS_HNTCH_HMNCS back to default (3) and try again. For future reference running INS_LOG_BAT_OPT at 1 (pre-filter log) logs at the sensor rate losing resolution in the range of interest. But no matter, we already reviewed this.
I think you are in good shape at this point! The tuning actually looks pretty good. Some oscillation at the end of these clips but in general this looks very good for a Rate response!


ok,

Sorry, thought 1 was the default value. I’ll run a test with the INS_HNTCH_HMNCS at 3

Thanks!

With (1) you are filtering the 1st harmonic which can be seen here, and on the FFT graph, at ~47Hz.

Let’s see how this looks when the next harmonic is being picked up.

I’m getting a weird error message about “too many notches”

Skärmklipp

Yea, OK. You will have to set the notch options to 0. I forget what older F4’s are capable of…

1 Like

hahah, yeah. The cube black has is quite old now.

I set the OPT to 0 and it flew well. I also noticed that the motors were cooler now than before doing the notch. Seems like it’s doing it’s thing.

Logifile:
https://drive.google.com/file/d/1nY3b1mblPOgDF7G3dwkevriYedf5TzxN/view?usp=sharing

Still some clipping but better. The first minute of the test is a hover. The rest is some small and large inputs and some breaking from forward and sideways flight.

Thanks!

Well, that took care of the 2nd harmonic!
FFT

Looking really good Axel. I’m curious what you would see if you configured BATT2_MONITOR for ESC (9). You don’t need it for anything but I’m puzzled by the Voltage reading from the ESC directly.

Thanks!

I’ll try to look into auto tune tomorrow. Or some manual tuning. I could maybe tune the D parameter to cope with the small oscillation when a small rapid pitch/roll input is commanded.

The voltage reading from the ESC is looking funky though


Don’t what’s up with that. I could setup the batery 2 monitor to look at it if you want to.

What parameters do I need to set in order to do that?

BATT2_MONITOR for ESC (9).

Try Auto Tune for sure but it might not improve things. It works best when Vibe’s are very low. But the Notch filter is working well so perhaps it will be successful. Save the parameter file of course as you advance and I would manually change the parameters back rather than load a parameter file (I never do that).

I won’t be able to fly again today, a bit to late here. But I’ll try to get a bench test in later tonight.

Won’t the voltage reading need scaling to? or maybe we’ll take that later

I’ll be 3 hrs closer to you in time next week. I’m returning home from a couple months working remotely in Mexico.

Yes, but usually it’s a minor adjustment. Not sure why yours is so far off.

1 Like

That’s great, I’ll try to post a fight log before lunch tomorrow.

Yeah, the voltage is way off, and jumps up and down in a weird fashion.

I enabled the BATT2_MONITOR to 9 so that it tracks the ESC voltage. It shows 11.3 volts while my cube power brick, the one that came with my cube black shows 24.2 volts, same as my multimeter shows.

Don’t know why, but when I connected the ESC telemetry, I only connected the telemetry wire to an RX input on a serial port. Serial 3, the gps 1 port since I use CAN for gps. I didn’t connect a ground from the ESC to the servo rail. I thought that since they both use the battery as ground they both have the same ground and I wouldn’t need to run a ground to the servo rail. Do I have to do that? The RPM data seems to work alright.

Edit: Also, I don’t want to use the BATT2_MONITOR for voltage scaling since it only shows 11 volts. Maybe it’s monitor number 1 per default?