MicroArduCopter, 3" props, Omnibus Nano, Success!

I think the key here is increasing INS_GYRO_FILTER to 80 or more (default is 20) and also decreasing PSC_ACCZ_P. By default I think the settings are optimized for copters with much more mass that need high input to change height and react slowly. I also found that decreasing MOT_SPIN_MIN helped the copter stop trying to take off when armed. I really wish there was better documentation on INS_GYRO_FILTER it really is so crucial to be high for smaller copters.

If you look at GitHub - betaflight/betaflight: Open Source Flight Controller Firmware you’ll see that the focus these days is totally on P. That seems to be a result of the much more powerful motors and efficient ESC’s that racing copters have now.

I’ve never found this has much effect for me.
Here are my settings (this is a bigger 180mm quad, but with quite powerful motors). QAV180-PIDPlus.param

My theory with EK2_ABIAS_P_NSE is that because the prop rpm’s are much higher than with bigger copters they tend to interfere with the gyro’s but are impossible to remove entirely (notch should help a bit here). Any moderately aggressive flying means that the EKF is trying to tune out the perceived “bias” meaning that over time the position estimate gets worse, but even more problematic is that if you then hover the “learned” bias is still there and the EKF is in all sorts of trouble. For me this meant that RTL would often fail if I flew for long enough. By reducing the bias learning, the position estimate will recover more quickly - and that is my experience.

1 Like

That makes sense, but I’m not sure… Because with my tilting issue, different FC’s do it differently. I went through 3 FC’s on this copter (all omnibus nano’s) and one was so bad I couldn’t fly… It just leaned and leaned to the point I couldn’t compensate for it. The other two did it less and I could work around it, but they were still different from each other. And there are tons of posts on the betaflight forums about omnibus boards doing the same thing for them… They eventually changed the way the driver for the IMU works, and added a few different filters that fixed it for everyone. That makes me think it’s more of an issue w/ either bad sensors, or noisy PSU or some sort of electrical problem. I don’t know for sure, though.

I wish I could understand why changing the abias_p_nse param changes the efficiency of the copter! It definitely does. I can go back and forth w/ that setting, and my hover throttle and flight time change.

Thanks for this useful information and explanations, it helps me understand these sometimes obscure parameters.

I’ve spent a peaceful bank holiday going through the filtering code :slight_smile:

My favorite explanation of filters so far is this: https://www.propwashed.com/betaflight-software-filters-setup-guide

My findings for ArduCopter:

  • Filters are applied in the order Raw Gyro -> LPF -> notch
  • Only filtered values are used by the PID controller
  • The notch filter only applies to the gyro
  • The batch sampler definitely shows only raw values, so there is no way it can show the effect of the notch
  • The primary problem with the LPF is latency, this is why altitude control is so bad with a low LPF value. The default for betaflight is 90Hz, which reduces latency but let’s more noise through. So INS_GYRO_FILTER=90 is a good option
  • The betaflight dynamic notch requires dshot telemetry :frowning:
  • The betaflight static notch is set to 400hz with another at 200Hz, this is pretty typical for small copters so a notch around 400Hz means you are on the right path. Interestingly the above article indicates that the LPF attenuates these frequencies anyway, but they are so strong that they still get through so the notch filter is much more aggressive in betaflight. Not sure about ours
  • Allowing the batch sampler to show filtered values would be pretty easy. I might try it.
  • More noise means your motors are working harder (they think the noise is pilot commanded) adjusting so get hotter and reduce flight time
5 Likes

So read some more of the PID controller code on the train. So a few things of note:

  • The PID values are updated at the fast loop rate, so higher loop rate should give more accurate values and crisper response
  • ATC_RAT_RLL_FILT and ATC_RAT_PIT_FILT are low-pass filters of already filtered gyro values to the D-term of the relevant controller only. So by analogy these shoud be set to 100Hz for small copters as per-betaflight settings
  • ATC_RAT_YAW_FILT is a low-pass filter that passes on already filtered gyro values to all PID elements for yaw
  • These settings apply to all modes - the PID controller is seperate to the mode control logic
3 Likes

It happened also to me to test some boards with noisy sensors.

I think we have two kind of problem:

  1. some cheap boards suffer from aforementioned electrical problems
  2. even with good boards with good PSU the default parameter values for PID are not good for this little copter

For the second part you (@wicked1), @andyp1per and others are doing a very useful job explaining which parameters need to be changed and in which way.

Thanks

P.S.: in all discussions you always talk about INS_GYRO_FILTER but never about INS_ACCEL_FILTER, do you think could be useful to experiment also with this last parameter?

I wonder if the new Omni Nano V7 with a different sensor suite would perform any better or it’s just overall poor quality. I went thru a couple Nano V6’s also.

My guess is that INS_ACCEL_FILTER is more applicable to EKF modes since the accelerometers are more required to figure out your position in space.

