6.3. Parameter customization

MCAF R4 now relies on the Customize feature of motorBench® Development Suite, which provides access to various parameters that affect code generation.

This section provides additional guidance for setting these parameters.

Please note: MCAF has been designed so that the default values for customizable parameters are applicable to most motors. In the event that it is unclear what to do, the best course of action is to use the default value of each parameter.

6.3.1. Summary

The following table describes these parameters briefly. Links to detailed guidance are included.

Table 6.1 Customizable parameters
Section Parameter Description
Estimators Active estimators Selects which estimators are active, in addition to the primary estimator used for commutation
Startup Startup current Determines current used during startup
Startup Rampup time Determines current rampup time during startup
Startup Min accel time Determines minimum acceleration time during startup
Startup Acceleration \(\alpha_1\) Determines fast acceleration rate
Startup Acceleration \(\alpha_0\) Determines slow acceleration rate
Startup Speed threshold \(\omega_0\) Determines speed threshold for switching to fast acceleration
Startup Startup algorithm Selects startup method
Startup Active damping: max amplitude Determines maximum amplitude of active damping current
Startup Active damping: max gain Determines maximum gain of active damping
Startup Active damping: speed threshold Determines the minimum velocity to enable active damping
Overmodulation D-axis limit Determines the maximum d-axis voltage
Overmodulation Q-axis limit Determines the maximum q-axis voltage
Encoder Lines Specifies the number of lines of the encoder
Encoder Index pulse present Specifies whether an index pulse is present
Encoder Tracking loop time constant Determines bandwidth of tracking loop
Encoder Synchronization method Selects method of synchronizing encoder with back-emf
Encoder Align angle shift Determines angle shift between rampup and align states of startup
Encoder Align initial angle Determines initial angle used in rampup state of startup
Encoder Align-and-sweep rate Determines rotation rate during align state of startup, when using align-and-sweep method
Encoder Align-and-sweep setup angle Determines setup angle of align-and-sweep method, to allow transients to settle prior to measurements
Encoder Pullout slip threshold Determines rotor slip threshold used for detecting a pullout condition

6.3.2. Detailed information

6.3.2.1. Estimators

6.3.2.1.1. Active estimators

Available estimators in MCAF R4 are the AN1292 PLL and the quadrature encoder.

Usage of both estimators is recommended for troubleshooting or validation purposes. Please note that this will increase CPU and memory requirements.

Only one estimator can be used for commutation.

New in version R4.

6.3.2.2. Startup

6.3.2.2.1. Startup current

Startup current amplitude \(I_{q0}\) represents a tradeoff between making startup robust (higher is better) and reducing power dissipation in the motor (lower is better). There’s not much value in reducing it below 0.5, which specifies half of maximum continuous current.

New in version R4.

6.3.2.2.2. Rampup time

This affects only the initial state of startup, in which current increases from zero to its maximum amplitude. The current rampup time should be slow compared to \(L/R\), so that it represents a smooth transition, but fast compared to the overall startup time.

New in version R4.

6.3.2.2.3. Min accel time

Increase this value if a slower, less-aggressive startup is desired.

New in version R4.

6.3.2.2.4. Acceleration \(\alpha_1\)

Increase or decrease to adjust the faster second phase of acceleration.

New in version R4.

6.3.2.2.5. Acceleration \(\alpha_0\)

Increase or decrease to adjust the slower first phase of acceleration. Note that this is normalized to \(\alpha_1\).

New in version R4.

6.3.2.2.6. Speed threshold \(\omega_0\)

Decreasing this value will switch to the faster second phase of acceleration sooner.

New in version R4.

6.3.2.2.7. Startup algorithm

Weathervane is quicker. Classic is the algorithm provided in MCAF R1-R3. See choice of startup method.

New in version R4.

6.3.2.2.8. Active damping: max amplitude

Controls the amplitude of active damping. Reduce this value if startup is noisy or unstable. Set to zero to eliminate active damping completely.

New in version R4.

6.3.2.2.9. Active damping: max gain

Controls the feedback gain of active damping. Reduce this value if startup is noisy or unstable.

