MOSFET SPICE models .lib file into Simulink using subcircuit2ssc

조회 수: 28 (최근 30일)
hugo c
hugo c 2021년 12월 11일
편집: David John 2023년 10월 9일
Hello,
I am attempting to import the 1200 V Infineon device models into Matlab Simulink using 'subcircuit2ssc', however when I attempt to in Matlab I get the error:
"Subcircuit delimiters is not in expected format.
Error in spiceSubckt
Error in subcircuit2ssc"
I have changed the numbers such as MEGA to 1e9 etc and ** to ^ to match Matlab use but still get the same errors. Any suggestions on other sections of the .lib to change in order to make it work?
The original model code is attached.

채택된 답변

David John
David John 2021년 12월 16일
Most likely this is because you have nested subcircuits. In particular, there is:
.ENDS TO263_7_11_HVM_1G75_1S500_100MHz_parlel
.ENDS TO263_7_11_HVM_1G75_1S500_100MHz
Please try getting rid of the nesting. This can be achieved by cutting the line:
.ENDS TO263_7_11_HVM_1G75_1S500_100MHz
and pasting it just above the line
.SUBCKT TO263_7_11_HVM_1G75_1S500_100MHz_half 1 2 3 4 5 6 7 8
  댓글 수: 4
Fan Yingpeng
Fan Yingpeng 2023년 10월 7일
Dear hugo c,
I met the same problem as you, after modification of .lib file wih subcircuits nesting and DC 0, curly brackets troubles me and I don't konw why. Error in Matlab Command Window as below
"Error using spiceSubckt/getFunctionCalls
Functions must be enclosed in {}."
I have already examined the amount of curly brackets in .lib file and add {} at every equal sign such as PARAMS: N9 = {30}, but the error still exists
code of .lib file is attached and could you help me
thank you
David John
David John 2023년 10월 9일
편집: David John 2023년 10월 9일
.FUNC N168(N101, N102, N103) = IF( -N148(N101, N102, N103) - N149(N101,N103) > 0, -N148(N101, N102, N103) - N149(N101,N103) , 0)
should be
.FUNC N168(N101, N102, N103) = {IF( -N148(N101, N102, N103) - N149(N101,N103) > 0, -N148(N101, N102, N103) - N149(N101,N103) , 0)}
Also, please make sure that X$M2 references the appropriate subcircuit on the same line:
X$M2 N4 N4 GATE DRAIN SOURCE SOURCESENSE N5 N6 TO263_7_11_HVM_1G75_1S500_100MHz (some editors will wrap that line and insert a newline before the TO263*, and this should be avoided).

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simscape Electrical에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by