PLECS 3.5 Online Help

AC Sweep

Purpose

Perform AC sweep

Library

PLECS Extras / Analysis Tools

Description

[Picture]

The AC Sweep block enables you to determine the transfer function of a generic system from a single input to one or more outputs. The analysis is performed by injecting a small sinusoidal signal at different frequencies into the system and extracting the same frequencies from the system output(s) by Fourier analysis. The perturbation signal is available at the block output. The system outputs to be analyzed must be fed into the block's input port.

An ac sweep can be started either by clicking the button Start analysis or with the MATLAB command

placsweep(block);

where block is the Simulink handle or the full block path of the AC Sweep block. The block handle or path can be followed by parameter/value pairs that override the settings in the dialog box.

For additional information see section AC Analysis.

Parameters

System period length
The period length of the unperturbed system.
Simulation start time
The simulation start time for the ac sweep.
Frequency sweep range
A vector containing the lowest and highest perturbation frequency.
Frequency sweep scale
Specifies whether the sweep frequencies should be distributed on a linear or logarithmic scale.
Number of points
The number of data points generated.
Amplitude at first freq
The amplitude of the perturbation signal at the lowest frequency. The amplitudes at the other frequencies are calculated as

         ∘ -----
Ai = A1 ⋅  fi∕f1

Method
Specifies the method to use for obtaining the steady-state operating point of the system for each perturbation frequency.

Brute force simulation simply simulates the system on a cycle-by-cycle basis until the difference between the state variables at the beginning and end of a cycle become sufficiently small. With this setting the parameter Max number of iterations actually limits the number of cycles until a steady state is reached.

Steady-state analysis performs a steady-state analysis for each perturbation frequency.

Start from model initial state uses the initial state values specified in the model - either in the individual blocks or in the simulation parameters.

Start from unperturbed steady state performs a steady-state analysis of the unperturbed system to determine the initial state vector for the ac sweep.

Termination tolerance
The relative error bound for all state variables. The analysis continues until

|x(t0)--x(t0 +-T)|
     max |x|     ≤ rtol

for each state variable.

Max number of iterations
The maximum number of iterations allowed.
Output variable
The name of a MATLAB variable used to store the transfer function at the end of an analysis. If the analysis was run interactively from the GUI, the variable is assigned in the MATLAB base workspace. If the analysis was run with the placsweep command, the variable is assigned in the caller's workspace.
Plot bode diagram
Specifies whether to plot the transfer function in a bode diagram.
Display level
Specifies the level of detail of the diagnostic messages displayed in the command window (iteration, final, off).
Hidden model states
Specifies how to handle Simulink blocks with 'hidden' states, i.e. states that are not stored in the state vector (error, warning, none).