Microcontrollers (MCU)

Real-time Control – Applications

Motor drive and control

Motor control is the key application space for the C2000 real-time control MCUs and has an important connection with our past and our future. We first released motor control software libraries before the turn of the century, and many of our original software system examples have been used throughout university and industry as the bedrock of digital motor control. The more recent of these “legacy” projects are archived in the legacy section below.

Since 2009 we have supported the digital motor control library and system examples running on controller plus inverter hardware through controlSUITE™ software. These are our fundamental  macro-based building blocks for computation, transforms, observers, and bit-field accessed peripheral drivers built-up into easy to follow software examples using incremental build levels of software blocks virtually wired together. Solution types include brushed and stepper control, hall BLDC, sensorless zero cross and InstaSPIN-BLDC™ solution, encoder and sensorless SMO based FOC.

Starting in 2013 we released our more advanced InstaSPIN-FOC™ and InstaSPIN-MOTION™ solutions using a new set of object-based building blocks, with abstracted APIs, accessed through MotorWare™ libraries. If you are using InstaSPIN-FOC or InstaSPIN–MOTION solutions you must use MotorWare software, but you can also use MotorWare software and the included drivers and modules to create your own projects using the latest object-oriented programming style.

Motor drive

InstaSPIN motor solutions

InstaSPIN motion

InstaSPIN Motion

InstaSPIN FOC

InstaSPIN FOC

InstaSPIN BLDC

InstaSPIN BLDC

Control technique & motor support Accurate speed and position using SpinTAC and FAST™ software encoder (observer) or rotor sensor for ACI, PMSM, IPM, and BLDC FOC torque controller using TI's FAST™software encoder (observer) for ACI, PMSM, IPM, BLDC Trapezoidal commutation for BLDC
Required feedback Voltage and current (2-3 shunt or phase) Voltage and current 2-3 shunt or phase) Simple voltage BEMF, current optional for torque control
Motor parameters Single variable speed/position loop tuning – tune your motor in minutes. Motor parameters automatically identified None required
Key features

Robust speed and position control

Cancels disturbances before they happen

Sustains performance across different speeds, positions, and changing dynamics

Trapezoidal, S-curve, ST-curve motion profile generation

Automatic current loop tuning

Full torque start-up

Stable at and through 0 speed

Max torque per amp

ACI PowerWarp™ software

Enhanced start-up, zero and slow speed capability with initial position detection (IPD) by high frequency injection (HFI)

Robust start-up

Simple tuning

Easily add speed or current control

TI supported devices

Piccolo

F28069M,

F28068M,

F28054M,

F28052M

Piccolo

F28069F,

F28068F,

F28062F,

F28054F,

F28052F,

F28027F,

F28026F

Piccolo

F2803x,

F2805x,

F2806x,

F2802x

Hercules

RM46x,

RM48x,

570LS12,

570LS31

Stay tuned for future InstaSPIN solutions

InstaSPIN solutions hardware development kits

TI InstaSPIN™ three-phase motor solutions are offered on a variety of three-phase inverter plus Piccolo micrconcontroller hardware evaluation modules in order to make designing motor control applications easier.

InstaSPIN solution support

MotorWare vs. controlSUITE™ software

Tool  controlSUITE MotorWare
Description The Digital motor control software library in controlSUITE consists of C macros covering nearly all target-independent mathematical functions and target-specific peripheral configuration functions essential for motor control. This includes transformation and observer modules, signal generators and control modules, peripheral drivers and real-time debugging modules. MotorWare is a collection of software and technical resources designed to minimize motor control system development time.
Versioning

Done at different sub levels

    kit project example

    device specific drivers

    math blocks

Project examples are “frozen”, don’t use newer versions of any files

Entire repository is versioned and up to date, all projects build with latest files
Code Composer Studio™ IDE Majority of projects built using CCSv4 All projects use CCSv5, and versions always built and tested with latest IDE and compiler
Drivers Bit field API with contextual naming
Software style

MACRO based C

Similar to connecting outputs of one block to inputs of another

