park_D
park_Q
clarke_d
clarke_q
Valpha
Vbeta
Tb
Ta
Tc
Ipark_d
Ipark_Q
Theta
Ipark_q
Mfunc_c1
Mfunc_c2
Mfunc_c3
PWM1A
PWM
DRV
MACRO
PWM1B
PWM2A
PWM2B
PWM3A
PWM3B
EV
HW
3-Phase
Inverter
PMSM
Motor
ADC
DRV
EV
HW
AdcRslt0
AdcRslt1
clarke_a
clarke_b
park_d
PARK
MACRO
CLARKE
MACRO
SVGEN
DQ
MACRO
IPARK
MACRO
theta
watch window
Speed_Ref
PID
MACRO
Iq Reg.
IdRef (=0)
PID
MACRO
Id Reg.
QEP
DRV
EV
HW
QEPA
QEPB
Index
Elec
Theta
Direction
Speed
Speed Rpm
SPEED_FR
MACRO
u_out_q
u_out_d
i_ref_d
I_ref_q
PID
MACRO
Iq Reg.
spd_fdb
Ipark_D
park_q
Ia
Vdc
Ib
Software Tools
www.ti.com
•
Modules are categorized (color coded) to clearly designate dependencies on peripherals and target
hardware.
•
Connections between modules show data flow via corresponding input/output variables.
•
Each module is reusable and has its own documentation explaining usage and instantiation.
Figure 3. ACI Sensored FOC – System Block Diagram Showing Clear One-to-One Mapping to Software
2.3.2
Reusability, Compatibility, and Expandability
Engineering reuse in today’s competitive environment is critical and software modularity is the perfect
vehicle to achieve this, especially in DMC systems. If we examine various motor control systems, it
becomes clear that a large degree of commonality exists between them. The PID regulator, for example,
is useful across all systems. Therefore, if each module is realized only once, but implemented according
to well defined guidelines, then compatibility and predictability can be assured across all modules. Since
this approach allows efficient reusability, efforts which may typically be used to “reinvent the wheel” can be
re-deployed on expanding the module library base for greater functionality and features.
There are several DMC blocks common for 3-phase motor control in general. On the other hand, in most
cases, the difference between a sensored and sensorless system is only one or two modules, e.g., a
position or speed estimator. The remaining modules are again common. Therefore, in keeping with the
reuse philosophy, design efforts can be focused on expanding the library with more robust estimators
which meet various system requirements, rather than recreating entire system infrastructures.
2.3.3
Target Independent Modules and Drivers
Understanding the exact dependencies of a software module is very important. This knowledge is
invaluable during debugging, software porting from one target to another, and on planning a system
commissioning strategy. The modules which are part of the DMC Library (examples of which are shown in
Table 3
) are categorized into two main types:
•
Target (microcontroller) independent (TI)
•
Drivers (i.e., target dependent and application configurable)
Table 3. Sample of DMC Module Descriptions and Type Category
Number
Module
Description
Type
1
bldcpwm_drv
BLDC PWM driver – uses high-side
Drv
chopping and fixed on/off for low side
2
cap_event_drv
Capture input event driver
Drv
3
hall_gpio_drv
Hall effect interface driver for sensored
Drv
3-phase BLDC trapezoidal control
8
TMS320C2000 Motor Control Primer
SPRUGI6 – September 2010
Submit Documentation Feedback
Copyright © 2010, Texas Instruments Incorporated