全是pdf格式,有好几百兆。就是matlab开发团队写的用户手册。
只是编辑成图书的样式,据说所有的matlab书籍都是参考这些资料编写的。
功能描述非常完整。每个功能都有完整的使用说明。
比如我第一次知道matlab还有专门和Excel交换数据的模块,直接把Excel数据表中的数据转换成向量或矩阵的格式。
这下可好了,我就可以用matlab来作计量分析了。因为任何格式的统计数据文件一般都可以转换成Excel格式。我再从Excel格式转成matlab的格式就好办了。再也不用为matlab的大量数据输入而发愁了。
Faint。。。。。。
这不是明显在馋我们嘛。。。
兄弟,能不能上传啊?我知道文件很大,跟版主商量商量,一定可以的!
我代表广大群众先谢谢你啦
有269兆,怎么传?我试着传过两次,每次都要好几个小时,传到中间就断了,前面的都白传了。
这269兆全部打印成书都不知道有多厚。是我在我2001年买的一张电脑图书光盘中发现的。那时还没听说过matlab,所以没注意。最近翻出来才发现了这个宝贝。简直是天上掉馅饼的感觉。
只能贴一点目录出来给大家参考一下。
这是matlab统计模块的使用手册目录
Before You Begin
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
v
What is the Statistics Toolbox? . . . . . . . . . . . . . . . . . . . . . . . . . . . .
v
How to Use This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
v
Mathematical Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vi
Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vii
1
Tutorial
Probability Distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-2
Parameter Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-2
Descriptive Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-3
Linear Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-3
Nonlinear Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-3
Hypothesis Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-3
Multivariate Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-3
Statistical Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-3
Statistical Process Control (SPC) . . . . . . . . . . . . . . . . . . . . . .
1-3
Design of Experiments (DOE) . . . . . . . . . . . . . . . . . . . . . . . .
1-4
Probability Distributions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-5
Overview of the Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-6
Probability Density Function (pdf) . . . . . . . . . . . . . . . . . . . . .
1-6
Cumulative Distribution Function (cdf) . . . . . . . . . . . . . . . .
1-7
Inverse Cumulative Distribution Function . . . . . . . . . . . . . .
1-7
Random Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-9
Mean and Variance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-11
ii
Contents
Overview of the Distributions . . . . . . . . . . . . . . . . . . . . . . . . . .
1-13
Beta Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-13
Binomial Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-16
Chi-square (
c
2
) Distribution . . . . . . . . . . . . . . . . . . . . . . . . .
1-18
Noncentral Chi-square Distribution . . . . . . . . . . . . . . . . . . .
1-19
Discrete Uniform Distribution . . . . . . . . . . . . . . . . . . . . . . .
1-20
Exponential Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-21
F Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-23
Noncentral F Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-24
Gamma Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-25
Geometric Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-28
Hypergeometric Distribution . . . . . . . . . . . . . . . . . . . . . . . .
1-29
Lognormal Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-30
Negative Binomial Distribution . . . . . . . . . . . . . . . . . . . . . .
1-31
Normal Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-32
Poisson Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-34
Rayleigh Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-36
Student’s t Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-37
Noncentral t Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-38
Uniform (Continuous) Distribution . . . . . . . . . . . . . . . . . . .
1-39
Weibull Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-40
Descriptive Statistics
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-42
Measures of Central Tendency (Location) . . . . . . . . . . . . . . . .
1-42
Measures of Dispersion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-43
Functions for Data with Missing Values (NaNs) . . . . . . . . . . .
1-46
Percentiles and Graphical Descriptions . . . . . . . . . . . . . . . . . .
1-47
The Bootstrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-48
Linear Models
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-51
One-way Analysis of Variance (ANOVA) . . . . . . . . . . . . . . . . .
1-51
Two-way Analysis of Variance (ANOVA) . . . . . . . . . . . . . . . . .
1-53
Multiple Linear Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-56
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-58
Quadratic Response Surface Models . . . . . . . . . . . . . . . . . . . . .
1-59
An Interactive GUI for Response Surface Fitting
and Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-60
iii
Stepwise Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-61
Stepwise Regression Interactive GUI . . . . . . . . . . . . . . . . . .
1-61
Stepwise Regression Plot . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-62
Stepwise Regression Diagnostics Figure . . . . . . . . . . . . . . .
1-62
Nonlinear Regression Models
. . . . . . . . . . . . . . . . . . . . . . . . . 1-65
Mathematical Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-65
Nonlinear Modeling Example . . . . . . . . . . . . . . . . . . . . . . . . . . 1-65
The Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-66
Fitting the Hougen-Watson Model . . . . . . . . . . . . . . . . . . . . 1-66
Confidence Intervals on the Parameter Estimates . . . . . . . 1-68
Confidence Intervals on the Predicted Responses . . . . . . . . 1-69
An Interactive GUI for Nonlinear Fitting and Prediction . . 1-69
Hypothesis Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-71
Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-71
Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-72
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-73
Multivariate Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-77
Principal Components Analysis . . . . . . . . . . . . . . . . . . . . . . . . 1-77
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-78
The Principal Components (First Output) . . . . . . . . . . . . . . 1-80
The Component Scores (Second Output) . . . . . . . . . . . . . . . 1-81
The Component Variances (Third Output) . . . . . . . . . . . . . 1-85
Hotelling’s T2 (Fourth Output) . . . . . . . . . . . . . . . . . . . . . . . 1-87
Statistical Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-88
Box Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-88
Normal Probability Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-89
Quantile-Quantile Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-91
Weibull Probability Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-93
Statistical Process Control (SPC) . . . . . . . . . . . . . . . . . . . . . . 1-95
Control Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-95
Xbar Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-95
S Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-96
EWMA Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-97
Capability Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-98
iv Contents
Design of Experiments (DOE) . . . . . . . . . . . . . . . . . . . . . . . . 1-100
Full Factorial Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-101
Fractional Factorial Designs . . . . . . . . . . . . . . . . . . . . . . . . . . 1-102
D-optimal Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-103
Generating D-optimal Designs . . . . . . . . . . . . . . . . . . . . . . 1-103
Augmenting D-Optimal Designs . . . . . . . . . . . . . . . . . . . . . 1-106
Design of Experiments with Known but
Uncontrolled Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-108
Demos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-109
The disttool Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-109
The randtool Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-110
The polytool Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-111
The rsmdemo Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-116
Part 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-117
Part 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-118
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-119
2 Reference
这是高阶谱分析模块的手册
Higher-Order Spectral Analysis Toolbox
For Use with MATLAB®
Ananthram Swami
Jerry M. Mendel
Chrysostomos L. (Max) Nikias
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Polyspectra and Linear Processes . . . . . . . . . . . . . . . . . . . . . . 1-4
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Why Do We Need Higher-Order Statistics? . . . . . . . . . . . . . . . 1-10
Bias and Variance of an Estimator . . . . . . . . . . . . . . . . . . . . . 1-11
Estimating Cumulants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
Estimating Polyspectra and Cross-polyspectra . . . . . . . . . . . . 1-15
Estimating the Power Spectrum . . . . . . . . . . . . . . . . . . . . . 1-15
Estimating Bispectra and Cross-Bispectra . . . . . . . . . . . . . 1-16
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
Estimating Bicoherence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-20
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-20
Testing for Linearity and Gaussianity . . . . . . . . . . . . . . . . . . . 1-22
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-24
ii Contents
Parametric Estimators, ARMA Models . . . . . . . . . . . . . . . . . . 1-26
MA Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-29
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-30
AR Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-32
ARMA Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-32
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-34
AR Order Determination . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-34
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-35
MA Order Determination . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-36
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-37
Linear Processes: Impulse Response Estimation . . . . . . . . . . . 1-37
The Polycepstral Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-38
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-39
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-41
The Matsuoka-Ulrych Algorithm . . . . . . . . . . . . . . . . . . . . . 1-41
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-42
Linear Processes: Theoretical Cumulants and Polyspectra . . 1-43
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-43
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-45
Linear Prediction Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-47
Levinson Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-47
Trench Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-49
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-50
Deterministic Formulation of FBLS . . . . . . . . . . . . . . . . . . . . . 1-53
Adaptive Linear Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-54
RIV Algorithm: Transversal Form . . . . . . . . . . . . . . . . . . . . 1-56
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-57
RIV Algorithm: Double-Lattice Form . . . . . . . . . . . . . . . . . . 1-58
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-60
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-61
Harmonic Processes and DOA . . . . . . . . . . . . . . . . . . . . . . . . . 1-62
Resolution and Variance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-65
AR and ARMA Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-66
Pisarenko’s Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-67
Multiple Signal Classification (MUSIC) . . . . . . . . . . . . . . . . . . 1-68
Minimum-Norm Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-69
ESPRIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-70
iii
Criterion-Based Estimators . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-72
Cumulant-Based Estimators . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-74
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-75
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-77
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-79
Nonlinear Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-80
Solution Using Cross-Bispectra . . . . . . . . . . . . . . . . . . . . . . . . 1-80
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-82
Solution Using FTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-82
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-83
Quadratic Phase Coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-84
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-87
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-88
Time-Frequency Distributions . . . . . . . . . . . . . . . . . . . . . . . . 1-89
Wigner Spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-90
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-93
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-94
Wigner Bispectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-94
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-96
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-97
Wigner Trispectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-98
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-99
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-100
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-100
Time-Delay Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-101
A Cross-Correlation Based Method . . . . . . . . . . . . . . . . . . . . . 1-101
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-103
A Cross-Cumulant Based Method . . . . . . . . . . . . . . . . . . . . . . 1-103
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-105
A Hologram Based Method . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-105
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-107
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-107
iv Contents
Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-108
Sunspot Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-108
Canadian Lynx Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-114
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-114
A Classification Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-120
Laughter Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-122
Pitfalls and Tricks of the Trade . . . . . . . . . . . . . . . . . . . . . . . . 1-131
Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-134
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-139
2
Reference
Function Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Higher-Order Spectrum Estimation: Conventional Methods . . 2-2
Higher-Order Spectrum Estimation: Parametric Methods . . . . 2-3
Quadratic Phase Coupling (QPC) . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Second-Order Volterra Systems . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Harmonic Retrieval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Time-Delay Estimation (TDE) . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Array Processing: Direction of Arrival (DOA) . . . . . . . . . . . . . . 2-4
Adaptive Linear Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Impulse Response (IR), Magnitude and
Phase Retrieval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Time-Frequency Estimates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Prompting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Guided tour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Addenda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
这是神经网络的
Neural Network Toolbox
For Use with MATLAB
®
Howard Demuth
Mark Beale
1
Introduction
Neural Networks
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-2
Getting Started
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-4
Basic Chapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-4
Help and Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-4
Whats New in 3.0
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-5
Other New Algorithms and Functions . . . . . . . . . . . . . . . . . . . . .
1-5
Modular Network Representation . . . . . . . . . . . . . . . . . . . . . . . .
1-5
Simulink Simulation Support . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-5
General Toolbox Improvements . . . . . . . . . . . . . . . . . . . . . . . . . .
1-5
Reduced Memory Levenberg-Marquardt Algorithm
. . . . . . .
1-6
Other New Networks, Algorithms and Improvements
. . . . .
1-7
Resilient Backpropagation (Rprop) . . . . . . . . . . . . . . . . . . . . . . .
1-7
Conjugate Gradient Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . .
1-7
Quasi-Newton Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-7
BFGS Quasi Newton Algorithm . . . . . . . . . . . . . . . . . . . . . . . .
1-7
A One Step Secant Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . .
1-7
Speed Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-8
Improving Generalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-9
Regularization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-9
Early Stopping With Validation . . . . . . . . . . . . . . . . . . . . . . . .
1-9
Pre and Post Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-9
Scale Minimum and Maximum . . . . . . . . . . . . . . . . . . . . . . .
1-10
Scale Mean and Standard Deviation . . . . . . . . . . . . . . . . . . .
1-10
Principal Component Analysis . . . . . . . . . . . . . . . . . . . . . . . .
1-10
Post-training Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-10
New Training Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-10
Probabilistic Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . .
1-11
Generalized Regression Networks . . . . . . . . . . . . . . . . . . . . . . .
1-11
ii
Contents
Modular Network Representation
. . . . . . . . . . . . . . . . . . . . .
1-12
Better Simulink Support
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-13
General Toolbox Improvements
. . . . . . . . . . . . . . . . . . . . . . .
1-14
Simpler and More Extensible Toolbox . . . . . . . . . . . . . . . . . . .
1-14
Custom Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-15
Neural Network Applications
. . . . . . . . . . . . . . . . . . . . . . . . .
1-16
Aerospace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-16
Automotive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-16
Banking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-16
Defense . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-16
Electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-16
Entertainment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-17
Financial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-17
Insurance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-17
Manufacturing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-17
Medical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-17
Oil and Gas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-17
Robotics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-17
Speech . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-18
Securities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-18
Telecommunications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-18
Transportation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-18
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-18
Neural Network Design Book
. . . . . . . . . . . . . . . . . . . . . . . . .
1-19
Acknowledgments
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-20
2
Neuron Model and Network Architectures
Basic Chapters
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-2
Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-2
Mathematical Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-2
Mathematical and Code Equivalents . . . . . . . . . . . . . . . . . . .
2-2
iii
Neuron Model
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-4
Simple Neuron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-4
Transfer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-5
Neuron With Vector Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-7
Network Architectures
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-10
A Layer of Neurons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Inputs and Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Multiple Layers of Neurons . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13
Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15
Simulation With Concurrent Inputs in a Static Network . . . . 2-15
Simulation With Sequential Inputs in a Dynamic Network . . 2-16
Simulation With Concurrent Inputs in a Dynamic Network . 2-18
Training Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20
Incremental Training (of Adaptive and Other Networks) . . . . 2-20
Incremental Training with Static Networks . . . . . . . . . . . . 2-20
Incremental Training With Dynamic Networks . . . . . . . . . 2-22
Batch Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
Batch Training With Static Networks . . . . . . . . . . . . . . . . . 2-22
Batch Training With Dynamic Networks . . . . . . . . . . . . . . . 2-24
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26
Figures and Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28
Simple Neuron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28
Hard Limit Transfer Function . . . . . . . . . . . . . . . . . . . . . . . 2-28
Purelin Transfer Function . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28
Log Sigmoid Transfer Function . . . . . . . . . . . . . . . . . . . . . . 2-29
Neuron With Vector Input . . . . . . . . . . . . . . . . . . . . . . . . . . 2-29
Net Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-29
Single Neuron Using Abbreviated Notation . . . . . . . . . . . . 2-30
Icons for Transfer Functions . . . . . . . . . . . . . . . . . . . . . . . . . 2-30
Layer of Neurons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-30
Three Layers of Neurons . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-31
Weight Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-31
Layer of Neurons, Abbreviated Notation . . . . . . . . . . . . . . . 2-32
Layer of Neurons Showing Indices . . . . . . . . . . . . . . . . . . . . 2-32
Three Layers, Abbreviated Notation . . . . . . . . . . . . . . . . . . 2-33
Linear Neuron With Two Element Vector Input. . . . . . . . . 2-34
Dynamic Network With One Delay. . . . . . . . . . . . . . . . . . . . 2-34
iv Contents
3
Perceptrons
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Important Perceptron Functions . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Neuron Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Perceptron Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Creating a Perceptron (NEWP) . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Simulation (SIM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
Initialization (INIT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Learning Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
Perceptron Learning Rule (LEARNP) . . . . . . . . . . . . . . . . . . 3-12
Adaptive Training (ADAPT) . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Limitations and Cautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
Outliers and the Normalized Perceptron Rule . . . . . . . . . . . . . 3-21
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23
Figures and Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23
Perceptron Neuron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23
Perceptron Transfer Function, hardlim . . . . . . . . . . . . . . 3-24
Decision Boundary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24
Perceptron Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25
The Perceptron Learning Rule . . . . . . . . . . . . . . . . . . . . . . . 3-25
One Perceptron Neuron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26
New Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26
4
Adaptive Linear Filters
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Important Linear Network Functions . . . . . . . . . . . . . . . . . . . . 4-3
v
Neuron Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4
Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
Single ADALINE (NEWLIN) . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
Mean Square Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
Linear System Design (NEWLIND) . . . . . . . . . . . . . . . . . . . . . 4-10
LMS Algorithm (LEARNWH) . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
Linear Classification (TRAIN) . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
Adaptive Filtering (ADAPT) . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16
Tapped Delay Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16
Adaptive Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17
Adaptive Filter Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18
Prediction Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20
Noise Cancellation Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-21
Multiple Neuron Adaptive Filters . . . . . . . . . . . . . . . . . . . . . . . 4-23
Limitations and Cautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25
Overdetermined Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25
Underdetermined Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25
Linearly Dependent Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25
Too Large a Learning Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-27
Figures and Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28
Linear Neuron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28
Purelin Transfer Function . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28
MADALINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-29
ADALINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-29
Decision Boundary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30
Mean Square Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30
LMS (Widrow-Hoff) Algorithm . . . . . . . . . . . . . . . . . . . . . . . 4-30
Tapped Delay Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-31
Adaptive Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-32
Adaptive Filter Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-32
vi Contents
Prediction Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33
Noise Cancellation Example . . . . . . . . . . . . . . . . . . . . . . . . . 4-34
Multiple Neuron Adaptive Filter . . . . . . . . . . . . . . . . . . . . . 4-35
Abbreviated Form of Adaptive Filter . . . . . . . . . . . . . . . . . . 4-35
Specific Small Adaptive Filter . . . . . . . . . . . . . . . . . . . . . . . 4-36
New Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-36
5
Backpropagation
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
Neuron Model (TANSIG, LOGSIG, PURELIN) . . . . . . . . . . . 5-3
Feedforward Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5
Simulation (SIM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
Backpropagation Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
Faster Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-16
Variable Learning Rate (TRAINGDA, TRAINGDX) . . . . . . . . 5-16
Resilient Backpropagation (TRAINRP) . . . . . . . . . . . . . . . . . . 5-18
Conjugate Gradient Algorithms . . . . . . . . . . . . . . . . . . . . . . . . 5-20
Fletcher-Reeves Update (TRAINCGF) . . . . . . . . . . . . . . . . . 5-20
Polak-Ribiére Update (TRAINCGP) . . . . . . . . . . . . . . . . . . 5-22
Powell-Beale Restarts (TRAINCGB) . . . . . . . . . . . . . . . . . . 5-24
Scaled Conjugate Gradient (TRAINSCG) . . . . . . . . . . . . . . 5-25
Line Search Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-26
Golden Section Search (SRCHGOL) . . . . . . . . . . . . . . . . . . . 5-26
Brent’s Search (SRCHBRE) . . . . . . . . . . . . . . . . . . . . . . . . . 5-27
Hybrid Bisection-Cubic Search (SRCHHYB) . . . . . . . . . . . 5-27
Charalambous’ Search (SRCHCHA) . . . . . . . . . . . . . . . . . . . 5-28
Backtracking (SRCHBAC) . . . . . . . . . . . . . . . . . . . . . . . . . . 5-28
Quasi-Newton Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-29
BFGS Algorithm (TRAINBFG) . . . . . . . . . . . . . . . . . . . . . . . 5-29
One Step Secant Algorithm (TRAINOSS) . . . . . . . . . . . . . . 5-30
Levenberg-Marquardt (TRAINLM) . . . . . . . . . . . . . . . . . . . . . 5-31
Reduced Memory Levenberg-Marquardt (TRAINLM) . . . . . . . 5-33
vii
Speed and Memory Comparison . . . . . . . . . . . . . . . . . . . . . . . 5-35
Improving Generalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-37
Regularization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-38
Modified Performance Function . . . . . . . . . . . . . . . . . . . . . . 5-38
Automated Regularization (TRAINBR) . . . . . . . . . . . . . . . . 5-39
Early Stopping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-41
Preprocessing and Postprocessing . . . . . . . . . . . . . . . . . . . . . 5-44
Min and Max (PREMNMX, POSTMNMX, TRAMNMX) . . . . . 5-44
Mean and Stand. Dev. (PRESTD, POSTSTD, TRASTD) . . . . . 5-45
Principal Component Analysis (PREPCA, TRAPCA) . . . . . . . 5-46
Post-training Analysis (POSTREG) . . . . . . . . . . . . . . . . . . . . . 5-47
Sample Training Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-49
Limitations and Cautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-54
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-56
6
Radial Basis Networks
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Important Radial Basis Functions . . . . . . . . . . . . . . . . . . . . . . . 6-2
Radial Basis Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
Neuron Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
Exact Design (NEWRBE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5
More Efficient Design (NEWRB) . . . . . . . . . . . . . . . . . . . . . . . . . 6-7
Demonstrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8
Generalized Regression Networks . . . . . . . . . . . . . . . . . . . . . . 6-9
Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9
Design (NEWGRNN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11
viii Contents
Probabilistic Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . 6-12
Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-12
Design (NEWPNN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-13
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16
Radial Basis Neuron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16
Radbas Transfer Function . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16
Radial Basis Network Architecture . . . . . . . . . . . . . . . . . . . 6-17
Generalized Regression Neural Network Architecture . . . . 6-17
Probabilistic Neural Network Architecture . . . . . . . . . . . . . 6-18
New Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-19
7
Self-Organizing Networks
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Important Self-Organizing Functions . . . . . . . . . . . . . . . . . . . . . 7-2
Competitive Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Creating a Competitive Neural Network (NEWC) . . . . . . . . . . 7-4
Kohonen Learning Rule (LEARNK) . . . . . . . . . . . . . . . . . . . . . . 7-5
Bias Learning Rule (LEARNCON) . . . . . . . . . . . . . . . . . . . . . . . 7-5
Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6
Graphical Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8
Self-Organizing Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-10
Topologies (GRIDTOP, HEXTOP, RANDTOP) . . . . . . . . . . . . 7-12
Distance Functions (DIST, LINKDIST,
MANDIST, BOXDIST) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-19
Creating a Self Organizing MAP Neural Network
(NEWSOM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-20
Training (LEARNSOM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-22
Phase 1: Ordering Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-22
Phase 2: Tuning Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-22
ix
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25
One-Dimensional Self-Organizing Map . . . . . . . . . . . . . . . . 7-25
Two-Dimensional Self-Organizing Map . . . . . . . . . . . . . . . . 7-27
Summary and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-32
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-32
Competitive Network Architecture . . . . . . . . . . . . . . . . . . . . 7-32
Self Organizing Feature Map Architecture . . . . . . . . . . . . . 7-33
New Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-33
8
Learning Vector Quantization
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Important LVQ Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3
Creating an LVQ Network (NEWLVQ) . . . . . . . . . . . . . . . . . . . 8-5
LVQ Learning Rule(LEARNLV2) . . . . . . . . . . . . . . . . . . . . . . . 8-9
Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-11
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-14
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-14
LVQ Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-14
New Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-14
x Contents
9 Recurrent Networks
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
Important Recurrent Network Functions . . . . . . . . . . . . . . . . . . 9-2
Elman Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Creating an Elman Network (NEWELM) . . . . . . . . . . . . . . . . . 9-4
Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4
Training an Elman Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6
Hopfield Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9
Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9
Design(NEWHOP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-13
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-16
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-17
Elman Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-17
Hopfield Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-17
New Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-18
10
Applications
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
Application Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
Applin1: Linear Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3
Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3
Network Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4
Network Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4
Thoughts and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-6
xi
Applin2: Adaptive Prediction . . . . . . . . . . . . . . . . . . . . . . . . . 10-7
Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-7
Network Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-8
Network Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-8
Network Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-8
Thoughts and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-10
Applin3: Linear System Identification . . . . . . . . . . . . . . . . 10-11
Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-11
Network Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-12
Network Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-12
Thoughts and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-14
Applin4: Adaptive System Identification . . . . . . . . . . . . . . 10-15
Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-15
Network Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-16
Network Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-17
Network Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-17
Thoughts and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-17
Appelm1: Amplitude Detection . . . . . . . . . . . . . . . . . . . . . . . 10-19
Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-19
Network Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-20
Network Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-20
Network Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-21
Network Generalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-22
Improving Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-23
Appcs1: Nonlinear System Identification . . . . . . . . . . . . . . 10-24
Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-25
Network Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-26
Network Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-26
Network Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-26
Thoughts and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-29
xii Contents
Appcs2: Model Reference Control . . . . . . . . . . . . . . . . . . . . . 10-30
Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-30
Neural Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-31
Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-32
Network Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-32
Network Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-33
Network Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-36
Thoughts and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-37
Appcr1: Character Recognition . . . . . . . . . . . . . . . . . . . . . . . 10-38
Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-38
Neural Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-39
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-40
Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-40
Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-40
Training Without Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-41
Training With Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-41
Training Without Noise Again . . . . . . . . . . . . . . . . . . . . . . 10-42
System Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-42
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-43
11
Advanced Topics
Custom Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2
Custom Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-4
Network Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-5
Architecture Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-5
Number of Outputs and Targets . . . . . . . . . . . . . . . . . . . . . . 11-7
Subobject Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-8
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-8
Network Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-12
Weight and Bias Values . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-13
Network Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-14
Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-14
Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-14
xiii
Additional Toolbox Functions . . . . . . . . . . . . . . . . . . . . . . . . 11-17
Initialization Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-17
randnc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-17
randnr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-17
Transfer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-17
satlin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-17
softmax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-17
tribas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-17
Learning Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-18
learnh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-18
learnhd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-18
learnis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-18
learnos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-18
Custom Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-19
Simulation Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-20
Transfer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-20
Net Input Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-22
Weight Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-24
Initialization Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-26
Network Initialization Functions . . . . . . . . . . . . . . . . . . . . 11-26
Layer Initialization Functions . . . . . . . . . . . . . . . . . . . . . . 11-26
Weight and Bias Initialization Functions . . . . . . . . . . . . . 11-27
Learning Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-29
Training Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-29
Adapt Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-32
Performance Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-34
Weight and Bias Learning Functions . . . . . . . . . . . . . . . . . 11-36
Self-Organizing Map Functions . . . . . . . . . . . . . . . . . . . . . . . 11-39
Topology Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-39
Distance Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-40
xiv Contents
12
Network Object Reference
Network Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
numInputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
numLayers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
biasConnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-3
inputConnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-4
layerConnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-4
outputConnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-4
targetConnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-5
numOutputs (read-only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-5
numTargets (read-only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-5
numInputDelays (read-only) . . . . . . . . . . . . . . . . . . . . . . . . . 12-5
numLayerDelays (read-only) . . . . . . . . . . . . . . . . . . . . . . . . . 12-6
Subobject Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-6
inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-7
layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-7
outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-7
targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-8
biases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-8
inputWeights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-9
layerWeights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-9
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-10
adaptFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-10
initFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-10
performFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-11
trainFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-11
Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-13
adaptParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-13
initParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-13
performParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-13
trainParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-14
Weight and Bias Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-14
IW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-14
LW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-15
b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-16
Other . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-16
userdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-16
xv
Subobject Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-17
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-17
range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-17
size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-17
userdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-18
Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-18
dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-18
distanceFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-19
distances (read-only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-19
initFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-20
netInputFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-20
positions (read-only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-21
size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-22
topologyFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-22
transferFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-23
userdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-24
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-25
size (read-only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-25
userdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-25
Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-25
size (read-only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-25
userdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-25
Biases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-26
initFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-26
learn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-26
learnFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-27
learnParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-27
size (read-only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-28
userdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-28
Input Weights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-28
delays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-28
initFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-29
learn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-29
learnFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-30
learnParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-31
size (read-only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-31
userdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-31
weightFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-32
xvi Contents
LayerWeights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-32
delays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-32
initFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-32
learn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-33
learnFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-33
learnParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-35
size (read-only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-35
userdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-35
weightFcn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-36
13
Reference
Functions Listed by Network Type . . . . . . . . . . . . . . . . . . . . 13-2
Functions by Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3
Transfer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-13
Transfer Function Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-14
Reference Page Headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-18
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-19
Glossary
这是小波分析的
Wavelet Toolbox
For Use with MATLAB
Preface
About the Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
What is the Wavelet Toolbox? . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
How to Use This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
For More Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
System Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
Platform-Specific Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
Windows Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
Other Platforms Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Mouse Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
1
Wavelets: A New Tool for Signal Analysis
Fourier Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Short-Time Fourier Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Wavelet Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
What Can Wavelet Analysis Do? . . . . . . . . . . . . . . . . . . . . . . . . 1-5
v Contents
What is Wavelet Analysis? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Number of Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
The Continuous Wavelet Transform . . . . . . . . . . . . . . . . . . . . . . . 1-8
Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
Five Easy Steps to a Continuous Wavelet Transform . . . . . . . 1-10
Scale and Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
The Scale of Nature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
What’s Continuous About the Continuous
Wavelet Transform? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15
The Discrete Wavelet Transform . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
One-Stage Filtering: Approximations and Details . . . . . . . . . . 1-16
Multiple-Level Decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
Number of Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
Wavelet Reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-20
Reconstruction Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21
Reconstructing Approximations and Details . . . . . . . . . . . . . . 1-21
Relationship of Filters to Wavelet Shapes . . . . . . . . . . . . . . . . 1-23
The Scaling Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-25
Multistep Decomposition and Reconstruction . . . . . . . . . . . . . 1-25
Wavelet Packet Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-27
History of Wavelets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-29
An Introduction to the Wavelet Families . . . . . . . . . . . . . . . . . 1-30
Haar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31
Daubechies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31
Biorthogonal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-32
Coiflets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-33
Symlets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-33
Morlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-34
Mexican Hat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-34
Meyer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-35
vi
2
Using Wavelets
Continuous Wavelet Analysis (One-Dimensional) . . . . . . . . . . 2-3
Continuous Analysis Using the Command Line . . . . . . . . . . . . 2-3
Continuous Analysis Using the Graphical Interface . . . . . . . . . 2-7
Importing and Exporting Information
from the Graphical Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Loading Signals into the Continuous Wavelet 1-D Tool . . . 2-11
Saving Wavelet Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
One-Dimensional Discrete Wavelet Analysis . . . . . . . . . . . . 2-13
Analysis Decomposition Functions: . . . . . . . . . . . . . . . . . . . 2-13
Synthesis Reconstruction Functions: . . . . . . . . . . . . . . . . . . 2-13
Decomposition Structure Utilities:
Analysis Decomposition Functions: . . . . . . . . . . . . . . . . . . . 2-14
One-Dimensional Analysis Using the Command Line . . . . . . 2-15
One-Dimensional Analysis Using the Graphical Interface . . . 2-22
Importing and Exporting Information
from the Graphical Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-38
Saving Information to the Disk . . . . . . . . . . . . . . . . . . . . . . . 2-38
Loading Information into the Wavelet 1-D Tool . . . . . . . . . 2-40
Two-Dimensional Discrete Wavelet Analysis . . . . . . . . . . . . . 2-43
Analysis-Decomposition Functions: . . . . . . . . . . . . . . . . . . . 2-43
Synthesis-Reconstruction Functions: . . . . . . . . . . . . . . . . . . 2-43
Decomposition Structure Utilities: . . . . . . . . . . . . . . . . . . . . 2-43
De-noising and Compression: . . . . . . . . . . . . . . . . . . . . . . . . 2-44
Two-Dimensional Analysis Using the Command Line . . . . . . 2-44
Two-Dimensional Analysis Using the Graphical Interface . . . 2-52
Importing and Exporting Information
from the Graphical Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-59
Saving Information to the Disk . . . . . . . . . . . . . . . . . . . . . . . 2-59
Loading Information into the Wavelet 2-D Tool . . . . . . . . . 2-62
Working with Indexed Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-66
Understanding Images in MATLAB . . . . . . . . . . . . . . . . . . . . . 2-66
Indexed Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-66
Wavelet Decomposition of Indexed Images . . . . . . . . . . . . . . . 2-68
How Decompositions Are Displayed . . . . . . . . . . . . . . . . . . . 2-71
vii Contents
3
Wavelet Applications
Detecting Discontinuities and Breakdown Points I . . . . . . . . 3-3
Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Guidelines for Detecting Discontinuities . . . . . . . . . . . . . . . . 3-4
Detecting Discontinuities and Breakdown Points II . . . . . . . 3-6
Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Detecting Long-Term Evolution . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Detecting Self-Similarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Wavelet Coefficients and Self-Similarity . . . . . . . . . . . . . . . . . 3-10
Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
Identifying Pure Frequencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
Suppressing Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16
Vanishing Moments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
De-Noising Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-18
Compressing Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
4
Wavelets in Action: Examples and Case Studies
Illustrated Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Advice to the Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
About Further Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7
Example #1: A Sum of Sines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8
viii
Example #2: A Frequency Breakdown . . . . . . . . . . . . . . . . . . . 4-10
Example #3: Uniform White Noise . . . . . . . . . . . . . . . . . . . . . . 4-12
Example #4: Colored AR(3) Noise . . . . . . . . . . . . . . . . . . . . . . . 4-14
Example #5: Polynomial + White Noise . . . . . . . . . . . . . . . . . . 4-16
Example #6: A Step Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18
Example #7: Two Proximal Discontinuities . . . . . . . . . . . . . . . 4-20
Example #8: A Second-Derivative Discontinuity . . . . . . . . . . . 4-22
Example #9: A Ramp + White Noise . . . . . . . . . . . . . . . . . . . . . 4-24
Example #10: A Ramp + Colored Noise . . . . . . . . . . . . . . . . . . 4-26
Example #11: A Sine + White Noise . . . . . . . . . . . . . . . . . . . . . 4-28
Example #12: A Triangle + A Sine . . . . . . . . . . . . . . . . . . . . . . 4-30
Example #13: A Triangle + A Sine + Noise . . . . . . . . . . . . . . . 4-32
Example #14: A Real Electricity Consumption Signal . . . . . . . 4-34
A Case Study: An Electrical Signal . . . . . . . . . . . . . . . . . . . . . . . 4-36
Data and the External Information . . . . . . . . . . . . . . . . . . . . . 4-36
Analysis of the Midday Period . . . . . . . . . . . . . . . . . . . . . . . . . . 4-38
Analysis of the End of the Night Period . . . . . . . . . . . . . . . . . . 4-39
Suggestions for Further Analysis . . . . . . . . . . . . . . . . . . . . . . . 4-42
Identify the Sensor Failure . . . . . . . . . . . . . . . . . . . . . . . . . . 4-42
Suppress the Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-43
Identify Patterns in the Details . . . . . . . . . . . . . . . . . . . . . . 4-44
Locate and Suppress Outlying Values . . . . . . . . . . . . . . . . . 4-46
Study Missing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-47
Fast Multiplication of Large Matrices . . . . . . . . . . . . . . . . . . . . 4-48
Example 1: Effective Fast Matrix Multiplication . . . . . . . . 4-49
Example 2: Ineffective Fast Matrix Multiplication . . . . . . . 4-51
5
Using Wavelet Packets
About Wavelet Packet Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
One-Dimensional Wavelet Packet Analysis . . . . . . . . . . . . . . . . 5-6
De-Noising a Signal Using Wavelet Packet . . . . . . . . . . . . . . . 5-14
ix Contents
Two-Dimensional Wavelet Packet Analysis . . . . . . . . . . . . . . . 5-19
Importing and Exporting from Graphical Tools . . . . . . . . . . 5-26
Saving Information to the Disk . . . . . . . . . . . . . . . . . . . . . . . . . 5-26
Saving Synthesized Signals . . . . . . . . . . . . . . . . . . . . . . . . . 5-26
Saving Synthesized Images . . . . . . . . . . . . . . . . . . . . . . . . . . 5-27
Saving One-Dimensional Decomposition Structures . . . . . . 5-27
Saving Two-Dimensional Decomposition Structures . . . . . 5-28
Loading Information into the Graphical Tools . . . . . . . . . . . . . 5-28
Loading Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-29
Loading Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-29
Loading Wavelet Packet Decomposition Structures . . . . . . 5-30
6
Advanced Concepts
Mathematical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
General Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5
Wavelets: A New Tool for Signal Analysis . . . . . . . . . . . . . . . . . 6-5
Wavelet Decomposition:
A Hierarchical Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5
Finer and Coarser Resolutions . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6
Wavelet Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6
Wavelets and Associated Families . . . . . . . . . . . . . . . . . . . . . . . 6-8
Wavelets on a Regular Discrete Grid . . . . . . . . . . . . . . . . . . . . 6-13
Wavelet Transforms: Continuous and Discrete . . . . . . . . . . . . 6-14
Local and Global Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16
Synthesis: An Inverse Transform . . . . . . . . . . . . . . . . . . . . . . . 6-17
Details and Approximations . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-18
The Fast Wavelet Transform (FWT) Algorithm . . . . . . . . . . . 6-21
Filters Used to Calculate the DWT and IDWT . . . . . . . . . . . . 6-21
Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-24
Why Does Such an Algorithm Exist? . . . . . . . . . . . . . . . . . . . . 6-29
x
One-Dimensional Wavelet Capabilities . . . . . . . . . . . . . . . . . . . 6-34
Two-Dimensional Wavelet Capabilities . . . . . . . . . . . . . . . . . . . 6-40
Dealing with Border Distortion . . . . . . . . . . . . . . . . . . . . . . . . . . 6-46
Signal Extensions: Zero-Padding, Symmetrization,
and Smooth Padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-46
Periodized Wavelet Transform . . . . . . . . . . . . . . . . . . . . . . . . . 6-55
Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-56
Continuous or Discrete Analysis? . . . . . . . . . . . . . . . . . . . . . 6-56
Why Are Wavelets Useful for Space-Saving Coding? . . . . . 6-56
Why Do All Wavelets Have Zero Average and Sometimes
Several Vanishing Moments? . . . . . . . . . . . . . . . . . . . . . . . . 6-57
What About the Regularity of a Wavelet y? . . . . . . . . . . . . 6-57
Are Wavelets Useful in Fields Other Than Signal or
Image Processing? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-58
What Functions Are Candidates to Be a Wavelet? . . . . . . . 6-59
Is It Easy to Build a New Wavelet? . . . . . . . . . . . . . . . . . . . 6-59
What Is the Link Between Wavelet and Fourier Analysis? 6-60
Wavelet Families: Additional Discussion . . . . . . . . . . . . . . . . . 6-62
Daubechies Wavelets: dbN . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-63
Haar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-64
dbN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-64
Symlet Wavelets: symN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-65
Coiflet Wavelets: coifN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-66
Biorthogonal Wavelet Pairs: biorNr.Nd . . . . . . . . . . . . . . . . . . 6-67
Meyer Wavelet: meyr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-69
Battle-Lemarie Wavelets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-70
Mexican Hat Wavelet: mexh . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-71
Morlet Wavelet: morl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-72
Summary of Wavelet Families and Associated Properties 6-73
Wavelet Applications: More Detail . . . . . . . . . . . . . . . . . . . . . . . . 6-74
Suppressing Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-74
Splitting Signal Components . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-77
Noise Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-77
xi Contents
De-Noising . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-79
The Basic One-Dimensional Model . . . . . . . . . . . . . . . . . . . . 6-80
De-Noising Procedure Principles . . . . . . . . . . . . . . . . . . . . . 6-80
Soft or Hard Thresholding? . . . . . . . . . . . . . . . . . . . . . . . . . . 6-81
Threshold Selection Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-82
Dealing with Unscaled Noise and Non-White Noise . . . . . . 6-84
De-Noising in Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-85
Extension to Image De-Noising . . . . . . . . . . . . . . . . . . . . . . 6-88
More About De-Noising . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-89
Data Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-90
Default Values for De-Noising and Compression . . . . . . . . . . . 6-93
De-noising. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-93
Compression. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-93
About the Birge-Massart Strategy . . . . . . . . . . . . . . . . . . . . 6-94
Wavelet Packets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-95
From Wavelets to Wavelet Packets: Decomposing the Details 6-95
Wavelet Packets in Action: An Introduction . . . . . . . . . . . . . . 6-96
Example 1: Analyzing a Sine Function . . . . . . . . . . . . . . . . 6-96
Example 2: Analyzing a Chirp Signal . . . . . . . . . . . . . . . . . 6-97
Building Wavelet Packets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-98
Wavelet Packet Atoms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-101
Organizing the Wavelet Packets . . . . . . . . . . . . . . . . . . . . . . . 6-104
Choosing the Optimal Decomposition . . . . . . . . . . . . . . . . . . . 6-105
Wavelet Packets 1-D Decomposition Structure . . . . . . . . . . . 6-111
Wavelet Packets 2-D Decomposition Structure . . . . . . . . . . . 6-113
Wavelet Packets for Compression and De-Noising . . . . . . . . 6-113
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-114
7
Adding Your Own Wavelets
Preparing to Add a New Wavelet Family . . . . . . . . . . . . . . . . . . 7-3
Choose the Wavelet Family Full Name . . . . . . . . . . . . . . . . . . . 7-3
Choose the Wavelet Family Short Name . . . . . . . . . . . . . . . . . . 7-3
Determine the Wavelet Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
xii
Define the Orders of Wavelets
Within the Given Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Build a MAT-File or M-File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5
Type 1 (Orthogonal with FIR Filter) . . . . . . . . . . . . . . . . . . . 7-5
Type 2 (Biorthogonal with FIR Filter) . . . . . . . . . . . . . . . . . . 7-5
Type 3 (Orthogonal with Scale Function) . . . . . . . . . . . . . . . . 7-6
Type 4 (No FIR Filter; No Scale Function) . . . . . . . . . . . . . . . 7-6
Define the Effective Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-7
How to Add a New Wavelet Family . . . . . . . . . . . . . . . . . . . . . . . . 7-8
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-12
After Adding a New Wavelet Family . . . . . . . . . . . . . . . . . . . . . . 7-16
8
Reference
Commands Grouped by Function . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
A
GUI Reference
General Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
Color Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
Connectedness of Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
Using the Mouse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-4
Making Selections and Activating Controls . . . . . . . . . . . . . . A-5
Translating Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-5
Displaying Position-Dependent Information . . . . . . . . . . . . . A-5
Controlling the Colormap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-6
Controlling the Number of Colors . . . . . . . . . . . . . . . . . . . . . . . . A-7
Controlling the Coloration Mode . . . . . . . . . . . . . . . . . . . . . . . . . A-8
Customizing Graphical Objects . . . . . . . . . . . . . . . . . . . . . . . . . . A-8
xiii Contents
Customizing Print Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-10
Using Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-11
Continuous Wavelet Tool Features . . . . . . . . . . . . . . . . . . . . . . A-14
Wavelet 1-D Tool Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-15
Tree Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-15
More Display Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-15
Wavelet 2-D Tool Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-17
Wavelet Packet Tool Features (1-D and 2-D) . . . . . . . . . . . . . A-18
Node Action Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-19
Wavelet Display Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-22
Wavelet Packet Display Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-23
这是优化模块的
MATLAB
Optimization Toolbox
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Unconstrained Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Constrained Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Constrained Example with Bounds . . . . . . . . . . . . . . . . . . . . . . 1-8
Constrained Example with Gradients . . . . . . . . . . . . . . . . . . . 1-10
Gradient Check: Analytic Versus Numeric . . . . . . . . . . . . . . . 1-12
Maximization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12
Greater than Zero Constraints . . . . . . . . . . . . . . . . . . . . . . . . . 1-12
Equality Constrained Example . . . . . . . . . . . . . . . . . . . . . . . . 1-12
Additional Arguments: Avoiding Global Variables . . . . . . . . . 1-13
Multiobjective Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
Default Parameter Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-25
Changing the Default Settings Example . . . . . . . . . . . . . . . . . 1-27
Output Headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-28
Optimization of String Expressions Instead of M-Files . . . . . 1-29
Practicalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31
ii Contents
2
Introduction to Algorithms
Parametric Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Unconstrained Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Quasi-Newton Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Line Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Quasi-Newton Implementation . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Hessian Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Line Search Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Least Squares Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
Gauss-Newton Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Levenberg-Marquardt Method . . . . . . . . . . . . . . . . . . . . . . . . . 2-18
Nonlinear Least Squares Implementation . . . . . . . . . . . . . . 2-20
Gauss-Newton Implementation . . . . . . . . . . . . . . . . . . . . . . . . 2-20
Levenberg-Marquardt Implementation . . . . . . . . . . . . . . . . . . 2-20
Constrained Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
Sequential Quadratic Programming (SQP) . . . . . . . . . . . . . . . 2-23
QP Subproblem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23
SQP Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26
Updating the Hessian Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26
Quadratic Programming Solution . . . . . . . . . . . . . . . . . . . . . . . 2-27
Line Search and Merit Function . . . . . . . . . . . . . . . . . . . . . . . . 2-31
Multiobjective Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32
Introduction to Multiobjective Optimization . . . . . . . . . . . . . . 2-32
Goal Attainment Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-38
Algorithm Improvements for Goal Attainment Method . . . . . 2-39
iii
Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-42
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-43
3
Reference
Nonlinear Minimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Equation Solving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Least-Squares (Curve fitting) . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Demonstrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
这是求解偏微分方程模块的
Partial Differential Equation
Toolbox
For Use with MATLAB®
这是鲁棒控制模块的
MATLAB
Robust Control Toolbox
. . . . . . . . . . . . . . . . . . . . . . . 1-4
Singular Values, H2 and H¥ Norms . . . . . . . . . . . . . . . . . . . . . 1-8
The Robust Control Problem . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
Structured and Unstructured Uncertainty . . . . . . . . . . . . . . . 1-12
Positive Real and Sectoric Uncertainty . . . . . . . . . . . . . . . . . . 1-14
Robust Control Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15
Robust Analysis — Classical Approach . . . . . . . . . . . . . . . . . . 1-21
Example: [11] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-24
Robust Analysis — Modern Approach . . . . . . . . . . . . . . . . . . . 1-25
Properties of KM and m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-27
Diagonal Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-27
Robust Control Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31
LQG and Loop Transfer Recovery . . . . . . . . . . . . . . . . . . . . 1-33
H2 and H¥ Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-33
Properties of H¥ Controllers . . . . . . . . . . . . . . . . . . . . . . . . . 1-35
Existence of H¥ Controllers . . . . . . . . . . . . . . . . . . . . . . . . . 1-36
Singular-Value Loop-Shaping: Mixed-Sensitivity Approach 1-37
Guaranteed Gain/Phase Margins in MIMO Systems . . . . . 1-41
Significance of the Mixed-Sensitivity Approach . . . . . . . . . 1-43
m Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-45
Bilinear Transform and Robust Control Synthesis . . . . . . . 1-49
Robustness with Mixed Real and Complex Uncertainties . . . 1-51
Real KM Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-52
Properties of the Generalized Popov Multiplier . . . . . . . . . 1-55
Real KM Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-55
Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-58
Classical Loop-Shaping vs. H¥ Synthesis . . . . . . . . . . . . . . . . 1-58
H¥ Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-60
ii Contents
Fighter H2 & H¥ Design Example . . . . . . . . . . . . . . . . . . . . . . 1-64
Plant Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-64
Design Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-65
Design Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-66
Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-67
Large Space Structure H¥ Design Example . . . . . . . . . . . . . . . 1-68
Plant Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-68
Design Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-69
Control Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-72
Model Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-72
Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-72
H¥ Synthesis for a Double-Integrator Plant . . . . . . . . . . . . . . 1-74
Bilinear Transform + H¥ on ACC Benchmark Problem . . . . . 1-78
m Synthesis Design on ACC Benchmark Problem
ACC Benchmark Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-82
Model Reduction for Robust Control . . . . . . . . . . . . . . . . . . . 1-86
Achievable Bandwidth vs. H¥ Modeling Error . . . . . . . . . . . . . 1-87
Additive Model Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-87
Additive Model Reduction Methods . . . . . . . . . . . . . . . . . . . 1-89
Multiplicative Model Reduction . . . . . . . . . . . . . . . . . . . . . . . . 1-90
Multiplicative Model Reduction Method . . . . . . . . . . . . . . . 1-91
Sampled-Data Robust Control . . . . . . . . . . . . . . . . . . . . . . . . . 1-94
Robust Control Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-95
Discrete H2-norm: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-95
Discrete H¥-norm: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-95
Classical Sampled-Data Control . . . . . . . . . . . . . . . . . . . . . . . . 1-96
Miscellaneous Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-97
Ordered Schur Decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . 1-97
Descriptor System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-98
Sector Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-99
SVD System Realization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-99
Closing Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-100
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-101
iii
2
Reference
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Index
这是样条插值模块
Spline Toolbox
For Use with MATLAB
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Some Simple Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Splines: An Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
The pp-form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12
The B-form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
Tensor Product Splines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23
Example: A Nonlinear ODE . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-25
Example: Construction of the Chebyshev Spline . . . . . . . . 1-30
Example: Approximation by Tensor Product Splines . . . . 1-35
2 Reference
这是信号处理模块
Signal Processing Toolbox
For Use with MATLAB
What Is the Signal Processing Toolbox?
. . . . . . . . . . . . . . . . . . .
xii
How to Use This Manual
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xiii
Installation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xv
Typographical Conventions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xvi
Technical Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xvii
1
Signal Processing Basics
Signal Processing Toolbox Central Features
. . . . . . . . . . . . . .
1-2
Filtering and FFTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-2
Signals and Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-2
Key Areas: Filter Design and Spectral Analysis . . . . . . . . . . . .
1-3
Graphical User Interface (GUI) . . . . . . . . . . . . . . . . . . . . . . . . .
1-3
Extensibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-3
Representing Signals
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-4
Vector Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-4
Waveform Generation: Time Vectors and Sinusoids
. . . . . . .
1-6
Common Sequences: Unit Impulse, Unit Step, and Unit Ramp
1-7
Multichannel Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-7
Common Periodic Waveforms . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-8
Common Aperiodic Waveforms . . . . . . . . . . . . . . . . . . . . . . . . . .
1-9
The pulstran Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-10
The Sinc Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-10
The Dirichlet Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-12
ii
Contents
Working with Data
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-13
Filter Implementation and Analysis
. . . . . . . . . . . . . . . . . . . . . .
1-14
Convolution and Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-14
Filters and Transfer Functions . . . . . . . . . . . . . . . . . . . . . . . . .
1-15
Filter Coefficients and Filter Names . . . . . . . . . . . . . . . . . .
1-15
Filtering with the filter Function . . . . . . . . . . . . . . . . . . . . . . .
1-15
filter Function Implementation and Initial Conditions
. . .
1-17
Other Functions for Filtering
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-19
Multirate Filter Bank Implementation . . . . . . . . . . . . . . . . . .
1-19
Anti-Causal, Zero-Phase Filter Implementation . . . . . . . . . . .
1-20
Frequency Domain Filter Implementation . . . . . . . . . . . . . . . .
1-22
Impulse Response
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-23
Frequency Response
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-24
Digital Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-24
Analog Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-26
Magnitude and Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-26
Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-28
Zero-Pole Analysis
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-30
Linear System Models
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-32
Discrete-Time System Models . . . . . . . . . . . . . . . . . . . . . . . . . .
1-32
Transfer Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-32
Zero-Pole-Gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-33
State-Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-34
Partial Fraction Expansion (Residue Form) . . . . . . . . . . . .
1-35
Second-Order Sections (SOS) . . . . . . . . . . . . . . . . . . . . . . . .
1-37
Lattice Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-37
Convolution Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-39
Continuous-Time System Models . . . . . . . . . . . . . . . . . . . . . . .
1-40
Linear System Transformations . . . . . . . . . . . . . . . . . . . . . . . .
1-41
iii
Discrete Fourier Transform
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-43
References
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-46
2
Filter Design
Filter Requirements and Specification
. . . . . . . . . . . . . . . . . . . .
2-2
IIR Filter Design
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-4
Classical IIR Filter Design Using Analog Prototyping . . . . . . .
2-6
Complete Classical IIR Filter Design . . . . . . . . . . . . . . . . . . .
2-6
Designing IIR Filters to Frequency Domain Specifications .
2-7
Comparison of Classical IIR Filter Types . . . . . . . . . . . . . . . . . .
2-8
Butterworth Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-8
Chebyshev Type I Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2-9
Chebyshev Type II Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Elliptic Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Bessel Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Direct IIR Filter Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13
Generalized Butterworth Filter Design . . . . . . . . . . . . . . . . 2-14
FIR Filter Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
Linear Phase Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Windowing Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18
Standard Band FIR Filter Design: fir1 . . . . . . . . . . . . . . . . 2-20
Multiband FIR Filter Design: fir2 . . . . . . . . . . . . . . . . . . . . 2-21
Multiband FIR Filter Design with Transition Bands . . . . . . . 2-22
Basic Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
The Weight Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24
Anti-Symmetric Filters / Hilbert Transformers . . . . . . . . . . 2-25
Differentiators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26
Constrained Least Squares FIR Filter Design . . . . . . . . . . . . . 2-27
Basic Lowpass and Highpass CLS Filter Design . . . . . . . . . 2-28
Multiband CLS Filter Design . . . . . . . . . . . . . . . . . . . . . . . . 2-29
Weighted CLS Filter Design . . . . . . . . . . . . . . . . . . . . . . . . . 2-30
iv Contents
Arbitrary-Response Filter Design . . . . . . . . . . . . . . . . . . . . . . . 2-31
Multiband Filter Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32
Filter Design with Reduced Delay . . . . . . . . . . . . . . . . . . . . 2-34
Special Topics in IIR Filter Design . . . . . . . . . . . . . . . . . . . . . . . 2-37
Analog Prototype Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-38
Frequency Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-38
Filter Discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-41
Impulse Invariance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-41
Bilinear Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-42
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-45
3
Statistical Signal Processing
Correlation and Covariance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Bias and Normalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Multiple Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Spectral Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Welch’s Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Power Spectral Density Function . . . . . . . . . . . . . . . . . . . . . 3-10
Bias and Normalization in Welch’s Method . . . . . . . . . . . . . 3-11
Parseval’s Relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13
Cross-Spectral Density Function . . . . . . . . . . . . . . . . . . . . . 3-13
Confidence Intervals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
Transfer Function Estimate . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
Coherence Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Multitaper Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16
Yule-Walker AR Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19
Burg Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20
MUSIC and Eigenvector Analysis Methods . . . . . . . . . . . . . . . 3-22
Eigenanalysis Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23
Controlling Subspace Thresholds . . . . . . . . . . . . . . . . . . . . . 3-24
v
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26
4
Special Topics
Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Basic Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Generalized Cosine Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4
Kaiser Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4
Kaiser Windows in FIR Design . . . . . . . . . . . . . . . . . . . . . . . . 4-7
Chebyshev Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
Parametric Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
Time-Domain Based Modeling . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
Linear Prediction (AR Modeling) . . . . . . . . . . . . . . . . . . . . . 4-11
Prony’s Method (ARMA Modeling) . . . . . . . . . . . . . . . . . . . . 4-12
Steiglitz-McBride Method (ARMA Modeling) . . . . . . . . . . . 4-14
Frequency-Domain Based Modeling . . . . . . . . . . . . . . . . . . . . . 4-16
Resampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-20
Cepstrum Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-23
Inverse Complex Cepstrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25
FFT-Based Time-Frequency Analysis . . . . . . . . . . . . . . . . . . . . . 4-26
Median Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-27
Communications Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28
Deconvolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-32
Specialized Transforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33
Chirp z-Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33
Discrete Cosine Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-35
Hilbert Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-37
vi Contents
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-39
5
Interactive Tools
SPTool: An Interactive Signal Processing Environment . . . 5-2
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Using SPTool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
Opening SPTool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
Example: Importing Signal Data from a MAT-File . . . . . . . . 5-5
Basic SPTool Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6
File Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
Help Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
Importing Signals, Filters, and Spectra . . . . . . . . . . . . . . . . . . . 5-8
Loading Variables from the MATLAB Workspace . . . . . . . . 5-9
Loading Variables from Disk . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
Importing Workspace Contents and File Contents . . . . . . . . 5-9
Working with Signals, Filters, and Spectra . . . . . . . . . . . . . . . 5-14
Component Lists in SPTool . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15
Selecting Data Objects in SPTool . . . . . . . . . . . . . . . . . . . . . 5-15
Editing Data Objects in SPTool . . . . . . . . . . . . . . . . . . . . . . 5-16
Viewing a Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-17
Viewing a Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-17
Designing a Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18
Applying a Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-19
Creating a Spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-19
Viewing a Spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20
Updating a Spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20
vii
Customizing Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-21
Ruler Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-22
Color Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-23
Signal Browser Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-24
Spectrum Viewer Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-25
Filter Viewer Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-26
Filter Viewer Tiling Settings . . . . . . . . . . . . . . . . . . . . . . . . 5-27
Filter Designer Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-28
Plug-Ins Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-29
Saving and Discarding Changes to Preferences Settings . . 5-29
Controls for Viewing and Measuring . . . . . . . . . . . . . . . . . . . . 5-30
Zoom Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-30
Ruler Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-32
Making Signal Measurements . . . . . . . . . . . . . . . . . . . . . . . 5-37
Using the Signal Browser: Interactive Signal Analysis . . . 5-42
Opening the Signal Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-42
Basic Signal Browser Functions . . . . . . . . . . . . . . . . . . . . . . . . 5-42
Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-43
Zoom Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-44
Ruler and Line Display Controls . . . . . . . . . . . . . . . . . . . . . 5-44
Help Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-44
Display Management Controls . . . . . . . . . . . . . . . . . . . . . . . 5-44
Main Axes Display Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-45
Panner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-46
Making Signal Measurements . . . . . . . . . . . . . . . . . . . . . . . 5-47
Viewing and Exploring Signals . . . . . . . . . . . . . . . . . . . . . . . . . 5-47
Selecting and Displaying a Signal . . . . . . . . . . . . . . . . . . . . 5-47
Panner Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-51
Manipulating Displays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-52
Working with Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-53
Saving Signal Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-53
Using the Filter Designer: Interactive Filter Design . . . . . . 5-55
Opening the Filter Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-56
viii Contents
Basic Filter Designer Functions . . . . . . . . . . . . . . . . . . . . . . . . 5-56
Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-56
Filter Pop-Up Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-57
Zoom Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-57
Help Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-57
General Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-58
Filter Specifications Panel . . . . . . . . . . . . . . . . . . . . . . . . . . 5-59
Filter Measurements Panel . . . . . . . . . . . . . . . . . . . . . . . . . . 5-61
Magnitude Plot (Display) Area . . . . . . . . . . . . . . . . . . . . . . . 5-62
Specification Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-62
Measurement Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-62
Designing Finite Impulse Response (FIR) Filters . . . . . . . . . . 5-63
Example: FIR Filter Design, Standard Band Configuration 5-63
Filter Design Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-65
Order Selection for FIR Filter Design . . . . . . . . . . . . . . . . . 5-65
Designing Infinite Impulse Response (IIR) Filters . . . . . . . . . 5-66
Example: Classical IIR Filter Design . . . . . . . . . . . . . . . . . . 5-66
Filter Design Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-67
Order Selection for IIR Filter Design . . . . . . . . . . . . . . . . . . 5-68
Redesigning a Filter Using the Magnitude Plot . . . . . . . . . . . . 5-68
Saving Filter Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-69
Viewing Frequency Response Plots . . . . . . . . . . . . . . . . . . . . . 5-73
Using the Filter Viewer: Interactive Filter Analysis . . . . . . 5-74
Opening the Filter Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-74
Basic Filter Viewer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 5-75
Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-76
Filter Identification Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-76
Plots Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-76
Frequency Axis Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-77
Zoom Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-78
Help Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-78
Main Plots Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-78
Viewing Filter Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-80
Viewing Magnitude Response . . . . . . . . . . . . . . . . . . . . . . . . 5-80
Viewing Phase Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-82
Viewing Group Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-84
Viewing a Zero-Pole Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-85
Viewing Impulse Response . . . . . . . . . . . . . . . . . . . . . . . . . . 5-85
Viewing Step Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-87
ix
Using the Spectrum Viewer: Interactive PSD Analysis . . . 5-88
Opening the Spectrum Viewer . . . . . . . . . . . . . . . . . . . . . . . . . 5-88
Basic Spectrum Viewer Functions . . . . . . . . . . . . . . . . . . . . . . 5-89
Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-90
Signal ID Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-90
Spectrum Management Buttons . . . . . . . . . . . . . . . . . . . . . . 5-91
Zoom Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-91
Ruler and Line Display Controls . . . . . . . . . . . . . . . . . . . . . 5-91
Help Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-91
Main Axes Display Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-92
Making Spectrum Measurements . . . . . . . . . . . . . . . . . . . . . 5-92
Viewing Spectral Density Plots . . . . . . . . . . . . . . . . . . . . . . . . . 5-93
Controlling and Manipulating Plots . . . . . . . . . . . . . . . . . . . . . 5-93
Changing Plot Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-93
Choosing Computation Parameters . . . . . . . . . . . . . . . . . . . 5-93
Computation Methods and Parameters . . . . . . . . . . . . . . . . 5-94
Setting Confidence Intervals . . . . . . . . . . . . . . . . . . . . . . . . . 5-98
Saving Spectrum Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-98
Example: Generation of Bandlimited Noise . . . . . . . . . . . . . . 5-100
Create, Import, and Name a Signal . . . . . . . . . . . . . . . . . . . . 5-101
Design a Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-102
Apply the Filter to a Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-104
View and Play the Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-105
Compare Spectra of Both Signals . . . . . . . . . . . . . . . . . . . . . . 5-107
6
Reference
这是系统识别模块
System Identification
Toolbox
For Use with MATLAB
The System Identification Problem
What is System Identification? . . . . . . . . . . . . . . . . . . . . . . . 1-2
How is that done? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
How do you know if the model is any good? . . . . . . . . . . . . . . 1-2
Can the quality of the model be tested in other ways? . . . . . 1-2
What models are most common? . . . . . . . . . . . . . . . . . . . . . . 1-2
Do you have to assume a model of a particular type? . . . . . . 1-2
What does the System Identification Toolbox contain? . . . . 1-2
Isn’t it a big limitation to work only with linear models? . . . 1-3
How do I get started? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Is this really all there is to System Identification? . . . . . . . . 1-3
The Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
The Basic Dynamic Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Variants of Model Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
How to Interpret the Noise Source . . . . . . . . . . . . . . . . . . . . . . . 1-7
Terms to Characterize the Model Properties . . . . . . . . . . . . . . . 1-9
Impulse Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Step Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Frequency Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Zeros and Poles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Model Unstable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
Feedback in Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
Noise Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
Model Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
Additional Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
Nonlinear Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
Still Problems? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
Fit Between Simulated and Measured Output . . . . . . . . . . 1-15
Residual Analysis Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15
Pole Zero Cancellations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15
What Model Structures Should be Tested? . . . . . . . . . . . . . 1-15
Multivariable Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
Available Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
Working with Subsets of the Input Output Channels . . . . 1-17
Some Practical Advice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17
v Contents
Reading More About System Identification . . . . . . . . . . . . . . . 1-19
2
The Graphical User Interface
The Model and Data Boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
The Working Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
The Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
The Validation Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
The Work Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Management Aspects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Workspace Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Help Texts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Data Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Getting Data into the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Taking a Look at the Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Preprocessing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Detrending . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Selecting Data Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Prefiltering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Resampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
Checklist for Data Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
Simulating Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
The Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14
Direct Estimation of the Impulse Response . . . . . . . . . . . . . . . 2-14
Direct Estimation of the Frequency Response . . . . . . . . . . . . . 2-15
Estimation of Parametric Models . . . . . . . . . . . . . . . . . . . . . . . 2-17
Estimation Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18
Resulting Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19
How to Know Which Structure and Method to Use . . . . . . . 2-19
ARX Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20
The Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20
Entering the Order Parameters . . . . . . . . . . . . . . . . . . . . . . 2-20
Estimating Many Models Simultaneously . . . . . . . . . . . . . . 2-20
Estimation Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21
Multi-Output Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21
vi
ARMAX, Output-Error and Box-Jenkins Models . . . . . . . . . . . 2-22
The General Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
The Special Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
Entering the Model Structure . . . . . . . . . . . . . . . . . . . . . . . . 2-23
Estimation Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23
State-Space Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24
The Model Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24
Entering Black-Box State-Space Model Structures . . . . . . . 2-24
Estimating Many Models Simultaneously . . . . . . . . . . . . . . 2-24
Estimation Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-25
User Defined Model Structures . . . . . . . . . . . . . . . . . . . . . . . . . 2-25
State-Space Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-25
Any Model Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26
Views and Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27
The Plot Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28
File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28
Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28
Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-29
Channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-29
Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-29
Frequency Response and Disturbance Spectra . . . . . . . . . . . . 2-29
Transient Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-29
Poles and Zeros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-30
Compare Measured and Model Output . . . . . . . . . . . . . . . . . . . 2-30
Residual Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-31
Text Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32
Present . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32
Modify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32
Further Analysis in the MATLAB Workspace . . . . . . . . . . . . . 2-32
Mouse Buttons and Hotkeys . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-34
The Main ident Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-34
Plot Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-34
Troubleshooting in Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-35
Layout Questions and idprefs.mat . . . . . . . . . . . . . . . . . . . . . . 2-35
Customized Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-36
Import from and Export to Workspace . . . . . . . . . . . . . . . . . . . 2-36
What Cannot be Done Using the GUI . . . . . . . . . . . . . . . . . . . 2-37
vii Contents
3
Tutorial
Impulse Responses, Frequency Functions, and Spectra . . . . . . 3-8
Polynomial Representation of Transfer Functions . . . . . . . . . 3-10
State-Space Representation of Transfer Functions . . . . . . . . . 3-13
Continuous-Time State-Space Models . . . . . . . . . . . . . . . . . . . 3-14
Estimating Impulse Responses . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Estimating Spectra and Frequency Functions . . . . . . . . . . . . . 3-16
Estimating Parametric Models . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
Subspace Methods for Estimating State-Space Models . . . . . . 3-18
Data Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19
Correlation Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20
Spectral Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20
ARX Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
AR Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23
General Polynomial Black-Box Models . . . . . . . . . . . . . . . . . . . 3-23
State-Space Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25
Optional Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-26
Polynomial Black-Box Models . . . . . . . . . . . . . . . . . . . . . . . . . . 3-29
Multivariable ARX Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30
State-Space Models with Free Parameters . . . . . . . . . . . . . . . 3-33
Discrete-Time Innovations Form . . . . . . . . . . . . . . . . . . . . . 3-33
System Dynamics Expressed in Continuous Time . . . . . . . 3-33
The Black-Box, Discrete-Time Case . . . . . . . . . . . . . . . . . . . 3-34
State-Space Models with Coupled Parameters . . . . . . . . . . . . 3-36
State-Space Structures: Initial Values and
Numerical Derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-37
Some Examples of User-Defined Model Structures . . . . . . . . . 3-38
Theta Format: th . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-40
Frequency Function Format: ff . . . . . . . . . . . . . . . . . . . . . . . . . 3-41
Zero-Pole Format: zp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-43
State-Space Format: ss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-43
Transfer Function Format: tf . . . . . . . . . . . . . . . . . . . . . . . . . . 3-44
Polynomial Format: poly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-45
The ARX Format: arx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-45
Transformations Between Discrete and Continuous Models . 3-46
Continuous-Time Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-46
Discrete-Time Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-46
Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-47
Simulation and Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-47
viii
Comparing Different Structures . . . . . . . . . . . . . . . . . . . . . . . . 3-49
Checking Pole-Zero Cancellations . . . . . . . . . . . . . . . . . . . . . . . 3-51
Residual Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-52
Noise-Free Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-53
Assessing the Model Uncertainty . . . . . . . . . . . . . . . . . . . . . . . 3-53
Comparing Different Models . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-54
Conditioning of the Prediction Error Gradient . . . . . . . . . . . . 3-55
Selecting Model Structures for Multivariable Systems . . . . . . 3-55
Offset Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-58
Outliers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-58
Filtering Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-58
Feedback in Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-59
Delays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-59
The Basic Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-61
Choosing an Adaptation Mechanism and Gain . . . . . . . . . . . . 3-62
Available Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-65
Segmentation of Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-67
Time Series Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-68
The Sampling Interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-70
Out of Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-71
Memory-Speed Trade-Offs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-72
Regularization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-72
Local Minima . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-73
Initial Parameter Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-73
Linear Regression Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-74
Spectrum Normalization and the Sampling Interval . . . . . . . 3-75
Interpretation of the Loss Function . . . . . . . . . . . . . . . . . . . . . 3-77
Enumeration of Estimated Parameters . . . . . . . . . . . . . . . . . . 3-78
Complex-Valued Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-79
Strange Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-79
4
Command Reference
这是动态系统仿真模块
SIMULINK
Dynamic System Simulation for MATLAB
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Installation Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
2
Tutorial
Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
A Control Design Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
NCD Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Adjusting Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Running the Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Adding Uncertainty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13
A System Identification Problem . . . . . . . . . . . . . . . . . . . . . . 2-16
NCD Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
Adjusting Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19
Running the Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21
Solving the Optimization Problem . . . . . . . . . . . . . . . . . . . . . 2-24
NCD Blockset Command Line Interaction . . . . . . . . . . . . . . 2-25
NCD and the SIMULINK Accelerator . . . . . . . . . . . . . . . . . . . 2-26
ii Contents
Printing a NCD Blockset Constraint Figure . . . . . . . . . . . . 2-26
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26
3
Problem Formulation
Actuation Limits vs State Constraints
(Physical vs Design Constraints) . . . . . . . . . . . . . . . . . . . . . . . 3-3
Minimizing Integrated Positive Signals (Control Energy) . 3-3
Noise Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Disturbance Rejection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
System Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Model Following . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Adaptive Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
MIMO Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Multimode Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Gain Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Repeated Parameter Problems . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Simultaneous Stabilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
Controller Pole (Zero) Placement . . . . . . . . . . . . . . . . . . . . . . . 3-8
Strong Stabilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
iii
4
Case Studies
Case Study 1: PID Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Problem Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4
Problem Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4
Case Study 2: LQR with Feedforward Controller . . . . . . . . . 4-6
Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
Problem Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
Problem Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7
Case Study 3: MIMO PI Controller . . . . . . . . . . . . . . . . . . . . . . 4-9
Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
Problem Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
Problem Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
Case Study 4: Inverted Pendulum on Track . . . . . . . . . . . . . 4-12
Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12
Problem Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
Problem Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14
References for Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . 4-14
5
Troubleshooting
Control and Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
NCD Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
iv Contents
6
Reference
Object Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Cursor Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Manipulating Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Using the Mouse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Using the Keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
Using Edit Menu and Control Panel . . . . . . . . . . . . . . . . . . . 6-4
NCD Blockset Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5
File Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6
Edit Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8
Options Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9
Optimization Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-12
Style Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-14
NCD Blockset Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15
A
Appendix
Optimization Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
Problem Formulation Details . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
Optimization Algorithmic Details . . . . . . . . . . . . . . . . . . . . . . . . A-7
Representation of Time Domain Constraints . . . . . . . . . . . A-10
NCD Global Variable ncdStruct . . . . . . . . . . . . . . . . . . . . . . . A-11
LQR Design for Inverted Pendulum . . . . . . . . . . . . . . . . . . . A-14
不贴了,太多了。
还有什么实时系统模块,控制系统模块,不动点模块,金融模块.......
一共将近45个模块的手册和几个matlab编程和其他功能的单元。
扫码加好友,拉您进群



收藏
