Documentation Home Page eHS Toolbox Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

DFIM Control - SPS

Description


This model illustrates the closed loop control of eFPGASIM based Doubly Fed Induction Machine (DFIM) using back-to-back PWM converters built with eHS solver. This example is flexible for different real-time simulators, efsChassisSelection drop-down list gives five options in total. This model has CPU and FPGA as two major processing units. Here, the DFIM and the converter are simulated on FPGA and the controller on CPU in real time. RT-Lab model is provided to show the exchange of information between the controller and plant:

  • Firmware selection for different platforms

  • Exchange happening within the software

  • Exchange through analog and digital I/O cards present on the simulator

A SimPowerSystems equivalent model "SPS_DFIMref_2015a" is also provided along with these models for the users reference. This model needs "ssn_dfim_windturbine_init" file for initializing the parameters.

SIM POWER SYSTEMS OP4510 OP5607 OP5707

Table of Contents

Requirements


The RT-LAB, RT-EVENTS, SimPowerSystems and eFPGASIM toolboxes must be installed on the host and target computers in order to run this example model properly. Please refer to the product documentation for details on version compatibility.

Setup and Connections


This model must be run with the Hardware Synchronized option, and with the XHP mode enabled. The firmware used in this model is generated using RT-XSG tool, and it can be modified to generate firmware to fit another I/O hardware configuration. The CPU model simulation time step is set to 20 microseconds and all the variables required for eFPGASIM DFIM, eHS power network and controller block are defined in "ParameterInitialization.m" file which gets loaded during simulation automatically.

  • For the model with I/O configured, DB37 pin based analog and digital loop back cables are required to be connected at the rear side of the simulator.

 

  • For the model without I/O, no cables are required.

Procedure


The following procedure will help the user understand how to work with the eHS solver, eFPGASIM based DFIM and the controls involved for back-to-back PWM converters.

Firmware Selection

It supports five options, three for OP4510 (325T with eHSx32 and x64 and 410T with eHSx128) while two for OP5700 (eHSx64 and x128).

RT-LAB model without IO Configuration [Software-in-the-loop]

Run this demo : efsOpenExample('DFIM_rtlab');

Software-in-the-loop based RT-Lab model, "DFIM_rtlab", is provided to show the exchange of information between the controller and plant.

  1. Click on "Run this demo" on the top of this section (if this page is displayed in the Matlab demo browser). The RT-LAB model using the eHS solver will open automatically, as well as the SimPowerSystems model describing the circuit to be solved.

  2. Verify that the board type is set to TE0741 in the OpCtrl block in the master subsystem of the RT-LAB model. In the "OpCtrl" block, select the "Board ID" corresponding to the hardware on which eHS is executed. To get this information, select "Tools > Get I/O infos" on the target context menu in RT-LAB and find the index of your hardware.

  3. To run this example, user needs to ensure that the RT-Lab model and eHS model are present in the same folder.

  4. RT Lab model consists of a master subsystem i.e. "SM_Controller" and a console subsystem i.e. "SC_Console" .

    • The master subsystem has FPGA interface of DFIM i.e. "Generic Machine", converter interface i.e. "eHS CPU Block" and controls for back-to-back PWM converters.

    • The console subsystem is used to control set points, like magnitude and frequency of source voltages, speed reference and mechanical torque during real time simulation. Also, users can monitor voltages, currents, machine torque and speed of the machine at any point of time during simulation. For this example the role of each set points are as following:

  • Vdc_Ref: This sets the DC bus reference voltage for the outer loop of grid side converter control.

  • Kp Ki rotor: These are the Kp and Ki values of outer loop active and reactive power control of the rotor side converter control.

  • Kp Ki DC-link: These are the Kp and Ki values of inner loop active and reactive power control of grid side converter control.

  • Iq_related: This generates Iq reference value manually when PQ control of rotor side converter is disabled.

  • P ref: This block is used to set reference active power in PU to the rotor side converter outer loop control. This block holds a feature of generating reference value as a constant or a square wave with perturbation or a triangular wave with perturbation.

  • Q ref: This block is used to set reference reactive power in PU to the rotor side converter outer loop control

  • PQ_Control: This block, upon setting a value 0, enables all controls with respect to back-to-back PWM converters. It disables active and reactive power control of rotor side converter upon setting its value to 1. The value of Iq is given manually from "Iq_related".

  • Rotor speed: The rotor speed of DFIM is set in per unit.

  • Rotor speed type: The rotor speed continuously varies between sub and super synchronous mode upon setting a value 0. If the value is set to 1 then the speed mentioned in "Rotor speed" is considered.

  • Frequency: Grid frequency

  1. eHS model consists of power network and is solved by eHS solver present in the master subsystem of RT-Lab model. eHS model "eHS_DFIM" is built by keeping the conventions of sources, switch and measurements compatible to solver requirements. Total of 7 current/voltages sources needed by eHS circuit, three of them are generated and mapped via RT-Lab model (Vabc grid0) and last four are the current feedback from the machine model (Current Source Ia_stator, Ib_stator, Ia_rotor and Ib_rotor). The convention to follow in eHS solver "Input Settings" tab is shown below.