Object oriented C

Modern software interface with structures, handles, and interface functions

Building a system

Incremental build approach

Project code build with different levels that let you add and test code in a structured methodology

Multiple projects approach

Projects are numbered and add functionality in sequence, choose the point to build from for your project

Open vs. closed source

Fully open except for special libraries

    IQMath & Flash API

    InstaSPIN-BLDC

    eSMO

    HFI/IPD

Fully open except for special libraries

    IQMath & Flash API

    Secure con-chip ROM for InstaSPIN–FOC & InstaSPIN-MOTION

    InstaSPIN-MOTION SpinTAC library

    HFI/IPD (future)

Solution support

BLDC hall

Sensorless BLDC BEMF zero cross

Sensorless InstaSPIN-BLDC

ACI V/Hz

Encoder FOC

Sensorless SMO, eSMO, or FE FOC

Sensorless InstaSPIN-FOC 

Sensorless InstaSPIN-MOTION

Encoder InstaSPIN-MOTION

Motor kit support

LAUNCHXL-F28027F + BOOSTXL-DRV8301

DRV8312-69M-KIT

DRV8301-69M-KIT

TMDSHVMTRINSPIN

DRV8312-C2-KIT

DRV8301-HC-C2-KIT

DRV8302-HC-C2-KIT

TMDXHVMTRKIT5X

TMDSHVMTRPFCKIT

controlSUITE motor control software

Macro-based digital motor control software library

Available in controlSUITE, the digital motor control software library consists of C macros covering nearly all target-independent mathematical functions and target-specific peripheral configuration functions essential for motor control. This includes transformation and observer modules, signal generators and control modules, peripheral drivers and real-time debugging modules.

Features and benefits:

  • Modular macro-based code blocks in system block diagram fashion
    • At initialization all variables are defined and outputs of one block are set as inputs to the next
    • At run-time the structures or macro functions are called
  • Each module is separately documented with source code, use-case, and background technical theory
  • Library modules allow users to quickly build and customize their system in an intuitive manner
  • Removal of fixed point scaling and saturation burden
  • Incremental system build methodology allows validation of software in a step-by-step and easy to understand fashion
  • Consistency between software modules and control block diagrams
  • Hardware development kits show example implementation and theory
Transformation and observer modules Clarke, Park, Phase voltage calculation, sliding mode observer, BEMF commutation, direct flux estimator, speed calculators and estimators, position calculators and estimators etc.
Signal generators and control modules PID, commutation trigger generator, V/f controller, impulse generator, mod 6 counter, slew rate controllers, sawtooth ramp generators, space vector generators etc.
Peripheral drivers PWM abstraction for multiple topologies and techniques, ADC Drivers, hall sensor driver, QEP driver, CAP driver etc.
Real-time debugging modules DLOG module for CCS graph window utility, PWMDAC module for monitoring the control variables through ocilloscope

DMC systems: Connect the blocks – incrementally

Using the DMC library modules, we build up complete motor control system examples. These system examples have been created across different motor types, control techniques, and feedback methods and most have an electrically isolated hardware platform for verification.

The most important feature of the systems is they all use an incremental build approach, which allows an incremental section of code to be built so that the developer can verify each section of their application one step at a time. For example, in the sensorless PMSM FOC example above the following incremental builds are built into the software.

Features and benefits:

  • Build level 1: Using a dummy signal, verify inverse Park, space vector generation, and three-phase PWM driver is producing the correct PWM waveforms
  • Build level 2: Hook up the power stage, verify ADC conversion, phase voltage calculation, Clarke and Park transforms
  • Build level 3: Closed loop PID current control verification
  • Build level 4: Sliding mode observer and speed estimator verification
  • Build level 5: Closed loop PID speed control

All systems come with complete working software, step-by–step user's guide, copious documentation, screenshots and hardware hook-up.

These white papers include information on designing high performance drives and the motor control methodology for C2000 real-time control MCUs.

The digital motor control software library is included with controlSUITE Software:

controlSUITE technology hardware development kits

