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

Phase lag pre-arm check #27068

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

andyp1per
Copy link
Collaborator

Made a separate PR for discussion so as to not hold up #26674

@tridge your original suggestion was bw > 0.75*freq/nsources, I assume that was a typo because that will break the configuration of all 14 of my copters that are using this feature very successfully (and for which this feature was originally written) 😄 I have changed that to bw * 0.75 > freq/nsources which at least does not break many existing configurations but it does not work on octacopters. It is impossible to get the octacopter test to pass with this setting which was my original concern with having any check like this - it simply does not filter enough noise. My suggestion therefore is either to make this a warning or simply clamp the check at f/4. Either way much discussion and testing required!

Copy link
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe go to 1.0 so it passes with quad multi-src with 1:4 ratio?

libraries/AP_Vehicle/AP_Vehicle.cpp Outdated Show resolved Hide resolved
@andyp1per
Copy link
Collaborator Author

After discussion with @lthall we decided f/sqrt(nsources) was a suitable compromise in terms of pre-arm check. Adjusting attenuation unfortunately is unlikely to make enough of a difference.

@andyp1per andyp1per force-pushed the pr-phase-lag-pre-arm branch 2 times, most recently from 15aaabf to 69451bd Compare May 25, 2024 21:26
@tridge
Copy link
Contributor

tridge commented May 26, 2024

Adjusting attenuation unfortunately is unlikely to make enough of a difference.

I'm surprised about this. At zero attenuation there should be no phase lag. I wrote a little test to check this out and got this:
image
this was for a single notch set at 60Hz with bandwidth of 60Hz. Source frequency was 50Hz, and the test frequency varies for the 5 graphs from 10Hz to 50Hz.
The test shows a strong relationship between attenuation and phase lag.
test code here:
#27164
one thing I can't explain is the stair step in the graphs

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

Successfully merging this pull request may close these issues.

None yet

3 participants