The following table lists configurable parameters of the Motor Control Application Framework.
This list is still under construction.
| Key | Symbol | Intended Value | Units | Description |
|---|---|---|---|---|
adc (4 items) | ADC parameters | |||
adc.currentKaa |
0.8910000 | normalized A->A current gain | ||
adc.currentKab |
-3.000e-02 | normalized B->A current gain | ||
adc.currentKba |
-4.000e-03 | normalized A->B current gain | ||
adc.currentKbb |
0.9650000 | normalized B->B current gain | ||
fault_detect (2 items) | Fault detection parameters | |||
fault_detect.vdcOvervoltageThreshold |
2.800e+01 | V | overvoltage fault threshold | |
fault_detect.vdcUndervoltageThreshold |
1.400e+01 | V | undervoltage fault threshold | |
foc (10 items) | Field-oriented control (FOC) parameters | |||
foc.kii |
\(K_{ii}\) | 1.024e+03 | V/A/s | Current loop integral gain |
foc.kip |
\(K_{ip}\) | 0.5342732 | V/A | Current loop proportional gain |
foc.kwi |
\(K_{\omega i}\) | 0.5714491 | A/rad | Velocity loop integral gain |
foc.kwp |
\(K_{\omega p}\) | 0.0341963 | A/(rad/s) | Velocity loop proportional gain |
foc.mcafCurrentCtrlDOutLimit |
1.0000000 | line-to-line | Limit for output line-to-line voltage of d-axis current controller, expressed as a fraction of DC link voltage | |
foc.mcafCurrentCtrlDqMagnitudeLimit |
0.9500000 | line-to-line | Limit for output magnitude of current controllers which triggers voltage saturation, expressed as a fraction of DC link voltage | |
foc.mcafCurrentCtrlQOutLimit |
1.1500000 | line-to-line | Limit for output line-to-line voltage of q-axis current controller, expressed as a fraction of DC link voltage | |
foc.mcafRvdcMin |
0.1515105 | 1/V | reciprocal of minimum DC link voltage | |
foc.mcafRvdcMinVdc |
6.6002014 | V | minimum DC link voltage for which we calculate reciprocals | |
foc.mcafRvdcQ |
12 | binary point for reciprocal voltages | ||
hal (8 items) | Hardware Abstraction Layer (HAL) parameters | |||
hal.halParamDeadtimeCounts |
2.000e-06 | s | Dead time in PWM clock cycles | |
hal.halParamMaxDutyCounts |
0.9377000 | Maximum duty cycle register value in counts | ||
hal.halParamMaxDutyQ15 |
0.9377000 | Maximum duty cycle register value, as ratio | ||
hal.halParamMaxLowerDutyCounts |
0.9550000 | Maximum low-side duty cycle register value in counts | ||
hal.halParamMinDutyCounts |
0.0450000 | Minimum duty cycle register value in counts | ||
hal.halParamMinDutyQ15 |
0.0450000 | Minimum duty cycle register value, as ratio | ||
hal.halParamMinLowerDutyCounts |
0.0623000 | Minimum low-side duty cycle register value in counts | ||
hal.halParamPwmPeriodCounts |
2.500e-05 | s | PWM period register value in PWM clock cycles | |
operating_params (7 items) | System operating parameters | |||
operating_params.baseSpeed |
3.816e+02 | rad/s | base speed: nominal no-load speed at nominal supply voltage with no flux weakening | |
operating_params.maxSpeed |
4.198e+02 | rad/s | maximum speed command | |
operating_params.minSpeed |
1.047e+02 | rad/s | minimum speed command | |
operating_params.ratedMotorIpeak |
2.2900000 | rated allowable current of motor (peak amplitude, A) | ||
operating_params.velocityCoastdownTime |
1.0712770 | s | estimate of worst-case time needed to decelerate to a stop | |
operating_params.velocitySlewrateLimitAccel |
3.4089914 | rad/s | slew rate limit for velocity commands during acceleration | |
operating_params.velocitySlewrateLimitDecel |
0.4186750 | rad/s | slew rate limit for velocity commands during deceleration | |
pll (10 items) | AN1292 PLL estimator parameters | |||
pll.dIlimitHs |
6.283e+02 | counts | Maximum rate of change of current in terms of estimator sampling time, at high velocity operating range | |
pll.dIlimitLs |
3.816e+02 | counts | Maximum rate of change of current in terms of estimator sampling time, at low velocity operating range | |
pll.decimateBaseSpeed |
3.816e+01 | rad/s | Decimation speed threshold, below which velocity estimation is optimized for stability | |
pll.kfilterEsdq |
7.320e+02 | rad/s | Filter constant that is used for filtering the estimated BEMF, at nominal velocity | |
pll.kfilterEsdqFw |
1.001e+02 | rad/s | Filter constant that is used for filtering the estimated BEMF, during field-weakening | |
pll.kfilterVelestim |
4.566e+02 | rad/s | Filter contant that is used for filtering the estimated velocity | |
pll.normDeltat |
5.000e-05 | seconds | Estimator sampling time | |
pll.normInvkfi |
2.698e+01 | rad/V-s | Inverse of BEMF constant of the motor | |
pll.normLsdt |
0.0003301 | V-s/A | Motor stator inductance (per phase) | |
pll.normRs |
0.4922369 | ohm | Motor stator resistance (per phase) | |
qei (4 items) | Encoder parameters | |||
qei.mcafEncoderCountsPerElectricalCycle |
2.000e+02 | number of counts per electrical cycle | ||
qei.mcafEncoderCountsPerRev |
1,000 | number of counts per revolution | ||
qei.mcafEncoderLines |
250 | number of lines = complete cycles per revolution (CPR) | ||
qei.mcafEncoderPositionScaler |
6.554e+01 | Scaling coefficient to convert from Q0 encoder counts to Q16 mechanical revolutions | ||
qei_controller (3 items) | Encoder velocity estimator parameters | |||
qei_controller.mcafTrackingLoopDt |
\(\Delta t\) | 5.000e-05 | s | Tracking loop timestep |
qei_controller.mcafTrackingLoopKi |
4.444e+05 | rad/s^2 | Tracking loop integral gain | |
qei_controller.mcafTrackingLoopKp |
2.000e+03 | rad/s | Tracking loop proportional gain | |
sat (5 items) | Control loop saturation parameters | |||
sat.currentMaximumCommand |
2.2900000 | A | Maximum current command to current controller | |
sat.currentSaturationThresholdDown |
2.2233010 | A | Threshold limit for current to exit saturation (velocity controller output) | |
sat.currentSaturationThresholdUp |
2.3622573 | A | Threshold limit for current to enter saturation (velocity controller output) | |
sat.voltageSaturationThresholdDownConstant |
0.8500000 | line-to-line | Threshold limit for voltage to exit saturation (current controller output) | |
sat.voltageSaturationThresholdUpConstant |
0.9000000 | line-to-line | Threshold limit for voltage to enter saturation (current controller output) | |
stall_detect (21 items) | Stall detection parameters | |||
stall_detect.group (14 items) | ||||
stall_detect.group.activeTimerThresholdLowSpeedDetect |
0.1988937 | s | Timer threshold to trigger low speed detect. It is set to 3 times (1/natural frequency of velocity loop) | |
stall_detect.group.activeTimerThresholdNegativeEdDetect |
0.3314894 | s | Timer threshold to trigger negative Ed stall detect. It is set to 5 times (1/natural frequency of velocity loop) | |
stall_detect.group.activeTimerThresholdTorqueAngleDetect |
0.1988937 | s | Timer threshold to trigger stall detect based on torque angle. It is set to 3 times (1/natural frequency of velocity loop) | |
stall_detect.group.decimationFactor |
1.000e+02 | decimation factor for 2 stage filter LPF | ||
stall_detect.group.decimationFilterLpf1VarianceDetectCoeffa1 |
1.000e+01 | Hz | Coefficient a1 for 2 stage implementation of LPF. Equation used for calculation: f3db*TPWM*2*pi. f3db for 1st stage is 10hz | |
stall_detect.group.decimationFilterLpf2VarianceDetectCoeffa1 |
1.5083437 | Hz | Coefficient a1 for 2 stage implementation of LPF. Equation used for calculation: f3db*Ts*2*pi. f3db for second stage is 1/10th of the natural frequency, Ts is 1/200hz | |
stall_detect.group.filterHpfVarianceDetect |
3.017e+01 | Hz | HPF filter coefficient for 16bit implementation of HPF. f3db is 2x natural frequency. | |
stall_detect.group.filterLpfNegativeEdDetect |
1.508e+01 | Hz | LPF filter coefficient for negative Ed detect. Equation used for calculation: f3db*Ts*2*pi f3d is equal to natural frequency | |
stall_detect.group.filterLpfOvercurrentDetect |
1.508e+01 | Hz | LPF filter coefficient for over current detect. Equation used for calculation: f3db*Ts*2*pi f3d is equal to natural frequency | |
stall_detect.group.inactiveTimerThresholdLowSpeedDetect |
0.1988937 | s | Inactive timer threshold for low speed detect. It is set to (2.0/natural frequency of velocity loop), in units of the ADC ISR period. | |
stall_detect.group.inactiveTimerThresholdNegativeEdDetect |
0.3314894 | s | Timer threshold to trigger negative Ed stall detect. It is set to 5 times (1/natural frequency of velocity loop) | |
stall_detect.group.inactiveTimerThresholdTorqueAngleDetect |
0.1988937 | s | Inactive Timer threshold for stall detect based on torque angle. It is set to 3 times (1/natural frequency of velocity loop) | |
stall_detect.group.timerCountsOvercurrentDetect |
0.0065537 | s | Overcurrent detector. Normally if the saturation limit was exceeded, then we have a fault in the controllers. then the error should immediately trigger Timer threshold to trigger over currents detect. It is set to 2 times (1/natural frequency of current loop) | |
stall_detect.group.timerCountsVarianceDetect |
0.0662979 | s | Timer threshold to trigger stall detect based on variance in Ed and Eq. It is set to (1/natural frequency of velocity loop) | |
stall_detect.thresholdEdStallDetect |
0.0100000 | V | Ed detect threshold | |
stall_detect.thresholdOvercurrentStallDetect |
2.5012136 | A | overcurrent threshold (109.2% of rated allowable current) | |
stall_detect.torque_angle (5 items) | Torque angle method of stall detection | |||
stall_detect.torque_angle.stallDetectTorqueAngleCoeff0 |
0.1019293 | torque angle threshold polynomial, constant term | ||
stall_detect.torque_angle.stallDetectTorqueAngleCoeff1 |
0.8644309 | torque angle threshold polynomial, linear term | ||
stall_detect.torque_angle.stallDetectTorqueAngleCoeff2 |
0.0236398 | torque angle threshold polynomial, quadratic term | ||
stall_detect.torque_angle.stallDetectTorqueAngleK |
0.2748093 | |||
stall_detect.torque_angle.stallDetectTorqueAngleVelocityThreshold |
1.526e+02 | rad/s | Maximum velocity for torque angle stall detection (we inhibit at faster speeds) | |
startup (17 items) | Motor startup parameters controlling open-loop commutation and transition to sensorless closed-loop operation | |||
startup.finaltorque |
2.0839000 | A | motor current from end of current rampup phase to end of startup | |
startup.holdtime |
0.000e+00 | s | hold time between velocity rampup and current rampdown | |
startup.initialtorque |
0.000e+00 | A | motor current at beginning of startup | |
startup.mcafRampdownDecayRate |
8.9674336 | 1/s | current rampdown decay rate (=1/time constant) | |
startup.mcafRampdownEndCurrent |
0.1041950 | A | current rampdown end threshold | |
startup.minspeedinrpm |
1,000 | minimum operating speed in RPM | ||
startup.startupAccel0VelocityThreshold |
7.174e+01 | rad/s | first startup threshold velocity | |
startup.startupAccel1VelocityThreshold |
1.047e+02 | rad/s | second startup threshold velocity | |
startup.startupAcceleration0 |
1.836e+02 | rad/s^2 | first startup acceleration rate | |
startup.startupAcceleration1 |
6.247e+02 | rad/s^2 | second startup acceleration rate | |
startup.startupDampingGain |
0.0575791 | A/(rad/s) | active damping gain | |
startup.startupDampingIqmax |
0.2290000 | A | maximum current amplitude used for active damping | |
startup.startupDampingShift |
8 | binary point for active damping gain | ||
startup.startupDampingThreshold |
4.189e+01 | rad/s | threshold velocity for damping | |
startup.startupDeltaTFactor |
2,985 | |||
startup.startupDeltaTFactorAcceleration |
4 | |||
startup.startupTorqueRampupRate |
0.0062158 | A | increase in current per PWM cycle, during current rampup | |
timing (8 items) | Timing parameters | |||
timing.dtcy |
1.429e-08 | s | instruction cycle period | |
timing.looptimeinsec |
5.000e-05 | s | PWM period | |
timing.mcafCyclesPerNanosecondQ16 |
\(f_{cy}\) | 7.000e+07 | Hz | Instruction clock frequency (converted to cycles per nanosecond Q16 for use in time delays) |
timing.mcafIsrSubsampleDivider |
\(T_{s,\omega}\) | 0.0010000 | s | Timestep for velocity loop timing, converted to a divider (one velocity control cycle executes every N ISRs) |
timing.mcafUiLoopTimeInIsrs |
0.1000000 | s | UI update period | |
timing.velocityLoopFreq |
1.000e+03 | Hz | velocity loop frequency | |
timing.velocityLoopFreqInteger |
1,000 | integer version of velocityLoopFreq | ||
timing.velocityLoopTime |
0.0010000 | s | velocity loop period | |
Motor Control Application Framework
R3/RC14 (commit 90529, build on 2018 Oct 04)