Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.

modelsim.jpg
simulink.jpg
 

Attachments

  • ModelSim_problem.rar
    1.2 KB · Views: 45

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
50,792
Helped
14,601
Reputation
29,477
Reaction score
13,682
Trophy points
1,393
Location
Bochum, Germany
Activity points
290,863
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.
 

Bruno8124

Newbie level 4
Joined
Mar 21, 2021
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
55
ModelSim simulation refers to this Simulink model. You can also download it.

Simulink_model.png
 

Attachments

  • Boost_model.rar
    27.1 KB · Views: 46

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
50,792
Helped
14,601
Reputation
29,477
Reaction score
13,682
Trophy points
1,393
Location
Bochum, Germany
Activity points
290,863
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.
 

Bruno8124

Newbie level 4
Joined
Mar 21, 2021
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
55
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.
Bez tytułu.jpg
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
50,792
Helped
14,601
Reputation
29,477
Reaction score
13,682
Trophy points
1,393
Location
Bochum, Germany
Activity points
290,863
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top