SPICELib.tutorial.circ1

Example 1 of SPICELib tutorial

Information



Example 1

The modeling of the circuit shown in Figure 1 is discussed, and OP, AC sweep and transient analyses are carried out.
The results of the analysis using SPICELib are shown, together with the results obtained using OrCAD PSpice.

Figure 1. Full wave Rectifier.

Circuit modeling

Bias Point Analysis (OP)

STATIC MODEL ITERATION (SOLVE_STATIC := 0)

STATIC MODEL RAMPING (SOLVE_STATIC := 1)

GMIN STEPPING (SOLVE_STATIC := 2)

DYNAMIC MODEL RAMPING (SOLVE_STATIC := 3)

BIAS POINT ANALYSIS SIMULATED WITH ORCAD PSPICE

AC sweep analysis (AC)

AC SWEEP ANALYSIS SIMULATED WITH ORCAD PSPICE AND SPICELIB


Figure 18. AC sweep analysis simulated with ORCAD and SPICELib and errors.

Transient (time) analysis (TRAN)

TRANSIENT ANALYSIS SIMULATED WITH SPICELIB AND ORCAD PSPICE


Figure 22. Transient analysis and error.

NameDescription
schematic  
circ1_OP  
circ1_AC  
circ1_TRAN  


SPICELib.tutorial.circ1.schematic

SPICELib.tutorial.circ1.schematic

Information

        
Please, see SPICELib.tutorial.circ1 documentation

Modelica definition

partial model schematic 
  parts.breakout.Rbreak R(R=1000);
  parts.breakout.Ground Ground1;
  parts.source.VSIN V1(
    FREQ=50, 
    AMPL=5, 
    AC_MAG=1, 
    DC_VALUE=0.7, 
    OFF=2);
  src.BREAKOUT.PSPICE_diode D1(
    IS=14.11e-9, 
    RS=33.89e-3, 
    N=1.984, 
    VJ=0.3905, 
    M=0.2762, 
    BV=100.1, 
    IKF=94.81, 
    ISR=100e-12, 
    NR=2, 
    IBV=10, 
    CJ0=51.17e-12, 
    TT=4.761e-6);
  parts.breakout.PSPICE_diode D3(
    IS=14.11e-9, 
    RS=33.89e-3, 
    N=1.984, 
    VJ=0.3905, 
    M=0.2762, 
    BV=100.1, 
    IKF=94.81, 
    ISR=100e-12, 
    NR=2, 
    IBV=10, 
    CJ0=51.17e-12, 
    TT=4.761e-6);
  parts.breakout.PSPICE_diode D2(
    IS=14.11e-9, 
    RS=33.89e-3, 
    N=1.984, 
    VJ=0.3905, 
    M=0.2762, 
    BV=100.1, 
    IKF=94.81, 
    ISR=100e-12, 
    NR=2, 
    IBV=10, 
    CJ0=51.17e-12, 
    TT=4.761e-6);
  parts.breakout.PSPICE_diode D4(
    IS=14.11e-9, 
    RS=33.89e-3, 
    N=1.984, 
    VJ=0.3905, 
    M=0.2762, 
    BV=100.1, 
    IKF=94.81, 
    ISR=100e-12, 
    NR=2, 
    IBV=10, 
    CJ0=51.17e-12, 
    TT=4.761e-6);
  src.BREAKOUT.Cbreak C(C=100e-6);
equation 
  connect(R.n, Ground1.p);
  connect(V1.p, D2.p);
  connect(D1.n, D2.p);
  connect(D2.n, R.p);
  connect(D4.n, R.p);
  connect(D1.p, D3.p);
  connect(D3.p, Ground1.p);
  connect(V1.n, D4.p);
  connect(D3.n, D4.p);
  connect(R.p, C.p);
  connect(Ground1.p, C.n);
end schematic;

SPICELib.tutorial.circ1.circ1_OP

SPICELib.tutorial.circ1.circ1_OP

Information

        
Please, see SPICELib.tutorial.circ1 documentation

Modelica definition

model circ1_OP 
  analyses.OP OP(
    redeclare model Circuit = schematic, 
    LogResults=0, 
    TimeScale=0.1, 
    SOLVE_STATIC=0);
end circ1_OP;

SPICELib.tutorial.circ1.circ1_AC

SPICELib.tutorial.circ1.circ1_AC

Information

        
Please, see SPICELib.tutorial.circ1 documentation

Modelica definition

model circ1_AC 
  analyses.AC AC(
    LogResults=0, 
    redeclare model Circuit = schematic, 
    SOLVE_STATIC=0, 
    TYPE_AC_SWEEP=1, 
    END_FREQUENCY=1000, 
    TimeScale=0.01, 
    START_FREQUENCY=1, 
    POINTS_NUMBER=100);
end circ1_AC;

SPICELib.tutorial.circ1.circ1_TRAN

SPICELib.tutorial.circ1.circ1_TRAN

Information

        
Please, see SPICELib.tutorial.circ1 documentation

Modelica definition

model circ1_TRAN 
  analyses.TRAN TRAN(
    LogResults=0, 
    SOLVE_STATIC=0, 
    redeclare model Circuit = schematic, 
    TimeScale=0.01, 
    TSTOP=0.05, 
    SKIPBP=false);
end circ1_TRAN;

HTML-documentation generated by Dymola Tue Oct 14 18:26:39 2003 .