Position Sensor Tuning
Position sensors can experience significant electromagnetic interference. ASI BAC controllers provide parameters to tune position sensors for higher accuracy and filtering in high-noise applications.
Hall Sensor Configuration
Hall Interpolation
Hall interpolation smooths motor operation by interpolating rotor angle transitions instead of using discrete six-step Hall transitions.
| Parameter | Function |
|---|---|
| Hall interpolation start frequency | Frequency above which interpolation begins |
| Hall interpolation stop frequency | Frequency below which interpolation stops |
| Hall Interpolation Transitions | Number of transitions averaged |
How Interpolation Works
- Above the start frequency: Controller interpolates rotor angle based on time between Hall sensor edges
- Creates smooth triangle wave instead of six-step transitions
- Below the stop frequency: Interpolation stops
Tuning Guidelines
- Set
Hall interpolation start frequencyat twice theHall interpolation stop frequency - Lower interpolation frequencies are generally better
- This is especially true for high pole count direct drive motors
- Tuning is iterative and requires trial and error
Disabling Interpolation
Setting both Hall interpolation frequencies above the expected peak motor electrical frequency effectively disables this feature.
Factors Affecting Low-Speed Chatter
| Factor | Impact |
|---|---|
| System backlash | Spoke tightness affects vibration |
| Power output | Higher power increases chatter potential |
| Motor design | Some applications cannot fully eliminate low-speed chatter |
Hall to Sensorless Transition
Firmware 6.026+: Use Sensorless to Hall Transition Frequency to tune the transition point between Hall-based and sensorless operation.
Troubleshooting Hall Sensors
Hall vs Sensorless Position Fault
Problem: Motor Position Sensor Type is set to 0 (Hall) or 1 (Hall start + sensorless run) and throws an error.
Solution: Set Motor Position Sensor Type to 2 (Sensorless) for motor speed autotune, then restore original setting.
Hall Table Issues
| Symptom | Cause | Solution |
|---|---|---|
| All -1 values | No ground, power, or sensors connected | Verify Hall 5V, Hall GND, and sensor connections |
| Repeating values | One or more sensors not connected | Verify Hall A, B, C connections |
| Repeating values at high RPM | High RPM + low signal quality | Reduce autotune speed or improve wiring |
Motor Power Requirement
Hall sensor discovery requires Rated motor power (Race mode Throttle power) to be filled in with at least the motor's rated power for:
- Analyze Hall wiring
- Offset calibration
- Rated motor speed analysis
Sine-Cosine Encoder Setup
Switching Frequency Limitation
Encoder configuration cannot run at switching frequencies higher than 12 kHz. Lower to 10 kHz before this process. Frequencies below 13 kHz disable Bluetooth connectivity—use TTL or CAN instead.
Prerequisites
Unlock Access Level 1
Enter Parameter access code: 15350
For newer dictionaries: Enter Parameter access code 1: 3BF6 (hexadecimal for 15350)
Lower Switching Frequency
Change Switching frequency to 10 kHz, save, and power cycle.
Brick Warning
Setting switching frequency too high can brick the controller, requiring return to ASI to unlock.
Configure Encoder Sources
Ensure Encoder Cos V Source and Encoder Sin V Source are configured to match your encoder's analog inputs.
Allowed sources (must be pulled down):
- Throttle
- ABMS
- Brake 1 (with Features2 bit 6 disabled)
- Brake 2 (with Features2 bit 7 disabled)
Note: Brake input options only work on TTL-CAN and CAN-BT controllers.
Low-Speed Noise Threshold
Reduces encoder angle fluctuations from analog input noise at low motor speeds.
| Parameter | Function |
|---|---|
| Encoder Noise Frequency Threshold | Electrical frequency below which noise filtering activates |
| Encoder analog noise threshold | Voltage change required before angle updates |
Converting RPM to Electrical Hz:
Electrical Hz = (RPM ÷ 60) × Pole Pairs
Example: For 50 RPM threshold with 6 pole pairs:
Encoder Noise Frequency = (50 ÷ 60) × 6 = 5 Hz
Noise Threshold Behavior
| Speed | Behavior |
|---|---|
| Above threshold | Encoder angle updates every PWM loop |
| Below threshold | Angle only updates when input voltage changes by at least the noise threshold |
Encoder Fault Range (FW 6.025+)
Fault ranges define the tolerance above and below Encoder Sine/Cos High/Low Voltage that triggers a fault.
| Parameter | Function |
|---|---|
| Encoder Sin Fault Range | Tolerance for sine input |
| Encoder Cos Fault Range | Tolerance for cosine input |
Values within this range are considered min/max voltage to allow for system-level measurement errors.
Post-Configuration
After encoder setup, you can restore:
Switching frequencyto 13 kHzBaud rate port2to 115200
This recovers Bluetooth connectivity if applicable.
Sensorless Motor Tuning
Sensorless operation eliminates Hall sensors by detecting motor position through back-EMF. Motor startup response is adjusted through two key parameters:
Sensorless open loop starting currentSensorless closed loop enable frequency
Sensorless Startup Sequence
The startup sequence consists of four phases:
Phase 1: Current Ramp
└── Duration: Sensorless open loop injection current ramp time (default 200ms)
└── Target: Sensorless open loop starting current (default 0.5 pu)
Phase 2: DC Current Hold
└── Duration: Sensorless open loop dc current hold time (default 15ms)
└── Purpose: Force motor into known position
Phase 3: Frequency Ramp
└── Duration: Sensorless open loop freq ramp time ms (default 1500ms)
└── Target: Sensorless closed loop enable frequency (default 20 Hz)
Phase 4: Closed-Loop Operation
└── Controller switches to closed-loop regulation
Sensorless Parameters
| Parameter | Function | Typical Value |
|---|---|---|
| Sensorless open loop starting current | AC current relative to rated motor current | 50%+ of max phase current |
| Sensorless open loop injection current ramp time | Time to reach starting current | 200 ms |
| Sensorless open loop dc current hold time | DC injection duration for positioning | 15 ms |
| Sensorless open loop freq ramp time ms | Time to reach closed-loop frequency | 1500 ms |
| Sensorless closed loop enable frequency | Transition point to closed-loop | ~10% of rated electrical frequency |
Tuning Guidelines
Sensorless open loop starting current:
- Higher current = more startup torque
- Common setting: 50% or more of max phase current
- Increase if motor fails to start under load
Sensorless open loop freq ramp time:
- Shorter time = quicker startup
- Too short = motor may lose synchronization under load
- Balance between responsiveness and reliability
Sensorless closed loop enable frequency:
- Should be as low as possible while maintaining stable back-EMF
- Motors with higher RPM/V constants need higher transition frequency
- Starting point: ~10% of rated electrical frequency
Starting Point
Set Sensorless closed loop enable frequency to approximately 10% of the motor's rated electrical frequency as an initial value.
Key Parameters Reference
Hall Sensor Parameters
| Address | Parameter | Function |
|---|---|---|
| 79 | Hall interpolation start frequency | Frequency to begin interpolation (Hz) |
| 80 | Hall interpolation stop frequency | Frequency to stop interpolation (Hz) |
| 81 | Hall Interpolation Transitions | Number of transitions to average |
| 82-89 | Hall Sectors 0-7 | Hall table values |
| 90 | Hall offset angle | Hall angle offset (degrees) |
Encoder Parameters
| Address | Parameter | Function |
|---|---|---|
| 91 | Encoder Cos V Source | Cosine signal input source |
| 92 | Encoder Sin V Source | Sine signal input source |
| 93 | Encoder Noise Frequency Threshold | Low-speed noise filter threshold (Hz) |
| 94 | Encoder analog noise threshold | Voltage change for angle update (V) |
| 95 | Encoder Sin Fault Range | Sine input fault tolerance (V) |
| 96 | Encoder Cos Fault Range | Cosine input fault tolerance (V) |
| 97 | Encoder offset | Encoder angle offset (degrees) |
Sensorless Parameters
| Address | Parameter | Function |
|---|---|---|
| 100 | Sensorless open loop starting current | Startup current (pu of rated) |
| 101 | Sensorless open loop injection current ramp time | Current ramp duration (ms) |
| 102 | Sensorless open loop dc current hold time | DC hold duration (ms) |
| 103 | Sensorless open loop freq ramp time ms | Frequency ramp duration (ms) |
| 104 | Sensorless closed loop enable frequency | Transition frequency (Hz) |
| 105 | Sensorless to Hall Transition Frequency | Hall-sensorless transition (Hz) |
Next Steps
- Complete Motor Setup before tuning position sensors
- Configure System Tuning for control loop optimization
- Review Protection Systems for safe operation