# Harmonic and Notch Filters

**URL:** <https://discuss.px4.io/t/harmonic-and-notch-filters/32158>\
**Category:** Uncategorized\
**Created:** [May 10, 2023, 4:33pm UTC](https://discuss.px4.io/t/harmonic-and-notch-filters/32158 "2023-05-10T16:33:49Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![AWilkins\_Ascend](https://discuss.px4.io/user_avatar/discuss.px4.io/awilkins_ascend/32/8388_2.png) [@AWilkins\_Ascend](https://discuss.px4.io/u/AWilkins_Ascend)\
**Post date:** [May 10, 2023, 4:33pm UTC](https://discuss.px4.io/t/harmonic-and-notch-filters/32158/1 "2023-05-10T16:33:49Z")

</div>

Hello,

I am getting into tuning larger Quadcopters and have come across a lot of high vibrations in my logs. I would like to implement a harmonic and a notch filter. However, I just want to make sure my thinking is correct on this.

Here is my log:  
[https://review.px4.io/plot\_app?log=f79f2b01-82fe-4844-a41a-4a6508271105](https://review.px4.io/plot_app?log=f79f2b01-82fe-4844-a41a-4a6508271105)

Here is an image of the frequencies

 ![image](https://discuss.px4.io/uploads/default/original/2X/8/8e7a734d89e16509781f55cd276863d1b1b004e6.png)

As you can see I have a large spike at around 50Hz (what I assume to be from the skids). I was going to implement a notch filter at 48Hz with a bandwidth of 10 to get rid of that large spike.

Is there any other changes I should consider regarding IMU\_GYRO\_CUTOFF or IMU\_DGYRO\_CUTOFF? I am not a controls engineer so I am a bit of a newbie on these things.

Thank you!

---

<div class="post-metadata">

**Author:** ![hamishwillee](https://discuss.px4.io/user_avatar/discuss.px4.io/hamishwillee/32/3469_2.png) [@hamishwillee](https://discuss.px4.io/u/hamishwillee)\
**Post date:** [May 11, 2023, 12:20am UTC](https://discuss.px4.io/t/harmonic-and-notch-filters/32158/2 "2023-05-11T00:20:54Z")

</div>

@bresch @bkueng Is this something you can advise on?

---

<div class="post-metadata">

**Author:** ![AWilkins\_Ascend](https://discuss.px4.io/user_avatar/discuss.px4.io/awilkins_ascend/32/8388_2.png) [@AWilkins\_Ascend](https://discuss.px4.io/u/AWilkins_Ascend)\
**Post date:** [May 11, 2023, 2:14am UTC](https://discuss.px4.io/t/harmonic-and-notch-filters/32158/3 "2023-05-11T02:14:07Z")

</div>

For context, this is an acecore Zoe I am tuning for PX4

---

<div class="post-metadata">

**Author:** ![pacak](https://discuss.px4.io/letter_avatar_proxy/v4/letter/p/76d3ee/32.png) [@pacak](https://discuss.px4.io/u/pacak)\
**Post date:** [May 11, 2023, 7:24am UTC](https://discuss.px4.io/t/harmonic-and-notch-filters/32158/4 "2023-05-11T07:24:27Z")

</div>

From my understanding of the filtering process, you are already filtering most of that noise. Your IMU\_GYRO\_CUTOFF and IMU\_DGYRO\_CUTOFF are lower than those spikes.  
Only if you wanted to move IMU\_GYRO\_CUTOFF and IMU\_DGYRO\_CUTOFF to higher values, let’s say 80 and 70 Hz, would make sense to notch filter those spikes. But I don’t think that makes much sense for larger quads, as they don’t have to be very agile.  
Or if you had a spike at 20Hz, in which case you don’t wanna low pass filter that low, as that would probably make your quad unstable and hard to tune, you could use a Notch filter .

But I might be wrong, in which case I too am following the thread for some better info.

---

<div class="post-metadata">

**Author:** ![AWilkins\_Ascend](https://discuss.px4.io/user_avatar/discuss.px4.io/awilkins_ascend/32/8388_2.png) [@AWilkins\_Ascend](https://discuss.px4.io/u/AWilkins_Ascend)\
**Post date:** [May 11, 2023, 5:39pm UTC](https://discuss.px4.io/t/harmonic-and-notch-filters/32158/5 "2023-05-11T17:39:44Z")

</div>

I was thinking about using a notch filter, but someone told me it would be risky given the large band of the spike. I am assuming that I am seeing this because the downward wind from the props is hitting the skids of the UAV

---

<div class="post-metadata">

**Author:** ![Aman\_Chandak](https://discuss.px4.io/user_avatar/discuss.px4.io/aman_chandak/32/10266_2.png) [@Aman\_Chandak](https://discuss.px4.io/u/Aman_Chandak)\
**Post date:** [May 12, 2023, 1:06pm UTC](https://discuss.px4.io/t/harmonic-and-notch-filters/32158/6 "2023-05-12T13:06:55Z")

</div>

For vibrations particularly, I feel that they are the prop-arm vibrations. This happens when air crosses the drone arms while props pushes air downwards. Although this is a common behaviour I observed with 20-22inch prop frames. I guess you can proceed with the notch filters and try taking a flight and then you can compare the results. I also have the similar frames and tuned it with the notch filters if that gives you a push 🙂

---

<div class="post-metadata">

**Author:** ![AWilkins\_Ascend](https://discuss.px4.io/user_avatar/discuss.px4.io/awilkins_ascend/32/8388_2.png) [@AWilkins\_Ascend](https://discuss.px4.io/u/AWilkins_Ascend)\
**Post date:** [May 15, 2023, 3:18pm UTC](https://discuss.px4.io/t/harmonic-and-notch-filters/32158/7 "2023-05-15T15:18:03Z")

</div>

That is very helpful, thank you! Yes I am going to add notch filters and see how things turn out while tuning

---

<div class="post-metadata">

**Author:** ![AWilkins\_Ascend](https://discuss.px4.io/user_avatar/discuss.px4.io/awilkins_ascend/32/8388_2.png) [@AWilkins\_Ascend](https://discuss.px4.io/u/AWilkins_Ascend)\
**Post date:** [May 16, 2023, 3:06pm UTC](https://discuss.px4.io/t/harmonic-and-notch-filters/32158/8 "2023-05-16T15:06:43Z")

</div>

I applied a notch filter at 47 frequency and a band of 8, things are looking much better. although my vibrations are still higher than I would like them to be

---

<div class="post-metadata">

**Author:** ![AWilkins\_Ascend](https://discuss.px4.io/user_avatar/discuss.px4.io/awilkins_ascend/32/8388_2.png) [@AWilkins\_Ascend](https://discuss.px4.io/u/AWilkins_Ascend)\
**Post date:** [May 17, 2023, 5:16pm UTC](https://discuss.px4.io/t/harmonic-and-notch-filters/32158/9 "2023-05-17T17:16:46Z")

</div>

I will add some documentation regarding this with larger quads

---

<div class="post-metadata">

**Author:** ![Aman\_Chandak](https://discuss.px4.io/user_avatar/discuss.px4.io/aman_chandak/32/10266_2.png) [@Aman\_Chandak](https://discuss.px4.io/u/Aman_Chandak)\
**Post date:** [July 3, 2023, 3:35am UTC](https://discuss.px4.io/t/harmonic-and-notch-filters/32158/10 "2023-07-03T03:35:35Z")

</div>

I can have a look at the log file and maybe can tell you something.

---

<div class="post-metadata">

**Author:** ![AWilkins\_Ascend](https://discuss.px4.io/user_avatar/discuss.px4.io/awilkins_ascend/32/8388_2.png) [@AWilkins\_Ascend](https://discuss.px4.io/u/AWilkins_Ascend)\
**Post date:** [July 20, 2023, 2:11pm UTC](https://discuss.px4.io/t/harmonic-and-notch-filters/32158/11 "2023-07-20T14:11:40Z")

</div>

All Set Aman, thank you though!

---

<div class="post-metadata">

**Author:** ![mikeisted](https://discuss.px4.io/user_avatar/discuss.px4.io/mikeisted/32/18014_2.png) [@mikeisted](https://discuss.px4.io/u/mikeisted)\
**Post date:** [December 9, 2024, 5:37pm UTC](https://discuss.px4.io/t/harmonic-and-notch-filters/32158/12 "2024-12-09T17:37:06Z")

</div>

Hi Aman.  
The props on the Zoe sit beneath the arms, so the usual impact of high velocity air on the arms would be much mitigated. I also did some quick calculations that might indicate the hover rpm of the Zoe may be just shy of 3000 rpm. This suggests a blade passing frequency of 100Hz or roughly double what @AWilkins_Ascend is seeing.

Given that this is predominantly seen in roll and not pitch, it does not suggest to me unbalanced props.

The suggestion of resonance in the legs is a good one as it does seem to occur at near the hover rpm, which may be the source of the resonance signal. It would be interesting to see if there is any data indicating the resonance reduces in more general flight.

---

<div class="post-metadata">

**Author:** ![mikeisted](https://discuss.px4.io/user_avatar/discuss.px4.io/mikeisted/32/18014_2.png) [@mikeisted](https://discuss.px4.io/u/mikeisted)\
**Post date:** [December 11, 2024, 11:51am UTC](https://discuss.px4.io/t/harmonic-and-notch-filters/32158/13 "2024-12-11T11:51:53Z")

</div>

Just for info. Here is the Actuator FFT plot we had while beginning to tune the Acecore Zoe. There is no sign of the peak at about 50Hz, in contrast to that from @AWilkins_Ascend. The low pass filters are still set to default here, as can be seen.

 ![image](https://discuss.px4.io/uploads/default/original/3X/e/3/e3d76d63b4e3194b187b99ace925083537fe525d.png)

---

<div class="post-metadata">

**Author:** ![Falcon](https://discuss.px4.io/letter_avatar_proxy/v4/letter/f/49beb7/32.png) [@Falcon](https://discuss.px4.io/u/Falcon)\
**Post date:** [January 22, 2025, 1:43am UTC](https://discuss.px4.io/t/harmonic-and-notch-filters/32158/14 "2025-01-22T01:43:17Z")

</div>

Hi @AWilkins_Ascend,

I have the same issue with angular acceleration not sure what should be done. Were your vibrations obvious while hovering before you applied the notch filter setting? Or it’s only showing in log? I lowered the Gyro cutoff to 34 but I heard it’s better to lower the D term to 20 or 15Hz for large drones. Mine is 22in prop quadcopter.

Have a look in the analysis.

Thanks

 ![image](https://discuss.px4.io/uploads/default/original/3X/7/3/7397899f62380d43e37e1543271d42ccff848581.jpeg)
