Hi @CosmicNewt51,
- FPGA Compatibility & Verification Checklist
To confirm that your OP5600 and RT-LAB 2022.1 setup supports FPGA-based eHS simulation with the eHS SE S-Function Driver, you can check the following items:
(A) Software Compatibility:
Ensure your MATLAB/Simulink version matches the supported versions for RT-LAB 2022.1 (typically MATLAB R2020b, R2021a, or R2021b).
Verify your eHS solver version is compatible with RT-LAB 2022.1. The eHS SE S-Function driver workflow is supported in eHS v3.1 and later. Refer to the RT-LAB: Software Compatibility
matrix for details.
If using custom bitstreams or RT-XSG, check that RT-XSG and the Xilinx toolchain (Vivado/ISE) align with RT-LAB 2022.1.
(B) FPGA Hardware & Firmware (Bitstream):
Check the FPGA board installed inside your OP5600 (commonly a Xilinx Virtex-6, Virtex-7, Kintex-7, or OP5142).
Ensure the active FPGA firmware (.bin or .tar.gz) is a standard OPAL-RT bitstream configured with the eHS IP core and compatible with eHS SE.
(C) License Verification:
Open the RT-LAB License Manager (or check your target properties) to confirm an active eHS license feature.
Check your licensed eHS matrix tier (eHSx32, eHSx64, or eHSx128), as this sets the maximum number of switches, passive components (L, C), and electrical nodes supported on the FPGA.
- Model Partitioning Strategy
Your ideas for the strategies are very interesting. I’d love to hear what approach you actually end up with. Here are some of my recommendation.
Option A: Hybrid Partitioning (Recommended)
FPGA (eHS SE): Fast power converters (DC/DC converter, DC-link capacitor, DC/AC converter, and output filter).
CPU (Simulink / RT-LAB): Battery model, IEEE 9-bus electrical network, and controller algorithms.
Key Advantages:
Optimized Time Steps: High-frequency switching elements run at sub-microsecond time steps (~200–500 ns) on the FPGA, preventing PWM distortion and numerical instability.
Resource Efficiency: Keeps the FPGA footprint low, easily fitting within standard eHSx32 or eHSx64 cores.
Non-Linear Support: Slow-dynamics models like the battery (SOC lookup tables, thermal/aging equations) and large networks run comfortably on CPU cores at standard time steps (20–50 µs) using Simscape / ARTEMiS.
Consideration: Requires a CPU–FPGA decoupling interface (controlled voltage/current sources) which introduces a 1-step communication delay between the grid and converter interfaces.
Option B: All-in-eHS Electrical System
FPGA (eHS SE): Entire electrical circuit (Battery + DC/DC + DC link + DC/AC + Filter + IEEE 9-bus grid).
CPU (Simulink / RT-LAB): Control loops and high-level management only.
Key Advantages:
Zero Interface Delay: Eliminates decoupling delays between the converters, battery, and grid.
Considerations:
Matrix Limits: The IEEE 9-bus grid and passive components significantly increase branch/node counts, likely requiring an eHSx64 or eHSx128 license.
Model Constraints: The battery and grid components must be modeled using linear or piecewise-linear representations compatible with eHS.
Summary & Recommendation
For an EV charger connected to a 9-bus network, I would recommend Option A (Hybrid Partitioning) as it is the industry-standard approach for real-time HIL:
- Put the switching converters and filter in eHS SE on the FPGA for sub-microsecond precision.
- Put the battery model, 9-bus grid, and controls in Simulink on the CPU to handle complex dynamics and preserve FPGA resources.