预处理数据
删除均值、偏移量和线性趋势;重新构造缺失数据,更改数据采样率
System Identification Toolbox™ 和命令行函数允许您在将估计(和验证)数据用于模型估计之前对其进行预处理。预处理有助于优化数据,并更正或消除不准确之处。它用来确保数据处于适合模型估计的形式。
选择用于估计的数据后,请检查数据中是否存在类似下面这些不需要的特征:
缺失值或错误值(也称为 outliers)。例如,您可能会发现空缺数据(表明数据缺失)、与其余数据不符的值,或无信息的值。
信号电平的偏移与漂移(低频干扰)。
高于系统动态特性所关注频率区间的高频干扰。
根据数据的特征,您可以对缺失数据进行重建,调整数据采样率,或从数据中去除均值、常数偏移量或线性趋势。
有关分析时域或频域数据的方法,请参阅如何使用 advice 命令分析数据。
函数
detrend | Subtract offset or trend from time-domain signals contained in
iddata objects |
retrend | 向存储在 iddata 对象中的时域数据信号添加偏移量或趋势 |
diff | Iddata 对象中的差异信号 |
idfilt | Filter data using user-defined passbands, general filters, or Butterworth filters |
misdata | Reconstruct missing input and output data |
nkshift | Shift data sequences |
idresamp | 通过降采样或插值对时域数据进行重采样 |
idresampOptions | Option set for idresamp (自 R2023a 起) |
resample | (不建议)通过降采样或插值对存储在 iddata 对象中的时域数据进行重采样(需要 Signal Processing Toolbox 软件) |
getTrend | 创建趋势信息对象,用于存储存储在 iddata 对象中的时域信号的偏移量、均值和趋势信息 |
chgFreqUnit | Change frequency units of frequency-response data model |
fdel | 从频率响应数据 (FRD) 模型中删除指定数据 |
TrendInfo | Offset and linear trend slope values for detrending data |
主题
数据的处理、重采样和滤波
- Handling Missing Data and Outliers
Handling missing or erroneous data values. - Handling Offsets and Trends in Data
Removing and restoring constant offsets and linear trends in data signals. - Resampling Data
Decimating and interpolating (resampling) data. - 数据过滤
决定是否在模型估计前对数据进行过滤,以及如何对数据进行预滤波。
使用 App 对数据进行预处理
- 使用快速入门预处理数据
从数据中减去平均值,并指定估计数据和验证数据。 - 如何使用 App 对数据进行去趋势处理
在执行此任务之前,必须将定期采样的稳态时域数据导入“系统辨识”App 中。请参阅Import Time-Domain Data into the App。有关瞬态数据,请参阅如何在命令行中对数据进行去趋势处理。 - Resampling Data Using the App
Use the System Identification app to resample time-domain data. - How to Filter Data Using the App
The System Identification app lets you filter time-domain data using a fifth-order Butterworth filter by enhancing or selecting specific passbands.
使用命令行对数据进行预处理
- 如何在命令行中对数据进行去趋势处理
在执行此任务之前,您必须将时域数据作为iddata对象准备好。请参阅Representing Time- and Frequency-Domain Data Using iddata Objects。 - 在命令行中对数据进行重采样
对时域数据进行降采样和插值。 - How to Filter Data at the Command Line
Useidfiltto apply passband and other custom filters to a time-domain or a frequency-domainiddataobject.