Estimate Impulse-Response Models at the Command Line
Before you can perform this task, you must have:
Input/output or frequency-response data. SeeRepresenting Time- and Frequency-Domain Data Using iddata Objects. For supported data formats, seeData Supported by Correlation Analysis.
Performed any required data preprocessing operations. If you use time-domain data, you can detrend it before estimation. SeeWays to Prepare Data for System Identification.
Useimpulseest
to compute impulse response models.impulseest
estimates a high-order, noncausal FIR model using correlation analysis. The resulting models are stored asidtf
model objects and contain impulse-response coefficients in the model numerator.
To estimate the modelm
and plot the impulse or step response, use the following syntax:
m=impulseest(data,N); impulse(m,Time); step(m,Time);
wheredata
is a single- or multiple-outputiddata
oridfrd
object.N
is a scalar value specifying the order of the FIR system corresponding to the time range0:Ts:(N-1)*Ts, whereTsis the data sample time.
You can also specify estimation options, such as regularizing kernel, pre-whitening filter order and data offsets, usingimpulseestOptions
and pass them as an input toimpulseest
. For example:
opt = impulseestOptions('RegularizationKernel','TC')); m = impulseest(data,N,opt);
To view the confidence region for the estimated response, useimpulseplot
andstepplot
to create the plot. Then useshowConfidence
.
For example:
h = stepplot (m、时间);showConfidence (h, 3)% 3 std confidence region
Note
cra
is an alternative method for computing impulse response from time-domain data only.
Next Steps
Perform model analysis. SeeValidating Models After Estimation.
Related Examples
- Identify Delay Using Transient-Response Plots
- 计算Response Values
- Estimate Impulse-Response Models Using System Identification App