Skip to content

AC sweep

The AC sweep feature is a frequency analysis of a periodic system. It uses the steady-state determination algorithm to compute the transfer function of a periodic system at different frequencies of a user-defined frequency sweep range. For each frequency, the following steps are performed:

  • apply the (sinusoidal) AC sweep perturbation (see figure below to add this component in the circuit) to the periodic system,
  • determine the steady-state operation of this perturbed system,
  • compute the system response at this perturbation frequency.

get_ac_perturbation

Important

AC Sweep is currently in public beta. Some performance and accuracy issues remain to be addressed, especially when the perturbation frequency is close to the switching frequency.

The perturbation frequencies are defined by specifying:

  • the frequency sweep range with the start and the end-frequency,
  • the sweep type: linear or logarithmic,
  • the start and the end-magnitude of the sinusoidal perturbation,
  • the number of points within this range.

define_ac_sweep_testbench

Once executed, the transfer function between the perturbation signal and each scope enabled in the design is then available in the Results tab.

ac_sweep_results

Python API

The AC Sweep is entirely accessible from the Python API to automate transfer function analysis.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Load modules
from aesim.simba import DesignExamples, ACSweep

# Load AC Sweep Design Example
buck_converter = DesignExamples.DCDC_Buck_Converter_ACSweep()

# Create the AC Sweep Test bench and assign the perturbation device
buck_converter_acsweep = ACSweep()
buck_converter_acsweep.Design = buck_converter;
buck_converter_acsweep.Device = buck_converter.Circuit.GetDeviceByName("Control")
buck_converter_acsweep.Fmin = 100;
buck_converter_acsweep.Fmax = 1E5;
buck_converter_acsweep.MagMin  = 0.03;
buck_converter_acsweep.MagMax  = 0.05;
buck_converter_acsweep.NumberOfPoints  = 41;

# Create and run the job
job = buck_converter_acsweep.NewJob();
status = job.Run();

# Retrieve Transfer Function
mag_sim = job.GetSignalByName('Rload - Voltage Magnitude').DataPoints
phase_sim = job.GetSignalByName('Rload - Voltage Angle').DataPoints