Problem in importing spice model to Simulink

13 次查看(过去 30 天)
I have imported a spice model to simulink, but it doesn't work. After getting the R8003KND3TL1.lib, I've run
subcircuit2ssc('R8003KND3TL1.lib','+mylibrary');
ssc_build mylibrary;
and got mylibrary_lib.slx which contains the model. I build a simple circuit as:
where Vdc = 400V, Vg = 0/4V according with the device, and R = 1000 ohm.
However, there is some error:
```
运行仿真时出错,仿真终止(Error running simulation, simulation terminated)
Reason: all components and nodal across variables involved
Cannot solve for one or more variables, including dynamic variable derivatives:
Time derivative of 'r8003knd3.M1.cap_cgdo.Qcap' (Charge)
Time derivative of 'r8003knd3.M1.cap_cgso.Qcap' (Charge)
Time derivative of 'r8003knd3.M1.mos_cin.Qd' (Drain charge)
'r8003knd3.M1.cap_cgdo.i' (Current)
'r8003knd3.M1.cap_cgso.i' (Current)
'r8003knd3.M1.mos_cin.Id' (Drain current)
all components and nodal across variables involved
Cannot solve for one or more variables, including dynamic variable derivatives:
Time derivative of 'r8003knd3.M1.cap_cgso.Qcap' (Charge)
Time derivative of 'r8003knd3.M1.mos_cin.Qb' (Bulk charge)
Time derivative of 'r8003knd3.M1.mos_cin.Qg' (Gate charge)
'r8003knd3.M1.cap_cgso.i' (Current)
'r8003knd3.M1.mos_cin.Ib' (Bulk current)
'r8003knd3.M1.mos_cin.Ig' (Gate current)
Problems possible for transient initialization, as well as stepsize control for transient solve, due to equations (including nonlinear equations) of one or more components:
all components involved
'untitled/r8003knd3'
Equation locations are:
'D:\MATLAB\R2021b\toolbox\physmod\elec\library\m\+ee\+additional\+spice_semiconductors\spice_mos3_charge.sscp' (no line number info)
'D:\MATLAB\R2021b\toolbox\physmod\elec\library\m\+ee\+additional\+spice_semiconductors\spice_mos3_charge.sscp' (no line number info)
Problems possible for transient initialization, as well as stepsize control for transient solve, due to equations (including nonlinear equations) of one or more components:
all components involved
'untitled/r8003knd3'
Equation locations are:
'D:\MATLAB\R2021b\toolbox\physmod\elec\library\m\+ee\+additional\+spice_semiconductors\cap.sscp' (no line number info)
'D:\MATLAB\R2021b\toolbox\physmod\elec\library\m\+ee\+additional\+spice_semiconductors\cap.sscp' (no line number info)
'D:\MATLAB\R2021b\toolbox\physmod\elec\library\m\+ee\+additional\+spice_semiconductors\spice_mos3_charge.sscp' (no line number info)
'D:\MATLAB\R2021b\toolbox\physmod\elec\library\m\+ee\+additional\+spice_semiconductors\spice_mos3_charge.sscp' (no line number info)
'D:\MATLAB\R2021b\toolbox\physmod\elec\library\m\+ee\+additional\+spice_semiconductors\cap.sscp' (no line number info)
'D:\MATLAB\R2021b\toolbox\physmod\elec\library\m\+ee\+additional\+spice_semiconductors\cap.sscp' (no line number info)
'D:\MATLAB\R2021b\toolbox\physmod\elec\library\m\+ee\+additional\+spice_semiconductors\spice_mos3_charge.sscp' (no line number info)
'D:\MATLAB\R2021b\toolbox\physmod\elec\library\m\+ee\+additional\+spice_semiconductors\spice_mos3_charge.sscp' (no line number info)
```
How do I solve the problem?

回答(1 个)

Sabin
Sabin 2022-12-22
The conversion is fine, it seems that the simulation model is a bit challenging for the continuous solver. The simple model will simulate with the local solver. For some help you can check the SPICE Conversion of a MOSFET Subcircuit and Validation workflow in Simscape Electrical. I hope this helps.

类别

Help CenterFile Exchange 中查找有关 Parameterization Methods 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by