The following kits are available highlighting various motor control methodologies and implementations. The software is based around the controlSUITE DMC software.

Part Number Description Microcontroller
TMDSRSLVR Motherboard-style resolver-to-digital conversion Kit

TMS320F28027

TMS320F28035

TMS320F28335

TMDSHVMTRPFCKIT High-voltage three-phase motor kit w/ PFC

TMS320F28035

TMS320F28335

TMDXHVMTRKIT5X High-voltage three-phase motor kit TMS320F28055
DRV8312-C2-KIT
Low-voltage low-current three-phase
TMS320F28035
DRV8301-HC-C2-KIT
Low-voltage high-current three-phase TMS320F28035
TMDXIDDK377D
DesignDRIVE Kit
TMS320F28377D
TMDXIDDK377D-MTR-BNDL
DesignDRIVE kit and motor bundle
TMS320F28377D

Other system features

IQMath: Virtual floating-point

IQMath is a library and compiler intrinsic for the C28x generation that allows you to select your range (and hence your resolution) by choosing which bits of your binary represented number are integer (I) and which are the quotient (Q). It also allows you to write C functions in floating point format instead of dealing with fixed point scaling, and the compiler takes care of the rest.

  • Start-up, tuning, and debug effort are reduced
    • Change numerical range on the fly, global or local
    • Tune for best resolution and dynamic range
    • Remove quantization effects
    • Reduce scaling and saturation burden
    • Better integration with simulation and code gen tools
    • Single source set to move between fixed and floating point processors
    • Easy re-use and re-tuning for new systems

Real-time debug

  • Implemented in silicon, not by a software debug monitor
  • No CPU cycles required
  • RTDX always available, real-time debug on customer returns
  • Halt in non-critical code for debug while time-critical interrupts continue to be serviced
  • Access memory and registers without stopping the processor

C28x CPU

The C28x 32-bit DSP is the premier computational engine for digital motor control.

  • Offers the highest precision and fastest throughput for computationally intensive algorithms.
    • DMC library based sensorless FOC takes ˜12 MIPS
  • Extended performance
    • Delfino family offers single precision floating-point unit
    • FPU is an extension of the fixed point core and provides about a 50% cycle improvement in the core DMC algorithms
  • In the Piccolo family we are offering an optional control law accelerator (CLA)
    • CLA is a floating point parallel processing unit that has independent control of the ADCs and PWMs
    • Was designed for very high speed, low latency control loops in digital power applications
    • In process of releasing a CLA DMC library and system examples that will allow the core DMC functions to be "black boxed and off-loaded" into the CLA, allowing the C28x CPU extra bandwidth for other system functions

A/D converter

The ADC on every F28x device has a common ancestry, but has been improved upon in each successive series with more accurate references, better auto-calibration, and DMA support.

  • 12-bit ADC converter with up to 12.5 MSPS throughput
  • Two sample and hold circuits for simultaneous sampling
  • Single or dual bank sequencer with flexible start of conversion and 16 result registers
  • The latest Piccolo family supports ratiometric operation, a more flexible sequencer, adjustable acquisition window, and a just-in-time feature which allows the ADC to pre-call the CPU interrupt to synchronize availability of the converted sample with the CPU

PWM generation

The ePWM modules provide the industry's most feature-rich and flexible PWM pattern generation.

  • Each ePWM module has an independent shadowed 16-bit time base (count up, down, or up-down) that can produce two duty cycle independent outputs
  • There is an optional rising and falling edge dead-band generator, high frequency chopper, and programmable trip zone
  • The trip zone operates even if the MCU clocks go missing, and allows you to map an external pin to any combination of PWM output states, interrupts, ADC start of conversion, or PWM synchronization signals. The trip can be synchronous or asynchronous, has an off-set window, and can be run in cycle by cycle or one-shot modes
  • Independent ePWM blocks can be synchronized to a common time base or automatically phase delayed
  • Standard PWM resolution is tied to the system clock, but there are also high resolution PWMs with as accurate as 55ps resolution, and the Piccolo family offers High Resolution precision on both the duty cycle and the period.

