-
Notifications
You must be signed in to change notification settings - Fork 553
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
[FEATURE] Foc calculation refactoring #311
Comments
If this generates too much work (changing the examples, ....) getfoccurrents:
getdccurrents:
and no changes in loopfoc. |
I only added a getABCurrents function and it looks like that before: RAM: [= ] 9.2% (used 4536 bytes from 49152 bytes) So no real space saving, no performance impact, but a single function to enhance in the future. |
I thought a getDQCurrents function (park transform) wouldn't be useful because it's used only once. |
@Candas1 should be close this one? |
Sorry I forgot about this one, it was covered here. |
Hi,
This is not adding a feature, but could make further changes easier.
There is duplicate code here and here
This could be made a function getAlphaBeta or getClarkTransform that uses foc currents as inputs, and returns alpha and beta.
A function getParkTransform could use the electrical angle, alpha and beta and return DQcurrents.
getDCCurrent could use the electrical angle, alpha and beta and return DCcurrent.
Eventually, foc_current torque control type in loopfoc would do:
And dc_current torque control type in loopfoc would do:
The text was updated successfully, but these errors were encountered: