ebook img

Simulink Control Design™ - MathWorks PDF

1420 Pages·2016·14.8 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Simulink Control Design™ - MathWorks

Simulink® Control Design™ User's Guide R2017b How to Contact MathWorks Latest news: www.mathworks.com Sales and services: www.mathworks.com/sales_and_services User community: www.mathworks.com/matlabcentral Technical support: www.mathworks.com/support/contact_us Phone: 508-647-7000 The MathWorks, Inc. 3 Apple Hill Drive Natick, MA 01760-2098 Simulink® Control Design™ User's Guide © COPYRIGHT 2004–2017 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. Revision History June 2004 Online only New for Version 1.0 (Release 14) October 2004 Online only Revised for Version 1.1 (Release 14SP1) March 2005 Online only Revised for Version 1.2 (Release 14SP2) September 2005 Online only Revised for Version 1.3 (Release 14SP3) March 2006 Online only Revised for Version 2.0 (Release 2006a) September 2006 Online only Revised for Version 2.0.1 (Release 2006b) March 2007 Online only Revised for Version 2.1 (Release 2007a) September 2007 Online only Revised for Version 2.2 (Release 2007b) March 2008 Online only Revised for Version 2.3 (Release 2008a) October 2008 Online only Revised for Version 2.4 (Release 2008b) March 2009 Online only Revised for Version 2.5 (Release 2009a) September 2009 Online only Revised for Version 3.0 (Release 2009b) March 2010 Online only Revised for Version 3.1 (Release 2010a) September 2010 Online only Revised for Version 3.2 (Release 2010b) April 2011 Online only Revised for Version 3.3 (Release 2011a) September 2011 Online only Revised for Version 3.4 (Release 2011b) March 2012 Online only Revised for Version 3.5 (Release 2012a) September 2012 Online only Revised for Version 3.6 (Release 2012b) March 2013 Online only Revised for Version 3.7 (Release 2013a) September 2013 Online only Revised for Version 3.8 (Release 2013b) March 2014 Online only Revised for Version 4.0 (Release 2014a) October 2014 Online only Revised for Version 4.1 (Release 2014b) March 2015 Online only Revised for Version 4.2 (Release 2015a) September 2015 Online only Revised for Version 4.2.1 (Release 2015b) March 2016 Online only Revised for Version 4.3 (Release 2016a) September 2016 Online only Revised for Version 4.4 (Release 2016b) March 2017 Online only Revised for Version 4.5 (Release 2017a) September 2017 Online only Revised for Version 5.0 (Release 2017b) Contents Steady-State Operating Points 1 About Operating Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 What Is an Operating Point? . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 What Is a Steady-State Operating Point? . . . . . . . . . . . . . . . . 1-3 Simulink Model States Included in Operating Point Object . . . 1-4 Compute Steady-State Operating Points . . . . . . . . . . . . . . . . . 1-6 Steady-State Operating Point Search (Trimming) . . . . . . . . . . 1-6 Steady-State Operating Point from Simulation Snapshot . . . . 1-7 Which States in the Model Must Be at Steady State? . . . . . . . 1-8 View and Modify Operating Points . . . . . . . . . . . . . . . . . . . . . 1-10 View Model Initial Condition in Linear Analysis Tool . . . . . . 1-10 Modify Operating Point in Linear Analysis Tool . . . . . . . . . . 1-11 View and Modify Operating Point Object (MATLAB Code) . . 1-12 Compute Steady-State Operating Point from State Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14 Compute Operating Point from State Specifications Using Linear Analysis Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14 Compute Operating Point from State Specifications at Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-22 Compute Steady-State Operating Point from Output Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-28 Compute Operating Point from Output Specifications Using Linear Analysis Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-28 Compute Operating Point from Output Specifications at Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-36 v Initialize Steady-State Operating Point Search Using Simulation Snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-41 Initialize Operating Point Search Using Linear Analysis Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-41 Initialize Operating Point Search Using MATLAB® Code . . . 1-44 Change Operating Point Search Optimization Settings . . . . 1-46 Import and Export Specifications For Operating Point Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-48 Compute Operating Points Using Custom Constraints and Objective Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-50 Batch Compute Steady-State Operating Points for Multiple Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-61 Batch Compute Steady-State Operating Points for Parameter Variation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-65 Which Parameters Can Be Sampled? . . . . . . . . . . . . . . . . . . 1-65 Vary Single Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-65 Multidimension Parameter Grids . . . . . . . . . . . . . . . . . . . . . 1-66 Vary Multiple Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 1-67 Batch Trim Model for Parameter Variations . . . . . . . . . . . . . 1-70 Batch Trim Model at Known States Derived from Parameter Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-72 Batch Compute Steady-State Operating Points Reusing Generated MATLAB Code . . . . . . . . . . . . . . . . . . . . . . . . . . 1-75 Compute Operating Points at Simulation Snapshots . . . . . . 1-78 Compute Operating Points at Simulation Snapshots Using Linear Analysis Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-78 Find Operating Points at Simulation Snapshots at Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-80 Simulate Simulink Model at Specific Operating Point . . . . . 1-83 Handle Blocks with Internal State Representation . . . . . . . 1-86 Operating Point Object Excludes Blocks with Internal States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-86 Identifying Blocks with Internal States in Your Model . . . . . 1-87 vi Contents Configuring Blocks with Internal States for Steady-State Operating Point Search . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-87 Synchronize Simulink Model Changes with Operating Point Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-89 Synchronize Simulink Model Changes Using Linear Analysis Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-89 Synchronize Simulink Model Changes at the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-92 Find Steady-State Operating Points for Simscape Models . . 1-95 Projection-Based Trim Optimizers . . . . . . . . . . . . . . . . . . . . 1-95 Steady-State Simulation with Projection-Based Trim Optimizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-96 Generate MATLAB Code for Operating Point Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-101 Linearization 2 Linearize Nonlinear Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 What Is Linearization? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 Applications of Linearization . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 Linearization in Simulink Control Design . . . . . . . . . . . . . . . . 2-5 Model Requirements for Exact Linearization . . . . . . . . . . . . . 2-6 Operating Point Impact on Linearization . . . . . . . . . . . . . . . . 2-6 Choose Linearization Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9 Choosing Simulink Control Design Linearization Tools . . . . . 2-9 Choosing Exact Linearization Versus Frequency Response Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10 Linearization Using Simulink Control Design Versus Simulink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 Specify Portion of Model to Linearize . . . . . . . . . . . . . . . . . . 2-13 Analysis Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13 Opening Feedback Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17 Ways to Specify Portion of Model to Linearize . . . . . . . . . . . . 2-19 vii Specify Portion of Model to Linearize in Simulink Model . . 2-21 Specify Analysis Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21 Select Bus Elements as Analysis Points . . . . . . . . . . . . . . . . 2-24 Specify Portion of Model to Linearize in Linear Analysis Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-29 Specify Analysis Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-29 Edit Analysis Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-34 Edit Simulink Model Analysis Points . . . . . . . . . . . . . . . . . . 2-36 How the Software Treats Loop Openings . . . . . . . . . . . . . . . . 2-39 Linearize Plant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-41 Linearize Plant Using Linear Analysis Tool . . . . . . . . . . . . . 2-41 Linearize Plant at Command Line . . . . . . . . . . . . . . . . . . . . 2-44 Mark Signals of Interest for Control System Analysis and Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-48 Analysis Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-48 Specify Analysis Points for MATLAB Models . . . . . . . . . . . . 2-49 Specify Analysis Points for Simulink Models . . . . . . . . . . . . . 2-50 Refer to Analysis Points for Analysis and Tuning . . . . . . . . . 2-54 Compute Open-Loop Response . . . . . . . . . . . . . . . . . . . . . . . . 2-59 Compute Open-Loop Response Using Linear Analysis Tool . . 2-61 Compute Open-Loop Response at the Command Line . . . . . . 2-65 Linearize Simulink Model at Model Operating Point . . . . . . 2-69 Linearize Simulink Model Using Linear Analysis Tool . . . . . 2-69 Linearize Simulink Model at Command Line . . . . . . . . . . . . 2-73 Visualize Bode Response of Simulink Model During Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-77 Linearize at Trimmed Operating Point . . . . . . . . . . . . . . . . . 2-85 Linearize at Simulation Snapshot . . . . . . . . . . . . . . . . . . . . . . 2-91 Linearize at Triggered Simulation Events . . . . . . . . . . . . . . . 2-95 Linearization of Models with Delays . . . . . . . . . . . . . . . . . . . 2-99 Linearization of Models with Model References . . . . . . . . . 2-106 viii Contents Visualize Linear System at Multiple Simulation Snapshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-110 Visualize Linear System of a Continuous-Time Model Discretized During Simulation . . . . . . . . . . . . . . . . . . . . . 2-117 Plotting Linear System Characteristics of a Chemical Reactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-121 Order States in Linearized Model . . . . . . . . . . . . . . . . . . . . . 2-130 Control State Order of Linearized Model using Linear Analysis Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-130 Control State Order of Linearized Model using MATLAB Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-134 Validate Linearization In Time Domain . . . . . . . . . . . . . . . . 2-136 Validate Linearization in Time Domain . . . . . . . . . . . . . . . 2-136 Choosing Time-Domain Validation Input Signal . . . . . . . . . 2-139 Validate Linearization In Frequency Domain . . . . . . . . . . . 2-140 Validate Linearization in Frequency Domain using Linear Analysis Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-140 Choosing Frequency-Domain Validation Input Signal . . . . . 2-142 View Linearized Model Equations Using Linear Analysis Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-144 Analyze Results Using Linear Analysis Tool Response Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-146 View System Characteristics on Response Plots . . . . . . . . . 2-146 Generate Additional Response Plots of Linearized System . 2-148 Add Linear System to Existing Response Plot . . . . . . . . . . . 2-151 Customize Characteristics of Plot in Linear Analysis Tool . . 2-153 Print Plot to MATLAB Figure in Linear Analysis Tool . . . . 2-153 Generate MATLAB Code for Linearization from Linear Analysis Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-155 When to Specify Individual Block Linearization . . . . . . . . . 2-157 Specify Linear System for Block Linearization Using MATLAB Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-158 ix Specify D-Matrix System for Block Linearization Using Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-159 Augment the Linearization of a Block . . . . . . . . . . . . . . . . . 2-163 Models with Time Delays . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-168 Choose Approximate Versus Exact Time Delays . . . . . . . . . 2-168 Specify Exact Representation of Time Delays . . . . . . . . . . . 2-169 Linearize Multirate Models . . . . . . . . . . . . . . . . . . . . . . . . . . 2-170 Change Sample Time of Linear Model . . . . . . . . . . . . . . . . . 2-170 Change Linearization Rate Conversion Method . . . . . . . . . 2-171 Linearization Using Different Rate Conversion Methods . . . 2-172 Linearization of Multirate Models . . . . . . . . . . . . . . . . . . . . 2-176 Change Perturbation Level of Blocks Perturbed During Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-181 Change Block Perturbation Level . . . . . . . . . . . . . . . . . . . . 2-181 Perturbation Levels of Integer Valued Blocks . . . . . . . . . . . 2-182 Linearize Blocks with Nondouble Precision Data Type Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-183 Overriding Data Types Using Data Type Conversion Block 2-183 Overriding Data Types Using Fixed Point Tool . . . . . . . . . . 2-184 Linearize Event-Based Subsystems (Externally Scheduled Subsystems) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-185 Linearizing Event-Based Subsystems . . . . . . . . . . . . . . . . . 2-185 Approaches for Linearizing Event-Based Subsystems . . . . . 2-185 Periodic Function Call Subsystems for Modeling Event-Based Subsystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-186 Approximating Event-Based Subsystems Using Curve Fitting (Lump-Average Model) . . . . . . . . . . . . . . . . . . . . . . . . . . 2-189 Configure Models with Pulse Width Modulation (PWM) Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-192 Linearize Simscape Networks . . . . . . . . . . . . . . . . . . . . . . . . 2-194 Find Steady-State Operating Point . . . . . . . . . . . . . . . . . . . 2-194 Specify Analysis Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-194 Linearize Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-195 Troubleshoot Simscape Network Linearizations . . . . . . . . . 2-195 x Contents

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.