Adding LTSPICE component to MATLAB

조회 수: 15 (최근 30일)
Shrinivas Hanchate
Shrinivas Hanchate 2020년 5월 26일
댓글: Shrinivas Hanchate 2020년 6월 1일
We want to incorporate a SPICE component in our MATLAB model.
We are using "subcircuit2ssc" command to add that component in MATLAB, but we are getting an error.
Please find the attached error snap-shot and component file in txt format.

답변 (2개)

Maadhav Akula
Maadhav Akula 2020년 5월 28일
I think these errors come up usually indicating that there is a syntax or expression in the file that is not recognized or supported by Matlab's SPICE conversion assistant, which is described in detail here:
From looking at your component file I have found that upon removing the following lines 116,123 and 128(bolded below)
e5 NET5 0 Value {
+ if (V(gk,s)>11 ,
*+ (-0.9267*V(gk,s)**3+49.313*V(gk,s)**2-877.727*V(gk,s)+5351.268)/10000
+ ((87.641n*V(Tj)**3+46.001u*V(Tj)**2-15.03m*V(Tj)-0.13539)*V(gk,s)**3+
+ (-4.7725u*V(Tj)**3-2.0118m*V(Tj)**2+0.69225*V(Tj)+13.826)*V(gk,s)**2+
+ (86.016u*V(Tj)**3+27.876m*V(Tj)**2-10.322*V(Tj)-366.33)*v(gk,s)+
+ (-496.9u*V(Tj)**3-0.12272*V(Tj)**2+49.167*V(Tj)+3084.3))/10000
+ ,
+ if (V(gk,s)<=11 & V(gk,s)>9,
*+ (15*V(gk,s)**2-245*V(gk,s)+1470)/10000
+ ((8.3091u*V(Tj)**3+1.2517m*V(Tj)**2-0.30635*V(Tj)-4.25318)*(V(gk,s)**2)+
+ (-166.98u*V(Tj)**3-21.874m*V(Tj)**2+4.7236*V(Tj)+53.187)*v(gk,s)+
+ (821.34u*V(Tj)**3+90.986m*V(Tj)**2-15.564*V(Tj)+475.4))/10000
+ ,
*+ (13.958*V(gk,s)**2-158.333*V(gk,s)+774.375)/10000
and also by removing the semicolon in the line 217(bolded below), you should be able to build your library!
+ (Cjo/(1+(limit(v(dk,s),0,460)/Vj)**M))*ddt(v(dk,s)) ;
This behavior might be due to the comments (as * and ; are treated as comments) in the middle of a multi-line expression.
Hope this helps!

Shrinivas Hanchate
Shrinivas Hanchate 2020년 6월 1일
Thank you Maadhav Akula ​for your replay we tried your solution but, we are now facing a new error.PFA the error image.
  댓글 수: 2
Maadhav Akula
Maadhav Akula 2020년 6월 1일
I think ddt inside a function call is not supported by the conversion assistant, please have a look at the limitations page:
Shrinivas Hanchate
Shrinivas Hanchate 2020년 6월 1일
Thanks for your reply.
I understood derivative function ddt is not supported by matlab, but we need this SPICE component in our MATLAB model, is there any alternate way by which we can import this SPICE component in our MATLAB model ?

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

카테고리

Help CenterFile Exchange에서 SPICE files에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by