Motor Identification
Identification commands
These commands are used to automatically identify the motor parameters and motor sensor parameters.
spinup [acceleration] [time] [current]
Spins up the motor in the synchronous mode with given [acceleration], for given [time], and with given amplitude of [current]. When spin-up ends, the motor freewheels. Units and default values of parameters are the same as for identrun. The command returns zero if all the process was successfully finished.
identlin <options> [samples] [current]
IDENtify LINear - attempts to identify some of the electrical parameters of the motor (phase resistance , inductance , . Obtained values are printed into the terminal window and saved as corresponding parameters in /driver/motor/.
Optionally, the routine also calculates:
- (from ESCx 5.0 and above) the P and I coefficients of the current loops are also calculated and stored in /driver/pid_iq/ and /driver/pid_id/.
- the saturation coefficients in /driver/motor/:
DaandDc. The q-axis coefficientDq(optional) is not identified.
If parameters are given, the default ones are overridden:
[samples]- [-]; default value is 10 000. Number of measured cycles for one measurement. The higher value, the better the precision, but lower the speed.[current]- [A]; default value isiref/2. Amplitude of phase current used for rotor positioning and derating measurement. From driver 6 any value can be used: the identifiedDadoes not depend on it, and a later change ofirefneeds no re-identification. (Older drivers: for motors that should be operated close to their magnetic saturation, use current that will be matching the operating point.)
Options
- '-n' - identify non-linear motor parameters (/driver/motor/Da, /driver/motor/Dc). It is recomended to use this options for motors that are operated close to the magnetic saturation (default from ESCx 5.0 and above)
-N- do NOT identify non-linear motor parameters- '-p' - identify PI current control coefficients (default from ESCx 5.0 and above)
-P- do NOT identify PI current control coefficients
Remarks
Note that the rotor is auto-positioned into different angles during the procedure. The rotor must be free from load and the time and current values must be chosen properly for good results.
Run identlin with non-linear parameter identification enabled and use the identified Da and Dc as they are; hand-tuning Dc is not recommended.
identrun <options> [acceleration] [time] [current]
IDENTify RUNtime - attempts to identify some motor parameters during the freewheeling. Typically, the rotor angle sensor parameters and flux linkage (KV) of the motor are measured. The motor accelerates (spins-up) in the synchronous mode by [acceleration] for [time] and with [current]. When the spin-up finishes, the motor is left to freewheel, until it stops. During the freewheeling phase, the main motor constant /driver/motor/psi and related motor sensor parameters in /driver/rest/ are identified. The procedure progress is displayed in the terminal and measured curves are presented in the scope window. The command returns zero if all the process was successfully finished.
If parameters are given, the default ones are overridden:
[acceleration]- [erad/s^2]; default value 100. Rotor angular acceleration during the spin-up phase. If the value is 0, the spin-up phase is skipped and the algorithm presumes a back-driven motor. This is useful for identification where synchronous spin-up is not possible.[time]- [ms]; default value is 4000. Time of acceleration duringidentrunspin-up phase.[current]- [A]; default value isiref/4. The amplitude of phase current duringidentrunspin-up phase.
Options
-q- be quiet (do not plot identification data to the scope after measurement)-k- keep the scope (do not reset defaults) before the data plot-w- wait for the visualization data to be transmitted before end
Remarks
Note that the successful synchronous spin-up is crucial for good results. Spin-up requires the rotor free from load. The acceleration, time and current arguments must be adjusted according to the system's dynamic parameters.
Measured data exposing
- if the command finds any of the writable int16 array named
idata1A,idata1B,idata1Cwith size of at least 360 elements each, the sensor identification data will be written there. The index of each array corresponds to the sensor angular degree. - if the command finds any of the writable int16 arrays named
idata2A,idata2B,idata2Cwith size of at least 640 elements each, the motor identification data will be written there. The back-EMF voltage of each single motor phase corresponds to each single array. The sampling rate is 20kHz.
identsat <options> [samples] [current]
Measures the dependency of stator inductances , on the current and .. This command identifies no parameters. The procedure progress is displayed int the terminal and measured curves are presented in the scope window. The command returns zero if all the process was successfully finished.
If parameters are given, the default ones are overridden:
[samples]- [-]; default value is 100. Number of measured cycles for one measurement. The higher the value, the better the precision, but the lower the speed.[current]- [A]; default value isiref/4. Amplitude of phase current used for rotor positioning; the measurement itself sweeps the current from 0 toiref.
Options
-q- be quiet (do not plot identification data to the scope after measurement)-k- keep the scope (do not reset defaults) before the data plot-w- wait for the visualization data to be transmitted before end
Remarks
The rotor is auto-positioned into different angles during the procedure. The rotor must be free from load and the time and current values must be chosen properly for good results.
Measured data exposing
- if the command finds any of the writable int16 array named
idata1A,idata1B,idata1C,idata2A,idata2B,idata2Cwith size of at least 400 elements each, the measured D-axis (for idata1X) and Q-axis (for idata2X) inductance values will be written there. The index of each array corresponds to the 0.25% of the iref current. Each single motor phase corresponds to each single array.
identsal <options> [samples] [current]
Measures the saliency (the dependency of , on the rotor position). This command identifies no parameters. The procedure progress is displayed in the terminal and measured curves are presented in the scope window. The command returns zero if all the process was successfully finished.
If parameters are given, the default ones are overridden:
[samples]- [-]; default value is 100. Number of measured cycles for one measurement. The higher the value, the better the precision, but the lower the speed.[current]- [A]; default value isiref/4. Amplitude of phase current used for measurement.
Options
-q- be quiet (do not plot identification data to the scope after measurement)-k- keep the scope (do not reset defaults) before the data plot-w- wait for the visualization data to be transmitted before end
Remarks
The rotor is auto-positioned into different angles during the procedure. The rotor must be free from load and the time and current values must be chosen properly for good results.
Measured data exposing
- if the command finds any of the writable int16 arrays named
idata1A,idata1B,idata1Cwith the size of at least 360 elements each, the measured inductance values will be written there. The index of each array corresponds to the rotor's electrical degree.
Return values of identification commands
Common return values:
| Return value | Description | Solution |
|---|---|---|
| 0 | Success | |
| -101 | Driver is in error (/driver/error is not zero) | Is controller powered? |
| -102 | Motor is enabled. | Run stop command. |
| -103 | Limiter is active. (/driver/totallimit is not 1) | Check for active limiters. (Usually ubmax or ubmin) |
| -104 | Protection is active. (/driver/stat is not zero) | Wait until the protection clears; check /driver/stat. |
| -105 | Motor is not steady. | Run the identification on a steady motor. |
Identrun and spinup return values:
| Return value | Description | Solution |
|---|---|---|
| -10 | Unable to set current through phases | |
| -11 | Spin-up has failed. | Check if the motor is free from load and can freely rotate. |
| -1 | Could not identify flux linkage (identrun only). | Check if the motor is free from load and can freely rotate. |
| 1 | Flux linkage identified, the rotor sensor not (identrun only). | Check the sensor, its wiring and the sensor mode. |
Identlin return values:
| Return value | Description |
|---|---|
| -10 - -18 | Phase A measurement failed. |
| -19 - -27 | Phase B measurement failed. |
| -28 - -36 | Phase C measurement failed. |
The first value of each range (-10, -19, -28) means the current could not be set through the phase.
Identsat and identsal return values:
| Return value | Description | Solution |
|---|---|---|
| -110 | Phase resistance is not identified (Rt is zero). | Run identlin first. |
| -10, -20 | Unable to set current through phases | |
| -11, -21 | Measurement was interrupted (a limiter, a protection or a driver error). | Check for active limiters. |
| -12, -22 | Measurement was interrupted while the current ramped down. |
identsat returns -10 to -12 in its D-axis part and -20 to -22 in its Q-axis part; identsal returns -10 to -12 only.
If identlin fails, try to decrease battery voltage or decrease the current amplitude.