Benjamin Vedder
3d57ed2f06
Cleanup
2021-04-11 19:38:55 +02:00
Benjamin Vedder
9a00234346
Merge pull request #282 from powerdesigns/ipm_bemf_decoupling
...
bemf_decoupling: improved math for IPM motors.
2021-04-11 19:36:35 +02:00
Maximiliano Cordoba
c7819a8722
speed_pid: improved integral term antiwindup.
...
-we feedback the output saturation to the integral term to improve the antiwindup mechanism.
Signed-off-by: Maximiliano Cordoba <mcordoba@powerdesigns.ca>
2021-04-11 11:59:22 -03:00
Maximiliano Cordoba
fbd35f15ad
bemf_decoupling: improved math for IPM motors.
...
-In IPM motors (ld_lq_diff > 0) Ld affects in the Q axis, and Lq affects in the D axis.
Signed-off-by: Maximiliano Cordoba <mcordoba@powerdesigns.ca>
2021-04-11 10:51:09 -03:00
Benjamin Vedder
1469e2568d
Field weakening updates
2021-04-11 11:31:25 +02:00
Maximiliano Cordoba
31d14e1c4e
mc_pwm_foc: simplified math in current PI antiwindup
...
Signed-off-by: Maximiliano Cordoba <mcordoba@powerdesigns.ca>
2021-04-10 20:02:15 -03:00
Benjamin Vedder
1da747e50f
Use filtered currents for cross bemf decoupling
2021-04-10 16:31:02 +02:00
Benjamin Vedder
feb1be5fbd
First attempt at field weakening and current controller windup protection improvement
2021-04-10 11:37:35 +02:00
Benjamin Vedder
2133d21fbc
Avoid numerical instability when utils_map is used over a range that approaches 0
2021-03-27 11:18:47 +01:00
Benjamin Vedder
8b9e3bf93f
Offset calibration improvements
2021-03-24 13:09:05 +01:00
Benjamin Vedder
3b4e601f61
Offset calibration update
2021-03-22 12:13:19 +01:00
Benjamin Vedder
89c4d712e8
HFI-Start fixes
2021-03-13 15:41:57 +01:00
Benjamin Vedder
c82346b42e
Added HFI start sensor mode
2021-03-13 11:42:23 +01:00
Benjamin Vedder
8900c41c34
First phase filter and offset calibration attempt
2021-02-28 20:36:02 +01:00
Benjamin Vedder
66b4d8f56d
Added FOC D axis controller gain scaling at max modulation
2020-12-06 21:33:08 +01:00
Benjamin Vedder
b7b0182856
CAN fixes, renamed HD to HD60, fixed multiturn position control
2020-11-18 14:26:55 +01:00
Till Rosenband
64d9132389
Remove some #ifdef HAS_DUAL_MOTORS.
2020-10-28 08:31:47 -04:00
Benjamin Vedder
af7cd36cb8
Added hall sensor interpolation ERPM config option
2020-10-22 08:37:32 +02:00
Benjamin Vedder
c77f92470b
IO board support, initial bms support, more openloop parameters, removed D current injection, added new HWs
2020-10-09 21:08:48 +02:00
Benjamin Vedder
ecb9b28e27
Merge pull request #197 from powerdesigns/MTPA_hall_detection
...
MTPA hall detection
2020-07-24 23:18:12 +02:00
Marcos Chaparro
0f337df9c2
MTPA: reduce variables scope
...
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2020-07-21 15:08:31 -03:00
Marcos Chaparro
75a70ccb36
MTPA: disable id override during hall detection
...
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2020-07-21 15:07:46 -03:00
Benjamin Vedder
80b5e7071f
Fixed bug introduced in PR and calculate motor current from magnitude of both axes
2020-07-21 09:23:48 +02:00
Benjamin Vedder
46e76ec975
Merge pull request #186 from powerdesigns/virtual-motor-update
...
Update virtual motor code to work with latest Vesc v5.
2020-06-30 20:18:51 +02:00
Maximiliano Cordoba
3a08b1e947
solved bug in speed_ramp.
...
it was being overwritten by the rpm command.
Signed-off-by: Maximiliano Cordoba <mcordoba@powerdesigns.ca>
2020-06-20 14:43:00 -03:00
Maximiliano Cordoba
4a9bf528a9
Fix virtual motor to work with latest Vesc v5.
...
connect_virtual_motor_command only requires 3 arguments, load torque, load inertia and battery voltage.
The rest of the motor characteristics, are taken from already existant variables in VESC motor configuration.
Solved issue with encoder sensor configuration.
Solved fault gate driver undervoltage
Improved hardware dependency defines in virtual motor.c
Signed-off-by: Maximiliano Cordoba <mcordoba@powerdesigns.ca>
2020-06-20 13:36:56 -03:00
Benjamin Vedder
960cd3b992
Some updates to MTPA PR
2020-06-17 13:55:35 +02:00
Marcos Chaparro
1876c52b02
Disable MTPA during encoder detection
...
Avoids id current set by encoder detection to be overwritten by the
MTPA algorithm.
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2020-06-06 22:14:06 -03:00
Maximiliano Cordoba
2c7ad3f797
add Id into the calculation of motor current
...
Signed-off-by: Maximiliano Cordoba <mcordoba@powerdesigns.ca>
2020-06-06 22:14:06 -03:00
Marcos Chaparro
42926d530e
Add MTPA support
...
Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2020-06-06 22:14:06 -03:00
Benjamin Vedder
b1915b06a7
Some updates for PRs
2020-06-03 10:52:55 +02:00
Maximiliano Cordoba
390f1019ef
Axiom: adds input current sensor capability.
...
use HW_HAS_INPUT_CURRENT_SENSOR in hw_axiom.h to enable it, it is commented by default
Signed-off-by: Maximiliano Cordoba <mcordoba@powerdesigns.ca>
2020-05-16 17:56:08 -03:00
Benjamin Vedder
9781fb9563
Manually merged #166
2020-05-12 15:53:32 +02:00
Benjamin Vedder
ee8f946aa8
Hall sensor transition and interpolation improvements
2020-04-17 00:38:36 +02:00
Benjamin Vedder
c64e7987bc
Use fast speed estimator for hall sensors and encoder
2020-04-16 12:16:02 +02:00
Benjamin Vedder
dd48276163
Disable hight current sampling during inductance measurement
2020-04-16 11:40:56 +02:00
Benjamin Vedder
6f7c40b4e1
Improved flux linkage measurement
2020-04-16 09:12:08 +02:00
Benjamin Vedder
ca05b60802
Fixed inductance measurement scaling, decreased observer gain scaling
2020-04-08 11:05:58 +02:00
Benjamin Vedder
ef37c70911
Fixed new bug in previous commit...
2020-04-04 01:02:53 +02:00
Benjamin Vedder
09dc8ce384
Fixed resistance measurement current ramping bug
2020-04-04 00:58:42 +02:00
Benjamin Vedder
1016ab076b
Added hall_analyze terminal command
2020-04-03 22:57:43 +02:00
Benjamin Vedder
88d74ae0b6
Added mutex to DRV SPI driver, moved fault stop to thread, smooth current ramping for sensor and flux linkage detection
2020-04-03 20:12:12 +02:00
Benjamin Vedder
c0f75f14ac
Current ramping during resistance measurement
2020-04-02 20:43:11 +02:00
Benjamin Vedder
450ed15837
Some Fixes in prevoius PR
2020-04-02 16:26:59 +02:00
Jeffrey M. Friesen
f7964e20c2
Few small changes and fixed bug with duals
...
Added ramping to current measurement to avoid steps during current calibration with an un-tuned current controller.
Added terminal command for mapping to internal nrf pins, useful when you want to erase_mass a locked nrf chip and dont want to cycle between a bunch of windows to scan connect etc.
Made fault led on duals blink if motor 2 is faulting.
Added break on inductance measurement if motor faults.
Added placeholder commands for changing name and pin of BLE module.
2020-04-01 17:58:37 -07:00
Benjamin Vedder
7ccf626b42
Some updates on PR
2020-03-29 17:00:43 +02:00
Jeffrey M. Friesen
47813b1ab6
One motor Double Current Drive on Dual
2020-03-28 11:21:45 -07:00
Benjamin Vedder
dd16cb7761
Updated ChibiOS to 3.0.5
2020-03-21 20:14:20 +01:00
Benjamin Vedder
b1945b7dfc
Cleaning, optimization and refactoring
2020-03-21 11:40:50 +01:00
Benjamin Vedder
10b700b74c
Updated observer gain scaling, and implemented CAN shutdown on unity hw config
2020-03-21 01:05:42 +01:00