sensorless docs improvements

This commit is contained in:
PAJohnson
2021-05-27 22:51:34 -04:00
parent 4b2ac94f08
commit 2edc38b77c
3 changed files with 13 additions and 7 deletions
+2
View File
@@ -9,6 +9,8 @@ Please add a note of your changes below this heading if you make a Pull Request.
* Step and direction mode resets position when entering closed loop just like `input_pos` does
* CAN baud rate setting is now correctly handled
* `odrivetool dfu` works properly when an ODrive is flashed with the `dfu` switch set to "dfu".
* `odrivetool dfu` now erases the entire flash memory before flashing firmware. This ensures that old configuration parameters are erased.
* ASCII and the Native Protocol do not run at the same time on a UART interface. See `odrv0.config.uart0_protocol` and the `STREAM_PROTOCOL_TYPE` enums for details.
### Added
* `sc` command to ascii protocol to run `odrv.clear_errors()`
+9 -5
View File
@@ -80,16 +80,20 @@ All variables that are part of a `[...].config` object can be saved to non-volat
* `<odrv>.hw_version_major`, `<odrv>.hw_version_minor`, `<odrv>.hw_version_revision`: The hardware version of your ODrive.
## Setting up sensorless
The ODrive can run without encoder/hall feedback, but there is a minimum speed, usually around a few hundred RPM.
The ODrive can run without encoder/hall feedback, but there is a minimum speed, usually around a few hundred RPM. In other words, sensorless mode does not support stopping or changing direction!
Sensorless mode starts by ramping up the motor speed in open loop control and then switches to closed loop control automatically. The sensorless speed ramping parameters are in `axis.config.sensorless_ramp` The `vel` and `accel` (in [radians/s] and [radians/s^2]) control the speed that the ramp tries to reach and how quickly it gets there. When the ramp reaches `sensorless_ramp.vel`, `controller.input_vel` is automatically set to the same velocity, in [turns/s], and the state switches to closed loop control.
If your motor comes to a stop after the ramp, try incrementally raising the `vel` parameter. The goal is to be above the minimum speed necessary for sensorless position and speed feedback to converge - this is not well-parameterized per motor. The parameters suggested below work for the D5065 motor, with 270KV and 7 pole pairs. If your motor grinds and skips during the ramp, lower the `accel` parameter until it is tolerable.
Below are some suggested starting parameters that you can use for the ODrive D5065 motor. Note that you _must_ set the `pm_flux_linkage` correctly for sensorless mode to work. Motor calibration and setup must also be completed before sensorless mode will work.
Below are some suggested starting parameters that you can use. Note that you _must_ set the `pm_flux_linkage` correctly for sensorless mode to work. Motor calibration and setup must also be completed before sensorless mode will work.
```
odrv0.axis0.controller.config.vel_gain = 0.01
odrv0.axis0.controller.config.vel_integrator_gain = 0.05
odrv0.axis0.controller.config.control_mode = 2
odrv0.axis0.controller.input_vel = 10
odrv0.axis0.controller.config.vel_limit = <a value greater than input_vel>
odrv0.axis0.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL
odrv0.axis0.controller.config.vel_limit = <a value greater than axis.config.sensorless_ramp.vel / (2pi * <pole_pairs>)>
odrv0.axis0.motor.config.current_lim = 2 * odrv0.axis0.config.sensorless_ramp.current
odrv0.axis0.sensorless_estimator.config.pm_flux_linkage = 5.51328895422 / (<pole pairs> * <motor kv>)
odrv0.axis0.config.enable_sensorless_mode = True
+2 -2
View File
@@ -32,14 +32,14 @@ to publish packages with the name odrive.
"""
# Set to true to make the current release
is_release = False
is_release = True
# Set to true to make an official post-release, rather than dev of new version
is_post_release = False
post_rel_num = 0
# To test higher numbered releases, bump to the next rev
devnum = 6
devnum = 0
bump_rev = not is_post_release and not is_release
# TODO: add additional y/n prompt to prevent from erroneous upload