TL;DRTrying to pick a DSP MCU family for power electronics control loop. Done some research and consideration, toss up between Texas Instruments C2000 and Infineon XMC4000. Would like to hear other people's own experiences and thoughts.
Edit: Similar question thread here:
https://www.eevblog.com/forum/renewable-energy/micros-for-digital-smps-control-ti-nxp-(freescale)-opinions/Update:
Decided on going with TI C2000 family for my needs but STM32G4 is a strong and popular alternative.
Detailed post on decision here.
BackgroundAs part of
the pilot 1kW CLLC converter design I've posted about and future power conversion systems a DSP MCU (digital signal processing microcontroller, often referred to as just DSP) will be required to control switching and regulate output (i.e. implement the control loop). Selection of an appropriate microcontroller platform/family is critical as the development of the control firmware/embedded software will require significant sunk resources in order to produce functional test prototypes. In particular, the basic operational code and associated learning curve for each platform will be non-transferable, especially for special proprietary features (e.g. integrated peripherals) if they are to be taken advantage of. More general learning of control loop and system dynamics are expected to be transferable however. There may be errors or points I’ve missed so please feel free to correct me.
Why DSP MCU? Alternatives to DSP MCUThe underlying function to be fulfilled is control loop regulation of a switchmode power supply and in our particular application primarily frequency modulation but there is also possibility for mixed control schemes using phase and duty cycle. This function does not require a DSP MCU in particular and could be potentially fulfilled by other devices.
Digital vs AnalogIn general, digital systems as opposed to analog systems offer benefits most significantly in flexibility and configurability of the control loop since most digital control systems are “programmed” rather than hardwired. This in turn enables faster development for application. The fundamental implementation of control systems also tends to be more straightforward with the ability implement arbitrary* response functions and conditional behaviour.
The limitations of digital control systems are aliasing, processing delay and data throughput. Analog enables the highest operating frequency and bandwidth possible. Analog components also tend to be more robust than high speed digital components due to freedom from digital error and failure modes but this is not guaranteed.
Costs and size can vary for digital and analog implementations. For simple systems and analog IC implementations, analog can be smaller and cheaper but for more complex control systems, a digital implementation can be smaller and cheaper as functions requiring multiple devices and stages can be easily accomplished in the digital domain in a single DSP chip.
Great overview of digitally controlled power
Discrete Analog Feedback NetworkThe most “basic” means of controlling a system using analog feedback via op-amp or even discrete transistors and passive components. Drawbacks of this method include increased circuit size and component count as well as potentially higher costs (when implementing more complex control systems). The biggest drawback from a developmental standpoint is the reduced speed of iteration due to the need for significant physical rework to adjust feedback network parameters or even change configuration topologies.
As minimising development/iteration time as well as minimising size of the circuit are high priorities, discrete analog systems are not being considered.
Analog Control ICsAnalog (aka linear) controller integrated circuits are another potential analog based option. ICs can provide all the required functionality in a cost effective single package with relatively simple implementation (compared to making a control circuit/algorithm for scratch) by following recommended reference designs. Being ICs however, they suffer from inflexibility. An IC suitable for the application needs to be found otherwise it is sometimes possible to use an IC outside its recommended application but doing so often involves risk in terms of reliability and development.
For the desired high power application, off the shelf ICs are not available. Example reference designs in our application space exclusively use DSP MCUs.
DSP ASICsDSP ASICs (digital signal processing application specific integrated circuits) are another means of performing digital control. DSP ASICs tend to be designed for digital domain processing of special signals such as video and audio processors where analog domain processing would be impractical. As with analog ICs, the application specific nature means they are inflexible and generally require a suitable IC to be available. Again, few (none known to me currently) are available on the market for our application. Generalised DSP using DSP MCUs seems to be the norm for cutting edge power electronics using DSPs.
FPGAsFPGAs are a strong alternative to DSP MCUs. Essentially capable of all the same functions as an MCU but potentially higher bandwidth and with the ability to efficiently transition designs to an ASIC. A downside to FPGAs is much higher unit cost for similar performance and a convoluted intellectual property landscape. Development and coding of FPGAs is also fundamentally different to MCU programming which can be a major barrier for designer competence. Engineers/programmers able to competently program MCUs tend to be more available however since MCU operation falls closer inline with typical computer science education. The available reference designs as well as recent academic literature all use DSP MCUs so in addition to the cost disadvantage and lower accessibility, FPGAs are not going to be used over DSP MCUs.
edit:
Some different opinions on FPGAs by gnuarmOther MiscThere are also discrete, general DSP microprocessors but these tend to be higher cost, very high compute power for processing actual signals and lack the integrated mixed-domain peripherals required for power control.
Programmable analog is a thing but you don’t see much of it. Article suggesting why:
https://www.digikey.com.au/en/blog/whatever-happened-to-programmable-analog HybridsHybrid solutions consisting of a mix of any of the above are also possible. Such systems can take advantage of the strengths of different solutions while covering weaknesses. However, mixing systems also greatly complicates designs and if not well optimised serves to increase size, cost and development time. Will still be targeting a primarily DSP MCU based implementation for now.
Wishlist Specifications and FeaturesNot all DSP MCUs are created equal and having an idea of what will be required or otherwise beneficial
Processor Core Frequency: >100 Mhz
ADC Bit Depth: >11 bits usable
ADC Sample Rate: >2 MSPS
ADCs: 2 minimum, more than 5 not useful
PWM Peripherals: <100ns resolution
ECC MemorySafety CertificationsSingle CoreAvailable CLLC or LLC reference designFPUProcessor Core Frequency needs to be sufficiently fast with respect to the converter maximum switching frequency such that “full” control can be achieved with minimal phase delay or potential aliasing effects. This will be particularly important for achieving active synchronous rectification. Maximum switching frequency will be in the order of 1MHz at light loads so to ensure minimal phase delay, a clock speed in the order of 100MHz will be required. This seems to be in line with DSP MCUs in reference LLC designs.
Control is possible with switching frequencies nearing or beyond processor frequency using PWM peripherals but sampling and control then needs to be done in frequency-phase domain rather than time domain which can limit flexibility and control.
ADC Bit Depth must be sufficient so that adequate regulation resolution can be achieved. Insufficient resolution also can contribute to instability due to quantisation error. A voltage regulation of 0.01V over a 60-40=20V range, a dynamic range of 2000:1 or ~33dB (note: just looking at voltage dynamic range and regulation, not signal power so not using x2 factor seen in some dynamic range dB equations) for which the minimum number of bits is 11 bits. A current regulation of 0.01A over 20A range will similarly require 11 bits. If a voltage offset is to be avoided in the voltage regulation frontend then the required dynamic range would be 60:0.01=6000:1=~38dB and 13 bits.
It should be noted that sometimes despite an ADC technically having for example 16 bit output, the LSB (least significant bit) or multiple LSBs can be unusable due to self-noise which can also be dependent on a configurable sample rate. The actual number of usable bits needs to be checked.
ADC Sample Rate needs to be sufficiently fast to capture control input signals without aliasing. Given a maximum switching frequency of 1MHz a minimum sample rate of above 2MHz will be required as per Nyquist sampling theorem to discern the fundamental but higher would be better, particularly for quickly and accurately determining phase and amplitude. Complete discrimination of switching waveforms is not necessary required for control but could allow better control and efficiency e.g. active synchronous rectification. However, such high sampling rate dependent features could be disabled when operating at maximum switching frequency i.e. light load where it is less necessary anyway.
Number of ADCs needs to be sufficient to sense all the required control signals. At a bare minimum, output voltage and current needs to be regulated and must be sensed. Additional sensing can also help improve the control loop e.g. sensing input voltage, sensing rectifier conduction state and tank energy. Perhaps up to 5 could be useful, at least for experimentation with the ability to measure input and output current voltage as well as tank state. Also a note on the number of ADCs, the limited number of ADC on an MCU can typically be internally multiplexed to sample multiple channels, the downside being that each ADC is still limited in its sample rate.
Edit:
As uer166 pointed out below, ADC sampling can be synced to the controlled waveform in hardware so Nyquist sampling doesn't necessarily apply.
External ADCs are possible but hooking up an external ADC properly so that full data throughput is enabled and delay is kept to a minimum is an additional challenge compared to using an internal ADC which will of course be fully compatible and have minimal delay.
PWM/Timer Peripherals need to be sufficiently fast and high resolution to operate in the circuit. Most MCUs have PWM/Timer peripherals to handle switching and timing outside the processor core but requirements for timer speed and resolution are much greater for high frequency (>100kHz) switching control. At a 1MHz operating frequency the required PWM resolution will be fractions of a microsecond so approximately <100ns; at lower timescales the gate drive and switching speed of the MOSFETs themselves will become overriding. Better resolution could allow better control using phase shifting techniques. Depending on control and output options, it may be possible to achieve the bare minimum input inverter control using a single timer. Multiple timers could allow greater control freedom.
ECC Memory is desired as any memory glitches or loop failures could potentially have catastrophic failures due to the amount of power being handled. Failures are also much less desirable in industrial grade, mission critical equipment.
Safety Certifications are not strictly required for the converter controller but the added reliability and potential to reuse a familiar family in another application requiring functional safety e.g. BMS are attractive.
Having an
Available Reference Design CLLC or LLC with the DSP MCU will speed up design greatly by having a full example to reference for all the basic required functions. It also provides some level of “proof” the DSP MCU is adequate for application in an CLLC/LLC.
Only a
Single Core MCU will be required for the time being. Only a single phase needs to be controlled for the pilot design and otherwise syncing between multiple MCUs will be required for high level multiphase implementations later anyway so no need for multicore MCUs probably?
An
FPU (floating point unit) is required to do floating point arithmetic efficiently. Whilst it is possible to implement control systems using fixed point arithmetic, doing so requires careful conversions at each calculation step to avoid loss of precision and introducing error. Using floating point will be much quicker to develop and avoid designer errors as well as rounding errors.
Short ListTexas Instruments: C2000https://www.ti.com/microcontrollers/c2000-real-time-control-mcus/overview.html Chips available meeting wishlist
Proprietary TI core?
Optional CLA and PGA peripherals
Best value in terms of features and performance per $
Wide performance/spec range available
Reference Design 6.6 kW CLLLC using TMS320F28004x
https://www.ti.com/tool/TIDM-02002 https://www.ti.com/product/TMS320F280049 Reference Design 500 W 2-phase LLC using TMS320F280025C
https://www.ti.com/tool/TIDM-1001 Also seems popular in designs from outside TI. Wolfspeed reference designs using C2000 MCUs
Wolfspeed Reference Designs:Oct 2020 Reference Design 22 kW CLLC bidirectional using TMS320F28377D
https://www.wolfspeed.com/power/products/reference-designs/crd-22dd12n 2019 Reference Design 6.6 kW LLC using TMDSCNCD280049C
https://www.wolfspeed.com/power/products/reference-designs/crd-06600dd065n 2019 Reference Design 6.6 kW CLLC bidirectional using TMS320F28377D
https://www.wolfspeed.com/power/products/reference-designs/crd-06600ff065n 2018 Reference Design 6.6 kW CLLC bidirectional using TMS320F28377D
https://www.wolfspeed.com/crd-06600ff10n TMS320F28377D Product Page:
https://www.ti.com/product/TMS320F28377DAcademic Papers:5kW CLLC bidirectional using TMS320F28335
https://www.researchgate.net/publication/260496284_Design_Methodology_of_Bidirectional_CLLC_Resonant_Converter_for_High-Frequency_Isolation_of_DC_Distribution_Systems (also seen some other papers for non-LLC circuits using C2000 DSP MCUs)
Cypress/Infineon: XMC4000https://www.infineon.com/cms/en/product/microcontroller/32-bit-industrial-microcontroller-based-on-arm-cortex-m/32-bit-xmc4000-industrial-microcontroller-arm-cortex-m4/ Chips available meeting wishlist
ARM® Cortex™-M4 based
No configurable logic peripherals
Most expensive but still within budget
XMC4400 series looks particularly relevant
Reference Design 3 kW 2-phase LLC using
XMC4400-F64K512 BAhttps://www.infineon.com/cms/en/product/evaluation-boards/eval_3kw_2llc_cfd7/STMicroelectronics: STM32G4https://www.st.com/en/microcontrollers-microprocessors/stm32g4-series.html Chips available meeting wishlist
ARM® Cortex™-M4 based
No configurable logic peripherals
Also lower spec 72 MHz STM32F3 series available, mostly intercompatible? Clock speed likely too low for highest target operating frequency however.
Reference Design STM32F334
https://www.st.com/en/evaluation-tools/steval-dpsllck1.htmlMicrochip: dsPIC33https://www.microchip.com/design-centers/16-bit/products/dspic33eMicrochip seems to be pushing the dsPIC33C (100 MIPS capable) and dsPIC33E (70 MIPS capable) families for digital power.
NO FPUConfigurable logic peripherals
Reference Design, 200 W half bridge LLC using
https://www.microchip.com/developmenttools/ProductDetails/DC/DC-LLC-Resonant-Converter Analog Devices: ADSP-CM4xxNo DSP MCU controlled LLC/CLLC reference designs available. Suggested MCU for digital power has been obsolesced. Doesn’t look like they’re putting much behind their DSP MCUs
https://www.analog.com/media/en/technical-documentation/tech-articles/IC-Ecosystem-for-Driving-Next-Generation-SiC-GaN-Power-Converters.pdf Renesas: RA6T1
https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ra6t1-120mhz-arm-cortex-m4-assp-ra6-motor-control Meant primarily for motor control but has peripherals useful for digital power.
No reference design
Not offering mixed-signal/DSP MCUs:Silicon Labs
Choosing the MCUThe main contenders are the STMicro STM32G4, Infineon XMC4000 and TI C2000. All have a full and complete feature set and excellent specs.
Only the
XMC4000 and C2000 have complete, well documented reference designs which closely match the target design. Documentations and materials for the STMicro reference design appear less complete and are for the related STM32F3 rather than the STM32G4. Edit: Only the C2000 reference design has publicly available source code.
Costwise, the C2000 appears to be the best value for money looking at 1ku budgetary pricing. The C2000 also has a much larger available product lineup with more cost-performance options.
The XMC4000 uses the “open” ARM Cortex for its processor core which might help keep us free from being too “locked-in” with a specific vendor in terms of being able to transfer code architecture but the C2000s use a TI proprietary core?
I’ve also actually been able to get my hands on the reference design board for the Infineon XMC4000 LLC and I have emails of the Infineon engineers which are responsible for the Infineon LLC design. I have tried via TI’s official portals but haven’t been able to get in touch with TI support (help?). There appears to be more stuff out there using C2000 MCUs.
Development environments also differ but would need experience and hands-on testing to know which is better.
For just what I have on hand currently, XMC4000 looks like the easier option but C2000 looks like it might be best overall on paper.