...
Parameter name | Data type | Default value | Description | Related module |
---|---|---|---|---|
MCL_INIT_PRM_MAX_PHASE_CURRENT_AMP | float | 40.0f | Maximum phase current. | MCL |
MCL_INIT_PRM_MAX_ADC_VREF_PIN_VOLTAGE | float | 3.3f | Maximum ADC Vref pin voltage. | |
MCL_INIT_PRM_MAX_PHASE_SHUNT_RES_OHM | float | 12.0f | Maximum phase shunt resistor value[Ω]. | |
DEFAULT_MCL_MOTION_PAR_MECH_SPEED_LOW_PASS_FILTER_HZ | uint16_t | 1500 | Mechanical speed low pass filter's cut-off frequency[Hz]. | MCL Motion |
DEFAULT_MCL_MOTION_PAR_FIELDWEAK_CONTROLLER_KP | float | 0.0f | Proportional gain of the field-weakening controller. | |
DEFAULT_MCL_MOTION_PAR_FIELDWEAK_CONTROLLER_KI | float | 0.2f | Integral gain of the field-weakening controller. | |
DEFAULT_MCL_MOTION_PAR_FIELDWEAK_START_VOLTAGE_RATIO | float | 1.1f | Threshold voltage vector magnitude to start field-weakening. Value is less than maximum voltage vector magnitude to allow a transition region. | |
DEFAULT_MCL_MOTION_PAR_STALL_DETECTION_SPEED_DIFFERENCE | uint16_t | 300 | Speed difference threshold to detect stall. | |
DEFAULT_MCL_MOTION_PAR_STALL_DETECTION_TIME_MS | uint32_t | 3000 | Time[ms] it takes to set stall error. | |
DEFAULT_MCL_FOC_CTRL_PAR_CURRENT_AMP_GAIN | float | 20.0f | DRV8323 gate driver current sense amplifiers gate. It gains the measured current value through shunt resistor. It is using for the current measurement purposes. | MCL Foc Control |
DEFAULT_MCL_FOC_CTRL_PAR_DCBUS_VOLTAGE_OFFSET_DIGITS | int8_t | 10 | Experimentally determinced DC-bus Voltage offset value. | |
DEFAULT_MCL_FOC_CTRL_PAR_NUMBER_OF_CURRENT_OFFSET_MEAS | uint8_t | 8 | Number of measurements to calculate average current offset. | |
DEFAULT_MCL_FOC_CTRL_PAR_CURRENT_OFFSET_THRESHOLD_DIG | uint8_t | 48 | Number of digits allowed for current offset. 88 | It is the threshold value that defines the range where the average Current Offset value can be found. Ideal current offset = 2048 (The half of the 12-bit ADC’s max range) |
DEFAULT_MCL_FOC_CTRL_PAR_MAX_DUTY_CYCLE_PERCENT | float | 96.0f | Maximum allowed duty cycle percentage. | |
DEFAULT_MCL_PSE_PAR_SPEED_EST_METHOD | MCL_SPEED_EST_METHOD_E | MCL_SPEED_EST_QEI | Speed estimation method. MCL_SPEED_EST_QEI - Quadrature Encoder Interface MCL_SPEED_EST_HALL_SENSOR - Hall Sensor | MCL Position and Speed Estimation |
DEFAULT_MCL_PSE_PAR_MAF_CAPTURE_SIZE | uint8_t | 4 | Moving average filter size. Captured position is filtered with a MAF. It is designed experimentally and disabled by default. | |
DEFAULT_MCL_CAL_PAR_REQUESTED_VOLTAGE | float | 0.12f | Length of the voltage vector used for calibration in units of the commutation. The direction is always Vd. | MCL Calibration |
DEFAULT_MCL_CAL_PAR_SAMPLING_SPEED_RPM | int16_t | 12 | Rotor speed at calibration stage. Slow speeds are generally more accurate. | |
DEFAULT_MCL_CAL_PAR_NUM_OF_TURNS | int16_t | 4 | Number of turns (mechanical angle, electrical angle) of the linear regression in one direction. | |
DEFAULT_MCL_CAL_PAR_WAIT_TIME_BETWEEN_EACH_SAMPLE_MS | uint16_t | 1 | Adding wait time[ms] when turing left and right before performing linear regression on another sample of (mechanical angle, electrical angle). During the calibration process, the motor rotating occurs using the samples of the mechanical and electrical angles. This parameter specifies the waiting time between two samples. It is one of the parameters that should be checked when proper calibration doesn't occur. | |
DEFAULT_MCL_CAL_PAR_WAIT_AFTER_ALIGNMENT_MS | uint16_t | 500 | Add wait time[ms] delay after each alignment process. During the calibration process, motor positioning alignment is performed during initial alignment, direction change and validation states. This parameter represents the waiting time after each motor alignment. It is one of the parameters that should be checked when proper calibration doesn't occur. | |
DEFAULT_MCL_CAL_PAR_MAX_DEVIATION_ANGLE | uint16_t | 4000 | Deviation angle of hall sensor position when turning CW and CCW. Angle is in digits (2^16 is 360 degrees). Maximum electrical angle deviation when validating the calibration values, unit complies with Angle definition above. |
...
Table 11 - Motor-specific configuration parameters
FOC Cycle TIme
FOC cycle time is totally programmable for experienced users. When the users adapt the FOC application to their software, they can tune the CPU load according to their own software by playing with the __FOC_CYCLE_TIME_MS
parameter (Default cycle time is 1ms).
FOC Demo
There are two demo modes:
Cyclical demo mode: Ramp-up, ramp-down, and coast stop demo.
Demo mode with potentiometer: The motor speed is adjusted with the potentiometer on the board.
...