C-HIL: Field-oriented control of PMSM using Texas Instruments TMS320F2808 card
Demonstration on how to use a Texas Instruments card as a controller for a Typhoon HIL power system model.
Introduction
Texas Instrument cards are the hardware of choice for those who want to accelerate the development of Power Electronics (PE) applications for the Texas Instrument family of Digital Signal Processors (DSPs). To allow you to properly test with Texas Instrument cards, Typhoon HIL Control Center emulates the power stage of a PE device. including power converters, electrical machinery, filters, electrical grid, PV cells, and passive elements. This way, you can develop and immediately begin testing and validating your control applications without worrying about the safety measures required in a power laboratory (P-HIL) environment.
This example shows you how to use an external controller from a Texas Instruments TMS320F2808 card in order to control a model implemented in the Typhoon HIL software. In particular, this section focuses on how you can connect the model with an external control and how they can operate together. While this case study uses a specific Texas Instruments control card as an example, the general process is applicable to a wide range of available cards.
Model description
The model consists of a single-phase rectifier, a three-phase inverter, and a permanent magnet synchronous machine. The single-phase rectifier and the three-phase inverter components are taken directly from the Converter library, while the permanent magnet synchronous machine is taken from the Machines library.
As shown in Figure 1, this model contains only the electrical parts and all components in the model are controlled externally by changing the properties of the components. The operation mode for the three-phase inverter is set to “Digital input per switch”, while the load for the permanent magnet synchronous machine is set to “SCADA / external”, as shown in Figure 2 below.
Simulation
This application comes with a pre-built SCADA panel shown in Figure 3. It offers the most essential user interface elements (widgets) to monitor and interact with the simulation at runtime, allowing you to further customize it according to your needs.
Before starting the simulation, you should load the settings file and then run the simulation. The settings file sends analog outputs and scales to signals towards the TI controller as an ABZ signal. Additionally, it contains digital output settings for the emulated machine encoder signals, sent as an ABZ inverted signal. The Settings file (.runx) is located in the same folder as the model and the SCADA file, and it will be automatically offered by the software.
To interact with the simulation, you should set the reference speed. This reference is then sent through the serial port widget to the TI card, which, in turn, sends that reference to the HIL inputs. Figure 4 shows the motor behavior following the set reference.
You can also change the parameters from PID. This is done in the Set/Read parameters group (see the “Set/Read parameters” in Figure 4).
Grid voltage can be changed manually or by using the LVRT (Low Voltage Ride Through) pulse macro button. LVRT is the capability of electric generators to stay connected during short periods of lower grid voltage.
Files | |
---|---|
Typhoon HIL files |
examples\models\hardware in the loop\ti pmsm sensored foc ti pmsm sensored foc.tse, ti pmsm sensored foc.cus, 20140220_pmsm3_1_TMS3202808.out |
Externals | UniFlash |
No. of HIL devices | 1 |
HIL device model | HIL 402 |
Device configuration | 1 |
Interface | HIL DSP Interface TMS320F2808 |
Test automation
We don’t have a test automation for this example yet. Let us know if you wish to contribute and we will gladly have you signed on the application note!
Authors
[1] Jovana Markovic