AN 995: Three-phase Boost Bidirectional AC-DC and LLC DC-DC Converter for EV Charging Design Example

ID 784593
Date 9/15/2023
Public
Document Table of Contents

2.6.1. Generating HDL and QPF Using MATLAB Scripts

The Three-phase Boost Bidirectional AC-DC and LLC DC-DC Converter for EV Charging design example provides MATLAB* files and scripts necessary to generate an Intel® Quartus® Prime software project and HDL code for the Intel® MAX® 10 FPGA Development Kit or Cyclone® V SoC Development Kit:. In the matlab/Simulink directory, bidir_rectifier_dcdc.slx and bidir_rectifier_2models_dcdc.slx MATLAB files contain MATLAB models. The bidir_rectifier_dcdc.slx file compares fixed-point and floating-point Simulink* models. The bidir_rectifier_2models_dcdc.slx file compares the Simscape Electronics and Simulink floating-point models.

The model to generate HDL code for the FPGA in this design example is the Simulink fixed-point model bidir_rectifier_fixed in the bidir_rectifier.slx file.

  1. Navigate to the matlab/Simulink directory and open one of the following files:
    • Cyclone® V SoC Development Kit: hdlworkflow_c5.m to generate an Intel® Quartus® Prime software project and VHDL code for the design.
    • Intel® MAX® 10 Development Kit: hdlworkflow_m10.m to generate an Intel® Quartus® Prime software project and VHDL code for the design.
  2. Click Run to run the script in the MATLAB interface.
    Figure 8. Run MATLAB Script to Generate a Project
    Running the HDL workflow script generates the hdl_prj_c5/quartus_prj for Cyclone® V or hdl_prj_m10/quartus_prj (for Intel® MAX® 10) inside the matlab/Simulink directory. These newly created directories contain a full Intel® Quartus® Prime software project similar to the one with this design example. This flow helps regenerate the HDL if you want to modify the model. The directory hdl_prj_x/hdlsrc is the newly generated HDL for the Three-phase Boost Bidirectional AC-DC and LLC DC-DC Converter for EV Charging design based on the fixed-point Simulink model.