### Convergence - Ideal Transformer

About the writer: Harvey Morehouse is a contractor/consultant with many years of experience using circuit analysis programs. His primary activities are in Reliability, Safety, Testability and Circuit Analysis. He may be reached at harvey.annie@verizon.net. Simple questions regarding my articles for which I know the answer are free. Complex questions, especially where I am ignorant of the answers, are costly!!!

Summary: An interesting problem was encountered in using the Ideal Transformer device model. What this points out is that sometimes 'tweaking' of a circuit model is required in some instances, while in others it works nicely.

#### Ideal Transformer Problem Circuit

In the course or preparing my SMPS book, a test circuit was created to compare the results of an orientation specific SMPS device model, namely a Forward Voltage Mode converter model. The circuit is itself not meaningful to this paper but to illustrate a problem encountered in simulation of the circuit.

Figure 1
FWDVMdl circuit1.cpr

There are two versions of the circuit shown in Figure 1. The upper circuit is an isolated version, wherein the inputs and outputs may be floated or grounded in combinations. The lower circuit is a non-isolated version of the circuit for comparison purposes.

Now for reference, the load resistance is set to be 1.1 ohms, which sets the circuit into Discontinuous Conduction Mode (DCM) operation. The circuit testing proceeds very nicely save for the transient analysis, which takes an interminably long time to complete. We have reason to believe that the cause is the upper circuit, as the lower circuit simulated nicely by itself, in a reasonable amount of time.

Now what could be causing the problem? Noting that the circuits are operating in DCM, from the operating point analysis we see that a load resistance of 0.5 ohms would place the circuit into Continuous Conduction Mode (CCM). Upon altering the user defined loadR value to 0.5 ohms and re-performing the analyses, it is found that the transient analysis is performed much more rapidly with no deterioration of the other tests.

Consequently it would seem that something about the ideal transformer model is not working correctly, causing problems in DCM but not in CCM.

The next test is to restore the load resistor value to 1.1 ohms, and to perform the analysis again, BUT for no particular reason with the ideal transformer associated with RISO2 'flipped' horizontally. When this is done, the transient analysis proceeds rapidly.

This would SEEM to indicate that the circuit topology favors a specific ideal transformer orientation. However, note that it is ONLY the transient analysis that has problems, indicating that there may be a convergence problem.

In this case a review of the SPICE simulation convergence options, revealed under the simulation drop down tab, seems appropriate. The last convergence option, 'solve_delta_x' is found to be true.

Intuitively it would seem we would wish to solve for x = 0 (whatever x is!!). Making the value false, change, the analysis was re-performed. It again solves fairly rapidly.

Now, the transformer was horizontally flipped back to its original orientation, and the circuit simulates rapidly.

#### Conclusions:

In the example circuit simulation problems occurred. Two different methods were shown to alleviate the problem. The lesson is that often circuits/models will need to be adjusted to achieve the proper results. There may be several means to do this, with some attacking the root cause of the problem and others being 'patches' used to get the correct solution.

A 'quick patch' such as flipping the transformer is often tempting to use, but the problem is that under certain operating conditions, especially ones not easily breadboard tested, undesired results might not be revealed. It is always easier to assume that a device or model is not working correctly, than the model or test has been incorrectly prepared.