System considerations

The latest Piccolo MCU family of devices includes the latest advances with the following goal in mind:

To lower system cost and increase system reliability:

  • On-chip voltage supervisor with POR/BOR eliminates external supervisor and has in built-in features to eliminate start-up glitches on all PWM pins
  • Three-tier clock protection for IEC-60730
    • Two internal and optional external oscillators
    • Two watchdogs and clock fail detection circuitry automatically switches to back-up OSC
    • If both internal fail device automatically goes into limp mode with graceful shutdown
  • GPIOs include internal digital filter which reduce noise and saves external system cost

In most countries outside of the United States we also see regulatory bodies mandating inclusion of power factor correction (PFC) into most new white goods, and we expect this to spread to other industries.

  • Problem
    • A three-phase inverter and motor act as a non-linear load and draw harmonic currents from the provider's line. These harmonics result in losses and distortions.
  • Solution
    • PFC guarantees the current waveform drawn follows the voltage waveform of the line and also regulates the output DC voltage to a constant value regardless of any changes in the load or the input conditions.
  • Analog vs. digital PFC:
    • Analog or passive implementations of PFC are locked into a single mode and have a limited ability to react to changes in operating conditions.
    • Active or digitally controlled PFC, in contrast, can act on and adapt to changes in operating conditions and it can be more precise and eliminate any phase shift between voltage and current, increasing efficiency.
    • The flexibility of digital PFC also enables developers to employ more complex PFC topologies than is possible with passive implementations.
  • C2000 real-time control devices have the processing headroom and high resolution ADCs and PWMs to implement PFC with sensorless FOC control (and dual axis FOC) even with our lowest cost Piccolo MCUs
  • Example hardware and software are included in all Piccolo and Delfino MCU solutions.

Graphical simulation and code development

Both the Mathworks embedded target and visual solutions VisSim support graphical motor control development tools that target C2000 real-time control MCUs (and interface seamlessly to existing DMC hardware). These tools offer:

  • Block support for the TI DMC library and other TI device, math, and peripheral libraries
  • Simulation, modeling, and validation of complete DMC systems
  • Auto-tuning and coefficient finders
  • Code generation and target deployment
  • Direct interface to TI's integrated development environment and hardware development tools
  • Vissim diagrams for C2000 real-time control motor control kits demonstrate a complete system created without C programming. These diagrams can be downloaded for free at http://www.vissim.com/solutions/field_oriented_motor_control.html

Legacy motor control solutions

Software
F281x series F280x Series Piccolo Series Delfino Series
DMC library Fundamental DMC building blocks and peripheral drivers SPRC080 SPRC215 controlSUITE controlSUITE

DMC Systems: Legacy Fixed-Point Series

Motor type Uses Control technique Control type Feedback Software
Position Current F281x series F280x series Update freq
AC induction three-phase Fixed or variable high speed control, industrial drives, compressors, pumps Scalar - V/Hz SVPWM Speed control Tachometer NONE SPRC130 SPRC194 20 KHz
FOC - vector SVPWM Speed & torque control Two-phase current SPRC077 SPRC207
Sensorless flux + speed estimator SPRC078 SPRC195
Brushless DC three-phase Variable speed control, some position control, fans, compressors, pumps, throttles Trapezoidal Speed control Hall effect NONE SPRC175 SPRC213 20 KHz
Sensorless BEMF DC Bus single shunt SPRC176 SPRC196
Permanent magnet three-phase Precision position, high torque speed control, traction, steering, direct drive, robotics FOC - vector SVPWM Speed & torque control Encoder Two-phase current SPRC129 SPRC210 20 KHz
Position control SPRC179 SPRC212
Speed & torque control Sensorless SMO position estimator SPRC128 SPRC197
Resolver SPRC178 SPRC211
Stepper Position & low torque speed sontrol Microstepping bipolar Position control Sensorless discrete angle estimator Two-phase current SPRAAU7 10 KHz
Brushed DC Low end speed control Direct drive H bridge Speed & position Encoder NONE SPRC177 SPRC214 40 KHz