Here, the switch configuration is also shown. The user can choose to send the gating pulses from the CPU or configuring Digital In

  1. When the model is compiled in Simulink, the configuration of the eHS solver will be generated according to the SimPowerSystem circuit characteristics. Elements will be put into matrices and stored into .mat files that will be transferred into the solver when the model is run from the RT-LAB interface. Matrices are generated during model compilation in RT-LAB.

  2. The generic machine available in eFPGASIM library has the capability to solve four motors with hardware. This machine model solves only electrical side of the system and mechanical model is computed in the CPU. The converter terminal voltages measured from eHS solver will feed the machine terminals and similarly, the machine stator currents are fed back to the converter terminals as mentioned in point 5. Following are the necessary information to configure DFIM.

    • Data In Port Number 29

    • Load In Port Number 20

    • Data Out Port Number 11

  3. Back-to-back converter control of DFIM is implemented on the CPU which runs at a sampling time of 20 micro-sec.

    Rotor side converter (RSC) shown below provides the excitation for the induction machine rotor. With this PWM converter it is possible to control the torque, hence the real power, and power factor at the stator terminals. The DFIM is controlled in a synchronously rotating dq axis frame, with d axis oriented along the stator flux vector position. In this way a decoupled control between the electrical torque and the rotor excitation current is obtained. Consequently, the active and reactive power are controlled independently.

Reference: Dr John Fletcher and Jin Yang "Introduction to Doubly-Fed Induction Generator for Wind Power Applications"

Grid side converter (GSC) control shown below controls the flow of real and reactive power to the grid. The objective of GSC is to keep the DC Link voltage constant regardless of the magnitude and direction of the rotor power flow. The vector control method is used with the reference frame oriented along the stator voltage vector position, enabling independent control of the active and reactive power flowing between the grid and the GSC.

Reference: Dr John Fletcher and Jin Yang "Introduction to Doubly-Fed Induction Generator for Wind Power Applications"

RTE_SPWM block is used to generate PWM pulses for eHS converter. The modulating waves are clamped to a value between 0 and 1 using a clamping circuit. The carrier frequency is 2000 Hz and the number of events chosen is 10. Exchange of information between the controller and plant happens within the software model.

  1. To run simulations which includes eHS solver and eFPGASIM machines in real time, create a RT-LAB project and add the RT-LAB model into the project. The eHS model should not be added to the RT-LAB project, as it does not need to be transferred to the target computer for execution. Compile the model, then assign a target node to run it in real time, then load the model onto it.

  2. During real time execution;

    1. Set reference active power in PU to the rotor side converter controller P ref in the console.

    2. Set reference reactive power in PU to the rotor side converter controller Q ref in the console.

    3. Set Vdc reference to the grid side converter controller Vdc_Ref in the console.

The user also has the option to play with the rotor speed mode and the nature of reference real power from the console.

Note: To capture the data during real time simulation, OpWriteFile block can be used. A mat file is available in the following folder model_name\model_name_SM_xxxx\OpREDHAWKtarget upon model reset. This .mat file can be used to visualize more accurately the outputs, or to compare the results of several simulations together.

RT-LAB model with IO Configuration [Hardware-in-the-loop]

Run this demo : efsOpenExample('DFIM_IOs_rtlab');

The following procedure will help the user understand how to work with the eHS solver, eFPGASIM based DFIM and the controls involved for back-to-back PWM converters. Hardware-in-the-loop based RT-Lab model, "DFIM_IOs_rtlab", is provided to show the exchange of information between the controller and plant.

  1. Click on "Run this demo" on the top of this page (if this page is displayed in the Matlab demo browser). The RT-LAB model using the eHS solver will open automatically, as well as the SimPowerSystems model describing the circuit to be solved.

  2. Step 2 to 8 from the previous section must be repeated to ensure proper configuration of the demo.

  3. Unlike the previous model, exchange of information between the controller and plant happens through analog and digital I/O cards present on the simulator as shown in the figure below.

  • "Analog Output Mapping and Rescaling block Control Panel" block in the console subsystem is customized to map measurements from eHS converter as well as signals from CPU model to analog out (DAC) card. For this example, analog out channels Ch00 to Ch06 are fixed as the controller expects the inputs in the following order {'DFIM1.Ias', 'DFIM1.Ibs', 'DFIM1.Ics', 'DFIM1.Iar', 'DFIM1.Ibr', 'DFIM1.Icr'}

  • Machine currents are provided to the controller using Analog In (ADC) of simulator

  • "Encoder In" block reads the encoder output and generates speed and angle information of the machine shaft.

  • Firing pulses generated by controller are sent out via digital out card present on the simulator, and fed back through digital loop back cable to fire eHS converter internally.

  1. To run simulations which includes eHS solver and eFPGASIM machines in real time, create a RT-LAB project and add the RT-LAB model into the project. The eHS model should not be added to the RT-LAB project, as it does not need to be transferred to the target computer for execution. Compile the model, then assign a target node to run it in real time, then load the model onto it.

  2. During real time execution;

    1. Set reference active power in PU to the rotor side converter controller P ref in the console.

    2. Set reference reactive power in PU to the rotor side converter controller Q ref in the console.

    3. Set Vdc reference to the grid side converter controller Vdc_Ref in the console.

 

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter