Problem with ModelSim simulation of a boost converter

Status
Not open for further replies.

Bruno8124

Newbie level 4
Joined
Mar 21, 2021
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
55
Hi,

I am trying to create a simulation of a power stage of a boost converter in ModelSim to further create a PID controller on FPGA. I have written differential equations that describe a boost converter and created a testbench for simulation. Unfortunately output signals (inductor current and output voltage) does not match those from adequate model from Simulink, for example inductor current reaches large negative values. Can you help me find mistakes in my files? I manually set simulation time in ModelSim (typically 50ms). Below I attach screens from ModelSim and Simulink (inductor current) and simulation files. Thanks in advance.

 

Attachments

  • ModelSim_problem.rar
    1.2 KB · Views: 94

You are apparently makin a time discrete behavioral model of the converter hardware in SV. That's of course possible, but there's no guarantee that the model is physical plausible.

Do you mind to show a circuit of the modelled hardware?
--- Updated ---

+ the Simulink schematic.
 

ModelSim simulation refers to this Simulink model. You can also download it.

 

Attachments

  • Boost_model.rar
    27.1 KB · Views: 104

Without looking into the details. I don't see a diode modelled in power_stage.sv. There should be a current sign dependent resistance respectively voltage drop.
 

OK, I added that voltage drop but it has pretty much no impact on the results, due to the way my model is created. Commutation is implemented as changes between equations, there are no changes of diode resistance.
 

That's not what I'm talking about. The emphasis is on "current sign dependent". Diode is a self-steered switch, you need to model it somehow in HDL.

Industry standard solution for modelling of analog circuits would be Verilog-A.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…