- Power on the appropriate power supply, and gradually increase the output voltage of the power
supply to get an appropriate DC-bus voltage.
- If using the graph tool, level 2 uses the same graph configurations and parameters as lab 1 to
monitor 2 of the phase currents.
- Disable the data cache by unchecking the
Data Cache Enabled in Tools > ARM Advanced Features.
- Run the project by clicking on the Resume button,
or click Run → Resume in the Debug tab. The
systemVars.flagEnableSystem is set to 1 after a fixed time, that means the
offsets calibration has completed. The fault flags, motorVars_M1.faultMtrUse.all is
equal to 0. If this is not the case, the user must double check the current and
voltage sensing circuit in level 1 as described in Section 4.4.1.3. Also, if the moduleOverCurrent in motorVars_M1.faultMtrPrev.bit is 1,
then motorSetVars_M1.overCurrent_A needs to be set to higher value to avoid initial
high current fault.
- To verify the current and voltage sensing
circuits of the motor driver, set the variable
motorVars_M1.flagEnableRunAndIdentify to 1 in the Expressions window as
shown in Figure 4-16. The motor runs with voltage/frequency (v/f) open loop. If the motor does not spin
smoothly, tune the v/f profile parameters in the user_mtr1.h file as shown in the
following according to the specification of the motor. Note: modification of these
parameters requires rebuilding the project. See step 15 of Section 4.4.1.3 for more information on rebuilding the project in debug mode.
#define USER_MOTOR1_FREQ_LOW_HZ (5.0) // Hz
#define USER_MOTOR1_FREQ_HIGH_HZ (400.0) // Hz
#define USER_MOTOR1_VOLT_MIN_V (1.0) // Volt
#define USER_MOTOR1_VOLT_MAX_V (24.0) // Volt
- The motorVars_M1.speedRef_Hz variable is used to set the speed reference for the
motor. Check the value of the motorVars_M1.speed_Hz variable in the
Expressions window to maintain that the motor speed (motorVars_M1.speed_Hz) is
close to the reference speed (motorVars_M1.speedRef_Hz) as shown in Figure 4-16.
- In this build level, the current sensing, voltage sensing, rotor angle estimator, and generator
need to be validated. This can be done using the PWMDAC in HV motor kit as described in
Section 4.5.2. Additionally, the DATALOG module can be used to view these sensing waveforms. For more
information on using the DATALOG to view the currents, voltages, and angle signals, see
step 8.
- If using the DATALOG module with the graph tool
to check the current sensing signals, voltage sensing signals, and the angle outputs,
follow the steps described in the following. For more info on the datalog module, see
Section 4.5.1. Note:You must rebuild the project in between each of the following steps after
modifying the code.
- To test the phase currents using the
DATALOG module, the following code must be set up in the sys_main.c file. Note:
this code is already configured by default for build level 2. The phase current
sampling signals waveform displayed on the graph tool as shown in Figure 4-18.
datalogObj->iptr[0] = (float32_t*) &motorVars_M1.adcData.I_A.value[0];
datalogObj->iptr[1] = (float32_t*) &motorVars_M1.adcData.I_A.value[1];
- To test the phase voltage using the
DATALOG module, the following code must be set up in the sys_main.c file. The
phase voltage sampling signals waveform displayed on graph tool as shown in Figure 4-19.
datalogObj->iptr[2] = (float32_t*) &motorVars_M1.adcData.V_V.value[0];
- The angle from the force angle
generator or estimator can be monitored on the graph tool as shown in Figure 4-21. Notice that the angle of the force angle generator is very similar as the
estimated rotor angle of the eSMO
estimator.
datalogObj->iptr[3] = (float32_t*) &motorVars_M1.angleFOC_rad;
- Verify the over current fault protection by decreasing the value of the variable
motorVars_M1.overCurrent_A, the over current protection is implemented by the
CMPSS modules. The over current fault triggers if the motorVars_M1.overCurrent_A is
set to a value less than the motor phase current actual value, the PWM output is disabled,
the motorVars_M1.flagEnableRunAndIdentify is cleared to 0, as shown in Figure 4-17.
- Set the variables motorVars_M1.flagEnableRunAndIdentify to 0 to stop run the motor.
- Once complete, the controller can now be halted,
and the debug connection terminated. Fully halting the controller by first clicking the
Halt button on the toolbar Suspend or by clicking Target → Halt. Finally,
reset the controller by clicking on CPU Reset or clicking Run → Reset.
- Close CCS debug session by clicking on Terminate
Debug Session button or clicking Run → Terminate.
- Power off the power supply to the inverter kit.
Adjust the value of
motorVars_M1.overCurrent_A in Expression window to trigger the over current fault
as shown in Figure 4-17.
Use Datalog with Graph Tool to monitor three phase
sensing current of the motor as shown in Figure 4-18.
Use Datalog with Graph Tool to monitor three phase
sensing voltage of the motor as shown in Figure 4-19. The SVM mode selected here is DPWM with minimum modulation.
Use Datalog with Graph Tool to monitor three phase sensing voltage of the motor with SVPWM
Common modulation as shown in Figure 4-20. SVM type can be selected in motor1_drive.c file.
Use Datalog with Graph Tool to monitor rotor angle
of the motor from the angle generator and angle from the eSMO estimator as shown in Figure 4-21.