New in version R4.

6.3.2.2.10. Active damping: speed threshold

Determines the minimum velocity to enable active damping. Make sure to choose a velocity where the estimator is stable enough to be useful for active damping.

New in version R4.

6.3.2.3. Overmodulation

See the section on overmodulation for more information.

6.3.2.3.1. D-axis limit

Determines the maximum d-axis voltage. Leaving this at 1.0 is recommended.

New in version R4.

6.3.2.3.2. Q-axis limit

Determines the maximum q-axis voltage. A value between 1.05 and 1.25 is recommended. Larger values will allow higher output voltage amplitude, at the cost of higher distortion in output voltage and current.

The section on overmodulation behavior in the synchronous frame has more information on this subject.

New in version R4.

6.3.2.4. Quadrature encoder

See the section on quadrature encoder support for more information.

6.3.2.4.1. Lines

This should match the number of lines, or cycles per revolution (CPR), listed in the datasheet of the motor or encoder. The number of counts per revolution is 4× the number of lines.

New in version R4.

6.3.2.4.2. Index pulse present

Select this option if an index pulse signal is present.

New in version R4.

6.3.2.4.3. Tracking loop time constant

Values in the 1ms - 10ms range are recommended. Smaller values will increase estimator bandwidth but allow more encoder quantization noise to appear in the velocity estimate. Larger values will decrease estimator bandwidth, along with the achievable velocity loop bandwidth, but will decrease the effect of encoder quantization noise.

Note: With MCAF R4, out-of-range errors in code generation will occur for certain combinations of motors with low speed ratings, and choices of tracking loop time constant. This is expected when \(\omega_{m1} \tau < \theta_L\) where \(\theta_L \approx 0.4 \text{rad}\), where \(\omega_{m1}\) is the rated motor velocity in rad/s, and \(\tau\) is the tracking loop time constant. A viable workaround in most cases is to increase the tracking loop time constant, though this would reduce the velocity loop bandwidth.

For example, a motor with rated velocity of 2000RPM ≈ 209 rad/s is likely to have out-of-range errors if the tracking loop time constant is less than approximately \(0.4 / 209 = 0.0019\) or 1.9msec.

New in version R4.

6.3.2.4.4. Synchronization method

  • Align — best general-purpose synchronization method, fastest, sensitive to large cogging torque
  • Pullout — most immune to cogging torque, sensitive to high inertia
  • Align-and-sweep — slow, best accuracy

New in version R4.

6.3.2.4.5. Align time

This determines the align time used for back-emf synchronization. Systems with larger inertia may need longer times. Shorter times (less than 0.5s) may be adequate for very low inertia systems.

New in version R4.

6.3.2.4.6. Align angle shift

Increase this angle for systems with high cogging torque. Values of 30° - 60° are recommended.

New in version R4.

6.3.2.4.7. Align initial angle

Controls the initial electrical angle used during the rampup state of startup. Some angles may be slightly more robust, but this must be determined empirically for a particular motor.

New in version R4.

6.3.2.4.8. Align-and-sweep rate

4 counts per ISR is the fastest, and is adequate for most motors with low cogging torque. Decrease this value for motors with high cogging torque.

New in version R4.

6.3.2.4.9. Align-and-sweep setup angle

This controls the setup angle prior to making commutation offset measurements. Smaller values may not leave enough time for transients to settle. Larger values will add more time for transients to settle. Increasing it for high-inertia systems may improve accuracy.

New in version R4.

6.3.2.4.10. Pullout slip threshold

This parameter controls the slip at which pullout offset is measured for determining commutation offset. Slip here is defined as the rate of change of difference in the angle of the stationary frame voltage vector \(V_{\alpha\beta}\) and the raw electrical position from the encoder. Good choices for this parameter depend on the motor’s mechanical properties, namely inertia \(J\), viscous damping \(B\), and friction torque \(T_{fr}\). The slip threshold may need to be increased for motors with low inertia, or decreased for motors with higher inertia. The recommended range for slip threshold is approximately 0.059 to 0.47 rad/s. (0.5× to 4× the default value)

New in version R4.