You need to use EasyEDA editor to create some projects before publishing
Basic Center Tap XFMR example?
2165 7
claytonthigpen 9 years ago
I'm having trouble running simulations using transformers with a center tap and have done some digging and can't seem to find an example of how to set this up properly. I'm pretty new to SPICE simulations and most of it is pretty intuitive so far but this is the one thing I can't seem to iron out and I'm sure it's just something simple. Simulation output and netlist is below. Circuit: transformer test Error: unknown subckt: xt5 r2_2 r1_2 volprobe1 0 c2_1 xfmr-tap_xt5 1e15 ======================================= Transformer Test XT5 R2_2 R1_2 VOLPROBE1 GND C2_1 XFMR-TAP_XT5 V1 R2_2 R1_2 SIN(0V 120 60hz 0 0 0) AC 1 0 R3 C2_1 VOLPROBE1 1K R2 GND R2_2 1G R1 GND R1_2 1G C2 C2_1 GND 4700p C1 GND VOLPROBE1 4700p .param pi = 3.141593 .func LIMIT(x, y, z) {min(max(x, min(y, z)), max(z, y))} .func PWR(x,a) {(MAX(ABS(x), 1e-313))**a} .func PWRS(x,a) {sgn(x) * PWR(x,a)} .func stp(x) {u(x)} .func log10(x) {ln(x)/ln(10)} .func SQRT(x) {(MAX(x, 1e-313))**0.5} .func INT(x) {sgn(x)*floor(ABS(x))} .func URAMP(x) {max(x,0)} .func POW(x,a) + {(((a-(int(a)))==0)||(sgn(x)>=0))*( max(exp(ln(uramp(x))*a),0) + + (2*(0.5-ABS((int(a))-2*int(a/2))))*max(exp(ln(uramp(-1*x))*a),0) )} * Authors: L.G. Meares and Charles E. Hymowitz * * Updated to add R1 - R5 to provide DC paths to * ground in case any winding is left floating * by mistake. * * signality.co.uk 140920 * * Windings: 1-2 : 3-4 : 4-5 * | | | * | | | * Turns ratio: 1 :RATIO:RATIO ** .SUBCKT XFMR-TAP_XT5 1 2 3 4 5 E1 7 8 1 2 2 F1 1 2 VM1 2 RP 1 2 1MEG RS 6 3 1U VM1 7 6 F2 1 2 VM2 2 E2 9 5 1 2 2 R5 8 4 1U VM2 9 8 * .param rval=1e15 R1 1 0 {rval} R2 2 0 {rval} R3 3 0 {rval} R4 4 0 {rval} R5 5 0 {rval} .ENDS .control tran 1m 200m 0 probe V(VOLPROBE1) quit .endc .END ================================= https://easyeda.com/editor#id=51PpYyK64
Comments
andyfierman 9 years ago
Thanks for pointing that out to us. It was nothing you'd done wrong! There was a bug in our subckt which is now fixed.
Reply
claytonthigpen 9 years ago
Thanks so much! I appreciate the fast response and fix as well as your transparency about the bug!
Reply
example 9 years ago
If you have a look at the netlist you'll see a bit more about the bug. I am going to raise a formal bug report about it because although the fix works, I don't understand why the `.param rval=1e15` `R1 x y {rval}` syntax doesn't work in this particular subckt whereas it's fine in similar ones!
Reply
sgraf 9 years ago
I am using the mutual transformer and get a similar error as claytonhigpen. Error: unknown subckt: xt5 xa1_2 0 0 volprobe2 mutual_inductors Could it be that the same line containing rval needs to be commented out? My schematic is in the public Anonymous Files folder and called: test1
Reply
dillon 9 years ago
I have fixed your anonymous file, you can open it again.
Reply
sgraf 9 years ago
Could you look at it again please? I replaced the transformer with a mutual inductor.
Reply
dillon 9 years ago
Or Sorry, I guess you try to add `transformer`. I have test the `mutual inductor`'s model is bad, we will fix it soon. Now you can use `Mutual_Inductor2` to replace, please check your `anonymous file` again. Thanks.
Reply
Login or Register to add a comment
goToTop
你现在访问的是EasyEDA海外版,建议访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus-@1x -mockplus-

Cookie Notice

Our website uses essential cookies to help us ensure that it is working as expected, and uses optional analytics cookies to offer you a better browsing experience. To find out more, read our Cookie Notice