Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FilterReview: features to be implemented #10

Open
8 of 16 tasks
IamPete1 opened this issue Jun 11, 2023 · 9 comments
Open
8 of 16 tasks

FilterReview: features to be implemented #10

IamPete1 opened this issue Jun 11, 2023 · 9 comments

Comments

@IamPete1
Copy link
Member

IamPete1 commented Jun 11, 2023

Somewhere to note down all the features that we would like:

@jkordani
Copy link

ESC Telem with "MultiSource" deselected doesn't respect the scale value of the _REF field. I am working on a PR to fix that.

Additionally, I'd like to have the _REF field used as a scale for multisource as well, but that is not supported in AP firmware yet (and I'll probably make a PR for that too)

@IamPete1
Copy link
Member Author

ESC Telem with "MultiSource" deselected doesn't respect the scale value of the _REF field. I am working on a PR to fix that.

I think that is what I would have expected. The way to test is to turn on notch logging and compared the estimated to the logged on the spectrograph.

Image

@jkordani
Copy link

jkordani commented Feb 18, 2025

Not sure I understand your response, to be clear
https://github.com/ArduPilot/ardupilot/blob/15376a4908cc1a0019f692b495085688736f84e0/libraries/AP_Vehicle/AP_Vehicle.cpp#L866
If the filter has the option set for HarmonicNotchFilterParams::Options::DynamicHarmonic which in the filter review tool corresponds to "MultiSource", then individual filters are added per esc telem freqency. If not, then the average is targeted. In the AP code, the average is scaled by the _REF parameter, in the WebTools it is not.

Edit: I do intend to get some experimental data, but this particular craft's flight windows are hard to come by, so I was hoping to get some insight from the tool ahead of time.

Edit 2: In my fork, I added the ref scaling parameter to the identically shaped code in the trackers/EKF.js, That resulted in the notch filter centers shifting visually in the logging overlay, but not being used in the transfer functions. When I added the scaling to the smaller get_target function, then I get scaling also with MultiSource, which I don't think is the way AP currently works and would be an incorrect feature at the moment

@IamPete1
Copy link
Member Author

Not sure I understand your response, to be clear
https://github.com/ArduPilot/ardupilot/blob/15376a4908cc1a0019f692b495085688736f84e0/libraries/AP_Vehicle/AP_Vehicle.cpp#L866

Hum, that is quite odd. As you say, it looks like were doing it wrong. I guess most everyone uses per-ESC if they have the feedback (that is what I would suggest you do too).

@jkordani
Copy link

I have counter-rotating motors, so I have my first noise peak is at 1/2 the motor RPM and hence need to scale the targeted frequencies down by 1/2 of the reported RPM. The AP doesn't support scaling on per-ESC tracking (which frankly looks like a simple oversight, I'm sure my prop style is uncommon), but it does support scaling on avg-ESC and RPM tracking. In the short term, I we'll see how far we get with avg-ESC with scaling, but I plan on submitting a PR to add scaling on per-ESC as well.

@IamPete1
Copy link
Member Author

I have counter-rotating motors, so I have my first noise peak is at 1/2 the motor RPM and hence need to scale the targeted frequencies down by 1/2 of the reported RPM.

I don't understand how it would be half?

@jkordani
Copy link

I have a motor that has a pair of props on the top, and a pair on the bottom. They rotate in opposite directions, and there seems to be a noise source at 1/2 the motor RPM. The upper and lower blades pass each other at 1/2 motor revolution

@IamPete1
Copy link
Member Author

The upper and lower blades pass each other at 1/2 motor revolution

Right, but half a revolution would be twice the frequency.

Double check your motor poles is set correctly. It could be the ESC RPM is reporting double and your really seeing the fundamental.

@jkordani
Copy link

jkordani commented Feb 18, 2025

Nope I'm dumb, it would be twice the frequency, good catch.

Edit: Yes, we have a known issue with our ESC config, I missed a memo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants