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

[FEATURE] Always run current sense and persist current values #419

Open
Candas1 opened this issue Jul 6, 2024 · 0 comments
Open

[FEATURE] Always run current sense and persist current values #419

Candas1 opened this issue Jul 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Candas1
Copy link
Collaborator

Candas1 commented Jul 6, 2024

Always run current sense in loopfoc() if it's available/linked to the motor.
Save phase currents, alpha beta currents, unfiltered d/q currents as motor members.

Benefits:

  • if user declared current sense but is not using FOC modes, he has to run his own code to check current sense returns proper values. With this change, he can always see the currents without additional code.
  • this could allow overcurrent protection even if not in FOC mode
  • the different currents are available for sensors like Flux observers or HFI

In loopfoc:

  • if current sense is available, get phase currents and save phase currents
  • run clarke transform and save alpha/beta currents (useful for flux observers)
  • run park transform and save unfiltered d/q currents (useful for HFI)
  • filter d/q currents

This will impact the performance when not using FOC, but will not run if the user doesn't link the current sense to the motor.

@Candas1 Candas1 added the enhancement New feature or request label Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant