Commit Graph
108 Commits
Author SHA1 Message Date
Oskar Weigl 68c2fb9777 implement 2-norm current clamping 2021-04-13 23:24:30 -04:00
Oskar Weigl ceafbe37fc let acim identification run model without data 2021-04-13 23:21:05 -04:00
Paul Guenette 6ff5e18c56 Update to devel 2021-01-10 15:04:50 -05:00
Paul Guenette 2f3caed851 Change how TUNING mode handles frequency, add last_error_time 2020-12-20 14:04:27 -05:00
Samuel Sadok e72d5ad831 fix return value 2020-12-16 10:13:21 +01:00
Paul Guenette adadef86aa Change some defines to static constexpr values 2020-12-10 15:21:00 -05:00
PAJohnson 95d5df6f4f Updated changelog, made phase check beta current filtering not depend on control loop rate 2020-12-09 20:12:34 -05:00
Oskar Weigl e407cb4cb6 implement phase balance check 2020-12-03 12:57:03 -08:00
Samuel Sadok 8765654429 fix overcurrent on arming
The first current samples happen exactly during low side FET switches and are thus not faithful.
2020-11-25 22:24:18 +01:00
Samuel Sadok c32cbec58c rename some of the new functions and variables 2020-11-16 21:03:23 +01:00
Samuel Sadok 18a391c092 Reduce kI in motor calibration
This prevents current overshoot if the motor snaps to align with
I_alpha. Consequently we can reenable current limit checks during
motor calibration.
2020-11-16 18:41:28 +01:00
Samuel Sadok 60b433700f fix uninitialized warning after CRITICAL_SECTION 2020-11-16 17:15:00 +01:00
Samuel Sadok 69897ece9c improve debug instrumentation
- add ERROR output on GPIO
 - add exported get_gpio_states() function
 - add task timer for DC calib ADC wait time
 - fix oscilloscope
