System Identification Toolbox™
Getting Started Guide
Lennart Ljung
R2018a
How to Contact MathWorks
Latest news:
www.mathworks.com
Sales and services:
www.mathworks.com/sales_and_services
User community:
Technical support:
Phone:
www.mathworks.com/matlabcentral
www.mathworks.com/support/contact_us
508-647-7000
The MathWorks, Inc.
3 Apple Hill Drive
Natick, MA 01760-2098
System Identification Toolbox™ Getting Started Guide
© COPYRIGHT 1988–2018 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used
or copied only under the terms of the license agreement. No part of this manual may be photocopied or
reproduced in any form without prior written consent from The MathWorks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by,
for, or through the federal government of the United States. By accepting delivery of the Program or
Documentation, the government hereby agrees that this software or documentation qualifies as commercial
computer software or commercial computer software documentation as such terms are used or defined in
FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms and conditions of this
Agreement and only those rights specified in this Agreement, shall pertain to and govern the use,
modification, reproduction, release, performance, display, and disclosure of the Program and
Documentation by the federal government (or other entity acquiring for or through the federal government)
and shall supersede any conflicting contractual terms or conditions. If this License fails to meet the
government's needs or is inconsistent in any respect with federal procurement law, the government agrees
to return the Program and Documentation, unused, to The MathWorks, Inc.
Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See
www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand
names may be trademarks or registered trademarks of their respective holders.
Patents
MathWorks products are protected by one or more U.S. patents. Please see
www.mathworks.com/patents for more information.
First printing
Revision History
March 2007
September 2007 Second printing
Third printing
March 2008
Online only
October 2008
March 2009
Online only
September 2009 Online only
March 2010
Online only
September 2010 Online only
April 2011
Online only
September 2011 Online only
March 2012
Online only
September 2012 Online only
March 2013
Online only
September 2013 Online only
Online only
March 2014
October 2014
Online only
March 2015
Online only
September 2015 Online only
March 2016
Online only
September 2016 Online only
March 2017
Online only
September 2017 Online only
March 2018
Online only
New for Version 7.0 (Release 2007a)
Revised for Version 7.1 (Release 2007b)
Revised for Version 7.2 (Release 2008a)
Revised for Version 7.2.1 (Release 2008b)
Revised for Version 7.3 (Release 2009a)
Revised for Version 7.3.1 (Release 2009b)
Revised for Version 7.4 (Release 2010a)
Revised for Version 7.4.1 (Release 2010b)
Revised for Version 7.4.2 (Release 2011a)
Revised for Version 7.4.3 (Release 2011b)
Revised for Version 8.0 (Release 2012a)
Revised for Version 8.1 (Release 2012b)
Revised for Version 8.2 (Release 2013a)
Revised for Version 8.3 (Release 2013b)
Revised for Version 9.0 (Release 2014a)
Revised for Version 9.1 (Release 2014b)
Revised for Version 9.2 (Release 2015a)
Revised for Version 9.3 (Release 2015b)
Revised for Version 9.4 (Release 2016a)
Revised for Version 9.5 (Release 2016b)
Revised for Version 9.6 (Release 2017a)
Revised for Version 9.7 (Release 2017b)
Revised for Version 9.8 (Release 2018a)
Contents
Product Overview
System Identification Toolbox Product Description . . . . . . . . .
Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
System Identification Overview . . . . . . . . . . . . . . . . . . . . . . . . .
What Is System Identification? . . . . . . . . . . . . . . . . . . . . . . . .
About Dynamic Systems and Models . . . . . . . . . . . . . . . . . . . .
System Identification Requires Measured Data . . . . . . . . . . . .
Building Models from Data . . . . . . . . . . . . . . . . . . . . . . . . . . .
Black-Box Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Grey-Box Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Evaluating Model Quality . . . . . . . . . . . . . . . . . . . . . . . . . . .
Learn More . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1-2
1-2
1-3
1-4
1-4
1-4
1-7
1-9
1-11
1-14
1-16
1-19
1-21
Using This Product
1
2
When to Use the App vs. the Command Line . . . . . . . . . . . . . . .
System Identification Workflow . . . . . . . . . . . . . . . . . . . . . . . . .
Commands for Model Estimation . . . . . . . . . . . . . . . . . . . . . . . .
2-2
2-4
2-6
v
3
Linear Model Identification
Identify Linear Models Using System Identification App . . . . .
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Preparing Data for System Identification . . . . . . . . . . . . . . . .
Saving the Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Estimating Linear Models Using Quick Start . . . . . . . . . . . . .
Estimating Linear Models . . . . . . . . . . . . . . . . . . . . . . . . . . .
Viewing Model Parameters . . . . . . . . . . . . . . . . . . . . . . . . . .
Exporting the Model to the MATLAB Workspace . . . . . . . . . .
Exporting the Model to the Linear System Analyzer . . . . . . .
Identify Linear Models Using the Command Line . . . . . . . . .
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Preparing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Estimating Impulse Response Models . . . . . . . . . . . . . . . . . .
Estimating Delays in the Multiple-Input System . . . . . . . . . .
Estimating Model Orders Using an ARX Model Structure . . .
Estimating Transfer Functions . . . . . . . . . . . . . . . . . . . . . . .
Estimating Process Models . . . . . . . . . . . . . . . . . . . . . . . . . .
Estimating Black-Box Polynomial Models . . . . . . . . . . . . . . .
Simulating and Predicting Model Output . . . . . . . . . . . . . . .
3-2
3-2
3-3
3-19
3-21
3-27
3-47
3-50
3-52
3-53
3-53
3-54
3-62
3-65
3-66
3-73
3-77
3-85
3-96
Identify Low-Order Transfer Functions (Process Models) Using
System Identification App . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
What Is a Continuous-Time Process Model? . . . . . . . . . . . .
Preparing Data for System Identification . . . . . . . . . . . . . .
Estimating a Second-Order Transfer Function (Process Model)
with Complex Poles . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Estimating a Process Model with a Noise Component . . . . .
Viewing Model Parameters . . . . . . . . . . . . . . . . . . . . . . . . .
Exporting the Model to the MATLAB Workspace . . . . . . . . .
Simulating a System Identification Toolbox Model in Simulink
Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-102
3-102
3-103
3-103
3-111
3-117
3-123
3-125
3-126
3-133
3-133
3-134
3-140
3-140
Estimating Models Using Frequency-Domain Data . . . . . . .
Advantages of Using Frequency-Domain Data . . . . . . . . . . .
Representing Frequency-Domain Data in the Toolbox . . . . .
Preprocessing Frequency-Domain Data for Model
Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Estimating Linear Parametric Models . . . . . . . . . . . . . . . . .
vi
Contents
Validating Estimated Model . . . . . . . . . . . . . . . . . . . . . . . .
Next Steps After Identifying a Model . . . . . . . . . . . . . . . . .
3-146
3-148
4
Nonlinear Model Identification
Identify Nonlinear Black-Box Models Using System
Identification App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
What Are Nonlinear Black-Box Models? . . . . . . . . . . . . . . . . .
Preparing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Estimating Nonlinear ARX Models . . . . . . . . . . . . . . . . . . . .
Estimating Hammerstein-Wiener Models . . . . . . . . . . . . . . .
4-2
4-2
4-3
4-7
4-11
4-23
vii