AC analysis is an important tool in circuit analysis and design. By default, SPICE-based software cannot perform ac analysis if a circuit is in switchmode. It can only perform the analysis if the switchmode circuit is replaced by its equivalent average model. Deriving the average model, however, is a non-trivial task.
One way of performing ac analysis of a switchmode circuit is to perform multiple simulation runs in the time domain. This becomes possible with the increasing computational power of computers.
However, it is cumbersome and tedious to set up multiple simulation runs, perform postprocessing, and obtain ac analysis results by oneself.
PSIM provides the capability to perform ac analysis of switchmode circuits in LTspice simulation. It is very easy to set up the circuit, and both open-loop and closed-loop frequency responses can be
This tutorial describes how to use this function through an example.
In this tutorial, we will use a buck converter example to illustrate the process. In PSIM, go to the File menu and select Open examples…. Then go to the “dc-dc” folder and open the file “buck.psimsch”. This file contains two-buck converter circuits: one controlled by a Gating Block, and another by a comparator which compares a dc voltage with a triangular wave.
Copy the buck converter controlled by the comparator to a new schematic file. Save the file as “Buck Converter FRA1.psimsch”.
In order to better illustrate the ac analysis, the circuit is slightly modified as shown below.
Changes to the circuit are:
AC analysis of a circuit should be carried out in the steady-state. To prepare ac analysis, run a transient simulation of the circuit until it reaches the steady state. In this example, with the duty cycle of 0.6, the steady-state is reached around t0=0.003 sec.
For a single ac sweep output, from the PSIM menu, select Elements >> SPICE >> AC Sweep (1 probe) and place it in the circuit. This element contains an ac perturbation source and a probe to measure the response.
Enter the parameters of the ac sweep block. In the example, the perturbation source peak amplitude is set to 0.2, and the dc offset that establishes the circuit operating point is set to 0.6.
Then define the names of the nodes. The names of the node must be defined as ACS at the source side, and ACR at the response side. The node names can be set by selecting Edit >> Set Node Name.
The circuit is shown below:
In “Simulation Control”, go to the SPICE tab, and define the parameters as below:
Click on the Lt button in the Toolbar or select Simulate >> Run LTspice Simulation to run the simulation.
After the simulation is completed, SIMVIEW will display the Bode plot as shown below.
SIMVIEW can also display the time-domain waveforms of the voltages at the nodes ACS and ACR, as well as other voltages and currents as defined by the voltage probes and current flags.
In many cases, a circuit may have two control loops – for example, a voltage loop and a current loop. Or one may wish to run ac analysis with two outputs in the same circuit, as shown in the
The ac sweep block has one ac perturbation source and two output probes.
From the PSIM menu, select Elements >> SPICE >> AC Sweep (2 probes), and place the element in the circuit. Name the nodes as ACS at the source side and ACR1 and ACR2 at the response side.
Connect the nodes to the rest of the circuit. For the current response, a current sensor can be used to convert the current signal into a voltage signal.
Run LTspice simulation and view result in SIMVIEW.
To measure the frequency response of a closed control loop, use the AC Sweep (loop) block.
From the PSIM menu, select Elements >> SPICE >> AC Sweep (loop) and place it in the schematic, as shown in the example below.
Name the nodes as ACS at the source side and ACR at the response side.
Enter the parameters for the ac sweep block. In the example, the perturbation source peak amplitude is 0.01V.
Run LTspice simulation and view results in SIMVIEW.