idnlarx/findop
Compute operating point for Nonlinear ARX model
Syntax
Description
[
returns the operating-point state values, X
,U
] =
findop(sys
,'steady',InputLevel
,OutputLevel
)X
, and input
values, U
, for the idnlarx
model,
sys
, using steady-state input and output
specifications.
Examples
Find Steady-State Nonlinear ARX Operating Point Using Default Specifications
Estimate a nonlinear ARX model.
load iddata6;
M = nlarx(z6,[4 3 1]);
Find the steady-state operating point where the input level is fixed to 1
and the output is unknown.
[X,U] = findop(M,'steady',1,NaN);
Find Nonlinear ARX Operating Point Using Additional Specifications
Estimate a nonlinear ARX model.
load iddata7;
M = nlarx(z7,[4 3*ones(1,2) 2*ones(1,2)]);
Create a default operating point specification object.
spec = operspec(M);
Set the values for the input signals.
spec.Input.Value(1) = -1; spec.Input.Value(2) = 1;
Set the maximum and minimum values for the output signal.
spec.Output.Max = 10; spec.Output.Min = -10;
Find the steady-state operating point using the given specifications.
[X,U] = findop(M,spec);
Find Nonlinear ARX Operating Point Using Custom Options
Estimate a nonlinear ARX model.
load iddata6;
M = nlarx(z6,[4 3 2]);
Create a default findopOptions
option set.
opt = findopOptions(M);
Modify the option set to specify a steepest descent gradient search method with a maximum of 50 iterations.
opt.SearchMethod = 'grad';
opt.SearchOptions.MaxIterations = 50;
Find the steady-state operating point using the specified options.
[X,U] = findop(M,'steady',1,1,opt);
Retrieve Nonlinear ARX Operating Point Search Report
Estimate a nonlinear ARX model.
load iddata7;
M = nlarx(z7,[4 3*ones(1,2) 2*ones(1,2)]);
Find the steady-state operating point where input 1 is set to 1
and input 2 is unrestricted. The initial guess for the output value is 2
.
[X,U,R] = findop(M,'steady',[1 NaN],2);
Display the summary report.
disp(R);
SearchMethod: 'auto' WhyStop: 'Near (local) minimum, (norm(g) < tol).' Iterations: 11 FinalCost: 0 FirstOrderOptimality: 0 SignalLevels: [1x1 struct]
Find Nonlinear ARX Simulation Snapshot Using Default Initial States
Load the estimation data and estimate a nonlinear ARX model.
load twotankdata;
z = iddata(y,u,1);
M = nlarx(z,[4 3 1]);
Find the simulation snapshot after 10 seconds, assuming initial states of zero.
[X,U] = findop(M,'snapshot',10,z);
Find Nonlinear ARX Simulation Snapshot Using Initial State Specifications
Load the estimation data and estimate a nonlinear ARX model.
load twotankdata;
z = iddata(y,u,1);
M = nlarx(z,[4 3 1]);
Create an initial state vector. The first four states correspond to delayed output values and the final three states correspond to delayed inputs.
X0 = [2;2;2;2;5;5;5];
Find the simulation snapshot after 10 seconds using the specified initial states.
[X,U] = findop(M,'snapshot',10,z,X0);
Input Arguments
sys
— Nonlinear ARX model
idnlarx
object
Nonlinear ARX model, specified as an idnlarx
object.
InputLevel
— Steady-state input level
vector
Steady-state input level for computing the operating point,
specified as a vector. The length of InputLevel
must
equal the number of inputs specified in sys
.
The optimization algorithm assumes that finite values in InputLevel
are
fixed input values. Use NaN
to specify unknown
input signals with initial guesses of 0
. The minimum
and maximum bounds for all inputs have default values of -Inf
and +Inf
respectively.
OutputLevel
— Steady-state output level
vector
Steady-state output level for computing the operating point,
specified as a vector. The length of OutputLevel
must
equal the number of outputs specified in sys
.
The values in OutputLevel
indicate initial
guesses for the optimization algorithm. Use NaN
to
specify unknown output signals with initial guesses of 0
.
The minimum and maximum bounds for all outputs have default values
of -Inf
and +Inf
respectively.
spec
— Operating-point specifications
operspec
object
Operating-point specifications, such as minimum and maximum input/output constraints and known
inputs, specified as an idnlarx/operspec
object.
T
— Operating point snapshot time
positive scalar
Operating point snapshot time, specified as a positive scalar.
The value of T
must be in the range [T0, N*Ts],
where N is the number of input samples, Ts is
the sample time and T0 is
the input start time (Uin.Tstart
).
Uin
— Snapshot simulation input
iddata
object | matrix
Snapshot simulation input, specified as one of the following:
Time-domain
iddata
object with a sample time and input size that matchessys
.Matrix with as many columns as there are input channels. If the matrix has N rows, the input data is assumed to correspond to the time vector
(1:N)*sys.Ts
.
X0
— Initial states
column vector
Initial states of the simulation, specified as a column vector
with size equal to the number of states in sys
. X0
provides
the initial conditions at the time corresponding to the first input
sample (Uin.Start
, if Uin
is
an iddata
object, or sys.Ts
if Uin
is
a double matrix).
For more information about the states of an idnlarx
model,
see Definition of idnlarx States.
Options
— Operating point search options
findopOptions
option set
Operating point search options, specified as a findopOptions
option
set.
Output Arguments
X
— Operating point state values
column vector
Operating point state values, returned as a column vector of length equal to the number of model states.
U
— Operating point input values
column vector
Operating point input values, returned as a column vector of length equal to the number of inputs.
Report
— Search result summary
structure
Search result summary report, returned as a structure with the following fields:
Field | Description |
---|---|
SearchMethod | Search method used for iterative parameter estimation. See SearchMethod in findopOptions for more information. |
WhyStop | Search algorithm termination condition. |
Iterations | Number of estimation iterations performed. |
FinalCost | Final value of the minimization objective function (sum of the squared errors). |
FirstOrderOptimality | -norm of the search gradient vector when the search algorithm terminates. |
SignalLevels | Structure containing the fields Input and Output ,
which are the operating point input and output signal levels respectively. |
Algorithms
findop
computes the operating point from
steady-state operating point specifications or at a simulation snapshot.
Computing the Operating Point from Steady-State Specifications
To compute the steady-state operating point, call findop
using
either of the following syntaxes:
[X,U] = findop(sys,'steady',InputLevel,OutputLevel) [X,U] = findop(sys,spec)
To compute the states, X
, and the input, U
,
of the steady-state operating point, findop
minimizes
the norm of the error e(t) = y(t)-f(x(t), u(t)),
where:
f is the nonlinearity estimator.
u(t) is the input.
x(t) is the model state.
y(t) is the model output.
You can specify the search algorithm and search options using
the findopOptions
option set.
The algorithm uses the following independent variables for minimization:
Unknown (unspecified) input signal levels
Output signal levels
Because idnlarx
model states are delayed
samples of the input and output variables, the state values are the
constant values of the corresponding steady-state inputs and outputs.
For more information about the definition of nonlinear ARX model states,
see Definition of idnlarx States.
Computing the Operating Point at a Simulation Snapshot
When you use the syntax [X,U] = findop(sys,'snapshot',T,Uin,X0)
, the
algorithm simulates the model output until the snapshot time,
T
. At the snapshot time, the algorithm passes the input and
output samples to the data2state
command to map these values
to the current state vector.
Note
For snapshot-based computations, findop
does
not perform numerical optimization.
Version History
Introduced in R2008aR2018a: Advanced Options are deprecated for SearchOptions
when SearchMethod
is 'lsqnonlin'
Specification of lsqnonlin
- related advanced options are deprecated,
including the option to invoke parallel processing when estimating using the
lsqnonlin
search method, or solver, in Optimization Toolbox™.
See Also
idnlarx
| findopOptions
| idnlarx/operspec
| data2state
| sim
| idnlhw/findop
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)