Skip to content

Linear Analysis ​

The Linear Analysis computes the linearized dynamics of a model and provides a suite of frequency- and time-domain analysis tools. This is useful for understanding the small-signal behavior of a system, including stability, resonance, and transient response.

Method Overview ​

Linear analysis is performed by linearizing the provided model around an operating point. The resulting linear system can be analyzed using classical control theory tools, including:

Example Definition ​

dyad
analysis DCMotorLinearAnalysis
  extends DyadControlSystems.LinearAnalysis(
    outputs       = ["y"],
    inputs        = ["r"],
    loop_openings = ["r"],
    duration = 5.0
  )
  model = DyadExampleComponents.TestDCMotorLoadControlled(w_motor = 0)
end

Here, we set the motor reference velocity w_motor to zero in order for the controller not to saturate at the linearization point.

@example
using Main.var"##build/.dyad/analyses/linearDyadHygiene#483".LinearExample # hide
using DyadInterface: artifacts
asol = DCMotorLinearAnalysis()
artifacts(asol, :StepInfoPlot)
@example
using Main.var"##build/.dyad/analyses/linearDyadHygiene#483".LinearExample # hide
artifacts(asol, :BodePlot)
@example
using Main.var"##build/.dyad/analyses/linearDyadHygiene#483".LinearExample # hide
artifacts(asol, :DampReport)

Analysis Arguments ​

The following arguments define a LinearAnalysis:

Required Arguments ​

  • model: The model to be analyzed.

  • inputs::Vector{String}: Names of the input analysis points

  • outputs::Vector{String}: Names of the output analysis points

Optional Arguments ​

  • wl::Real = -1: Lower frequency bound for Bode plot (set to -1 for automatic selection).

  • wu::Real = -1: Upper frequency bound for Bode plot (set to -1 for automatic selection).

  • num_frequencies::Int = 3000: Number of frequency points.

  • duration::Real = -1: Duration for the step response plot (set to -1 for automatic selection).

Artifacts ​

A LinearAnalysis returns the following artifacts:

Standard Plots ​

Tables ​

Further Reading ​