Spectrum Software
spacer
Industrial Strength Simulation
select:

divider

 

News:

Spectrum Software has released Micro-Cap 11, the eleventh generation of our SPICE circuit simulator.

For users of previous Micro-Cap versions, check out the new features available in the latest version. For those of you who are new to Micro-Cap, take our features tour to see what Micro-Cap has to offer.

 

divider

 

Variable K Transformer Model

 

Ever wanted to vary the K value in a transformer but couldn't? Well you can if you use the equivalent circuit below. This is an equivalent circuit for the transformer primitive.

Transformer Equivalent Model

The general transformer equations are as follows:

Basic transformer equations:
(Z1 + S*LP)*I1 + S*M*I2 = V1

S*M*I1 + (Z2 + S*LS)*I2 = 0

Definition of Terms
I1 is the current flowing the primary
I2 is the current flowing in the secondary
V1 is the primary input voltage
Z1 is any impedance in series with the primary
Z2 is any impedance in series with the secondary
LP is the primary inductance
LS is the secondary inductance
M is the mutual inductance between LP and LS

These transformer equations are implemented in the circuit above. The utility of this equivalent circuit is that its part values can be expressions and thus varied during a run, whereas in current Micro-Cap implementations (through Micro-Cap 7.0), the transformer parameters (L1, L2, and K) cannot be time-varying expressions.

Here is the transient analysis of the circuit above.

Transient Plot

The transient analysis above and the AC analysis below show identical plots for both the primitive and the equivalent circuit model outputs, demonstrating the electrical equivalence of the transformer equivalent circuit.

AC Plot

With this equivalent circuit in mind we'll now modify the circuit by changing the K value from a constant to a variable. This is done by simply changing its .define statement as follows:

Old: .DEFINE K .98

New: .DEFINE K 1.0*(10U-T)/10U

The new expression for K causes it to vary linearly over time.

General Feedback Circuit

Here is what the transient analysis for 5us looks like.

General Feedback Circuit

Having gone through the exercise of how to do a transformer variable K expression, we thought it would be a good idea to simply add it to MC7. So we did. Micro-Cap 7 Version 7.02 or later has this capability built in. Prior versions would only allow a constant K value. Now, you can simply write an expression for the transformer K value. A typical transformer with an expression looks like this:

Transformer Primitive with variable K

If you have Micro-Cap 7 Version 7.0 or 7.01 you can update by downloading the MC7.ZIP file from our web site at www.spectrum-soft.com

 
Return to the main Newsletter page