Oscillate and flip over after switching FC

What exactly causes the desync problem? I have been researching for hours and there are countless posts about this but I couldn’t find a definitive explanation for its cause. How do I ensure it does not happen again? I have been using these ESCs for stable hover and auto missions and they have not done this before; it only happened during autotune.

When I tested the offensive ESC with a motor it was causing the motor to “stutter” on throttle up. Do I need to use different ESCs? Which ones would those be? The Lumenier model:

seems to be targeted towards racing drones. From reading around it seems that T-motor ESCs are a no-go given the number of issues reported here. What about these ESCs?

The Neuron 60S seems to have everything (BLHeli_32, Dshot, even nice heatsinks), but seems targeted for RC planes. Not sure if it has desync problems on a hexacopter. The Hobbywing does not have any telemetry or Dshot but people have reported to get good results from it.

Should I just make a separate topic about this?

My guess is that it’s not the ESC that’s the problem but the noise you are putting through them. Lots of noise is a good way to burn out motors and ESCs (and your graphs above are showing a lot of noise). Stuttering (or grinding) sounds like noise to me - do a motor test on the bench w/o props and make sure the motors run nice and smooth. This is direct input without noise so will tell you if something is up with the setup - if they stutter on the bench then it’s something to do with the ESC/Motor config if they are smooth but stutter in flight then more likely noise that you need to eliminate. Do short test flights and make sure the motors come down cold/warm - hot motors is also an indication of noise. Noise is eliminated through good mounting and effective filtering.

The test I mentioned above was with the offensive ESC + motor on the bench sans props and flight controller. When I changed the motor and tried again it did the same thing so it must be the ESC. I’ve had several flights before with untuned parameters and the motors would only get slightly warm, nothing too severe to the touch.

What noise are you referring to exactly? Gyro noise?

You should try a few of things:

  • Set the motor timing in BLHeliSuite to auto
  • Increase the dshot rate by increasing SERVO_DSHOT_RATE. Default (0) is 1Khz other numbers a multiples of loop rate, so if you loop rate is 400 start with setting it to 3 (=1.2Khz)
  • Make sure you are using dshot - accidental PWM can sound like stuttering - so using AUX1-6 and the various masks set correctly

The ESCs I have currently do not support telemetry or Dshot. I was asking for recommendations on good ESCs for my build (960 mm frame hexacopter, Cube Orange, 8-9 kgs AUW)

Hi Andy,

Does bi-directional Dshot work on hex configs now? Your topic here says it is only for quads. Asking so that I can have RPM-based harmonic notch filters.

It should work on hex configs but you will generally only get RPM from 4 channels. What flight controller? I think we could expand to hex now that some of the other issues are resolved.

Cube Orange. Will the RPM-based notch filtering work if there is only input from 4 channels?

It should do - if there is no incoming data then the notches won’t move. It’s true that it used to be that we only create 4 notches so it wouldn’t matter. Now that we create notches for all motors we might have to think about how that works.

1 Like

Wait, are you saying there is a separate notch for each motor per harmonic? I thought it took the averaged frequency from all the motors as the center.

The default is the average and that should work fine. INS_HNTCH_OPTS=2 gives you a notch-per-motor

Hello @andyp1per. I am only getting 4 out of 6 motors to work with Dshot enabled. I have made a topic here. Can you please advise?

I’ve got my ESC issues resolved. They seem to be working and I get telemetry data from them. I have set up bdshot and its relevant masks. However, I am seeing no difference in the gyro data with and without the filters. I did several hover tests. First with harmonic notch turned off and then with these params enabled:

INS_HNTCH_ENABLE,1
INS_HNTCH_REF,1
INS_HNTCH_FREQ,40
INS_HNTCH_HMNCS,7
INS_HNTCH_MODE,2
INS_HNTCH_BW,20
INS_HNTC2_ENABLE,1
INS_HNTC2_REF,1
INS_HNTC2_FREQ,40
INS_HNTC2_HMNCS,7 
INS_HNTC2_MODE,2
INS_HNTC2_BW,20

Here is gyro noise from MP FFTs:


Before implementing filters

After implementing filters (actually looks a bit worse).

Also, FTN.NDn is showing 1 the whole time so I am not sure what to make of that. There should be 4 * 3 * 3 = 36 dynamic filters total if I understood this correctly. FTN.NF1 is 40 (default) so it seems like the filters are just not enabled.

Log files:
Before filters enabled
After filters enabled

You have INS_LOG_BAT_OPT set to 0 for both logs. How would you know if they are working well or not? And don’t bother looking at the Accel graph, the notch filter is only active on the Gyro.

In any case this is what you want to look at to configure the notch filter. You don’t need 2 notches filters. And you want INS_HNTCH_MODE 3 not 2 for ESC telemetry RPM reference.

FFT

1 Like

Okay, changed INS_LOG_BAT_OPT,1. I’ll give it a try now.

I was trying to implement this:

2 not 1 for post-filter analysis. Disable Notch 2 and configure Notch 1 based on the graph I attached. The center frequency is ~52Hz.

That’s a different parameter.

1 Like

Cheers, Dave. You’re right. I had a brain fart, thanks for pointing that out. I did INS_HNTC2_ENABLE,0 and implemented the changes you suggested. Here is what it looks like now:

image

Clearly the filtering is working now. However, I have some questions:

  1. What are those large downward spikes at 250, 500, and 750 Hz? They are only on GyroX.

  2. Why does this FFT look different from what mavfft_isb.py generates:
    image
    Is it something to do with how the Fourier transforms are averaged?

  3. Why is FTN.NDn showing 6 in the logs? 4 motor inputs, 3 axes, 3 harmonics → 36 notches. FTN.NF1 to FTN.NF6 are all centered around 50 Hz or so. I thought only 4 inputs from bdshot were supported even if this is a hex config.

Log file.

Some artifact of log scaling I suppose. This is what it really looks like (similar to your mavfft graph):
FFT

Working well I would say. You can disable FFT, FFT_ENABLE to 0 as you are not using it.

That I’m not sure of never having configure the notch filter on a Hexa.

1 Like

I am guessing averaging difference because during takeoff my drone tipped forward which caused RPM to fluctuate and the fundamental vibration mode jumped to ~60 Hz. See:

My guess is that mavfft_isb.py is only looking at the first few windows whereas MP averages all of them which is why the 60 Hz component gets lost in that graph. It will also explain the scaling difference.

This also does not explain why the 200 Hz component is removed. I had INS_HNTCH_HMNCS,7 so only 50, 100, and 150 Hz should be filtered out.

It averages all of them. It also windows them, which MP may not do. I don’t know what algorithm MP uses - it keeps changing

1 Like