Analysis and recommendations for data or estimated linear models

## Syntax

``advice(data)``
``advice(model,data)``

## Description

````advice(data)` displays the following information about the data in the MATLAB® Command Window: What are the excitation levels of the signals and how does this affect the model orders? See also `pexcit`.Does it make sense to remove constant offsets and linear trends from the data? See also `detrend`.Is there an indication of output feedback in the data? See also `checkFeedback`.Would a nonlinear ARX model perform better than a linear ARX model? See also `isnlarx`. ```

example

````advice(model,data)` displays the following information about the estimated linear model in the MATLAB Command Window: Does the model capture essential dynamics of the system and the disturbance characteristics?Is the model order higher than necessary?Is there potential output feedback in the validation data? ```

## Examples

collapse all

`load frictiondata`

Create an `iddata` object with a sample time of one second.

`z = iddata(f1,v,1);`

Analyze the data and obtain advice. Here, `f1` is the output data and `v` is the input data.

`advice(z)`
```General data characteristics: ----------------------------- This is a time domain data set with 1 input(s) and 1 output(s), 2001 samples and 1 experiment(s). All inputs in the data have been denoted as 'zero order hold' ('zoh'), i.e. they are assumed to be piecewise constant over the sample time. If the input is a sampled continuous signal and you plan to build or convert to continuous-time models, it is recommended to mark the InterSample property as 'First order hold': Data.InterSample = 'foh' or Data.InterSample = {'foh','foh', ...} for multi-input signals. Some inputs and/or outputs have non-zero means. It is generally recommended to remove the means by DAT = DETREND(DAT), except in the following cases: 1. The signals are measured relative to a level that corresponds to a physical equilibrium. This could e.g. be the case if step responses are recorded from an equilibrium point. In this case, it is advisable to remove the equilibrium values rather than data means. You may do so using a TrendInfo object with DETREND command, or during estimation using the "InputOffset" and "OutputOffset" estimation options. 2. There is an integrator in the system, and the input and output levels are essential to describe the effect of the integration. 3. You are going to use the data to estimate nonlinear ARX models. Excitation level in data: ------------------------- The input is persistently exciting of order 2. This means that you will encounter problems if estimating models of order higher than 2. Possibility of feedback in data: -------------------------------- There is no significant indication of feedback in the data. Use the "checkFeedback" command for assessment of feedback with more options. Possibility of nonlinearity: ---------------------------- There is an indication of nonlinearity in the data. A nonlinear ARX model of order [4 4 1] and idTreePartition function performs better prediction of output than the corresponding ARX model of the same order. Consider using nonlinear models, such as IDNLARX, or IDNLHW. You may also use the "isnlarx" command to test for nonlinearity with more options. ```

## Input Arguments

collapse all

Estimation data, specified as a timetable, a comma-separated matrix pair u,y, or an `iddata` object.

## Version History

Introduced before R2006a

expand all