Open
Conversation
- Added FW revision info to the 7 MSB bits of brake state (ui8_tx_buffer[6]) - Removed Human Power (ui8_tx_buffer[23-24]: could be calculated from torque and cadence fields)
… less power losses. - 40KHz TIM1 Interrupt rate -> max HAL sensor detection offset 25us - Rotor speed calculated two times each Electrical Revolution
- TIM1 PWM Freq to 19KHz - Better rotor interpolation: + Double TIM1 IRQ rate + Hal sensor detection running at 38KHz - Updated motor svm_table according to TIM1 PWM freqency and to upper bound of TIM1 counter - Motor ref speed calculated two times every electr. revol. - Battery current sampled in the middle of PWM duty cycle (counter = 0) - Max Field Weakening angle calculated based on motor speed - Higher Power Assist multiplier resolution (2% insted of 10%) - ADC Freq. = CPU Freq/3
…KHz) - OK - ADC conversion started by HW TRGO signal (TIM1 OC4 Compare) - OK - Hall sensor position calibration - WIP
- Hall angles Calibration - Updated message from ESP32
- New Motor control algorithm: - IRQ based Hall detection - Hall counter @ 250KHz - Hall Calibration (Angular and Time correction) - Hall counter correction based on Hall state - Phase adjust step by step - HW tirggered ADC conversion (OC4Ref) - Added calibration mode to riding modes
- Use different Hall counter offset for every Hall state - Updated low pass filter() function
- Solved Power delay issue on restart.
- ADC values Right aligned. - To avoid overrun errors, ADC buffered values no more readed in ebike_app but in pwm-up interrupt (end of conversion) - Fixed minor bug in main loop timings - PWM freq decreased to 18KHz (all values parametrized in main.h) - Power glitch bug fix (race condition between PWM interrupt and Hall GPIO interrupt) - FOC angle asin_table optimization (thanks to beemac) - PWM Dead Time increased from 1us to 1.5us (OEM firmware uses a value of 3us!)
- motor_controller() loop removed - FOC Angle calculation algorithm changed - Field Weakening Enable/Disable
4ced82e to
ab25614
Compare
- Battery overcurrent check in main loop - FOC angle calculation code optimization - Slightly increased FOC angle multiplicator default values (36v/48v) - OTA FW update using Watchdog reset instead of Power OFF/ON - Motor blocked counter fix
- New Torque Smooth function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.