DRV8323RS GUI User Guide¶
1. Overview¶
This graphical user interface (GUI) was developed to allow simple evaluation of a user’s motor with the DRV8323RSEVM being controlled by TI’s MSPM0 microcontroller. This guide will go over the key parts of the GUI to allow you to get up and running quickly. You can access the GUI described in this document here.
1.1 Getting Started with GUI¶
The GUI allows the user to configure various settings required for Sensorless FOC motor control. The user can adjust settings like motor speed reference, set parameters and other device settings, as well as monitoring the device status.
Perform the following steps to begin using the GUI:
Connect the BLDC motor to the EVM.
Make the necessary connections for connecting LP-MSPM0G3507 to BOOSTXL-DRV8323RS. For detailed steps refer to Hardware User Guide.
Plug in the micro-USB cable to the PC.
Enable the power supply to EVM.
Launch the MSPM0G-DRV8323RS-EVM-GUI.
Set all the parameters under Section 3.
Click “Enable Motor” to start the motor.
2. Using the GUI¶
The GUI when launched will automatically try to establish communication with the device. If this does not happen or if user needs to disconnect, the user can click on the link icon shown on the left side in the image shown below.
A message showing “Connecting to target…” will be displayed when the GUI tries to connect to the board in the hardware connection status pane which is located at the bottom of GUI window. If the connection is successful, ‘Hardware connected’ message appears, as shown in the image below.
![Hardware connected](../../_images/GUI-hardware_connected.jpg)
Fig. 9 Hardware connected¶
3. GUI Window¶
In the GUI Window, the user can find various controls to enable system, control the BLDC motor, and configure various parameters such as PWM frequency, deadband and so forth.
![GUI window](../../_images/GUI-window.jpg)
Fig. 10 GUI window¶
3.1 Motor & Drive Parameters¶
The GUI allows modification of motor and system parameters like motor resistance, inductance, flux, deadband, etc.
![Motor & Drive Parameters](../../_images/GUI-parameters.jpg)
Fig. 11 Motor & Drive Parameters¶
Function |
Description |
---|---|
R |
Motor Phase resistance in ohms. |
L |
Motor Phase inductance in henry. |
KE |
Back emf constant of the motor in V/Hz. |
Max Freq |
Maximum electrical frequency of the motor in Hz |
PWM Freq |
PWM frequency used to drive the motor. |
Deadband |
Deadtime in nanoseconds inserted between high side and low side pwm outputs. |
CSA Gain |
FOC gain settings, this is mapped to the DRV gains, refer “param_[motor driver].h” . |
3.2 Control¶
The user can use this section of the GUI to control the motor. The user can control the motor speed, motor state, etc.
![Control](../../_images/GUI-control.jpg)
Fig. 12 Control¶
Function |
Description |
---|---|
Enable Motor |
Controls whether FOC is enabled or disabled. If set 0, PWM is disabled and the drive is in Hi-Z state. |
Disable Closed Loop |
When set to 1, disables the closed loop transition after rampup phase is completed |
Reverse |
When set to 1, the direction of rotation is reversed. Set only when motor is disabled. |
Outer Loop |
Selects the PI speed as the outer loop or the PI current loop. |
Motor State |
Displays the state of the FOC algorithm. |
Speed Reference |
Reference speed in Hz, input to the speed PI controller. Note that this value is set to the PI controller for speed through a ramp to smoothen the response. While viewing the PI speed reference in the graph, the user will see a linear ramp to the reference value. |
Speed |
Displays the estimated motor speed in Hz. |
Id Reference |
If outer loop is current, this is set as reference to PI ID controller in closed loop. Value is in Ampere. |
Id Feedback |
Displays the feedback to the PI ID controller in Ampere. |
Iq Reference |
If outer loop is current, this is set as reference to PI IQ controller in closed loop. Value is in Ampere. |
Iq Feedback |
Displays the feedback to the PI IQ controller in Ampere. |
3.3 Startup¶
The Method drop down allows you to select between each startup methods: Align, Slow first cycle, and IPD.
![Startup method](../../_images/GUI-startup.jpg)
Fig. 13 Startup method¶
3.3.1 Align startup¶
Align startup forces the motor position to phase A for a set period of time and current before starting rampup phase.
![Startup align parameters](../../_images/GUI-startup-align.jpg)
Fig. 14 Startup align parameters¶
Function |
Description |
---|---|
Align Time |
Duration of aligning the rotor in seconds. |
Align Current |
Current during align in Ampere. |
3.3.2 Slow First Cycle startup¶
Slow first cycle blindly spins the motor with a settable frequency and current in the first electrical cycle before starting rampup phase.
![Startup Slow First Cycle parameters](../../_images/GUI-startup-slowFirstCyc.jpg)
Fig. 15 Startup Slow First Cycle parameters¶
Function |
Description |
---|---|
Slow First Cycle Freq |
Frequency of motor rotation during first cycle in Hz. |
Slow First Cycle Current |
Current during first cycle in Ampere. |
3.3.3 Initial Position Detection (IPD)¶
IPD applies 6 short pulse sequences to determine the motor position without spinning the motor. Comparators and timers are used to measure which of the 6 pulses has the fastest current rise time (di/dt), which determines the aligned motor position. The IPD threshold and frequency of the pulses can be configured based on the based on motor inductance to balance between accurate position detection and reducing audible noise.
![Startup IPD parameters](../../_images/GUI-startup-ipd.jpg)
Fig. 16 Startup IPD parameters¶
Important Note
Verify the Hardware connections for the IPD is set, if using IPD startup. Refer to Hardware User Guide.
Function |
Description |
---|---|
IPD Thres count |
IPD threshold count from 1-100, higher the value higher the IPD current. |
IPD |
Frequency of injection of IPD pulses. |
3.4 Rampup¶
Rampup state is the acceleration from startup to open loop. Rampup has configurable current, speed rate, and target speed, which is dependent on the application and motor parameters.
![Rampup parameters](../../_images/GUI-rampup.jpg)
Fig. 17 Rampup parameters¶
Function |
Description |
---|---|
Rampup current |
Current in rampup current in Ampere. |
Rampup speed rate |
Rampup rate in Hz/s. |
Rampup Target |
Frequency to rampup to in Hz. |
3.5 Closed Loop (CL)¶
Closed loop is the state after open loop once motor BEMF is sufficient to determine real-time motor position and velocity. In closed loop, the FOC algorithm can be optimized for PI speed control execution, speed reference, or speed reference ramp rate adjustment.
![Closed loop parameters](../../_images/GUI-cl.jpg)
Fig. 18 Closed loop parameters¶
Parameters used in closed loop.
Function |
Description |
---|---|
PI speed Divider |
Execution divider for PI speed. This is the number of times the FOC loop runs for the PI speed controller to run once. |
CL Speed Ref ramp |
Speed reference ramp rate in Hz/s. |
3.6 Tuning¶
The user can use the Tuning section of the GUI to tune the control parameters to the desired response.
![Tuning parameters](../../_images/GUI-tuning.jpg)
Fig. 19 Tuning parameters¶
Function |
Description |
---|---|
Speed Kp |
Proportional constant for Speed PI controller. |
Speed Ki |
Integral constant for Speed PI controller. |
Id Kp |
Proportional constant for Id PI controller. |
Id Ki |
Integral constant for Id PI controller. |
Iq Kp |
Proportional constant for Iq PI controller. |
Iq Ki |
Integral constant for Iq PI controller. |
3.7 Protection¶
This section allows the user to configure software protections like overcurrent, undervoltage and overvoltage.
![Protection parameters](../../_images/GUI-protection.jpg)
Fig. 20 Protection parameters¶
Function |
Description |
---|---|
Over Current Limit |
Value of phase current in Ampere above which software triggers over current |
Over Voltage Limit |
Value of voltage in Volts above which software triggers over voltage fault. |
Under Voltage Limit |
Value of voltage in Volts below which software triggers under voltage fault. |
3.8 Fault Status¶
The fault monitoring and handling is at the top right side of the screen to allow the user to monitor any system faults. The Fault LED on the driver board turns red when a fault occurs. To clear all the faults, use the “CLEAR FAULTS” button.
![Fault Status](../../_images/GUI-fault_status.jpg)
Fig. 21 Fault Status¶
Function |
Description |
---|---|
CLEAR FAULTS |
Pressing this button clears all the faults. |
Ext Fault |
External Fault is set when fault input pin from DRV goes low. |
OC |
Set when phase currents is above the set overcurrent limit. |
OV |
Set when bus voltage is above the set overvoltage limit. |
UV |
Set when bus voltage is below the set undervoltage limit. |
3.9 Monitors¶
Displays the relevant monitors like bus voltage.
![Monitors](../../_images/GUI-monitors.jpg)
Fig. 22 Monitors¶
Function |
Description |
---|---|
VDC |
DC bus input in Volts. |
3.10 Plots¶
The user can see a graphical view of the speed, Id and Iq currents using the plots in the GUI.
![GUI plot](../../_images/GUI-plot.jpg)
Fig. 23 GUI plot¶