2020-11-13 18:45:49 +01:00
Samuel Sadok a6587f8d8a fix various issues
- overcurrent error during motor calibration (this is caused by
overshoot. For now we just ignore the current limit during motor
calibration as we did before)
- factor 2 error at encoder calibration
- set error flag if Motor::arm() is called while the brake resistor is
enabled but disarmed.
- only arm brake resistor if enabled
- auto-arm brake resistor on clear_errors()
2020-11-13 18:45:49 +01:00
Samuel Sadok 80f648fa5c don't use std::isnan 2020-11-03 18:37:26 +01:00
Samuel Sadok 1f7815459f Merge branch 'devel' into control-loop-refactor 2020-11-03 18:34:08 +01:00
Paul Guenette 9594c477cb Read thermistors at least once at startup 2020-11-02 23:36:26 -05:00
Paul Guenette 1d0fcc5fcf Throw a DRV FAULT if initialization fails 2020-11-01 14:36:02 -05:00
Paul Guenette a428d08ecd Merge branch 'timing' into devel_fast 2020-10-30 21:26:31 -04:00
Paul Guenette 53a976fe6b Merge branch 'devel' into devel_fast 2020-10-30 20:48:37 -04:00
PAJohnson fd848f2c36 Addressed PR comments
Updated API Migration Notes
Changed Axis error that is thrown for over temp from ERROR_OVER_TEMP to ERROR_MOTOR_FAILED
Moved setting of thermistor_.motor_ = this from motor apply_config() to motor constructor
Moved motor_thermistor apply_config call from Motor to config_apply_all() in main.cpp
2020-10-21 03:44:32 -04:00
Paul Guenette b13fbe4163 Merge remote-tracking branch 'madcowswe/clean-math-funcs' into devel 2020-10-20 23:32:54 -04:00
PAJohnson 1899fa7df5 Moved thermistors from belonging to Axis to being a part of Motor.
Thermistor apply_config now called in Motor::apply_config()
Thermistor errors rolled into motor errors
odrivetool and GUI updated to handle change
Removed CurrentLimiter,Thermistor arrays abstraction
2020-10-13 22:01:52 -04:00
Samuel Sadok e1c7ddbafa fix stack overflow 2020-09-28 19:01:18 +02:00
Samuel Sadok 7fd0806d49 introduce InputPort and OutputPort, don't use NAN
The InputPort/OutputPort infrastructure facilitates safer
data paths between components: OutputPorts store a value
and the age of the value measured in number of control loop
iterations. InputPorts can be connected to various sources,
for instance an OutputPort. InputPorts expose the values to
consumers in the form of std::optional to reflect the fact
that an InputPort can be dangling or connected to a stale
OutputPort.
2020-09-23 16:20:21 +02:00
Samuel Sadok 3addf6da77 Merge remote-tracking branch 'origin/devel' into control-loop-refactor 2020-09-22 12:56:00 +02:00
Paul Guenette c764e2b286 Merge pull request #485 from madcowswe/rc-v0.5.1
Reset Ibus in reset_current_control
2020-09-10 19:33:43 -04:00
Unknown 4c5761c120 Reset Ibus in reset_current_control 2020-09-10 19:31:29 -04:00
Unknown 29332281be Convert SVM to not use out parameters 2020-09-05 00:56:59 -04:00
Unknown 4815e5ed19 Change sqrtf to std::sqrt 2020-09-05 00:23:58 -04:00
Oskar Weigl 600832f8cf drop flag fno-finite-math-only, and implement explicit nan check function 2020-09-04 20:31:58 -07:00
Oskar Weigl fb7d1d2961 change fabsf to std abs 2020-09-04 18:27:14 -07:00
Oskar Weigl 711111e6fb change fmaxf to std max 2020-09-04 18:23:33 -07:00
Samuel Sadok 5661a3b5ed Refactor control loop.
Please see https://github.com/madcowswe/ODrive/issues/472 for a detailed description.
2020-09-01 00:03:01 +02:00
Unknown ea03574ce3 Add FOC_Current timer 2020-08-27 18:09:44 -04:00
Oskar Weigl f59c80515b add MOTOR_ERROR_MODULATION_IS_NAN 2020-08-23 13:38:23 -07:00
PAJohnson f52c68b3a8 Added FF terms for current control and config variables to enable them. 2020-08-21 16:52:27 -04:00
Samuel Sadok 8d144bd944 Merge branch 'devel' into lowlevel-refactor 2020-08-05 16:28:17 +02:00
Oskar Weigl 3760c7bc84 Merge branch 'rc-v0.5.0' into devel 2020-08-03 20:16:51 -07:00
Oskar Weigl af16316940 Merge branch 'devel' into counts_to_rads 2020-07-25 20:29:43 -07:00
Samuel Sadok 171dab31bd fix ERROR_CONTROL_DEADLINE_MISSED
call effective_current_limit() only once instead of several times per
control iteration
2020-07-21 13:02:03 +02:00
Samuel Sadok 2d256f43cb more refactoring in perparation for new hardware 2020-07-21 13:02:03 +02:00
Samuel Sadok 6377df4b1e move ext int subscribe logic to Stm32Gpio class 2020-07-21 12:31:03 +02:00
Samuel Sadok ab7957f07f Overhaul upper level NVM configuration manager
Instead of using a declarative compile-time type that defines the layout
of the NVM data, now we use procedural style code to load and store the
configuration as a series of pop and push calls.  This allows for more
flexible code organization and opens the future possibility of storing
dynamically sized data (e.g. an array prepended by a length field).
2020-07-21 12:31:03 +02:00
Samuel Sadok 856455077d refactor drv8301 driver 2020-07-21 12:31:03 +02:00
Oskar Weigl 1808bedf1a Fix phase_vel units 2020-07-18 19:02:28 -07:00
Rowan Goemans 1a0d6acace - Refactored thermal and current lmiting sub-systems and introduced motor thermistor support.
- Added thermal errors to dump_errors call in odrivetool.
- Added function in odrivetool to set thermistor coefficients based on thermistor specs.
- Added documentation for users on how to connect and configure their own thermistors.
2020-07-17 14:09:47 +02:00
Unknown 883dd27a17 Fix static in encoder.cpp, constexpr the things 2020-07-11 22:19:41 -04:00
Oskar Weigl 758989e2b4 Cleaner clamping 2020-06-18 12:58:10 -07:00
pjohnson 63f7c09bc2 Clamped max_torque to 0 for ACIM motors in case max_torque happened to be negative. 2020-06-18 15:13:58 -04:00