As far as I can tell cleanflight sets this to 15Hz and betaflight 20Hz. In general I would expect these lower values to result in increased latency in flight modes that care (i.e. that use the EKF and rely on leveling) but I suspect it doesn’t matter as much since they are not used by the PID controllers and setting it lower will reduce the amount of noise coming from the accelerometers.

Finally I think my journey is ending… (or starting!). After a long time I got a good flight endurance test with my Sub250g micro-quad: A 210g Micro-Quad that Flies for More Than 21 Minutes . Cheers!

I have some lg hg2 batteries, so tried them. 15:35 for a gentle hover. No wind or anything.
I ordered a couple of the vtc6’s to try.

My voltage readout was at 5.4v when my esc started acting strange… It was like bad oscillations.
When I plugged the battery into my charger after it rested for 5 or 10 minutes, the cells were at 6.2v.
I don’t know how accurate my voltage reading is on this copter… I did calibrate it for a full battery when I built the copter.

ESC is an Aikon AK32 20x20 esc.

Sony VTC6 is really better than LG HG2 because you can drain almost all energy of it, around 2.85A, due to the better continuous discharge rate of Sony…

@andyp1per (or anyone), have you done much more fine tuning of loiter? At some point I had non default settings for my PID’s related to position hold, but earlier this spring I reset everything and started from scratch again.
Now that everything else is working so well, I’d like to get it to hold its position more steadily… W/ the default settings it’s on now it rocks back and forth a lot in GPS position hold modes. I don’t think it’s just chasing a bad GPS signal either… It’s like every movement causes it to rock back and forth a bit.
In stabilize it’s completely solid…

If you’ve fine tuned that could you give me any advice or post a parameter file?

I never use loiter - usually - but today was trying the autotune in loiter feature. Didn’t work great from an autotune perspective (maybe too much wind?) but loiter was very steady. I usually use PosHold as my goto EKF mode. Rocking back and forth sounds like toilet bowl? maybe too much compass interference?

I think it is oscillating… I can see it in the logs. Basically the desired position is a straight line, and the actual position is a sine wave over it. I spent a day tuning the PSC settings in my first iteration of ‘microcopter’, but those settings aren’t working well for this new setup. I’ll just have to jump in and start tuning again…
It’s not going around in a circle at all… But if I move forward and stop, it rocks back and forth. If it sits still w/ a good GPS signal it’s fine. If it repositions itself, it rocks back and forth again. It’s subtle and not anything you could see flying line of sight… But in FPV, it’s obvious.
I’ll get it sorted next time I have some tuning time.

Nice question @wicked1,

on controller tuning with oscillations @Leonardthall once said this:

By the way, I was reading this that is somewhat related:

and

EK2_ABIAS_P_NSE
This noise controls the growth of the vertical accelerometer delta velocity bias state error estimate. Increasing it makes accelerometer bias estimation faster and noisier.

so making accelerometer bias estimation slower solves this problem? What values have you tried?

Thanks for the reply. I hadn’t seen Leo’s post about it.

For EK2_ABIAS_P_NSE, I’m currently on the default setting of .0005 (I may have an extra zero in there, I don’t have the parameters in front of me). The leaning issue is a little complex. If EKF is not using the GPS due to bad reception, at .0005, the copter leans to the left based on the amount of throttle I give it. Once it gets a good GPS signal, it levels itself and is fine as long as it has GPS, even in non GPS modes. I lowered it to .0001, and it no longer leaned even when it has no GPS reception, but my flight time decreased. So, I am putting up w/ the leaning in order to get the longest flight time possible.
The issue is somehow related to the IMU’s or noisy power in the cheap omnibus boards… Different Omnibus Nano’s do it differently. One was so bad it wasn’t flyable. Another leaned back rather than left, etc… It seems like a hardware issue to me.

I have a problem with my micro copter (3" props, kakute f7). I put it on the ground, arm in stabilize mode, put a little throttle (but not takeoff). After inspecting the log, I found when motors start to spin, AccZ decreased enough to make copter feel there is a velocity downward. This do not happened on my 250 frame.


1 1980-1-1 上午 08-00-00.bin (300 KB)

this is my 250 frame

@maroquio Compliments for the design of your microcopter. I think that the parts under the motors that holds the legs are 3D printed. Is it possible to have the STL file of that part?

This is one of those tuning threads that might benefit from the tuning instructions I wrote on the wiki:
http://ardupilot.org/copter/docs/tuning-process-instructions.html

Please give feedback and suggestions here:

1 Like

Hello, Andrea.
Actually, that part is made of CNC machined nylon, but you can 3D print as well. It will not be so strong as solid nylon, but can work. I’m sending the file as an attachment. Btw, the new version does not use this part anymore. I use a M2.5 nylon 8mm standoff with a 2mm carbon fiber rod. You can see in the assembly 3D animation in the video below:

Anyway, the STL of that old landing gear base is attached.

Best regards!

Sub250 Landing Gear Support.stl (221.3 KB)

3 Likes