Harmonic Notch Filter not setup correctly?

Hi this is the chart of freq after setting Harmonic Notch Filter.
Shouldn’t these motor vibrations be reduced to lower than normal control vibrations after setting the notch filter? The notch filter didn’t seem to make a difference. Have I set it up wrong?

I’ve changed the FC mounting to a much softer setup with foam pad + rubbers since I last posted. A complete change in setup.

Vibrations after HNTCH setup:

HNTCH Setup:
image

Log: WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free

Thanks in advance!

This is the Vibes in the latest setup with the above filter (whilst hovering):

This is the Vibes from a previous vibration failsafe flight (whilst hovering for comparison):

I think your HNTCH settings look correct, but the logging is still showing pre-filter values. Set INS_LOG_BAT_OPT,4 and we’ll be able to see pre and post values for a proper comparison.

The vibrations are mechanical, and setting the HNTCH won’t make those go away. If you’ve soft mounted the controller, make sure none of the wires are restricting movement or bouncing off the controller. Also look at your props and make sure they are balanced and even. This is a Z vibration so if the tips of individual props aren’t spinning evenly that can cause a problem.

Ok will do. I’ll refly to capture the difference between before and after filtering.

I think I understand what your saying - All vibrations are mechanical. The vibrations are still there the filter just removes them for the software onboard. The logs are still recording the vibrations pre-filter and by changing the log_options I will be able to log both before and after.

The vibrations recorded aren’t changed by the filtering. The filtering changes what the gyro is seeing and acting on. The vibration graphs are generated by the accelerometers, and the HNTCH is working on the gyro data.

The HNTCH is trying to remove/reduce the effects of the noise created by the mechanical vibrations on the gyros.

By setting INS_LOG_BAT_OPT,4 you only need to do one flight as it will record both pre and post filter data at the same time.

1 Like

These are the results of another hover flight. With the option INS_LOG_BAT_OPT,4 it looks like I’m still getting the pre-filter values. How do I see the post filter values?

Log: WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free

Might be my fault. Also set INS_LOG_BAT_MASK,1 (and leave …BAT_OPT,4). I don’t know for sure, but I wonder if the pre/post logging only works on one IMU at a time.

Edit: Also set INS_HNTC2_ENABLE,0. and INS_HNTCH_REF, 0.187

Hi @Allister I’ve made those changes but not seeing any changes to the charts. I appeciate the help.


Logfile:WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free

I just realized you’re running an older version of AC. Option 4 doesn’t work on that version. I should have looked at that sooner.

Ideally you should update the latest stable version of AC, but in the mean time try INS_LOG_BAT_OPT,2. This will only give you post filter data but at least that will sort out if the filter is working.

1 Like

@Allister that is why I always start by telling people to update to the latest firmware version :smiley:

1 Like

I see you have Dshot configured. If you are going to update to latest Stable consider using the Bdshot target and drive the Notch filter with Motor RPM instead of FFT. If you do that disable FFT as it will just be churning in the background and doing nothing. You also want these:
INS_ACCEL_FILTER,10
PSC_ACCZ_I,1 (2X MOT_THST_HOVER)
PSC_ACCZ_P, (MOT_THST_HOVER)

1 Like

Hi Chaps, good progress now

Harmonic notch filter now shown in the logs, amplitude peak reduced by 30x

I finally got a day with less wind and completed Autotune. I think that has solved the yawing error I had under high torque. The autotune made significant changes to the Yaw PID values although pitch and roll didn’t vary much. Its flying very tight now.

I’ve rebuilt the FC mounts 4 or 5 times trying to reduce vibrations. Some of the changes I’ve made is:

  1. Isolate the ESC/FC Stack Assy by putting the assembly on a foam pad rather than directly on the frame. The FC (Matek) has the rubbers it came with but these don’t seems to be suitable in this case.
  2. Decreased the distance between the FC and the foot of the stack
  3. Added another rubber grommet under the FC
  4. Added a 20g mass to the FC

This is the results of the last flight. The highlighted section is the hover and slow maneuvering. The rest is maneuvering at about 65% throttle. Is this in the safe region to prevent accel saturation and a Failsafe due to vibration?

Now I have cleared up some of the issues, more linger :slight_smile:
Once reaching 15m/s in Loiter the copter begins to slow even with the stick pinned forward as you can see in the log btwn 3:51 and 3:54. Motors are only at 60% and not being maxed out.

Log: WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free

Unfortunately the branch of arducopter I use is a few months behind the official version. I don’t update until the developers of that branch release theirs tested with the latest firmware.

Auto Tune didn’t really run on Pitch and Roll. And if it did the changes were not saved. You would never have the same values for these if it did:
ATC_ACCEL_P_MAX,116700
ATC_ACCEL_R_MAX,116700
ATC_ACCEL_Y_MAX,27000
ATC_ANG_PIT_P,4.5 (default and too low)
ATC_ANG_RLL_P,4.5 (default and too low)
ATC_ANG_YAW_P,4.5

There are some insignificant changes to the Rate Pitch/Roll PID’s, not sure how that happened. Yaw did change significantly as you said. Perhaps it’s the branch you are using, something isn’t right.

I wouldn’t say the tune looks that good and the Vibes are still high.

You are correct, Autotune completed successfully but when 1 ft off the ground before landing it went into RTL due to low battery and switched it off. So i went through the logs and could see the PID values after each of the 3 successful tunes. I manually changed these to those in the log. I didn’t touch those numbers you mention there. Do I have to run it again? :roll_eyes:

Yes, I’m trying to get rid of vibes but running out of ideas.

Any idea why it slows in loiter?

Well yea, those changes you made manually don’t amount to anything and others are not changed at all.

Give it more throttle?

In Loiter throttle controls climb rate does it not. Mid throttle means it should maintain current height. 100%pitch forward stick it would attempt to achieve 20m/s loiter speed? As per loiterxyspeed param.

Upgrade firmware to latest stable

Set these:
FFT_ENABLE,0
INS_ACCEL_FILTER,10
INS_HNTCH_REF, 0.1267
INS_HNTCH_FREQ,90
INS_HNTCH_BW,45
INS_HNTCH_FM_RAT,0.7 ← you will get this with the firmware upgrade
INS_HNTCH_OPTS,0
INS_LOG_BAT_OPT,4
After confirming the HNOTCH settings are correct with another test flight (again :frowning: ) then you could run Autotune.

I think your battery voltage levels need a slight adjustment, these are correct for 4 cell LiPo
BATT_ARM_VOLT,14.70
BATT_CRT_VOLT,14.00
If these are triggering failsafe actions too soon then DO NOT change them → something else is wrong.
Check the voltage calibration at the lowest expected voltage, like connect a 3 cell lipo and measure/set the calibrated voltage.

For the Loiter speed, you are pitching over to 30 degrees at most which is
LOIT_ANG_MAX,0 Set to zero for 2/3 of PSC_ANGLE_MAX/ANGLE_MAX
and
ANGLE_MAX,4500
45 x 2 / 3 = 30
which is why the GPS speed indicates a maximum of about 15m/s
So to go faster, increase LOIT_ANG_MAX or just use Stabilise or AltHold modes.
At least use one of those modes to test what speeds you can achieve, and what angle it takes to achieve the desired 20m/s.
Loiter is sort of designed for more precise flying rather than speed runs and moon shots :slight_smile:

For vibrations, it still looks less than ideal, but if you can be prepared to switch to Stabilize mode if there appears to be a fly away, you should be OK. Get plenty of practice in Stabilize!
And set this:
ATC_THR_MIX_MAN,0.5