Electric vehicles

There are over 100 AEC-Q100-qualified C2000™ real-time control MCUs available that are well suited for a variety of electric vehicle applications. These MCUs provide integrated performance and minimize energy loss, they can be used for:

Digital Power technology

  • Charging stations (AC/DC)
  • DC/DC power conversion
  • Onboard charging
  • AC Output

Motor Control technology

  • Traction or propulsion motors
  • Auxiliary motors
  • Power steering

With the number of electric vehicles continually increasing, C2000 MCUs make the task of designing electric vehicle applications quick and easy.

Electric vehicle charging

Digital power

C2000 real-time control MCUs have the computational performance, analog speed and accuracy, and the high resolution, flexible high resolution pulse-width-modulation generation needed for the high frequency control loops required in digital power applications. To get started with C2000 MCU-based digital power applications, there are a number of software and hardware resources listed below. For more information about TI's digital power solutions, go to ti.com/digitalpower.

Digital power plugs

Digital power PowerSUITE software tools

PowerSUITE software tools

PowerSUITE is suite of tools targeted at simplifying the design of digital power supply designs. PowerSUITE is included as part of controlSUITE, which is a cohesive set of software infrastructure and software tools designed to minimize software development time for real-time microcontrollers.

Digital power software library

Available in controlSUITE, the digital power software library consists of a set of modular macro-based functions. These macro functions are encapsulated in re-usable code blocks which can be connected together to build any desired software structure necessary for a digital power system. Functions include target independent mathematical functions and target-specific peripheral configuration functions essential to digital power. These functions include:

  • Controller modules:
    • Second order control law, third order control law
  • Peripheral drivers:
    • PWM drivers for multiple digital power topologies and control techniques, ADC drivers, DAC driver for slope compensation
  • Application specific modules:
    • Power factor correction current command blocks, power factor correction inverse square blocks
  • Math modules:
    • Exponential moving average, sine wave analyzer
  • Real-time debugging modules:
    • DLOG modules for Code Composer Studio™IDE graph window utility

The digital power software library is included with controlSUITE Software:

Digital power development kits and reference designs

The following kits and reference designs are available highlighting various digital power methodologies and implementations. The software is based around the digital power software libraries.

Part number Description Microcontroller
TMDSILPFCKIT

Two-phase interleaved power factor correction with integrated metering

View reference design

TMS320F28035
TMDSHVBLPFCKIT Bridgeless power factor correction
TMDSHVPFCKIT Two-phase interleaved power factor correction TMS320F28027
TMDSHVRESLLCKIT

Resonant LLC DC/DC

View reference design

TMDSHVPSFBKIT

Phase shifted full bridge DC/DC with peak current mode control and slope compensation 

View reference design

BOOSTXL-BUCKCONV DC/DC buck converter with software-controlled active load TMS320F28069
Digital power development kit

Digital power training and videos

Welcome to the C2000 MCU digital power training portal.

Our online digital power training series includes both lecture videos and lab materials for learning the basics of digital power control on the C2000 MCU.

Our set of training kits allows you to experiment with the many features C2000 MCUs offer for digital power control.

The basic training kit uses a single buck converter power stage to implement voltage mode control.

The advanced training kit showcases two buck converter power stages implementing peak current mode control and voltage mode control.

Industrial drives and automation

Some specialized uses of motor control technology are for general purpose AC inverters and servo controllers. This technology can be found in many industrial applications as well including robotic manufacturing, computer numeric controlled (CNC) machinery, elevators, materials conveyance and other industrial automation equipment. 

TI’s Industrial Drives applications initiative, DesignDRIVE offers support for a wide variety of motor types, sensing technologies, encoder standards and communications networks, as well as easy expansion to develop with real-time Ethernet communications and functional safety topologies, enabling more comprehensive, integrated system solutions. 

DesignDRIVE is a single hardware and software platform that makes it easy to develop and evaluate solutions for many industrial drive and servo topologies.

Industrial automation