• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. PCB Design
  3. PSPICE simulation of a flyback transformer created with...

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 165
  • Views 16701
  • Members are here 0
More Content
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PSPICE simulation of a flyback transformer created with Magnetics Part Editor

pestra81
pestra81 over 13 years ago

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? 

  • flyback_conv.JPG
  • View
  • Hide
  • Cancel
Parents
  • Alok Tripathi
    Alok Tripathi over 13 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Alok Tripathi
    Alok Tripathi over 13 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information