Hello I am trying to convert a ltspice capacitor part into a simulink part through Matlab
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
.param esr2=20m esl2=2.7n N=10 fg=10kHz captemp=85
.subckt B58035U9255M001_2.5uF_FA10_TD A1 A2
RIN A1 t1 {esr2}
LIN t1 func1 {esl2} Rser=0
R0 B1 func1 100
R1 func1 21 20
C1 21 B1 22µ Rser=0 Rpar=0
R2 func1 31 1
C2 31 B1 18µ Rser=0 Rpar=0
R3 func1 41 80m
C3 41 B1 18µ Rser=0 Rpar=0
R4 func1 51 5m
C4 51 B1 25µ Rser=0 Rpar=0
R5 func1 61 {esr/N}
C5 61 B1 15µ Rser=0 Rpar=0
R6 mid B1 100Meg
C6 B2 mid {1/(2*pi*fg*100Meg)} Rser=0 Rpar=0
B1 101 A2 V=V(B1,mid)*V(B1,mid)
R7 int 101 100Meg
C7 A2 int {1/(2*pi*fg*10*100Meg)} Rser=0 Rpar=0
B2 vaceff A2 V=limit(Sqrt(V(int,A2)),0.5,7.1)
R8 vaceff A2 100Meg
B3 B1 B2 I=N*0.000001*(4*(13.151561603982+(0.18392685302364+(0.0013480077966704+(-5.2876622060756*pow(10,-7)+(-4.2445410907105*pow(10,-7)+2.0702248668382*pow(10,-9)*limit(captemp,-50,150))*limit(captemp,-50,150))*limit(captemp,-50,150))*limit(captemp,-50,150))*limit(captemp,-50,150)+limit(V(vaceff,A2),0.5,7.1)*(2.133883766835+(-0.0056987119667124+(-0.00037124601416288+(7.4474115578529*pow(10,-8)+(5.9782268883247*pow(10,-8)-2.9158096716032*pow(10,-10)*limit(captemp,-50,150))*limit(captemp,-50,150))*limit(captemp,-50,150))*limit(captemp,-50,150))*limit(captemp,-50,150)))*exp(2
.end
0 commentaires
Réponses (1)
Raghava S N
le 14 Mar 2024
Hi Tahsina,
The function “subcircuit2ssc” reads the SPICE netlist specified as a parameter and converts every subcircuit into one or more Simscape files in the folder specified by the second parameter.
Refer to this link for the documentation of “subcircuit2ssc” - https://www.mathworks.com/help/sps/ref/subcircuit2ssc.htmlfor more details. There are a few limitations listed in the link as well, regarding the version of SPICE, and other intricacies of the input netlist, so do look at that before implementing the function.
There is a MATLAB Answers post discussing some limitations which can be found here - https://www.mathworks.com/matlabcentral/answers/491959-interfacing-simulink-with-ltspice
Best Regards,
Raghava
0 commentaires
Voir également
Catégories
En savoir plus sur Simscape Electrical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!