Getting started with B-Box Micro
Table of Contents
This page delivers getting-started information for individuals new to operating the B-Box Micro. As a practical use case, a generic open-loop three-phase inverter application is implemented. Additionally, this page provides a comprehensive list of relevant examples that can be implemented with the B-Box Micro.
This article focuses on the seamless transition from simulation to lab testing with B-Box Micro rather than the theoretical aspects of the implemented three-phase inverter. The latter is addressed in this Three-phase inverter example.
Overview of useful resources
For a complete introduction to imperix software development kits, it is recommended to read the following articles beforehand:
- ACG SDK:
- CPP SDK:
- PROGRAMMING IMPERIX CONTROLLERS:
Implementing an experimental setup
The B-Box Micro is a tabletop controller specifically designed to facilitate the teaching of power electronics. The B-Box Micro can be programmed by writing C/C++ code (CPP SDK) or by drawing a block diagram in Simulink or PLECS (ACG SDK). The code is deployed onto the controller with the Cockpit software, using an Ethernet link. Imperix Cockpit also provides run-time interaction and monitoring from the host PC.
The illustration below shows the employed use case example, where the B-Box Micro controls a three-phase inverter.
This setup can be implemented with the imperix starter kit. Some additional material, listed below, is however required to test the system before operating the complete converter.
- Laboratory DC power supply
- 3x power resistors
- 3x 2.5mH inductor
During the presented experiments, the inverter is connected to a three-phase RL load, under the following conditions:
- DC-bus voltage: 100 V
- Control frequency: 20 kHz
- Sampling phase: 0.5 (middle of the switching period)
- Load resistance: 6 Ω
- Load inductance: 2.5 mH
How to program the B-Box Micro from Simulink
To develop and flash a run-time code using Matlab Simulink, the necessary software must be installed on a computer (the requirements and the procedure are similar using PLECS):
- Main software: Matlab Simulink, with Matlab Coder, Embedded Coder, and Simulink Coder
- Imperix ACG SDK
- Optionally: a plant simulation software (e.g. Simscape Electrical or PLECS blockset for Simulink).
Imperix ACG SDK requires a paid license for loading the generated code on a programmable controller. The license gives unlimited access to the controllers. All software licenses are target-locked (i.e. usable on multiple computers) and lifetime (no renewal fees, free software updates).
Once the model is opened, the code generation option must be selected in the “CONFIG” block. To generate code, click the “Build” button or use the shortcut (Ctrl+B in Simulink). Regardless of the workflow that is used, the build procedure is done such that everything takes place automatically. This comprises code generation, compilation, and upload of the user code onto the controller.
At the end of a successful build, Cockpit automatically launches and creates a new project with a pre-filled project name and executable file path. To load the user code (.elf file) to the target and start the code execution, search for the IP of the B-Box Micro on the target explorer panel and click “Create”. The user code is then automatically transferred to the B-Box.
How to connect to the B-Box Micro from the PC
The connection to the host computer is required to deploy the user code and to provide real-time access to the controller variables during run-time. The location of the ethernet port on the B-Box Micro is on the rear side, as highlighted in the following figure.
The B-Box Micro does not feature a display. In a regular classroom setup where different workstations are operated, the best way to address the lack of display is to rename the hostnames with the corresponding workstation numbers. By doing so, once the B-Box Micro is assigned to a specific workstation, there will be no need to verify the correct connection during future training sessions.
How to configure analog inputs and protections
The B-Box Micro features safety limits, which can be configured on Cockpit. For that, when connected to a B-Box Micro, the Target configuration window offers an additional tab called Analog inputs (see illustration below). More details about analog inputs configuration on B-Box Micro are given in PN106.
Safety limits configuration for the open loop three-phase inverter
Assuming that the load current is measured using the embedded current sensors of PEB8038 modules, whose sensitivity is 50.0 mV/A, the Limit high and Limit low values can be computed as follows. The same approach applies to the DC bus voltage sensor.
- Current sensors (CH0, CH1, CH2)
- Maximum acceptable instantaneous current: ±8 A
- Corresponding sensor output: ±8 A x 50.0 mV/A = 400 mV
- Limit high: +0.4 V and limit low: -0.4 V
- Voltage sensor (CH3)
- Maximum acceptable DC voltage: 120 V
- Corresponding sensor output: 120 V x 4.99 mV/V ≈ 600 mV
- Limit high: +0.6 V and limit low: -0.2 V
Run-time monitoring using Cockpit
Each Cockpit project contains a view in which users can drag and drop modules to monitor and alter user-defined variables. Any signal in the user code connected to a Probe block can be monitored in real time using the Scope or Rolling plot modules. Additionally, the Tunable parameters defined in the user code can be modified at run time from within the Variables module. A full guide on Cockpit monitoring software is addressed here.
Once the safety limits are configured, the PWM outputs can be enabled to monitor the behavior of the user-defined variables, as shown below.
How to acknowledge faults
If an error occurs during operation, the PWM outputs are blocked. To enable the PWM outputs again, the fault must be acknowledged.
For instance, let’s consider a step change from 100 V to 130 V for the DC voltage supply. Since the high limit is set to 120 V, the voltage crosses the imposed threshold once the voltage step occurs. Hence, the PWM outputs are blocked, and the error message appears on the screen.
To resume operation, the fault needs to be acknowledged. To do so, a shortcut on the error message is given to rapidly access the target limit configuration panel. The channel and the relative exceeded limit are highlighted in red. The button “Acknowledge faults” authorizes the return in the operating mode.
Where to go next?
A wide spectrum of control techniques can be easily implemented and tested with the starter kit. The examples provided below are ready-to-use and fully tested:
- PI control:
- Phase detectors:
- Modulation techniques:
- Carrier-based PWM
- Space Vector PWM
- Discontinuous PWM
Thanks to the modular nature of the modules and plug-and-play connectivity of the whole starter kit, many different applications and topologies can be addressed quickly and with high performance:
These are just a few examples of what is achievable with the 4x phase leg modules capabilities of the B-Box Micro.