Main Content

Time-Domain Specifications

This example gives a tour of available time-domain requirements for control system tuning withsystuneorlooptune.

Background

Thesystuneandlooptunecommands tune the parameters of fixed-structure control systems subject to a variety of time- and frequency-domain requirements. TheTuningGoalpackage is the repository for such design requirements.

Step Command Following

TheTuningGoal.StepTrackingrequirement specifies how the tuned closed-loop system should respond to a step input. You can specify the desired response either in terms of first- or second-order characteristics, or as an explicit reference model. This requirement is satisfied when the relative gap between the actual and desired responses is small enough in the least-squares sense. For example,

R1 = TuningGoal.StepTracking('r','y',0.5);

stipulates that the closed-loop response fromrtoyshould behave like a first-order system with time constant 0.5, while

R2 = TuningGoal.StepTracking('r','y',zpk(2,[-1 -2],-1));

specifies a second-order, non-minimum-phase behavior. UseviewGoalto visualize the desired response.

viewGoal(R2)

Figure contains an axes object. The axes object contains an object of type line. This object represents Desired.

This requirement can be used to tune both SISO and MIMO step responses. In the MIMO case, the requirement ensures that each output tracks the corresponding input with minimum cross-couplings.

Step Disturbance Rejection

TheTuningGoal.StepRejectionrequirement specifies how the tuned closed-loop system should respond to a step disturbance. You can specify worst-case values for the response amplitude, settling time, and damping of oscillations. For example,

R1 = TuningGoal.StepRejection('d','y',0.3,2,0.5);

limits the amplitude of y ( t ) to 0.3, the settling time to 2 time units, and the damping ratio to a minimum of 0.5. UseviewGoalto see the corresponding time response.

viewGoal(R1)

Figure contains an axes object. The axes object contains an object of type line. This object represents Reference.

You can also use a "reference model" to specify the desired response. Note that the actual and specified responses may differ substantially when better disturbance rejection is possible. Use theTuningGoal.Transient当接近的比赛所需的要求。为喜神贝斯t results, adjust the gain of the reference model so that the actual and specified responses have similar peak amplitudes (seeTuningGoal.StepRejectiondocumentation for details).

Transient Response Matching

TheTuningGoal.Transientrequirement specifies the transient response for a specific input signal. This is a generalization of theTuningGoal.StepTrackingrequirement. For example,

R1 = TuningGoal.Transient('r','y',tf(1,[1 1 1]),'impulse');

requires that the tuned response from r to y look like the impulse response of the reference model 1 / ( s 2 + s + 1 ) .

viewGoal(R1)

Figure contains an axes object. The axes object contains an object of type line. This object represents Desired.

The input signal can be an impulse, a step, a ramp, or a more general signal modeled as the impulse response of some input shaping filter. For example, a sine wave with frequency ω 0 can be modeled as the impulse response of ω 0 2 / ( s 2 + ω 0 2 ) .

w0 = 2; F = tf(w0^2,[1 0 w0^2]);% input shaping filterR2 = TuningGoal.Transient('r','y',tf(1,[1 1 1]),F); viewGoal(R2)

Figure contains an axes object. The axes object contains an object of type line. This object represents Desired.

LQG Design

Use theTuningGoal.LQGrequirement to create a linear-quadratic-Gaussian objective for tuning the control system parameters. This objective is applicable to any control structure, not just the classical observer structure of LQG control. For example, consider the simple PID loop of Figure 2 where d and n are unit-variance disturbance and noise inputs, and S d and S n are lowpass and highpass filters that model the disturbance and noise spectral contents.

Figure 2: Regulation loop.

To regulate y around zero, you can use the following LQG criterion:

J = l i m T E ( 1 T 0 T ( y 2 ( t ) + 0 . 0 5 u 2 ) d t )

The first term in the integral penalizes the deviation of y ( t ) from zero, and the second term penalizes the control effort. Usingsystune, you can tune the PID controller to minimize the cost J . To do this, use the LQG requirement

Qyu = diag([1 0.05]);% weighting of y^2 and u^2R4 = TuningGoal.LQG({'d','n'},{'y','u'},1,Qyu);

See Also

|||

Related Topics