Home > Community > Forums > PCB Design > PSPICE simulation of a flyback transformer created with Magnetics Part Editor

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 PSPICE simulation of a flyback transformer created with Magnetics Part Editor 

Last post Fri, Dec 30 2011 10:32 PM by alokt. 1 replies.
Started by pestra81 22 Dec 2011 06:39 AM. Topic has 1 replies and 3813 views
Page 1 of 1 (2 items)
Sort Posts:
  • Thu, Dec 22 2011 6:39 AM

    • pestra81
    • Not Ranked
    • Joined on Thu, Dec 22 2011
    • Posts 1
    • Points 20
    PSPICE simulation of a flyback transformer created with Magnetics Part Editor Reply

    Hi,

    I want to simulate a flyback transformer created with Magnetics Part Editor. I am writing down now the steps that I have followed until the simulation where finally the errors occured. Please let me know if the procedure is right or wrong.

    Step1: The generation of the library file using Magnetics Part Editor. After a successful design status a model for a flyback transformer is    generated.

    Step2: Copy the model into a text editor and save it with the extension .lib. My file is the following:

    * PSpice Model Editor - Version 16.2.0
    * Generated by Magnetic Parts Editor on 22.12.2011
    * Trafo 2
    *$
    .subckt trafo2 V_IN1 V_IN2
    + V_OUT11V V_OUT12V  
    + PARAMS:
    + Np=3 RSp=0.0189316 Llp=1.01149e-008
    + Ns1=1 RSs1=0.000936729 Gap=5.96853e-005
    L_LP NLP V_IN2 {Np}
    R_RP NRP NLP {RSp}
    L_Leak V_IN1 NRP {Llp}
    L_LS1 NLS1 V_OUT12 {Ns1}
    R_RS1 NLS1 V_OUT11 {RSs1}
    K_K2 L_LP L_LS1 1.0 core_model_K1
    .model core_model_K1 AKO:core_model CORE (GAP={Gap})
    .model core_model CORE (LEVEL=3 OD=6.7 ID=0 AREA=0.49 GAP=5.96853e-005 Br=1700 Bm=4500 Hc=0.1875)
    .ends trafo2
    *$

    Step3: Using the model editor I have created a symbol of a transformer ( a rectangular box with two input and two output pins ). The pins were assigned to  V_IN1, V_IN2, V_OUT11V and V_OUT12V accordingly.

     Step4: I have opened a new schematic and I have designed a simple flyback converter using the above mentioned flyback transformer (see uploaded picture).

    Step5: I have edited the simulation settings for a time domain simulation, I have added the .lib file into the library path and I want to check if I get the desirable result. 

    The PSPICE sends me back the following error report:

    *Analysis directives:
    .TRAN  0 1000ns 0
    .PROBE V(alias(*)) I(alias(*)) W(alias(*)) D(alias(*)) NOISE(alias(*))
    .INC "..\SCHEMATIC1.net"

    **** INCLUDING SCHEMATIC1.net ****
    * source TESTING_TRAFO4042
    D_D1         N10730 OUT13V ZHCS750/ZTX
    R_R1         0 OUT13V  12 TC=0,0
    V_V2         N00412 0 
    +PULSE -5 15 0 0 0 10u 20u
    X_M1         N00095 N00412 0 IXFK120N20/IXS
    V_V1         N00149 0 127Vdc
    C_C1         OUT13V 0  680u 
    X_U1         N00149 N00095 N10730 0 TRAFO2 PARAMS: NP=3 RSP=0.0189316
    +  LLP=1.01149E-008 NS1=1 RSS1=0.000936729 GAP=5.96853E-005

    **** RESUMING testing_trafo4042.cir ****
    .END

    ERROR -- Less than 2 connections at node N10730
    ERROR -- Less than 2 connections at node X_U1.V_OUT11
    ERROR -- Node X_U1.NLS1 is floating
    ERROR -- Node X_U1.V_OUT12 is floating
    ERROR -- Node X_U1.V_OUT11 is floating

     What am I doing wrong? 


    • Post Points: 20
  • Fri, Dec 30 2011 10:32 PM

    • alokt
    • Top 25 Contributor
    • Joined on Fri, Aug 22 2008
    • Noida, Uttar Pradesh
    • Posts 241
    • Points 3,470
    Re: PSPICE simulation of a flyback transformer created with Magnetics Part Editor Reply

    It seems that subckt definition has been hand edited? Node name in subckt definitions are

    V_OUT11V V_OUT12V  while internally used names are V_OUT11 V_OUT12

    Both of these should be in sync. Simplest way to do this, is to edit the flyback model and make the internal node name same as the one used in .subckt line. It would be

    **** RESUMING testing_trafo4042.cir ****
    * PSpice Model Editor - Version 16.2.0
    * Generated by Magnetic Parts Editor on 22.12.2011
    * Trafo 2
    *$
    .subckt trafo2 V_IN1 V_IN2
    + V_OUT11V V_OUT12V 
    + PARAMS:
    + Np=3 RSp=0.0189316 Llp=1.01149e-008
    + Ns1=1 RSs1=0.000936729 Gap=5.96853e-005
    L_LP NLP V_IN2 {Np}
    R_RP NRP NLP {RSp}
    L_Leak V_IN1 NRP {Llp}
    L_LS1 NLS1 V_OUT12V {Ns1}
    R_RS1 NLS1 V_OUT11V {RSs1}
    K_K2 L_LP L_LS1 1.0 core_model_K1
    .model core_model_K1 AKO:core_model CORE (GAP={Gap})
    .model core_model CORE (LEVEL=3 OD=6.7 ID=0 AREA=0.49 GAP=5.96853e-005 Br=1700 Bm=4500 Hc=0.1875)
    .ends trafo2
    *$

    With this change, above mentioned error should go away.

    Also you need to  reverse the secondary side connection, to make it work like flyback. In current configuration it seems to be connected in forward transformer mode.

    • Post Points: 5
Page 1 of 1 (2 items)
Sort Posts:
Started by pestra81 at 22 Dec 2011 06:39 AM. Topic has 1 replies.