Skip to main content
Firmware Stable

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 RdR_d, inductance LdL_d, LqL_q. 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/.
  • inductance de-ratings due to magnetic circuit saturation in /driver/motor/: DddD_{dd}, DqdD_{qd}.

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 is iref/2. Amplitude of phase current used for rotor positioning and derating measurement. 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.

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 during identrun spin-up phase.
  • [current] - [A]; default value is iref/4. The amplitude of phase current during identrun spin-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, idata1C with 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, idata2C with 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 LdL_d, LqL_q on the current IqI_q and IdI_d.. 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 is iref/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 array named idata1A, idata1B, idata1C, idata2A, idata2B, idata2C with 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 LdL_d, LqL_q 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 is iref/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, idata1C with 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 valueDescriptionSolution
0Success
-101Driver is in error (/driver/error is not zero)Is controller powered?
-102Motor is enabled.Run stop command.
-103Limiter is active. (/driver/totallimit is not 1)Check for active limiters. (Usually ubmax or ubmin)
-105Motor is not steady.Run the identification on a steady motor.

Identrun return values:

Return valueDescriptionSolution
-10Unable to set current through phases
-11Spin-up has failed.Check if the motor is free from load and can freely rotate.
-1Could not identify flux linkage.Check if the motor is free from load and can freely rotate.

Identlin return values:

Return valueDescription
-10Unable to set current through phases
-11 - -20Phase A measurement failed.
-21 - -29Phase B measurement failed.
-31 - -36Phase C measurement failed.
tip

If identlin fails, try to decrease battery voltage or decrease the current amplitude.