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

Zero vector frequency randomization #770

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

Conversation

lolwheel
Copy link

Adds Zero vector randomization so the acoustic profile of FET switching is less annoying.

I tested this change on my Floatwheel and made sure that all_fw target builds without issues.

I don't have a good way of testing this change on a dual-motor setup, any tips on how to do this would be appreciated.

@vedderb
Copy link
Owner

vedderb commented Oct 5, 2024

This one has many potential dangers and will almost certainly not work with dual motors. I also don't know how much the rand-function will impact performance. It will take me quite significant effort to test all of this. Before I do that, have you confirmed that it actually has any benefits? Is it more silent? Does it help with EMI? If it is just an "interesting feature" without any observed worthwhile benefits I don't think it is worth adding as it several potential problems that I might not even be able to find yet and it has impact on the performance.

@lolwheel
Copy link
Author

lolwheel commented Oct 8, 2024

I agree that this is a risky change. In my opinion it does provide improvements in the sound characteristics of the motor.

rand() is usually pretty fast but I think I agree with you that its performance is not a given. I can probably just inline a simple LCG random number generator in the code, it's like 2 lines.

I do not have a way of measuring EMI explicitly, neither is this my goal with this change.

What are your concerns regarding the change not working in dual motor setup? I'll be happy to address them better.

@vedderb
Copy link
Owner

vedderb commented Oct 8, 2024

My floatwheel has an almost entirely silent motor (maybe not all of them are like that). Having that almost non-existent sound change characteristics slightly is not a good enough motivation for me for a change with this impact. Maybe I'm wrong here though and my floatwheel is an exception, so if you have some demo and good arguments I'm prepared to change my mind here.

How does it change the HFI-sound? That is one area where there potentially is something to gain.

Here is one comment about it from the discord that is not very convincing:
bild

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

Successfully merging this pull request may close these issues.

2 participants