MATLAB CONTROL SYSTEM TOOLBOX 9 Guía de usuario

Busca en linea o descarga Guía de usuario para No MATLAB CONTROL SYSTEM TOOLBOX 9. MATLAB CONTROL SYSTEM TOOLBOX 9 User`s guide Manual de usuario

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 649
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 0
For Use with MATLAB
®
Computation
Visualization
Programming
Control System
Toolbox
User’s Guide
Version 4.2
Vista de pagina 0
1 2 3 4 5 6 ... 648 649

Indice de contenidos

Pagina 1 - Control System

For Use with MATLAB®ComputationVisualizationProgrammingControl SystemToolboxUser’s GuideVersion 4.2

Pagina 2 - How to Contact The MathWorks:

viii ContentsSpecifying the Simulink Model Portion for Analysis . . . . . . . . 6-53Adding Input Point or Output Point Blocks t o the Diagram 6-53Remo

Pagina 3

2 LTI Models2-56typepade(H,[],[],[1 1;2 1])where H is the TF representation of defined in the “Distillation ColumnExample” on page 2-47. This command

Pagina 4

Simulink Block for LTI Systems2-57Simulink Block for LTI SystemsYou can incorporate LTI objects into Simulink diagrams using the LTI Systemblock shown

Pagina 5

2 LTI Models2-58transfer functions or zero-pole-gain models, as it depends on the choice of statecoordinates used by the realization algorithm. As a r

Pagina 6

References2-59References[1] Dorf, R.C. and R.H. Bi shop, Modern Control Systems, Addison-Wesley,Menlo Park, CA, 1998.[2] Wood, R.K. and M.W. Berry, “T

Pagina 7

2 LTI Models2-60

Pagina 8

3Operations on LTI ModelsIntroduction ...3-2Precedence and Property Inheritance ...3-3Extracting and Modifying Subsystems ...

Pagina 9

3 Operations on LTI Models3-2IntroductionYou can perform basic matrix operations such as addition, multiplication, orconcatenation on LTI models. Such

Pagina 10 - Control Design Tools

Precedence and Property Inheritance3-3Precedence and Property InheritanceYou can apply operations to LTI models of different types. The resulting type

Pagina 11 - The Root Locus Design GUI

3 Operations on LTI Models3-4• In general, when two LTI models sys1 and sys2 are combined usingoperations such as+, *, [,], [;], append,andfeedback, t

Pagina 12 - Design Case Studies

Extracting and Modifying Subsystems3-5Extracting and Modifying SubsystemsSubsystems relate subsets of the inputs and outputs of a system. The transfer

Pagina 13 - Reference

ix8The Root Locus Design GUIIntroduction ... 8-2A Servomechanism Example ... 8-4Control

Pagina 14 - Contents

3 Operations on LTI Models3-6Note: •sys, the LTI model that has had a portion reassigned, retains its originalmodel type (TF, ZPK, SS, or FRD) regar

Pagina 15

Extracting and Modifying Subsystems3-7To extract the transfer function from the first input to the first output,typeT(1,1)Transfer function: 1------

Pagina 16 - Preface

3 Operations on LTI Models3-8I/O channel or g roup names) as a keyword. There are two ways you can specifyFRD models using frequencies:• Using integer

Pagina 17 - Installation

Extracting and Modifying Subsystems3-9is equivalent tosys(1,[2 4 5]Similarly, if pressure isthenameassignedtoanoutputchanneloftheLTImodelsys,thensys(&

Pagina 18

3 Operations on LTI Models3-10For state-space models, both concatenation and subsystem assignmentincrease the model order because they assume t hatsys

Pagina 19 - Typographic Conventions

Arithmetic Operations3-11Arithmetic OperationsYou can apply almost all arithmetic operations to LTI models, including thoseshown below.To understand h

Pagina 20

3 Operations on LTI Models3-12represents the parallel interconnection shown below.Ifsys1 and sys2 are two state-space models with data and, the state-

Pagina 21 - Quick Start

Arithmetic Operations3-13MultiplicationMultiplication of two LTI models connects them in series. Specifically,sys = sys1 * sys2returns an LTI model sy

Pagina 22 - 1 Quick Start

3 Operations on LTI Models3-14The resulting inverse model is of the same type as sys. Related operationsinclude:• Left divisionsys1\sys2, which is equ

Pagina 23 - LTI Models

Arithmetic Operations3-15You can use pertransposition to obtain the Hermitian (conjugate) transpose ofthe frequency response of a given system. The fr

Pagina 24

x ContentsClearingData... 8-46References ... 8-489Design Case StudiesYaw Da

Pagina 25 - Model Conversion

3 Operations on LTI Models3-16Model Interconnection FunctionsThe Control System Toolbox provides a number of functions to help with themodel building

Pagina 26

Model Interconnection Functions3-17Concatenation of LTI ModelsLTI model concatenation is done in a manner similar to the way youconcatenate matrices i

Pagina 27 - LTI Properties

3 Operations on LTI Models3-18Useappend(sys1,sys2)to specify the block-decoupled LTI model interconnection.Seeappend on page 11-12 for more informatio

Pagina 28

Model Interconnection Functions3-19For example, if sys1 has m inputs and p outputs, while sys2 has p inputs andm outputs, then the negative feedback c

Pagina 29

3 Operations on LTI Models3-20Continuous/Discrete Conversions of LTI ModelsThe function c2d discretizes continuous-time TF, SS, or ZPK models.Converse

Pagina 30

Continuous/Discrete Conversions of LTI Models3-21The signal is then fed to the continuous system , and the resultingoutput is sampled every seconds to

Pagina 31

3 Operations on LTI Models3-22and you get back the original discrete-time system (up to canceling thepole/zero pair at z=–0.5):Zero/pole/gain: (z+0.5)

Pagina 32

Continuous/Discrete Conversions of LTI Models3-23Similarly, the d2c conversion relies on the inverse correspondenceTustin with Frequency PrewarpingThi

Pagina 33

3 Operations on LTI Models3-24Discretization of Systems with DelaysYou can also use c2d to discretize SISO or MIMO continuous-time models withtime del

Pagina 34

Continuous/Discrete Conversions of LTI Models3-25The step responses of the continuous and discretized models are compared inthe figure below. This plo

Pagina 35

xi10Reliable ComputationsConditioning and Numerical Stability ... 10-4Conditioning... 10-4Numerical

Pagina 36

3 Operations on LTI Models3-26vectors when it is p ossible to reduce the total number of I/O delays. Theresulting model has a minimum number of such d

Pagina 37

Resampling of Discrete-Time Models3-27Resampling of Discrete-Time ModelsYou can resample a discrete-time TF, SS, or ZPK model sys1 by typingsys2 = d2d

Pagina 38

3 Operations on LTI Models3-28References[1] Åström, K.J. and B. Wittenmark, Computer-Controlled Systems: Theoryand Design, Prentice-Hall, 1990, pp. 48

Pagina 39 - System Interconnections

4Arrays of LTI ModelsIntroduction ...4-2When to Collect a Set of Models in an LTI Array . . . . . . 4-2Restrictions for LTI Models Co

Pagina 40

4 Arrays of LTI Models4-2IntroductionYou can use LTI arrays to collect a set of LTI models into a single MATLABvariable. You then use this variable to

Pagina 41

Introduction4-3Where to Find Information on LTI ArraysThenext twosections giveexamples thatillustratetheconcept ofanLTI array,its dimensions, and size

Pagina 42

4 Arrays of LTI Models4-4The Concept of an LTI ArrayTo visualize the concept of an LTI array, consider the set of five transferfunction models shown b

Pagina 43

The Concept of an LTI Array4-5Just as you might collect a set of two-by-two matrices in a multidimensionalarray, you can collect this set of five tran

Pagina 44

4 Arrays of LTI Models4-6Higher Dimensional Arrays of LTI ModelsYou can also collect a set of models in a two-dimensional array. The followingdiagram

Pagina 45

Dimensions, Size, and Shape of an LTI Array4-7Dimensions, Size, and Shape of an LTI ArrayThe dimensions and size of a single LTI model are determined

Pagina 46

xii ContentsConversiontoTransferFunction ... 11-226Example1... 11-226Example2...

Pagina 47 - LTI Objects

4 Arrays of LTI Models4-8Thenext figure illustrates the concepts of dimension and sizefor the LTI arraym2d, a 2-by-3 array of one-input, two-output tr

Pagina 48

Dimensions, Size, and Shape of an LTI Array4-9Five related quantities are pertinent to understanding the array dimensions:• N, the number of models in

Pagina 49 - Precedence Rules

4 Arrays of LTI Models4-10Note: • By convention, a single LTI model is treated as a 1-by-1 array of models.For s ingle LTI models, size returns only

Pagina 50

Dimensions, Size, and Shape of an LTI Array4-11Notice that size returns a vector whose entries correspond to the length ofeach of the four dimensions

Pagina 51

4 Arrays of LTI Models4-12Building LTI ArraysThere are several ways to b uild LTI arrays:• Using afor loop to assign each model in the array• Usingsta

Pagina 52

Building LTI Arrays4-13Suppose, based on measured input and output data, you estimate confidenceintervals , and for each of the pa rameters, and . All

Pagina 53 - Creating LTI Models

4 Arrays of LTI Models4-14The first two colon indices ( ) select all I/O channels from the I/O dimensionsofH. Thet hird indexof H refers to the first

Pagina 54

Building LTI Arrays4-15For the purposes of efficient computation, you can initialize an LTI array tozero, and then reassign the entire array to the va

Pagina 55 - Pure Gains

4 Arrays of LTI Models4-16When you concatenate several models or LTI arrays along the jth arraydimension, such as instack(j,sys1,sys2,...,sysn)• The l

Pagina 56

Building LTI Arrays4-17% Set up the LTI array using stack.COL1 = stack(1,H11,H21); % The first column of the 2-by-2 arrayCOL2 = stack(1,H12,H22); % Th

Pagina 57 - MIMO Zero-Pole-Gain Models

PrefaceInstallation ...3Getting Started ...4Typographic Conventions ...5

Pagina 58

4 Arrays of LTI Models4-18where• Both zeros and poles are multidimensional cell arrays whose cell entriescontain the v ectors of zeros and poles for e

Pagina 59

Building LTI Arrays4-19where• is the maximum of the number of states in each model in the array.• is the number of inputs in each model.• is the numbe

Pagina 60

4 Arrays of LTI Models4-20Indexing Into LTI ArraysYou can index into LTI arrays in much the same way as y ou would formultidimensional arrays to:• Acc

Pagina 61

Indexing Into LTI Arrays4-21For example, if sys is a 5-by-2 a rray of state-space models defined bysys = rss(4,3,2,5,2);youcan access(and display)the

Pagina 62

4 Arrays of LTI Models4-22selects the first two input channels, and the first output channel in each modelof the LTI arrayA, and returns the resulting

Pagina 63

Indexing Into LTI Arrays4-23Similarly, the commandssys(:,:,3,2) = sys(:,:,4,1);sys(1,2,3,2) = 0;reassign the entire model in the (3,2) position ofthe

Pagina 64

4 Arrays of LTI Models4-24Similarly,sys(:,:,[3 4],:) = []deletes the third and fourth rows of this two-dimensional array of models.

Pagina 65

Operations on LTI Arrays4-25Operations on LTI ArraysUsing LTI arrays, you can apply almost all of the basic model operations thatwork on single LTI mo

Pagina 66

4 Arrays of LTI Models4-26Example: Addition of Two LTI ArraysThe following diagram illustrates the addition of two 3-by-1 LTI arrayssys1+sys2.Figure 4

Pagina 67

Operations on LTI Arrays4-27Note that:• Each model in sys1 and sys2 must have the same number of inputs andoutputs. This is required for the addition

Pagina 68

Preface2MATLAB®has a rich collection of functions immediately useful to the controlengineer or system theorist. Complex arithmetic, eigenvalues, root

Pagina 69

4 Arrays of LTI Models4-28where sys, the result of the operation, is an L TI array with the same arraydimensions assys1. You can use shortcuts for cod

Pagina 70

Operations on LTI Arrays4-29You can do this efficiently by first setting up an LTI array h containing theSISO models and then using concatenation to f

Pagina 71

4 Arrays of LTI Models4-30adds a single SISO transfer function model to each entry in each model of theLTIarrayofMIMOmodels[h,h].Finally,G = rand(1,1,

Pagina 72

5 Model Analysis ToolsGeneral Model Characteristics ...5-2Model Dynamics ...5-4State-Space Realizations ...5-7Time a

Pagina 73

5 Model Analysis Tools5-2General Model CharacteristicsGeneral model characteristics include t he model type, I/O dimensions, andcontinuous or discret

Pagina 74

General Model Characteristics5-3This example ill ustrates the use of some of these commands. See the relatedreference pages for more details.H = tf({1

Pagina 75

5 Model Analysis Tools5-4Model DynamicsThe Control System Toolbox offers commands to determine the system poles,zeros,DCgain,norms,etc.Youcanapply the

Pagina 76

Model Dynamics5-5Here is an example of model analysis using some of these commands.h = tf([4 8.4 30.8 60],[1 4.12 17.4 30.8 60])Transfer function:

Pagina 77 - Direct Property Referencing

5 Model Analysis Tools5-6Thesefunctionsalsoo perateonLTIarraysandreturnarrays.F or example,thepoles of a three dimensional LTI arraysysarray are obtai

Pagina 78

State-Space Realizations5-7State-Space RealizationsThe following functions are useful t o analyze, perform state coordinatetransformations on, and der

Pagina 79

Installation3InstallationInstructions for installing the Control System Toolbox can be found in theMATLAB Installation Guide for your platform. We rec

Pagina 80

5 Model Analysis Tools5-8state-spacecomputations.Consequently,itiswisetousethemonly foranalysispurposes and not in control design algorithms.

Pagina 81

Time and Frequency Response5-9Time and Frequency ResponseThe Control System Toolbox contains a set of commands that provide the basictime and frequenc

Pagina 82

5 Model Analysis Tools5-10where sys is any continuous or discrete LTI model or LTI array. For MIMOmodels, these commands produce an array of plots wit

Pagina 83

Time and Frequency Response5-11Note: When specifying a time vector t = [0:dt:tf],rememberthefollowing constraints on the spacingdt between time samp

Pagina 84

5 Model Analysis Tools5-12In addition, the function margin determines the gain and phase margins for agiven SISO open-loop model. These functions can

Pagina 85

Time and Frequency Response5-13For example,bode(sys,{0.1 , 100})draws the Bode plot between 0.1 and 100 radians/second. You can also specifya particul

Pagina 86

5 Model Analysis Tools5-14several LTI models on a single plot. To do so, invoke the correspondingcommand line function using the listsys1,..., sysN of

Pagina 87 - Automatic Conversion

Time and Frequency Response5-15The following example compares a continuous model with its zero-order-holddiscretization.sysc = tf(1000,[1 10 1000])sys

Pagina 88

5 Model Analysis Tools5-16bode(sysc,'--',sysd,'-') % compare Bode responsesA comparison of the continuous and discretized response

Pagina 89 - Time Delays

Time and Frequency Response5-17Customizing the Plot DisplayYou can plo t da ta g e nerated by several response a na ly sis functions app lied toone or

Pagina 90

Preface4Getting StartedIf you are a new user, begin with Chapters 2 through 5 to learn:• How to specify and manipula te linear time-invariant models•

Pagina 91 - Distillation Column Example

5 Model Analysis Tools5-18For example, the following sequence of commands displays the Bode plot, s tepresponse, p ole/zero map, and some additional d

Pagina 92

Time and Frequency Response5-19Another example issubplot(221)bode(h)subplot(222)step(h)subplot(223)pzmap(h)subplot(224)plot(rand(1, 100)) % any data c

Pagina 93

5 Model Analysis Tools5-20Model Order ReductionYou can derive reduced-order models with the following commands.Useminreal to delete uncontrollable or

Pagina 94

6The LTI ViewerIntroduction ...6-2Getting Started U sing the LTI Viewer: An Example ..6-4The LTI Viewer Menus ...6-15The

Pagina 95

6 The LTI Viewer6-2IntroductionThe LTI Viewer is a graphical user interface for viewing and manipulating theresponse plots of LTI models.You can displ

Pagina 96

Introduction6-3• Zoom in on or out from the individual displayed plots• Toggle the grid on or off on a plot• Select which I/O channels the LTI Viewer

Pagina 97

6 The LTI Viewer6-4Getting Started Using the LTI Viewer: An ExampleThis section contains a brief introduction to the LTI Viewer through anexample that

Pagina 98

Getting Started Using the LTI Viewer: An Example6-5Transfer function: 2 s^3 + 1.2 s^2 + 15.1 s + 7.5----------------------------------------s^4 +

Pagina 99

6 The LTI Viewer6-6Note: When you initia lize the LTI Viewer with lsim or initial,theseplottypes require some extra arguments. For more information o

Pagina 100 - 2 LTI Models

Getting Started Using the LTI Viewer: An Example6-7Right-Click Menus: Setting Response CharacteristicsTo a ccess the individual response plot controls

Pagina 101

Typographic Conventions5Typographic ConventionsTo Indicate This Guide Uses ExampleExample code Monospace type To assign the value 5 to A,enterA = 5Fun

Pagina 102

6 The LTI Viewer6-81 Right -click anywherein theplotregionof thestepresponseplots.This opensthe following menu list in the plot region.Figure 6-1: Th

Pagina 103 - References

Getting Started Using the LTI Viewer: An Example6-9Your LTI Viewer should now look like this.Notice that there is one settling time or peak magnitude

Pagina 104

6 The LTI Viewer6-10Note that you can:• Use either the right or the left mouse button when you select a marker on aplot.• Left-click anywhere on a par

Pagina 105 - Operations on LTI Models

Getting Started Using the LTI Viewer: An Example6-11Importing ModelsIf the closed-loop models Gcl1 and Gcl2 donotmeetyourspecifications,youmay want to

Pagina 106 - 3 Operations on LTI Models

6 The LTI Viewer6-12Note: A given LT I Viewer c an only be used to analyze m odels with the samenumber of inputs and outputs. If you want to a nalyze

Pagina 107

Getting Started Using the LTI Viewer: An Example6-13a Point your mouse to any corner of the rectangle of the region you want tozoom in on.b Left-Click

Pagina 108

6 The LTI Viewer6-14After releasing the mouse on the zoom region, the LTI Viewer looks like this.Noticethatyou’veonlyzoomedonthe stepresponse plot;the

Pagina 109

The LTI Viewer Menus6-15The LTI Viewer MenusThe LTI Viewer has three main menus:•File• Tools• HelpThe File menu provides features pertinent to bringin

Pagina 110

6 The LTI Viewer6-16For directions for loading LTI models into the LTI Viewer workspace when youopen it, see “Initializing the LTI Viewer with Multipl

Pagina 111

The LTI Viewer Menus6-17The first submenu, Overview, opens the help text describing how to use theLTI Viewer menus and right-click menus that control

Pagina 112

How to Contact The MathWorks:508-647-7000 Phone508-647-7001 FaxThe MathWorks, Inc. Mail24 Prime Park WayNatick, MA 01760-1500http://www.mathworks.com

Pagina 114

6 The LTI Viewer6-18The Right-Click MenusYou can access most of the controls for the individual response plots displayedby the LTI Viewer through the

Pagina 115 - Arithmetic Operations

The Right-Click Menus6-19This isthe right-clickmenu forSISOmodels. These menu items control the LTIViewer plots for all models:•Plot Type—Youcan choos

Pagina 116

6 The LTI Viewer6-20are in the LTI Viewer workspace, but their responses are not displayed onthe plot associated with the open menu.- You can select a

Pagina 117 - Multiplication

The Right-Click Menus6-21Note: To multiselect submenu items (such as in the Characteristics or theSystems menus), re-open the right-click menu for ea

Pagina 118

6 The LTI Viewer6-22Your LTI Viewer looks like this.Figure 6-8: Nyquist Plots of the Four I/O Responses in ssF8Notice th at the I/O names for this mo

Pagina 119

The Right-Click Menus6-23Right-click on any part of the plot region (anywhere on the grid of plots). Thisopens the following menu.Figure 6-9: The Rig

Pagina 120

6 The LTI Viewer6-24You can use the Axes Grouping submenu to reconfigure the grouping of theseI/O response curves with the following submenu items.•In

Pagina 121 - Concatenation of LTI Models

The Right-Click Menus6-25• Outputs: The response curves from a g iven input to all of the outputs areplottedinthesameportionoftheplotregion.Thereareas

Pagina 122

6 The LTI Viewer6-26• All: All of the I/O response curves are displayed (grouped) in a single plotregion.Figure 6-12: Axes Grouping: AllThe Select I/

Pagina 123

The Right-Click Menus6-27When you select Select I/Os from the right-click menu, the following windowopens.ThisI/O Selector window allows you to custom

Pagina 124

1 Quick StartLTI Models ...1-3MIMOSystems ...1-4ModelConversion ...1-5LTIArrays...1

Pagina 125

6 The LTI Viewer6-28With the Axes Grouping set to None, the display looks like this.Note: To reset the Ax es Grouping to None, open the right-click

Pagina 126

The Right-Click Menus6-29For a given LTI array in the LTI Viewer workspace, you can use this interfaceto display the plots of a subset of models in th

Pagina 127 - Matched Poles and Zeros

6 The LTI Viewer6-30To display the responses of only some of the models in the LTI array, you mustfirst complete the following two steps:1 Right-click

Pagina 128

The Right-Click Menus6-31This opens the Model Selector for LTI Arrays window in the (default) Indexinto Dimensionssetup .Figure 6-14: LTI Array Model

Pagina 129

6 The LTI Viewer6-32OnceyouhaveselectedthenameofanLTIarrayintheModel Selector forLTI Arrayswindow, you can select models in the LTI array whose respon

Pagina 130

The Right-Click Menus6-33For example to display only the first row of models in the 2-by-3 LTI array m2d,either:• Select the first index in the first

Pagina 131

6 The LTI Viewer6-34Figure 6-16: Step Response of the First Row of Models in m2dThere are a variety of ways you can index into the dimensions of an L

Pagina 132

The Right-Click Menus6-35Indexing into the LTI Array Using Design Specification CriteriaYou can also use several plot-specific design criteria to sele

Pagina 133 - Arrays of LTI Models

6 The LTI Viewer6-364 Position your mouse pointer in the textbox next to the design specificationcharacteristic.5 Type a MATLAB relational expression

Pagina 134 - 4 Arrays of LTI Models

The Right-Click Menus6-37Figure 6-19: Step Response of the Model with the Maximum Rise TimeYou can also use any logical expression in variables defin

Pagina 135 - Introduction

1 Quick Start1-2Thischapter providesa quick overviewof somefeatures ofthe ControlSystemsToolbox.

Pagina 136

6 The LTI Viewer6-38at the MATLAB command line, and$ > any(any(Q))in the Model Selector for LTI Arrays window. This displays o nly the plots ofthos

Pagina 137 - The Concept of an LTI Array

The LTI Viewer Tools Menu6-39The LTI Viewer Tools MenuThree preferences windows provide additional options for customizingthe LTIViewer display. You c

Pagina 138

6 The LTI Viewer6-40load this model). With the Available LTI Viewer Configurations windowopen:1 Select the radio button for the two-plot configuration

Pagina 139

The LTI Viewer Tools Menu6-41Figure 6-21: Response Preferences WindowYou can use the Response Preferences window to:• Specify the time duration for t

Pagina 140

6 The LTI Viewer6-42value. You can use the Time vector (sec.) portionoftheTime Domain fieldshown below to do this.TheTime vector (sec.) field accepts

Pagina 141

The LTI Viewer Tools Menu6-43The Frequency vector (rad/sec.) field also provides you with the option torecalculateanew frequencyvectorforeach frequenc

Pagina 142

6 The LTI Viewer6-44rise time. For example, you can change the value for the settling time to 5% asshown below.Figure 6-22: Changing the Settling Tim

Pagina 143

The LTI Viewer Tools Menu6-45After selecting Linestyle Preferences from the Tools menu, t he followingLinestyle Preferences window opens.Figure 6-23:

Pagina 144

6 The LTI Viewer6-46You can designate that the chosen preference (color, marker, or linestyle)distinguish the plotted response curves by any (or all)

Pagina 145 - Building LTI Arrays

The LTI Viewer Tools Menu6-472 Select either:-Apply to keep the Linestyle Preferences window open when you applythese changes-OK to apply the changes

Pagina 146

LTI Models1-3LTI ModelsYou can specify linear time-invariant (LTI) systems a s transfer function (TF)models, zero/pole/gain (ZPK) models, state-space

Pagina 147

6 The LTI Viewer6-48Simulink LTI ViewerIf you have Simulink, you can use the Simulink LTI Viewer,aversionoftheLTI Viewer that performs linear a nalysi

Pagina 148

Simulink LTI Viewer6-49Notice that the title of this Simulink model is vdp, and that it contains staticnonlinearities.A Sample Analysis TaskSuppose yo

Pagina 149

6 The LTI Viewer6-50The basic procedure for carrying out this type of analysis is outlined below:1 Open the Simulink LTI Viewer.2 Specify your analysi

Pagina 150

Simulink LTI Viewer6-51When you select Linear Analysis, t wo new windows open: an LTI Viewerwindow and a Simuli n k diagram calledModel_Inputs_and_Out

Pagina 151

6 The LTI Viewer6-52The Simulink LTI Viewer differs from the regular LTI Viewer, in that: The Simulink LTI Viewer includes an additional menu for acqu

Pagina 152

Simulink LTI Viewer6-53• The title bar shows the name of the Simulink model to which it is linked.• The menu bar contains an additional menu calledSim

Pagina 153 - Indexing Into LTI Arrays

6 The LTI Viewer6-54To set up the analysis model for the vdp Simulink model:1 Insert an Input Point block on the line labeled x2 going into the Produc

Pagina 154

Simulink LTI Viewer6-55. Grab an Input Point block, drag it, and release it on the Simulink model here.

Pagina 155

6 The LTI Viewer6-56Keep the following in mind when using the Input Point a nd Output Pointblocks to specify analysis models:• You must p lace at leas

Pagina 156

Simulink LTI Viewer6-57Consider the following simple diagram.Based on the location of the Input Point and Output Point blocks, you mightthink that the

Pagina 157 - Operations on LTI Arrays

1 Quick Start1-4To create discrete-time models, append the sample time Ts to the previouscalling sequences.sys = tf(num,den,Ts)sys = zpk(z,p,k,Ts)sys

Pagina 158

6 The LTI Viewer6-581 Select Set Operating Point in the Simulink menu. This opens theOperating Point window.Figure 6-24: The Operating Point Window f

Pagina 159 - Dimension Requirements

Simulink LTI Viewer6-594 Select OK. A dialog box opens.a Selecting Yes closes the Operating Point window and linearizes themodel automatically. The ne

Pagina 160

6 The LTI Viewer6-60For this e xample, we use the Zero initial states setting, shown in the figurebelow.Note the following:• The inputs listed on theO

Pagina 161

Simulink LTI Viewer6-61• While the Operating Point window is in the Initial state in Simulinkdiagrammode, the linearization values used by the Simulin

Pagina 162

6 The LTI Viewer6-62Importing a Linearized Analysis Model to the LTI ViewerTo linearize and load your firstanalysis model for the van der Pol example

Pagina 163 - Model Analysis Tools

Simulink LTI Viewer6-63You can viewthe linearizedmodels in the LTIViewerworkspaceor chang etheplot type using the right-click menus. See “The Right-Cl

Pagina 164 - 5 Model Analysis Tools

6 The LTI Viewer6-64As is shown below, the linearized model for the new value of Mu appearsasthelast item in theSystems submenu, and the Bode plots fo

Pagina 165 - General Model Characteristics

Simulink LTI Viewer6-65Notice the foll o wing about the models lis ted in the Systems list on theright-click menu:• The names reflect the title of the

Pagina 166

6 The LTI Viewer6-66To export analysis models from the LTI Viewer workspace:1 Highlight the models you want to save in the Export List.(Youcanmultisel

Pagina 167 - Model Dynamics

7 Control Design ToolsRoot Locus Design ...7-3Pole Placement ...7-5State-FeedbackGainSelection...7-5StateEstim

Pagina 168

LTI Models1-5where each SISO entry is characterized by its n umerator and denominator.Cell arrays provide an ide al means to specify the resulting arr

Pagina 169 - State-Space Realizations

7 Control Design Tools7-2We use the term control system design to refer to the process of selectingfeed ba ck gains in a closed-loop control system. M

Pagina 170

Root Locus Design7-3Root Locus DesignThe root locus method is used to describe the trajectories of the closed-looppoles of a feedback system as one pa

Pagina 171 - Time and Frequency Response

7 Control Design Tools7-4If you are interested in just the root locus plot, use the command rlocus.Thiscommand takes one argument: a SISO model of the

Pagina 172

Pole Placement7-5Pole PlacementThe closed-loop pole locations have a direct impact on time responsecharacteristics such as rise time, settling time, a

Pagina 173 - Frequency Response

7 Control Design Tools7-6The estimator poles are the eigenvalues of , which can be arbitrarilyassigned by proper selection of the estimator gain matri

Pagina 174

Pole Placement7-7The function acker is limited to SISO systems and should only be used forsystems with a small number of states. The functionplace is

Pagina 175

7 Control Design Tools7-8LQG DesignLinear-Quadratic-Gaussian (LQG) control is a modern state-space techniquefordesigning optimal dynamic regulators. I

Pagina 176

LQG Design7-9Optimal State-Feedback GainIn LQG control, the regulation performance is measured by a quadraticperformance criterion of the formThe weig

Pagina 177

7 Control Design Tools7-10LQG RegulatorTo form the LQG regulator, simply connect the Kalman filter and LQ-optimalgain as shown below:This regulator ha

Pagina 178

LQG Design7-11discrete problems as well as the design of d iscrete LQG regulators forcontinuous plants.Seethecasestudyonpage9-31foranexampleofLQGdesig

Pagina 179 - Customizing the Plot Display

1 Quick Start1-6MATLAB derives the zero/pole/gain representation of the transfer function hZero/pole/gain: 1-------(s+1)^2LTI ArraysYou can now crea

Pagina 180

7 Control Design Tools7-12

Pagina 181

8The Root Locus DesignGUIIntroduction ...8-2A Servomechanism Example ...8-4Controller Design Using the Root Locus Design GUI

Pagina 182

8 The Root Locus Design GUI8-2IntroductionThe root locus method is used to descri be the trajectories in the complex planeof the closed-loop poles of

Pagina 183 - The LTI Viewer

Introduction8-3- Editing the compensator pole and zero locations- Opening the LTI Viewer• Saving the compensator and models to the workspace or the di

Pagina 184 - 6 The LTI Viewer

8 The Root Locus Design GUI8-4A Servomechanism ExampleA simple version of an electrohydraulic servomechanism model consists of:• A push-pull amplifier

Pagina 185

A Servomechanism Example8-5Aclosed-l oopmodelfortheelectrohydraul i cvalvepositioncontrolcan besetupas follows.Figure 8-1: Feedback Control for an El

Pagina 186

8 The Root Locus Design GUI8-6Controller Design Using the Root Locus Design GUIIn t h is section, we use the servomechanism example to describe some o

Pagina 187

Controller Design Using the Root Locus Design GUI8-7This brings up the following GUI.Importing Models into the Root Locus Design GUIThe Root Locus Des

Pagina 188

8 The Root Locus Design GUI8-8There are four ways to import SISO LTI models into the R oot Locus DesignGUI:• Load a model from the MATLAB workspace.•

Pagina 189 - Tools menu items

Controller Design Using the Root Locus Design GUI8-9Opening the Import LTI Design Model WindowTo import thelinearized electrohydraulicservomechanism m

Pagina 190

LTI Properties1-7LTI PropertiesInadditiontothemodeldata,theTF,ZPK,FRD,andSSobjectscanstoreextrainformation, such as the system sample time, time delay

Pagina 191 - 1 Click on the marker

8 The Root Locus Design GUI8-10Choosing a Feedback StructureTheRootLocus designtoolcan beapplied toSISO LTIsystems whosefeedbackstructure is i n one o

Pagina 192

Controller Design Using the Root Locus Design GUI8-11The Feedback Structure portionoftheImport LTI De sign Model windowshows the current selection for

Pagina 193 - Importing Models

8 The Root Locus Design GUI8-12To specify the design model components for this servomechanism example:1 Load the linearized servomechanism model Gserv

Pagina 194

Controller Design Using the Root Locus Design GUI8-13The root locus of the design model is displayed in the plot region of the GUI.Your Root Locus Des

Pagina 195

8 The Root Locus Design GUI8-14unstable if the gain set point is increased so as to place any of the closed-looppoles in the right-half of the complex

Pagina 196

Controller Design Using the Root Locus Design GUI8-15The following two figures capture this procedure.The right-most pair of closed-loop poles seem to

Pagina 197 - The LTI Viewer Menus

8 The Root Locus Design GUI8-16The Zoom controls are shown below.Once it is selected, you can operate any of the first threeZoom buttons in oneof two

Pagina 198

Controller Design Using the Root Locus Design GUI8-17The use of zooming to find the limits of stability on the root locus is depicted inthefollowingth

Pagina 199 - Interactive Help

8 The Root Locus Design GUI8-18The critical gain value for stability is approximately 43.9.Note: You can also test how much the g ain ca n be incre a

Pagina 200

Controller Design Using the Root Locus Design GUI8-19Storing and Retrieving Axes LimitsYou can store and change axes limits in two ways:• Using the Ax

Pagina 201 - The Right-Click Menus

1 Quick Start1-8Type:get(sys)a: -1 b: 1 c: 1 d: 0 e: [] StateName: {''} Ts: 0.5 InputDelay:

Pagina 202

8 The Root Locus Design GUI8-20You can also set or revise axes limits and other axes preferences in the RootLocus Axes Preferenceswindow. To open this

Pagina 203 - Characteristics or the

Controller Design Using the Root Locus Design GUI8-21Change the gain to 20 by edi ting the text box next to Gain,andpressingtheEnter key. Notice that

Pagina 204

8 The Root Locus Design GUI8-22Check the Step box, as shown below.Once you check theStep b ox, an LTI Viewer window opens. The plot type forthis LTI V

Pagina 205 - Axes Grouping

Controller Design Using the Root Locus Design GUI8-23To increase the gain to about 33 using your mouse:1 Hold your mouse button down as you click on a

Pagina 206

8 The Root Locus Design GUI8-24The step response plot on the dynamically linked LTI Viewer automaticallyupdates when you release the mouse button.As y

Pagina 207

Controller Design Using the Root Locus Design GUI8-25Let’s place approximate design region bo undaries on our root locus plot basedon our design speci

Pagina 208

8 The Root Locus Design GUI8-26After you press OK, the Root Locus Design GUI calculates and displays thespecified boundaries.Not all four branches of

Pagina 209 - Shift key while

Controller Design Using the Root Locus Design GUI8-27Once you have the gain specified, you can add poles or zeros to thecompensator.Youcan addpolesand

Pagina 210

8 The Root Locus Design GUI8-28The default mode for the toolbar is the drag mode. In this mode, you can:• Click on a specific location on the root loc

Pagina 211

Controller Design Using the Root Locus Design GUI8-29Try placing a pair of complex poles just above the right-most real closed-looppole. The resulting

Pagina 212

LTI Properties1-9MATLAB returnsans = 3.0000e–01

Pagina 213 - Arrays pull-down tab

8 The Root Locus Design GUI8-30Try adding a pair of complex zeros just to the left of and a little bit below thecomplexclosed-looppolesclosesttotheima

Pagina 214

Controller Design Using the Root Locus Design GUI8-31Editing Compensator Pole and Zero LocationsIn this section we use the Edit Compensator window to

Pagina 215

8 The Root Locus Design GUI8-32You can use the Edit Compensator window to:• Edit the locations of compensator poles and zeros.• Add compensator poles

Pagina 216

Controller Design Using the Root Locus Design GUI8-33With the gain set point at 9.7, your root locus looks as follows.Note: Whenever the numerator or

Pagina 217 - Index into Dimensions

8 The Root Locus Design GUI8-34To check where the closed-loop roots are with respect to the boundary of thedesign region, let’s zoom in a bit.Wedon’t

Pagina 218

Controller Design Using the Root Locus Design GUI8-35The step response looks good. However, to be certain that you’ve met yourdesign specifications, y

Pagina 219

8 The Root Locus Design GUI8-36Saving the Compensator and ModelsNow that you have successfully designed your compensator, you may want tosave your des

Pagina 220

Controller Design Using the Root Locus Design GUI8-37the compensator is now in the workspace, in the variable named comp.Then typecompto see that this

Pagina 221 - The LTI Viewer Tools Menu

8 The Root Locus Design GUI8-38Additional Root Locus Design GUI FeaturesThis section describes several features of the Root Locus Design GUI notcovere

Pagina 222

Additional Root Locus Design GUI Features8-39Designating the Model SourceThe source of your design model data is indicated in the Import From fieldsho

Pagina 223

iContentsPrefaceInstallation ... 3Getting Started ... 4Typographic Con

Pagina 224

1 Quick Start1-10Model CharacteristicsThe Control System Toolbox contains commands to query such modelcharacteristics as the I/O dimensions, poles, ze

Pagina 225

8 The Root Locus Design GUI8-40Using the Help MenuClick on the Help menu and you find that it contains five menu items:•Main Help• Edit Compensator• C

Pagina 226

Additional Root Locus Design GUI Features8-41Erasing Compensator Poles and ZerosYou ca n delete any co m p ens ator poles and zeros in o ne of two way

Pagina 227

8 The Root Locus Design GUI8-42To view the current closed-loop poles:• Select List Closed-Loop Poles fromtheTools menu. Ifyous elect thismenu,a window

Pagina 228

Additional Root Locus Design GUI Features8-43The following window opens.For each component of the design model, this window t ells you:• The component

Pagina 229 - 2 Select either:

8 The Root Locus Design GUI8-44Note: The name s you enter in this windo w are only u sed whe n you ge neratea Simulink diagram of the closed-lo op st

Pagina 230

Additional Root Locus Design GUI Features8-45If you a nswered Yes, a Simulink diagram such as this appears.The Simulink diagram is linked tothe worksp

Pagina 231 - A Sample Analysis Task

8 The Root Locus Design GUI8-46The Convert Model/Compensator window, shown below, opens.Once you select a discretization method, sampling time, and cr

Pagina 232

Additional Root Locus Design GUI Features8-47Totestthese features,select Clear Model. Notice that your compensator is notaltered, and its poles and ze

Pagina 233 - Model_Inputs_and_Outputs

8 The Root Locus Design GUI8-48References[1] Clark, R.N., Control System Dynamics, Cambridge University Press, 1996.[2] Dorf, R.C. and R.H. Bishop, Mo

Pagina 234

9 Design Case StudiesYaw Damper for a 747 Jet Transport ...9-3Open-LoopAnalysis ...9-6RootLocusDesign...9-9WashoutF

Pagina 235

Operations on LTI Models1-11Operations on LTI ModelsYou can perform simple matrix operations, such as addition, multiplication, orconcatenation on LTI

Pagina 236

9 Design Case Studies9-2This chapter contains four detailed case studies of control system design a ndanalysis using the Control System Toolbox.Demons

Pagina 237

Yaw Damper for a 747 Jet Transport9-3Yaw Damper for a 747 Jet TransportThis case study demonstrates the tools for classical control design by stepping

Pagina 238

9 Design Case Studies9-4You can display the LTI model sys by typing sys.MATLABrespondswitha = beta yaw roll

Pagina 239 - Linearized Model

Yaw Damper for a 747 Jet Transport9-5Compute the open-loop eigenvalues and plot them in the -plane.damp(sys)Eigenvalue Damping Freq.

Pagina 240

9 Design Case Studies9-6Supposeyou wantto designa compensatorthatincreasesthe dampingof thesepoles, so tha t the resulting complex poles have a dampin

Pagina 241

Yaw Damper for a 747 Jet Transport9-7concerned about the behavior during the first few seconds rather than the firstfew minutes. Nextlook at the respo

Pagina 242

9 Design Case Studies9-8Typically, yaw dampers are designed using the yaw rate as sensed output andthe rudder as control input. Look at the correspond

Pagina 243 - Performing Linear Analysis

Yaw Damper for a 747 Jet Transport9-9Root Locus DesignSince t he simplest compensator is a static gain, first try t o determineappropriate gain values

Pagina 244

9 Design Case Studies9-10This is the root locus for negative feedback and shows that the system goesunstable almost immediately. If, instead, you use

Pagina 245

Yaw Damper for a 747 Jet Transport9-11The '+' marks on the previous figure show a possible selection. Thecorresponding gain and closed-loop

Pagina 246

1 Quick Start1-12extracts the subsystem mapping the first input to the third output. Note thatrow indices select the outputs while columnindices selec

Pagina 247 - Saving Analysis Models

9 Design Case Studies9-12Plot the closed-loop impulse response for a duration of 20 seconds.impulse(cl11,20)The response settles quickly and does not

Pagina 248

Yaw Damper for a 747 Jet Transport9-13feedback with index vectors selecting this input/output pair). At the MATLABprompt, typecloop = feedback(sys,–k,

Pagina 249

9 Design Case Studies9-14Plot the MIMO impulse response.impulse(cloop,20)Look at the plot from aileron (input 2)to bankangle (output 2).When you movet

Pagina 250 - 7 Control Design Tools

Yaw Damper for a 747 Jet Transport9-15The washout filter places azero at the origin, which constrains the spiral modepole to remain near the origin. W

Pagina 251 - Root Locus Design

9 Design Case Studies9-16and draw another root locus for this open-loop model.rlocus(–oloop)sgridNow the maximum damping is about . You ca n select th

Pagina 252

Yaw Damper for a 747 Jet Transport9-17The selected pole locations are marked by '+' on the root locus above. Theresulting gain value and clo

Pagina 253 - Pole Placement

9 Design Case Studies9-18Look at the closed-loop response from rudder to yaw rate.cl11 = feedback(oloop,–k);impulse(cl11,20)The response settles nicel

Pagina 254

Yaw Damper for a 747 Jet Transport9-19Then close t he loop around the first I/O pair of the MIMO model sys andsimulate the impulse response.cloop = fe

Pagina 255

9 Design Case Studies9-20Hard-Disk Read/Write Head ControllerThis case study demonstrates the ability to perform classical digital controldesign by go

Pagina 256

Hard-Disk Read/Write Head Controller9-21Using the values kg , Nm/(rad/sec), Nm/rad,and Nm/rad, form the transfer function description of this system.A

Pagina 257 - Kalman State Estimator

Continuous/Discrete Conversions1-13Continuous/Discrete ConversionsThe commands c2d, d2c,andd2d perform continuous to discrete, discrete tocontinuous,

Pagina 258

9 Design Case Studies9-22You can compare the Bode plots of the continuous and discretized models withbode(H,'-',Hd,'--')

Pagina 259 - LQG Design

Hard-Disk Read/Write Head Controller9-23To analyze the discrete system, plot its step response, typestep(Hd)The system oscillates quite a bit. This is

Pagina 260

9 Design Case Studies9-24Thesimplestcompensatoris just again,so try therootlocus technique to selectan appropriate feedback gain.rlocus(Hd)As shown in

Pagina 261 - The Root Locus Design

Hard-Disk Read/Write Head Controller9-25The corresponding open-loop modelis obtained by the series connectionD = zpk(0.85,0,1,Ts)oloop = Hd * DNow see

Pagina 262 - 8 The Root Locus Design GUI

9 Design Case Studies9-26The p lant response is the dashed line and the open-loop response with thecompensator is the solid line.The plot above shows

Pagina 263

Hard-Disk Read/Write Head Controller9-27Now try the root locus again with the plant and compensator as open loop.rlocus(oloop)zgridThis time, the pole

Pagina 264

9 Design Case Studies9-28Typeddamp(poles,Ts)to see the equivalent damping and natural frequency for each of theeigenvalues.To analyze this design, for

Pagina 265 - A Servomechanism Example

Hard-Disk Read/Write Head Controller9-29Now look at the robustness of your design. The m ost common classicalrobustness criteriaare the gain andphase

Pagina 266

9 Design Case Studies9-30The command produces t he plot shown below.This design is robust and can tolerate a 11 dB gain increase or a 40 degreephase l

Pagina 267

LQG Regulation9-31LQG RegulationThis case study demonstrates the use of the LQG design tools in a processcontrolapplication.Theg oal istoregulatethe h

Pagina 268

1 Quick Start1-14Time and Frequency ResponseThefollowingcommandsproducevarioustimeandfrequencyresponseplotsforLTI models (see “Time and Frequency Resp

Pagina 269

9 Design Case Studies9-32This shape is impressed by two pairs of rolling cylinders (one per axis)positioned by hydraulic actuators. The gap between th

Pagina 270

LQG Regulation9-33This leads to the following generic model for each axis of the rolling process.Figure 9-1: Open-loop model for x- or y-axisThe meas

Pagina 271 - Specifying the Design Model

9 Design Case Studies9-34The model data for each axis is summarized below.Model Data for the x-AxisModel Data for the y-AxisLQG Design for the x-AxisA

Pagina 272

LQG Regulation9-35Start with the -axis. First specify the model components as transfer functionobjects .% Hydraulic actuator (with input "u-x&quo

Pagina 273 - Gain text boxon the

9 Design Case Studies9-36The variable Px now contains an open-loop state-space model complete withinput and output names.Px.inputnameans = 'u

Pagina 274

LQG Regulation9-37high-frequency content of with the low-pass filter and use thefiltered value in the LQ performance criterion.lpf = tf(30,[1 30])% Co

Pagina 275 - As you get close to a closed

9 Design Case Studies9-38Let’s look at the regulator Bode response between 0.1 and 1000 rad/sec.bode(Regx,{0.1 1000})The phase response has an interes

Pagina 276

LQG Regulation9-39Next, compare the open- and closed-loop responses from disturbance tothickness gap. Usefeedback to close the loop. To help specify t

Pagina 277 - Zoom button to zoom in

9 Design Case Studies9-40You are now ready to compare the open- and closed-loop Bode responses fromdisturbance to thickness gap.bode(Px(1,2:3),'-

Pagina 278

LQG Regulation9-41simulation, and derive equivalent discrete white noise inputs for this samplingrate.dt = 0.01t = 0:dt:50 % time samples% Generate u

Pagina 279

Time and Frequency Response1-15produces the Bode plot shown below.To superimpose and compare the responses of several LTI systems, use thesyntaxbode(s

Pagina 280

9 Design Case Studies9-42LQG Design for the y-AxisTheLQG design for the -axis (regulation of the thickness)followsthe exactsamestepsasforthe -axis.% S

Pagina 281 - Gain,andpressingthe

LQG Regulation9-43Compare the open- and closed-loop response to the white noise inputdisturban ces.dt = 0.01t = 0:dt:50wy = sqrt(1/dt) * randn(2,lengt

Pagina 282

9 Design Case Studies9-44process exhibits some degree of cross-coupling between axes. Physically, anincrease in hydraulic force along the -axis compre

Pagina 283 - Gain box

LQG Regulation9-45Accordingly, the thickness gaps and rolling forces are related to the outputsof the - and -axis models byLet’s see how the previous

Pagina 284

9 Design Case Studies9-46You are now ready to simulate the open- and closed-loop responses to thedriving white noiseswx (for the -axis) and wy (for th

Pagina 285 - Tools menu

LQG Regulation9-47MIMO LQG DesignStart with the complete two-axis state-space model Pc derived above. Themodel inputs and outputs arePc.inputnameans =

Pagina 286

9 Design Case Studies9-48The resulting LQG regulator RegMIMO has two inputs and two outputs.RegMIMO.inputnameans = 'x-force' 'y-

Pagina 287 - Edit Compensator menu item to

LQG Regulation9-49Next, plot the open- and closed-loo p time responses to the white noise inputs(using the MIMO LQG regulator for feedback).% Form the

Pagina 288

9 Design Case Studies9-50Kalman FilteringThis final case study illustrates the use of the Control System Toolbox forKalman filter design and simulatio

Pagina 289 - Add compensator poles here

Kalman Filtering9-51In these equations:• is the estimate of given past measuremen ts up to• is the updated estimate based on the last measurementGiven

Pagina 290

1 Quick Start1-16These commands automatically determine an appropriate simulation horizonor frequency range ba sed on t he system dynamics. To o verri

Pagina 291

9 Design Case Studies9-52This is done by% Note: set sample time to –1 to mark model as discretePlant = ss(A,[B B],C,0,–1,'inputname',{'

Pagina 292

Kalman Filtering9-53Becauseyouareinterestedinthe outputestimate ,keeponlythefirstoutputofkalmf.Typekalmf = kalmf(1,:);kalmfa = x

Pagina 293 - Compensator

9 Design Case Studies9-54The blockdiagram below shows how to generateboth true and filtered outputs.You can construct a state-space model of this bloc

Pagina 294

Kalman Filtering9-55Finally, close the sensor loop by connecting the plant output to the filterinput with positive feedback.% Close loop around input

Pagina 295 - Marker for the

9 Design Case Studies9-56and compare the true and filtered responses graphically.subplot(211), plot(t,y,'--',t,ye,'-'), xlabel(&ap

Pagina 296

Kalman Filtering9-57The error covariance before filtering (measurement error) isMeasErrCov MeasErrCov = 1.1138while the error covariance after filt

Pagina 297 - Then type

9 Design Case Studies9-58with and as defined on page 9-50, and in the following.For simplicity, we have dropped the subscripts indicating the time dep

Pagina 298

Kalman Filtering9-59you can implement the time-varying filter with the following for loop.P = B*Q*B'; % Initial error covariancex = zeros

Pagina 299 - Designating the Model Source

9 Design Case Studies9-60You can now compare the true and estimated output graphically.subplot(211), plot(t,y,'--',t,ye,'-') subpl

Pagina 300

Kalman Filtering9-61The time-varying filter also estimates the covariance errcov of the estimatio nerror at each sample. Plot it to see if your filter

Pagina 301 - Listing Poles and Zeros

The LTI Viewer1-17The LTI ViewerYou can also analyze time and frequency domain responses using the LTIViewer; see “The LTI Viewer” on page 6-1 for mor

Pagina 302

9 Design Case Studies9-62Compare with the estimation error covariance derived from the experimentaldata. TypeEstErr = y–ye;EstErrCov = sum(EstErr.*Est

Pagina 303 - OK to close this window

Kalman Filtering9-63References[1] Grimble, M.J., Robust Industrial Control: Optimal Design Approach forPolynomial Systems, Prentice Hall, 1994, p. 261

Pagina 304

9 Design Case Studies9-64

Pagina 305 - Pre-filter, F

10 Reliable ComputationsConditioning and Numerical Stability ...10-4Conditioning ...10-4Numerical Stability . . . . . . . . . .

Pagina 306

10 Reliable Computations10-2When working with low-order SISO models (less than five states), computersare usually quite forgiving and insensitive to n

Pagina 307

10-3At the same time, it is important to appreciate the limitations of computeranalyses. By following a few guidelines, you can avoid certain tools an

Pagina 308

10 Reliable Computations10-4Conditioning and Numerical StabilityTwo of the key concepts in numerical anal ysis are the conditioning of problemsand the

Pagina 309

Conditioning and Numerical Stability10-5Notice how much the smal l change in the data is magnified in the solution.One way t o measure the magnificati

Pagina 310 - 9 Design Case Studies

10 Reliable Computations10-6row of A. This perturbed matrix has n distinct eigenvalues with. Thus, you can see that this small perturbation in thedata

Pagina 311

Conditioning and Numerical Stability10-7Using row 1 as the pivot row (i.e., subtracting 1000 times row 1 from row 2) youarrive at the equivalent trian

Pagina 312

1 Quick Start1-18For more detail on the use of the LTI Viewer and how it can be integrated intoa Simulink diagram, see Chapter 6, “The LTI Viewer.”

Pagina 313

10 Reliable Computations10-8Choice of LTI ModelNow turn to the implications of the results in the last se ction on the linearmodelingtechniques usedfo

Pagina 314

Choice of LTI Model10-9A major difficulty is the extreme sensitivity of the roots of a polynomial to itscoefficients. This example is adapted from Wil

Pagina 315

10 Reliable Computations10-10verylittle. Thisis true in general.Different roots have different sensitivitiestodifferent perturbations. Computed roots

Pagina 316

Choice of LTI Model10-11and the conversionfrom zero-pole-gainto state s pace incurs no loss of accuracyin the poles.format long e[sort(eig(a1)) sort(e

Pagina 317

10 Reliable Computations10-12Its eigenvectors and eigenvalues are given as follows.[v,d] = eig(A)v = 0.7071 –0.0000 –0.3162 0.6325 –0.7071

Pagina 318

Choice of LTI Model10-13Note also that the eigenvectors have changed.[vc,dc] = eig(Ac)vc = –0.5017 0.2353 0.0510 0.0109 –0.8026 0.7531

Pagina 319

10 Reliable Computations10-14• The pole locations are very sensitive to the coefficients of the denominatorpolynomial.• The balanced companion form pr

Pagina 320

Scaling10-15ScalingStatespace isthepreferredmodelfor LTIsystems,especiallywithhigher ordermodels. Even with state-space models, however, accurate resu

Pagina 321

10 Reliable Computations10-16excellent discussion of scaling is given in the introduction to the LINPACKUsers’ Guide, [1].Choose scaling based upon ph

Pagina 322

Summary10-17SummaryThis chapter has described numerous things that can go wrong whenperforming numerical computations. You won’t encounter most of the

Pagina 323 - H = zpk(0,–0.333,1);

System Interconnections1-19System InterconnectionsYou ca n derive LTI models for various system interconnections ranging fromsimple series connections

Pagina 324

10 Reliable Computations10-18References[1] Dongarra, J.J., J.R. Bunch, C.B. Moler, and G.W. Stewart, LINPACK UsersGuide, SIAM Publications, Philadelph

Pagina 325

11 Reference

Pagina 326

11 Reference11-2This chapter contains detailed descriptions of all Control System Toolboxfunctions. It begins with a list of functions grouped by subj

Pagina 327

Category Tables11-3Category TablesTable 11-1: LTI ModelsFunction Name DescriptiondrssGenerate random discrete state-space model.dssCreate descriptor

Pagina 328

11 Reference11-4Table 11-2: Model CharacteristicsFunction Name DescriptionclassDisplay model type ('tf', 'zpk', 'ss', o

Pagina 329

Category Tables11-5residueProvide partial fraction expansion (see UsingMATLAB).ssConverttoastatespacemodel.tfConvert to a transfer function model.zpkC

Pagina 330

11 Reference11-6ss2ssState coordinate transformation.ssbalDiagonal balancing of state-space realizations.Table 11-6: Model DynamicsFunction Name Desc

Pagina 331

Category Tables11-7connectConnect the subsystems of a block-diagonal modelaccording to an interconnection scheme of yourchoice.convConvolve two polyno

Pagina 332

11 Reference11-8ltiviewOpen the LTI Viewer for linear response analysis.stepCalculate step r esponse.Table 11-9: Frequency ResponseFunction Name Desc

Pagina 333 - D = zpk(0.85,0,1,Ts)

Category Tables11-9sigmaCalc u late singular value plot.zgridSuperimpose z-plane grid on root locus or pole/zeromap.Table 11-10: Pole PlacementFuncti

Pagina 334

ii ContentsSystem Interconnections ... 1-19Control Design Tools ... 1-20The Root Locus Design

Pagina 335

1 Quick Start1-20Control Design ToolsThe Control System Toolbox supports three mainstream control designmethodologies: gain selection from root locus,

Pagina 336

11 Reference11-10kalmdCalculate the discrete Kalman estimator forcontinuous models.lqgregForm LQG regulator given LQ gain and Kalmanfilter.Table 11-12

Pagina 337

acker11-1111ackerPurpose Pole placement design for single-input systemsSyntax k = acker(A,b,p)Description Given the single-input systemand a vectorp o

Pagina 338

append11-1211appendPurpose Group LTI models by appending their inputs and outputsSyntax sys = append(sys1,sys2,...,sysN)Description append appends the

Pagina 339 - LQG Regulation

append11-13Arguments The input arguments sys1,..., sysN can be LTI models of any type. Regularmatrices are also accepted as a representation of static

Pagina 340

append11-14c = x1 x2 y1 1.00000 0 y2 0 0 y3

Pagina 341

augstate11-1511augstatePurpose Append the state vector to the output vectorSyntax asys = augstate(sys)Description Given a state-space model sys with e

Pagina 342

balreal11-1611balrealPurpose Input/output balancing of state-space realizationsSyntax sysb = balreal(sys)[sysb,g,T,Ti] = balreal(sys)Description sysb

Pagina 343

balreal11-17which indicates that the last two states of sysb are weaklycoupledto the inputand output. You can then delete these states bysysr = modred

Pagina 344

balreal11-18Algorithm Consider the modelwith controllability and observability gramians and . The statecoordinate transformation produces the equivale

Pagina 345

bode11-1911bodePurpose Compute the Bode frequency response o f LTI modelsSyntax bode(sys)bode(sys,w)bode(sys1,sys2,...,sysN)bode(sys1,sys2,...,sysN,w)

Pagina 346

Control Design Tools1-21Figure 1-1: Simple Regulation LoopThe following commands design the optimal LQG regulator for thisproblem.sys = ss(tf(100,[1

Pagina 347

bode11-20uses red dashed lines for the first system sys1 and green 'x' markers for thesecond systemsys2.When invoked w ith left-hand argumen

Pagina 348

bode11-21by typingg = tf([1 0.1 7.5],[1 0.12 9 0 0]);bode(g)To plot the response on a wider frequency range, for example, from 0.1 to 100rad/sec, type

Pagina 349

bode11-22You can also discretize this system using zero-order hold and the sample timesecond, and compare the continuous and discretized responses byt

Pagina 350

bode11-23structure. The reduction to Hessenberg form provides a good compromisebetween efficiency and reliability. See [1] for more details on this te

Pagina 351 - Cross-Coupling Between Axes

c2d11-2411c2dPurpose Discretize continuous-time systemsSyntax sysd = c2d(sys,Ts)sysd = c2d(sys,Ts,method)Description sysd = c2d(sys,Ts) discretizes t

Pagina 352

c2d11-25with input delay second. To discretize this system using thetriangle approximation with sample time second, typeH = tf([1 –1],[1 4 5],'in

Pagina 353

c2d11-26The next command compares the continuous and discretized step responses.step(H,'-',Hd,'--')See Also d2c Discrete to contin

Pagina 354

canon11-2711canonPurpose Compute canoni cal state-space re alizationsSyntax csys = canon(sys,'type')[csys,T] = canon(sys,'type')De

Pagina 355 - MIMO LQG Design

canon11-28For state-space models sys,[csys,T] = canon(a,b,c,d,'type')also returns the state coordinate transformation T relating the origina

Pagina 356

care11-2911carePurpose Solve continuous-time algebraic Riccati equations (CARE)Syntax [X,L,G,rr] = care(A,B,Q)[X,L,G,rr] = care(A,B,Q,R,S,E)[X,L,G,rep

Pagina 357

1 Quick Start1-22To validate the design,closethe loop with feedback andcomparetheo pen- andclosed-loop impulse responses withimpulse.% Close loopclsys

Pagina 358

care11-30Alternatively, [X1,X2,L,report] = care(A,B,Q,...,'implicit') also turnsoff error messages but now returns in implicit form.Note tha

Pagina 359 - Steady-State Design

care11-31Finally, note that the variable l contains the closed-loop eigenvalues eig(a–b*g).ll = –3.5026 –1.4370Example 2To solve the -like Riccati

Pagina 360

care11-32See Also dare Solve discrete-time Riccati equationslyap Solve continuous-time Lyapunov equationsReferences [1] Arno ld , W.F., III and A.J. L

Pagina 361 - Kalman Filtering

chgunits11-3311chgunitsPurpose Convert the frequency units of an FRD modelSyntax sys = chgunits(sys,units) Description sys = chgunits(sys,units) conve

Pagina 362

connect11-3411connectPurpose Derive state-space model from block diagram descriptionSyntax sysc = connect(sys,Q,inputs,outputs)Description Complex dyn

Pagina 363

connect11-35externaloutputsare outputs2 and7 of sys,theninputs and outputs shouldbe set toinputs = [1 2 15]; outputs = [2 7]; The final model sysc has

Pagina 364

connect11-36Given the matrices of the state-space model sys2A = [ –9.0201 17.7791 –1.6943 3.2138 ];B = [ –.5112 .5362–.002 –1.8470];C = [ –3.2897

Pagina 365 - Time-Varying Kalman Filter

connect11-37c = x1 x2 x3 x4 ? 2.5 0 0 0

Pagina 366

connect11-38You can obtain a state-space model for the overall interconnection by typingsysc = connect(sys,Q,inputs,outputs)a =

Pagina 367

connect11-39References [1] Edwards, J.W., “A Fortran Program for the Analysis of Linear Continuousand Sampled-Data Systems,” NASA Report TM X56038, Dr

Pagina 368

The Root Locus Design GUI1-23The Root Locus Design GUIYou ca n also design a compensator using the Root Locus Design GraphicalUser Interface (GUI). Se

Pagina 369

covar11-4011covarPurpose Output and state covariance of a system driven by white noiseSyntax [P,Q] = covar(sys,W)Description covar calculates the stat

Pagina 370

covar11-41and MATLAB returnsp =30.3167You ca n compare t his output of covar to simulation results.randn('seed',0)w = sqrt(5)∗randn(1,1000);

Pagina 371

covar11-42and is given byNote that is well defined for nonzero in the discrete case.Limitations The state and output covariances are d efined for stab

Pagina 372

ctrb11-4311ctrbPurpose Form the controllability matrixSyntax Co = ctrb(A,B)Co = ctrb(sys)Description ctrb computes the controllability matrix for stat

Pagina 373

ctrb11-44Limitations The calculation of Co may be ill-conditioned with respect to inversion. Anindication of this can be seen f rom this simple exampl

Pagina 374 - 10 Reliable Computations

ctrbf11-4511ctrbfPurpose Compute the controllability staircase formSyntax [Abar,Bbar,Cbar,T,k] = ctrbf(A,B,C)[Abar,Bbar,Cbar,T,k] = ctrbf(A,B,C,tol)De

Pagina 375

ctrbf11-46Example Compute the controllability staircase form forA = 1 1 4 –2B = 1 –1 1 –1C = 1 0 0 1and l

Pagina 376

ctrbf11-47Algorithm ctrbf is an M-file that implements the Staircase Algorithm of [1].See Also ctrb Form the controllability matrixminreal Minimum rea

Pagina 377

d2c11-4811d2cPurpose Convert discrete-time L TI models to continuous timeSyntax sysc = d2c(sysd)sysc = d2c(sysd,method)Description d2c converts LTI mo

Pagina 378

d2c11-49As with zero-order hold, the inverse discretization operationc2d(Hc,0.1,'tustin')gives back the original .Algorithm The 'zoh&ap

Pagina 379

1 Quick Start1-24

Pagina 380

d2c11-50Convert Hc back to discrete time by typingc2d(Hc,Ts)yieldingZero/pole/gain: (z+0.5) (z+0.2)-------------------------(z+0.5)^2 (z^2 + z + 0

Pagina 381 - Choice of LTI Model

d2d11-5111d2dPurpose Resample discrete-time LTI models or add input delaysSyntax sys1 = d2d(sys,Ts)Description sys1 = d2d(sys,Ts) resamples the discre

Pagina 382

damp11-5211dampPurpose Compute damping factors and natural frequenciesSyntax [Wn,Z] = damp(sys)[Wn,Z,P] = damp(sys)Description damp calculates the dam

Pagina 383

damp11-53Typedamp(H)and MATLAB returnsEigenvalue Damping Freq. (rad/s) –1.00e

Pagina 384

dare11-5411darePurpose Solve discrete-time algebraic Riccati equations (DARE)Syntax [X,L,G,rr] = dare(A,B,Q,R)[X,L,G,rr] = dare(A,B,Q,R,S,E)[X,L,G,rep

Pagina 385

dare11-55and L = eig(A–B*G,E).Two additional syntaxes are provided to help develop applications such as-optimal control design.[X,L,G,report] = dare(A

Pagina 386

dare11-56References [1] Arno ld, W.F., III and A.J. Laub, “Generalized Eigenproblem Algori thmsand Software for Algebraic Riccati Equations,” Proc. IE

Pagina 387

dcgain11-5711dcgainPurpose Compute low frequency (DC) gain of LTI systemSyntax k = dcgain(sys)Description k = dcgain(sys) computes the DC gain k of th

Pagina 388

delay2z11-5811delay2zPurpose Replace delays of discrete-time TF, SS, or ZPK models by poles at z=0, orreplace delays of FRD models by a phase shiftSyn

Pagina 389

dlqr11-5911dlqrPurpose Design linear-quadratic (LQ) state-feedback regulator for discrete-time plantSyntax [K,S,e] = dlqr(a,b,Q,R)[K,S,e] = dlqr(a,b,Q

Pagina 390

2 LTI ModelsIntroduction ...2-2Creating LTI Models ...2-8LTI Properties ...2-26Model Conversion ...

Pagina 391

dlqr11-60lqr State-feedback LQ regulator for continuous plantlqrd Discrete LQ regulator for continuous plantlqry State-feedback LQ regulator with outp

Pagina 392 - 11 Reference

dlyap11-6111dlyapPurpose Solve discrete-time Lyapunov equationsSyntax X = dlyap(A,Q)Description dlyap solves the discrete-time Lyapunov equationwhere

Pagina 393 - Category Tables

drmodel, drss11-6211drmodel, drssPurpose Generate stable random discrete test modelsSyntax sys = drss(n)sys = drss(n,p)sys = drss(n,p,m)sys = drss(n,p

Pagina 394

drmodel, drss11-63Example Generate a ran dom discrete LTI system with three states, two inputs, and twooutputs.sys = drss(3,2,2) a =

Pagina 395

dsort11-6411dsortPurpose Sort discrete-time poles by magnitudeSyntax s = dsort(p)[s,ndx] = dsort(p)Description dsort sorts the discrete-time poles con

Pagina 396

dss11-6511dssPurpose Specify descriptor state-space modelsSyntax sys = dss(a,b,c,d,e)sys = dss(a,b,c,d,e,Ts)sys = dss(a,b,c,d,e,ltisys)sys = dss(a,b,c

Pagina 397

dss11-66Example The commandsys = dss(1,2,3,4,5,'td',0.1,'inputname','voltage',...'notes','Just an example

Pagina 398

dssdata11-6711dssdataPurpose Quick access to descriptor state-space dataSyntax [a,b,c,d,e] = dssdata(sys)[a,b,c,d,e,Ts] = dssdata(sys)Description [a,b

Pagina 399

esort11-6811esortPurpose Sort continuous-time poles by real partSyntax s = esort(p)[s,ndx] = esort(p)Description esort sorts the continuous-time poles

Pagina 400

esort11-69See Also dsort, sort Sort system poleseig Calculate eigenvalues and eigenvectorspole Compute system polespzmap Pole-zero mapzero Compute (tr

Pagina 401

2 LTI Models2-2IntroductionThe Control System Too lbox offers ex tensiv e to ols to manip ulate and anal yzelinear time-invariant (LTI) models. It sup

Pagina 402 - 11append

estim11-7011estimPurpose Form state estimator given estimator gainSyntax est = estim(sys,L)est = estim(sys,L,sensors,known)Description est = estim(sys

Pagina 403 - Example The commands

estim11-71estim handles both continuous- and discrete-time cases. You can use thefunctionsplace (pole placement) or kalman (Kalman filtering) to desig

Pagina 404 - Series connection

evalfr11-7211evalfrPurpose Evaluate frequency response at a single (complex) frequencySyntax frsp = evalfr(sys,f)Description frsp = evalfr(sys,f) eval

Pagina 405 - Syntax asys = augstate(sys)

feedback11-7311feedbackPurpose Feedback connection of two LTI modelsSyntax sys = feedback(sys1,sys2)sys = feedback(sys1,sys2,sign)sys = feedback(sys1,

Pagina 406 - Syntax sysb = balreal(sys)

feedback11-74computes a closed-loop model sys for the more general feedback loop.The vectorfeedin contains indices into the input vector of sys1 and s

Pagina 407 - Phase (deg); Magnitude (dB)

feedback11-75Examples Example 1To connect the plantwith the controllerusing negative feedback, typeG = tf([2 5 1],[1 2 3],'inputname','

Pagina 408 - Algorithm Consider the model

feedback11-76Example 2Consider a state-space plant P with five inp uts and four outputs and astate-spacefeedbackcontrollerK with threeinputsandtwo out

Pagina 409 - Syntax bode(sys)

filt11-7711filtPurpose Specify discrete transfer functions in DSP formatSyntax sys = filt(num,den)sys = filt(num,den,Ts)sys = filt(M)sys = filt(num,de

Pagina 410

filt11-78MIMO transfer functions are regarded as arrays of SISO transfer functions(one per I/O channel), each of which is characterized by its numerat

Pagina 411

frd11-7911frdPurpose Create a frequency response data (FRD) object or convert another model typeto an FRD modelSyntax sys = frd(response,frequency)sys

Pagina 412

Introduction2-3Using LTI Models in the Control System ToolboxYou can manipulate TF, SS, and ZPK models using the arithmetic and modelinterconnection o

Pagina 413

frd11-80sysfrd = frd(sys,frequency,'Units',units)convertsan FRD model fromaTF, SS, or ZPK model while specifying the units forfrequency to b

Pagina 414 - Example Consider the system

frd11-81tf Create transfer functionszpk Create zero-pole-gain models

Pagina 415

frdata11-8211frdataPurpose Quick access to data for a frequency response data objectSyntax [response,freq] = frdata(sys)[response,freq,Ts] = frdata(sy

Pagina 416

frdata11-83returns the FRD model dataresp = 0.2040 + 0.4565i 2.4359 - 4.3665ifreq = 10 100See Also frd Create or convert to FRD modelsget Get t

Pagina 417 - Companion Form

freqresp11-8411freqrespPurpose Compute frequency response over grid of frequenciesSyntax H = freqresp(sys,w)Description H = freqresp(sys,w) computes t

Pagina 418

freqresp11-85at the frequencies . Typew = [1 10 100]H = freqresp(P,w)H(:,:,1) = 0 0.5000– 0.5000i –0.2000+ 0.6000i 1.0000

Pagina 419

freqresp11-86Algorithm For transfer functions or zero-pole-gain models, freqresp evaluates thenumerator(s) and denominator(s) at the specified frequen

Pagina 420 - Examples Example 1

gensig11-8711gensigPurpose Generate test input signals for lsimSyntax [u,t] = gensig(type,tau)[u,t] = gensig(type,tau,Tf,Ts)Description [u,t] = gensig

Pagina 421 - Example 2

gensig11-88Plot the resulting signal.plot(t,u)axis([0 30 –1 2])See Also lsim Simulate response to arbi trary inputs0 5 10 15 20 25 30−1−0.500.511.52

Pagina 422

get11-8911getPurpose Access/query LTI property valuesSyntax Value = get(sys,'PropertyName')get(sys)Description Value = get(sys,'Propert

Pagina 423 - Example w = logspace(1,2,2);

2 LTI Models2-4Creating an LTI Object: An ExampleAn LTI object of the type TF, ZPK, SS, or FRD is created whenever you i nvokethe corresponding constr

Pagina 424 - 11connect

get11-90or query only about the numerator and sample time values byget(h,'num')ans = [1x2 double]andget(h,'ts')ans = 0.1000

Pagina 425

gram11-9111gramPurpose Compute controllability and observability gramiansSyntax Wc = gram(sys,'c')Wo = gram(sys,'o')Description gr

Pagina 426

gram11-92tocompute thegramians ofa continuousor discretesystem.The LTImodel sysmust b e in state-space form.Algorithm The controllability gramian is o

Pagina 427

hasdelay11-9311hasdelayPurpose Test if an LTI model has time delaysSyntax hasdelay(sys)Description hasdelay(sys) returns 1 (true) if the LTI model sys

Pagina 428

impulse11-9411impulsePurpose Compute the impulse response of LTI modelsSyntax impulse(sys)impulse(sys,t)impulse(sys1,sys2,...,sysN)impulse(sys1,sys2,.

Pagina 429 - Center, 1976

impulse11-95As with bode or plot, you can specify a particular color, linestyle, and/ormarker for each system, for example,impulse(sys1,'y:'

Pagina 430 - Syntax [P,Q] = covar(sys,W)

impulse11-96use t he following commands.a = [–0.5572 –0.7814;0.7814 0];b = [1 –1;0 2];c = [1.9691 6.4493];sys = ss(a,b,c,0);impulse(sys)The l eft

Pagina 431

impulse11-97Because t his system has two inputs, y is a 3-D array with dimensionssize(y)ans = 101 1 2(the first dimension is the length of t

Pagina 432

initial11-9811initialPurpose Compute the initial condition response of state-space modelsSyntax initial(sys,x0)initial(sys,x0,t)initial(sys1,sys2,...,

Pagina 433 - Syntax Co = ctrb(A,B)

initial11-99To plot the initial condition responses of several LTI models on a single figure,useinitial(sys1,sys2,...,sysN,x0) initial(sys1,sys2,...,s

Pagina 434

Introduction2-5Precedence RulesOperations like addition and commands like feedback operate on more thanone LTI model at a time. If these LTI models ar

Pagina 435

initial11-100to the initial conditiona = [–0.5572 –0.7814;0.7814 0];c = [1.9691 6.4493];x0 = [1 ; 0]sys = ss(a,[],c,[]);initial(sys,x0)See Also im

Pagina 436

inv11-10111invPurpose Invert LTI systemsSyntax isys = inv(sys)Description inv inverts the input/output relationto produce the LTI system with the tran

Pagina 437

inv11-102You can verify thatH * Hiis the identity transfer f uncti on (static gain I).Limitations Do not use inv to model feedback connections such as

Pagina 438 - Syntax sysc = d2c(sysd)

inv11-103Use feedback or star to avoid such pitfalls.cloop = feedback(g,h)Zero/pole/gain: s-------------(s^2 + s + 1)

Pagina 439

isct, isdt11-10411isct, isdtPurpose Determine whether an LTI model is continuous or discreteSyntax boo = isct(sys)boo = isdt(sys)Description boo = isc

Pagina 440

isempty11-10511isemptyPurpose Test if an LTI model is emptySyntax boo = isempty(sys)Description isempty(sys) returns 1 (true) if the LTI model sys has

Pagina 441 - Syntax sys1 = d2d(sys,Ts)

isproper11-10611isproperPurpose Test if an LTI model is properSyntax boo = isproper(sys)Description isproper(sys) returns 1 (true) if the LTI model sy

Pagina 442 - Syntax [Wn,Z] = damp(sys)

issiso11-10711issisoPurpose Test if an LTI model is single-input/single-output (SISO)Syntax boo = issiso(sys)Description issiso(sys) returns 1 (true)

Pagina 443

kalman11-10811kalmanPurpose Design continuous- or discrete-time Kalman estimatorSyntax [kest,L,P] = kalman(sys,Qn,Rn,Nn)[kest,L,P,M,Z] = kalman(sys,Qn

Pagina 444

kalman11-109the output and state estimates and . Note that estimates the true plantoutputDiscrete-Time EstimationGiven the discrete plantand the noise

Pagina 445

iiiLTI Properties ... 2-26GenericProperties ... 2-26Model-SpecificProperties ...

Pagina 446 - 1746–1754

2 LTI Models2-6For example, the parallel connection of t wo LTI systems sys1 and sys2 can beexpr es sed assys = sys1 + sys2because parallel connection

Pagina 447 - 11dcgain

kalman11-110andgeneratesoptimal“current”outputandstateestimates andusing all available measurements including . The gain matrices andare derived by so

Pagina 448 - Syntax sys = delay2z(sys)

kalman11-111for more general plants sys where the known inputs and stochastic inputsare mixed together, and not all outputs are measured. The index ve

Pagina 449

kalmd11-11211kalmdPurpose Design discrete Kalman estimator for continuous plantSyntax [kest,L,P,M,Z] = kalmd(sys,Qn,Rn,Ts)Description kalmd designs a

Pagina 450

kalmd11-113lqgreg Assemble LQG regulatorlqrd Discrete LQ-optimal gain for continuous plant References [1] Franklin, G.F., J.D. Powell, andM.L. Workman

Pagina 452 - Syntax sys = drss(n)

lft11-11511lftPurpose Redheffer star product (linear fractional transformation) of two LTI modelsSyntax sys = lft(sys1,sys2)sys = lft(sys1,sys2,nu,ny)

Pagina 453

lft11-116The abbreviated syntaxsys = lft(sys1,sys2)produces:• The lower LFT ofsys1 and sys2 if sys2 has fewer inputs and outputs thansys1. This amount

Pagina 454

lqgreg11-11711lqgregPurpose Form LQG regulator given state-feedback gain and Kalman estimatorSyntax rlqg = lqgreg(kest,k)rlqg = lqgreg(kest,k,'cu

Pagina 455 - Syntax sys = dss(a,b,c,d,e)

lqgreg11-118In discrete time, you can form the LQG regulator using either the predictionof basedonmeasurementsupto , orthe currentstateestimate based

Pagina 456 - Example The command

lqgreg11-119• Continuous regulator for continuous plant: use lqr or lqry and kalman.• Discrete regulator for discrete plant: usedlqr or lqry and kalma

Pagina 457 - 11dssdata

Introduction2-7setSet LTI model properties.sizeGet output/input/array dimensions or model order.ssCreate a state-space model.ssdata, dssdataRetrieve s

Pagina 458 - Syntax s = esort(p)

lqgreg11-120Example See the examples “Control Design Tools” on page 1-20 and “LQG Regulation”on page 9-31.See Also kalman Kalman estimator designkalmd

Pagina 459 - Compute (transmission) zeros

lqr11-12111lqrPurpose Design linear-quadratic ( LQ) state-feedback regulator for continuous plantSyntax [K,S,e] = lqr(A,B,Q,R)[K,S,e] = lqr(A,B,Q,R,N)

Pagina 460 - Syntax est = estim(sys,L)

lqr11-122See Also care Solve continuous Riccati equationsdlqr State-feedback LQ regulator for discrete plantlqgreg Form LQG regulatorlqrd Discrete LQ

Pagina 461

lqrd11-12311lqrdPurpose Design discrete LQ regulator for continuous plantSyntax [Kd,S,e] = lqrd(A,B,Q,R,Ts)[Kd,S,e] = lqrd(A,B,Q,R,N,Ts)Description lq

Pagina 462 - 11evalfr

lqrd11-124With the notationthe discretized plant has equationsand the weighting matrices for the e quivalent discrete cost function areThe integrals a

Pagina 463 - 11feedback

lqry11-12511lqryPurpose Linear-quadratic (LQ) state-feedback regulator with output weightingSyntax [K,S,e] = lqry(sys,Q,R)[K,S,e] = lqry(sys,Q,R,N)Des

Pagina 464

lsim11-12611lsimPurpose Simulate LTI model response to arbitrary inputsSyntax lsim(sys,u,t)lsim(sys,u,t,x0)lsim(sys1,sys2,...,sysN,u,t)lsim(sys1,sys2,

Pagina 465

lsim11-127simulatestheresponsesofseveralLTI modelstothesameinputhistoryt,u andplots these responses on a single figure. As withbode or plot, you can s

Pagina 466 - Example 3

lsim11-128Then simulate with lsim.H = [tf([2 5 1],[1 2 3]) ; tf([1 –1],[1 1 5])];lsim(H,u,t)

Pagina 467 - Syntax sys = filt(num,den)

lsim11-129Note that if you begin the simulation with a nonzero value for t(1), then thezero-initial condition response is shifted in time, as shown be

Pagina 468 - Example Typing the commands

2 LTI Models2-8Creating LTI ModelsThe functions tf, zpk, ss,andfrd creat e transfer function models,zero-pole-gain models, state-space models, and fre

Pagina 469

lsim11-130To illustrate why resampling is sometimes necessary, consider thesecond-order modelTosimulateits responsetoasquarewavewithperiod1 second,you

Pagina 470 - Example Type the commands

lsim11-131The response exhibits strong oscillations. Less obvious from this plot is the factthatlsim has resampled the input to reveal the oscillatory

Pagina 471 - Create zero-pole-gain models

lsim11-132The two responses look quit e different. T o clarify this discrepancy,superimposethetwoplotsbylsim(h,'b--',hd,'r-',u,t)T

Pagina 472

ltiview11-13311ltiviewPurpose Initialize an LTI Viewer for LTI system response analysisSyntax ltiviewltiview(plottype,sys)ltiview(plottype,sys,extras)

Pagina 473 - Set model properties

ltiview11-134extras is one o r more input arguments as specified by the function named inplottype.Theseargumentsmayberequiredoroptional,dependingonthe

Pagina 474 - 11freqresp

lyap11-13511lyapPurpose Solve continuous-time Lyapunov equationsSyntax X = lyap(A,Q)X = lyap(A,B,C)Description lyap solves the special and g eneral fo

Pagina 475

lyap11-136 References [1] B artels, R.H. and G.W. Stewart, “Solution of the Matrix Equation AX + XB=C,”Comm . of the ACM, Vol. 15, No. 9, 1972.[2] Bry

Pagina 476

margin11-13711marginPurpose Compute gain and phase margins and associated crossover frequenciesSyntax [Gm,Pm,Wcg,Wcp] = margin(sys)[Gm,Pm,Wcg,Wcp] = m

Pagina 477 - 11gensig

margin11-138Example You can compute the gain and phase margins of the open-loop discrete-timetransfer function. Typehd = tf([0.04798 0.0464],[1 –1.81

Pagina 478 - Plot the resulting signal

margin11-139You can also display these margins graphically.margin(hd)Algorithm The phase margin is computed using theory, and the gain margin bysolvin

Pagina 479

Creating LTI Models2-9where num and den are row vectors listing the coefficients of the polynomialsand , respectively, when these polynomials are orde

Pagina 480

minreal11-14011minrealPurpose Minimal realization or pole-zero cancellationSyntax sysr = minreal(sys)sysr = minreal(sys,tol)Description sysr = minreal

Pagina 481

minreal11-141See Also balreal Gramian-based input/output bal ancingmodred M odel order reductionsminreal Structured model reduction

Pagina 482

modred11-14211modredPurpose Model order reductionSyntax rsys = modred(sys,elim)rsys = modred(sys,elim,'mdc')rsys = modred(sys,elim,'del

Pagina 483 - Syntax hasdelay(sys)

modred11-143The last three diagonal entries of the balanced gramians are small, soeliminate the last three states withmodred using both matched DC gai

Pagina 484 - Syntax impulse(sys)

modred11-144The reduced-order model hdel is clearly a better frequency-domainapproximation of . Now compare the step responses.step(h,'-',hm

Pagina 485

modred11-145Next, the derivative of is set to zero and the resulting equation is solved for. T he reduced-order model is given byThe discrete-time cas

Pagina 486 - Amplitude

ndims11-14611ndimsPurpose Provide the number of the dimensions of an LTI model or LTI arraySyntax n = ndims(sys)Description n = ndims(sys) i s the num

Pagina 487

ngrid11-14711ngridPurpose Superimpose a Nichols chart on a Nichols plotSyntax ngridDescription ngrid superimposes Nichols chart grid lines over the Ni

Pagina 488 - Syntax initial(sys,x0)

ngrid11-148Typenichols(H)ngridSee Also nichols Nichols plotsOpen−Loop Phase (deg)Open−Loop Gain (dB)Nichols Charts−500 −450 −400 −350 −300 −250 −200 −

Pagina 489

nichols11-14911nicholsPurpose Compute N ichols frequency response of LTI modelsSyntax nichols(sys)nichols(sys,w)nichols(sys1,sys2,...,sysN)nichols(sys

Pagina 490

2 LTI Models2-10MIMO Transfer Function ModelsMIMO transfer functions are two-dimensional arrays of elementary SISOtransfer f un c tio n s. There are s

Pagina 491 - Example Consider

nichols11-150When i nvoked with left-hand arguments,[mag,phase,w] = nichols(sys)[mag,phase] = nichols(sys,w)return the magnitude and phase (in degrees

Pagina 492

nichols11-151Algorithm See bode.See Also bode Bode plotevalfr Response at single complex frequencyfreqresp Frequency response computationltiview LTIsy

Pagina 493

norm11-15211normPurpose Compute LTI model normsSyntax norm(sys)norm(sys,2)norm(sys,inf)norm(sys,inf,tol)[ninf,fpeak] = norm(sys)Description norm compu

Pagina 494 - Syntax boo = isct(sys)

norm11-153The discret e-time counterpart isUsage norm(sys) or norm(sys,2) both return the norm of the TF, SS, or ZPKmodelsys. This norm is infinite in

Pagina 495 - Example Both commands

norm11-154Compute its infinity norm by typing[ninf,fpeak] = norm(H,inf)ninf = 2.5488 fpeak = 3.0844These values are confirmed by the Bode plot o

Pagina 496 - Syntax boo = isproper(sys)

norm11-155MATLAB returnsans = 8.1268Algorithm norm uses the same algorithm as covar for the norm, and the al gorithm of[1] for the infinity norm.sy

Pagina 497 - Syntax boo = issiso(sys)

nyquist11-15611nyquistPurpose Compute Nyquist frequency response of LTI modelsSyntax nyquist(sys)nyquist(sys,w)nyquist(sys1,sys2,...,sysN)nyquist(sys1

Pagina 498 - Continuous-Time Estimation

nyquist11-157When i nvoked with left-hand arguments[re,im,w] = nyquist(sys)[re,im] = nyquist(sys,w)return the re al and imaginary parts of the frequ e

Pagina 499 - Discrete-Time Estimation

nyquist11-158H = tf([2 5 1],[1 2 3])nyquist(H)See Also bode Bode plotevalfr Response at s ingle complex frequencyfreqresp Frequency response computati

Pagina 500

obsv11-15911obsvPurpose Form the observability matrixSyntax Ob = obsv(A,B)Ob = obsv(sys)Description obsv computes the observability matrix for state-s

Pagina 501

Creating LTI Models2-11For example, for the rational transfer matrix , the two cell arrays N and Dshould contain the row-vector representations of the

Pagina 502

obsv11-160MATLAB responds withunob = 0See Also obsvf Compute the o bservability staircase form

Pagina 503

obsvf11-16111obsvfPurpose Compute the observability staircase formSyntax [Abar,Bbar,Cbar,T,k] = obsvf(A,B,C)[Abar,Bbar,Cbar,T,k] = obsvf(A,B,C,tol)Des

Pagina 504

obsvf11-162Example Form the observability staircase form ofA = 1 1 4 –2B = 1 –1 1 –1C = 1 0 0 1by typing[

Pagina 505 - Syntax sys = lft(sys1,sys2)

ord211-16311ord2Purpose Generate continuous second-order systemsSyntax [A,B,C,D] = ord2(wn,z)[num,den] = ord2(wn,z)Description [A,B,C,D] = ord2(wn,z)

Pagina 506

pade11-16411padePurpose Compute the Padé approximation of models with time delaysSyntax [num,den] = pade(T,N)pade(T,N)sysx = pade(sys,N)sysx = pade(sy

Pagina 507 - Syntax rlqg = lqgreg(kest,k)

pade11-165sysx = pade(sys,NI,NO,Nio) specifies independent approximation orders foreach input,output, and I/O delay.These approximation ordersare give

Pagina 508

pade11-166Example Compute a third-order Padé approximation of a 0.1 second I/O delay andcompare the time and frequency responses of the true delay and

Pagina 509

pade11-167 References [1]Golub,G.H.andC.F.VanLoan,Matrix Computations, Johns HopkinsUniversity Press, Baltimore, 1989, pp. 557–558.

Pagina 510

parallel11-16811parallelPurpose Parallel connection of two LTI modelsSyntax sys = parallel(sys1,sys2)sys = parallel(sys1,sys2,inp1,inp2,out1,out2)Desc

Pagina 511 - Syntax [K,S,e] = lqr(A,B,Q,R)

parallel11-169sys = parallel(sys1,sys2,inp1,inp2,out1,out2) forms the more generalparallel connection.The index vectorsinp1 and inp2 s pecify which in

Pagina 512 - Form LQG regulator

2 LTI Models2-12whileE = tfcreates an empty transfer function.Zero-Pole-Gain ModelsThis section explains how to specify continuous-time SISO and MIMOz

Pagina 513

place11-17011placePurpose Pole placement designSyntax K = place(A,B,p)[K,prec,message] = place(A,B,p)Description Given the single- or multi-input syst

Pagina 514

place11-171Algorithm place uses the algorithm of [1] which, for multi-input systems, optimizes thechoice of eigenvectors for a robust solution. We rec

Pagina 515

pole11-17211polePurpose Compute the poles of an LTI systemSyntax p = pole(sys)Description pole computes the poles p of the SISO or M IMO LTI model sys

Pagina 516 - Syntax lsim(sys,u,t)

pzmap11-17311pzmapPurpose Compute the pole-zero ma p of an LTI modelSyntax pzmap(sys)[p,z] = pzmap(sys)Description pzmap(sys) plots the pole-zero map

Pagina 517

pzmap11-174Example Plot the poles and zeros of the continuous-time system.H = tf([2 5 1],[1 2 3])pzmap(H)Algorithm pzmap uses a combination of pole an

Pagina 518 - Then simulate with lsim

pzmap11-175sgrid, zgrid Plot lines of constant damping and natural frequencyzero Compute system (transmission) zeros

Pagina 519

reg11-17611regPurpose Form regulator given state-feedback and estimator gainsSyntax rsys = reg(sys,K,L)rsys = reg(sys,K,L,sensors,known,controls)Descr

Pagina 520

reg11-177This regulator should be connected to the plant using positive feedback.rsys = reg(sys,K,L,sensors,known,controls) handles more generalregula

Pagina 521

reg11-178Example Given a continuous-time s tate-space modelsys = ss(A,B,C,D) with seven outputs and four inputs, suppose you have designed:• A state-f

Pagina 522

reshape11-17911reshapePurpose Change the shape of an LTI arraySyntax sys = reshape(sys,s1,s2,...,sk)sys = reshape(sys,[s1 s2 ... sk])Description sys =

Pagina 523 - Syntax ltiview

Creating LTI Models2-13producesZero/pole/gain: –2 s--------------------(s–2) (s^2 – 2s + 2)You can also specify zero-pole-gain models as rational exp

Pagina 524 - See Also bode Bode response

rlocfind11-18011rlocfindPurpose Select feedback gain from root locus plotSyntax [k,poles] = rlocfind(sys)[k,poles] = rlocfind(sys,p)Description rlocfi

Pagina 525

rlocfind11-181where p i s the complex point you supply as an input argument to rlocfind (orwhereyoupoint towith themouse),andn and d arerespectivelyth

Pagina 526

rlocus11-18211rlocusPurpose Evans root locusSyntax rlocus(sys)rlocus(sys,k)[r,k] = rlocus(sys)r = rlocus(sys,k)Description rlocus computes the Evans r

Pagina 527 - 11margin

rlocus11-183the closed-loop poles are the roots ofrlocus adaptively selects a set of positive gains to produce a smooth plot.Alternatively,rlocus(sys,

Pagina 528 - MATLAB responds with

rlocus11-184h = tf([2 5 1],[1 2 3]);rlocus(h)For examples, see “Root Locus Design” on page 9-9 and “Hard-Disk Read/WriteHead Controller” on page 9-20.

Pagina 529

rltool11-18511rltoolPurpose Initialize the Root Locus Design GUISyntax rltoolrltool(sys)rltool(sys,comp)rltool(sys,comp,LocationFlag,FeedbackSign)Desc

Pagina 530 - Syntax sysr = minreal(sys)

rltool11-186The R oot Locus Design GUI looks like t his.Edit the gain set point to change the closed-loop pole locations. Compensator descrip-tion: Th

Pagina 531 - Structured model reduction

rltool11-187This tool can be applied to S ISO LTI systems whose feedback structure is inone of the following two configurations.In either configuratio

Pagina 532 - Purpose Model order reduction

rltool11-188model (sys) in the forward loop of a negative unity feedback system, as shownin the diagram below.In this case,F and H are taken to be 1,

Pagina 533

rmodel, rss11-18911rmodel, rssPurpose Generate stable random continuous test modelsSyntax sys = rss(n)sys = rss(n,p)sys = rss(n,p,m)sys = rss(n,p,m,s1

Pagina 534

2 LTI Models2-14wher e•Z is the p -by-m cell array o f zero s (Z{i,j} = zeros of )•P is the p-by-m cell array o f p oles (P{i,j} = poles of )•K is the

Pagina 535

rmodel, rss11-190Example Obtain a stable random continuous LTI model with three states, two inputs,and two outputs by typingsys = rss(3,2,2)a =

Pagina 536 - Example sys = rss(3,1,1,3);

series11-19111seriesPurpose Series connection o f two LTI modelsSyntax sys = series(sys1,sys2)sys = series(sys1,sys2,outputs1,inputs2)Description seri

Pagina 537 - Syntax ngrid

series11-192Theindexvectorsoutputs1 andinputs2 indicatewhich outputs of sys1 andwhich inputs ofsys2 should be connected. The resulting model sys hasas

Pagina 538 - Open−Loop Gain (dB)

set11-19311setPurpose Set or modify LTI model propertiesSyntax set(sys,'Property',Value)set(sys,'Property1',Value1,'Property2

Pagina 539 - Syntax nichols(sys)

set11-194Notethatset doesnotrequire anyoutputargument.Checktheresultwithget by typingget(sys)a: 1 b: 2 c: 3 d: 0 e: []

Pagina 540

set11-195Table 11-15: LTI PropertiesProperty Name Admissible Property ValuesTs• 0 (zero) for continuous-time systems• Sample time in seconds for disc

Pagina 541

set11-196OutputDelayOutput delays specified with• Nonnegative real numbers for continuous-time models (seconds)• Integers for discrete-time models (nu

Pagina 542

set11-197Table 11-17: TF Model PropertiesProperty Name Admissible Property Valuesnum, den• Real-valued row vectors for the coefficients of the numera

Pagina 543

set11-198Remark For discrete-time transfer functions, the convention used to represent thenumerator anddenominatordepends onthe choice ofvariable (see

Pagina 544

set11-199Because t he resulting transfer functions are different, make sure to use theconvention consistent with your choice of variable.See Also get

Pagina 545 - See Also bode Bode plot

Creating LTI Models2-15Use the command ss to create state-space modelssys = ss(A,B,C,D)For a model with Nx states, Ny out pu t s, and Nu inputs•A is a

Pagina 546 - Syntax nyquist(sys)

sgrid11-20011sgridPurpose Generate an s-plane grid of constant damping factors and natural frequenciesSyntax sgridsgrid(z,wn)Description sgrid generat

Pagina 547

sgrid11-201Limitations sgrid plots the grid over the current axis regardless of whether the axiscontains a root locus diagram or pole-zero map. Theref

Pagina 548

sigma11-20211sigmaPurpose Singular values of the frequency response of LTI modelsSyntax sigma(sys)sigma(sys,w)sigma(sys,w,type)sigma(sys1,sys2,...,sys

Pagina 549 - Example Determine if the pair

sigma11-203w = {wmin,wmax}. To use part icular frequency points, set w to thecorresponding vector of frequencies. Uselogspace to generate logarithmica

Pagina 550

sigma11-204Remark If sys is an FRD model, sigma(sys,w), w can o nly include frequencies insys.frequency.Example Plot the singular value responses ofan

Pagina 551

sigma11-205You can do this by typingH = [0 tf([3 0],[1 1 10]) ; tf([1 1],[1 5]) tf(2,[1 6])]subplot(211)sigma(H)subplot(212)sigma(H,[],2)Algorithm sig

Pagina 552

sigma11-206nichols Nichols plotnyquist Nyquist plot

Pagina 553 - Syntax [A,B,C,D] = ord2(wn,z)

size11-20711sizePurpose Provide the output/input/array dimensions of LTI models, the model order ofTF, SS, and ZPK models, and the number of frequenci

Pagina 554 - Syntax [num,den] = pade(T,N)

size11-208Example Consider the random LTI array of state-space modelssys = rss(5,3,2,3);Itsdimensionsareobtainedbytypingsize(sys)3x1 array of state-sp

Pagina 555

sminreal11-20911sminrealPurpose Perform model reduction based on structureSyntax msys = sminreal(sys)Description msys = sminreal(sys) eliminates the s

Pagina 556 - N>10 should be avoided

iv Contents3Operations on LTI ModelsIntroduction ... 3-2Precedence and Prop erty Inheritance ...

Pagina 557

2 LTI Models2-16to which MATLAB respondsa = x1 x2 x1 0 1.00000 x2 –5.00000

Pagina 558 - 11parallel

sminreal11-210all of the states of sys, including those of sys2 are retained. To eliminate theunobservable states fromsys2, while retaining the states

Pagina 559

ss11-21111ssPurpose Specify state-space models or convert an LTI model to state spaceSyntax sys = ss(a,b,c,d)sys = ss(a,b,c,d,Ts)sys = ss(d)sys = ss(a

Pagina 560 - Syntax K = place(A,B,p)

ss11-212with sample time Ts (in seconds). Set Ts = –1 or Ts = [] to lea ve t he sampletime unspecified.sys = ss(d) specif ies a stat ic g ain ma trix

Pagina 561

ss11-213Examples Example 1The commandsys = ss(A,B,C,D,0.05,'statename',{'position' 'velocity'},...'inputname',

Pagina 562

ss11-214The resulting state-space model order has order three, t he minimum numberof states needed to represent H(s).ThiscanbeseendirectlybyfactoringH

Pagina 563 - Syntax pzmap(sys)

ss2ss11-21511ss2ssPurpose State coordinate transformation for state-space modelsSyntax sysT = ss2ss(sys,T)Description Given a state-space model sys wi

Pagina 564 - Imag Axis

ssbal11-21611ssbalPurpose Balance state-space models using a diagonal similarity transformationSyntax [sysb,T] = ssbal(sys)[sysb,T] = ssbal(sys,condT)

Pagina 565

ssbal11-217Balance this model with ssbal by typingssbal(sys)a = x1 x2 x3 x1 1

Pagina 566 - Syntax rsys = reg(sys,K,L)

ssdata11-21811ssdataPurpose Quick access to state-space model dataSyntax [a,b,c,d] = ssdata(sys)[a,b,c,d,Ts] = ssdata(sys)Description [a,b,c,d] = ssda

Pagina 567

stack11-21911stackPurpose Build an LTI array b y stacking LTI models or LTI arrays along arraydimensions of an LTI arraySyntax sys = stack(arraydim,sy

Pagina 568

Creating LTI Models2-17it is often desirable to work with the descriptor form when the matrix ispoorly conditioned with respect to inversion.The funct

Pagina 569 - Example sys = rss(4,1,1,2,3);

step11-22011stepPurpose Step response of LTI systemsSyntax step(sys)step(sys,t)step(sys1,sys2,...,sysN)step(sys1,sys2,...,sysN,t)step(sys1,'PlotS

Pagina 570 - 11rlocfind

step11-221All systems must have the same number of inputs and outputs b ut mayotherwise be a mix of continuous- and discrete-time systems. This syntax

Pagina 571

step11-222a = [–0.5572 –0.7814;0.7814 0];b = [1 –1;0 2];c = [1.9691 6.4493];sys = ss(a,b,c,0);step(sys)The l eft plot shows the step response of t

Pagina 572 - Syntax rlocus(sys)

step11-223Algorithm Continuous-time models are converted to state space and discretized usingzero-order hold on the inputs. The sampling period is cho

Pagina 573

tf11-22411tfPurpose Specify transfer functions or convert LTI model to transfer function formSyntax sys = tf(num,den)sys = tf(num,den,Ts)sys = tf(M)sy

Pagina 574

tf11-225If all SISO entries of a MIMO transfer function have the same denominator,you can setden to the row vector representation of this common denom

Pagina 575 - Syntax rltool

tf11-226• s = tf('s') to specify a TF model using a rational function in the Laplacevariable,s.•z = tf('z',Ts) to specify a TF mod

Pagina 576

tf11-227To do this, typenum = {[1 1] ; 1}den = {[1 2 2] ; [1 0]}H = tf(num,den,'inputn','current',...'outputn',{'to

Pagina 577

tf11-228with common denominator and sample time of 0.2 seconds.nums = {1 [1 0];[–1 2] 3}Ts = 0.2H = tf(nums,[1 0.3],Ts) % Note: row vector for common

Pagina 578 - F and H

tf11-229engineers use the variable a nd order the numerator and denominator termsin descending powers of , for example,The polynomials and are then sp

Pagina 579 - Syntax sys = rss(n)

2 LTI Models2-18Here is the input frequency of each sinusoid, i = 1 ... n,andG(w)=. The steady state output response of this system satisfiesA frequen

Pagina 580

tf11-230uses the DSP convention and createsSee alsofilt for direct specification of discrete transfer functions using theDSP convention.Note thattf st

Pagina 581 - 11series

tfdata11-23111tfdataPurpose Quick access to transfer function dataSyntax [num,den] = tfdata(sys)[num,den] = tfdata(sys,'v')[num,den,Ts] = tf

Pagina 582

tfdata11-232you can extract the numerator and denominator coefficients by ty ping[num,den] = tfdata(h,'v')num = 0 1 1 den =

Pagina 583

tfdata11-233tf Specify transfer functionszpkdata Quick access to zero-pole-gain data

Pagina 584 - Property

totaldelay11-23411totaldelayPurpose Return the total combined I/O delays for an LTI modelSyntax td = totaldelay(sys)Description td = totaldelay(sys) r

Pagina 585

zero11-23511zeroPurpose Transmission zeros of LTI modelsSyntax z = zero(sys)[z,gain] = zero(sys)Description zero computesthe zeros of SISO systems and

Pagina 586

zgrid11-23611zgridPurpose Generate a z-plane grid of constant damping factors and nat ural frequenciesSyntax zgridzgrid(z,wn)Description zgrid generat

Pagina 587

zgrid11-237To see t he z -plane grid o n the root locus plot, typerlocus(H)zgridaxis('square')Limitations zgrid plots the grid over the curr

Pagina 588

zpk11-23811zpkPurpose Specify zero-pole-gain models or convert LTI model to zero-pole-gain formSyntax sys = zpk(z,p,k)sys = zpk(z,p,k,Ts)sys = zpk(M)s

Pagina 589

zpk11-239• s = zpk('s') to specify a ZPK model from a rational transfer function of theLaplace variable,s.•z = zpk('z',Ts) to spec

Pagina 590 - Syntax sgrid

Creating LTI Models2-19For example, the MAT-file LTIexamples.mat contains a frequency vector freq,and a corresponding complex frequency response data

Pagina 591

zpk11-240Each pair specifies a particular LTI property of the model, for example, theinput names or the input delay time. Seeset entry and the example

Pagina 592 - Syntax sigma(sys)

zpk11-241Example Example 1Specify the following zero-pole-gain model.To do this, typez = {[] ; –0.5}p = {0.3 ; [0.1+i 0.1–i]}k = [1 ; 2]H = zpk(z,p,k,

Pagina 593

zpk11-242Example 3Create a discrete- time ZPK model from a rational expression in the variable z,by typingz = zpk('z',0.1); H = (z+.1)*(z+.2

Pagina 594

zpkdata11-24311zpkdataPurpose Quick access to zero-pole-gain dataSyntax [z,p,k] = zpkdata(sys)[z,p,k] = zpkdata(sys,'v')[z,p,k,Ts,Td] = zpkd

Pagina 595

zpkdata11-244Example Given a zero-pole-gain model with two outputs and one inputH = zpk({[0];[–0.5]},{[0.3];[0.1+i 0.1–i]},[1;2],–1)Zero/pole/gain fro

Pagina 596 - Nyquist plot

zpkdata11-245See Also get Get properties of LTI modelsssdata Quick access to state-space datatfdata Quick access to transfer function datazpk Specify

Pagina 598 - Test if LTI model is SISO

I-1IndexAacker 11-11addition of LTI models 3-11scalar 3-12adjoint.See pertranspositionalgebraic loop 11-76aliasing 5-13analysis modelsspecifying 6-56S

Pagina 599 - Syntax msys = sminreal(sys)

IndexI-2SS model, to 2-42state-space, to 2-44, 11-212TF model, to 2-42ZPK model, to 2-42covar 11-40covarianceerror 9-56, 9-62, 11-110noise 7-9, 11-110

Pagina 600

IndexI-3control design 9-20equivalent continuous poles 11-52frequency 5-13, 11-23Kalman estimator 9-50, 11-108random 11-62resampling 3-27See also LTI

Pagina 601 - Syntax sys = ss(a,b,c,d)

2 LTI Models2-20Discrete-Time ModelsCreating discrete-time models is very much like creating continuous-timemodels, exce p t that you must als o spe c

Pagina 602 - Conversion to State Space

IndexI-4Nyquist 5-13, 11-23range 5-12frequency response 2-18, 5-11at single frequency (evalfr) 11-72Bode plot 11-19customized plots 5-17discrete-time

Pagina 603

IndexI-5square wave 11-87input point block 6-56See also Simulink LTI ViewerInputDelay. See delaysInputGroup 2-26, 2-27conflicts, naming 3-4See also I/

Pagina 604

IndexI-6extracting subsystems 4-21indexing into 4-20interconnection functions 4-25LTI Viewer, model selector 6-28, 6-31model d imensions 4-7operations

Pagina 605 - Syntax sysT = ss2ss(sys,T)

IndexI-7model-specific properties 2-28online help (ltiprops)2-26property names 2-26, 2-30, 11-89, 11-193property values 2-26, 2-31, 11-89, 11-193setti

Pagina 606 - Syntax [sysb,T] = ssbal(sys)

IndexI-8multiplication 3-13scalar 3-13multiselection of items in a window 6-11Nnatural fr equency 11-52ndims 11-146ngrid 11-147Nicholschart 11-147plot

Pagina 607

IndexI-9See also I/O, groupsOutputName 2-34conflicts, naming 3-4See also I/O, namesovershoot 5-9Ppade 11-164Padé approximation (pade) 2 -55, 11-164par

Pagina 608 - 11ssdata

IndexI-10See also LTI Viewerresponse preferences, setting 6-40response, I/O 3-5Riccati equation 7-9continuous (care) 11-29discrete (dare) 11-54for LQG

Pagina 609

IndexI-11analysis models 6-50clearing 6-53open and closed loop 6-56saving 6-65specifying 6-53, 6-56input point blocks 6-53linearizing models 6-53, 6-6

Pagina 610 - Syntax step(sys)

IndexI-12tfdataoutput, form of 2-24time delays.See delaystime response 5-9customized plots 5-17final time 5-10, 11-94impulse response (impulse) 11-94i

Pagina 611

IndexI-13pole-zero map 11-173property 2-28transmission 11-235zoomingLTI Viewer 6-12Root Locus Design GUI 8-15zpk 2-12, 11-238ZPK objects.See zero-pole

Pagina 612

Creating LTI Models2-21producesTransfer function:z – 0.2-------z + 0.3 Sampling time: unspecifiedNote: Do no t simply omit Ts in this case . This wou

Pagina 613

2 LTI Models2-22Similarly,z = zpk('z', 0.1);H = [z/(z+0.1)/(z+0.2) ; (z^2+0.2*z+0.1)/(z^2+0.2*z+0.01)]produces the single-input, two-output

Pagina 614 - Syntax sys = tf(num,den)

Creating LTI Models2-23produces the transfer functionwhich differs from by a factor .To avoid such convention clashes, the Control System Toolbox offe

Pagina 615

2 LTI Models2-24Data RetrievalThe functions tf, zpk, ss,andfrd pack the model data and sample time in asingleLTI object.Conversely,thefollowingcommand

Pagina 616

Creating LTI Models2-25displays the coefficients of the numerator and denominator of the first inputchannel.ans = 0 1 –1ans = 1 2

Pagina 617

vResampling of Discrete-Time Models ... 3-27References ... 3-284Arrays of LTI ModelsIntroductio

Pagina 618 - Conventions

2 LTI Models2-26LTI PropertiesThe previous s ection shows how to create LTI objects that encapsulate themodel data and sample time. You also have the

Pagina 619

LTI Properties2-27ThesampletimepropertyTs keeps track of the sample time (in seconds) ofdiscrete-time systems. By convention,Ts is 0 (zero) for contin

Pagina 620

2 LTI Models2-28Model-Specific PropertiesThe remaining LTI properties are specific to one of the four model types (TF,ZPK, SS, or FRD). For single LTI

Pagina 621 - 11tfdata

LTI Properties2-29Most of these properties are dedicated to storing the model data. Note that thematrix is set to[] (the empty matrix) for standard st

Pagina 622

2 LTI Models2-30Setting LTI PropertiesThere are three ways to specify LTI property values:• You can set properties when creating LTI models withtf, zp

Pagina 623 - Specify transfer functions

LTI Properties2-31For example, you can specify the delay directly when you create the model, andthen use theset command to assign InputName, OutputNam

Pagina 624 - Syntax td = totaldelay(sys)

2 LTI Models2-32where the string PropertyName is ei ther the full pr o pe r ty name, or a nyabbreviatio n wi th enoug h charact ers to i denti fy the

Pagina 625

LTI Properties2-33Direct Property ReferencingAn alternative way t o q uery /mo d ify pro p ert y values is by s tructure- lik ereferencing. Recall t h

Pagina 626 - Syntax zgrid

2 LTI Models2-34prod ucesans = 'u'Any valid syntax for structures extends to LTI objects. For example, given theTF modelh = tf(1,[1,0],&

Pagina 627

LTI Properties2-35This sets the Ts property to the v alue 0.5, as is confirmed byh.Tsans = 0.5000Forcontinuous-timemodels,thesampletimepropertyTs i

Pagina 628 - Syntax sys = zpk(z,p,k)

vi ContentsDimensionRequirements ... 4-27SpecialCasesforOperationsonLTIArrays ... 4-27Examples of Operations on L

Pagina 629

2 LTI Models2-36Note thattf(0.1,[1 –1],0.1) + tf(1,[1 0.5],0.5)returns an error message.??? Error using ==> lti/plusIn SYS1+SYS2, both models must

Pagina 630 - Selection

LTI Properties2-37This producesTransfer function from input "thrust" to output "velocity": 1------p + 10Note how the display refl

Pagina 631 - Example Example 1

2 LTI Models2-38To see how input and output groups (I/O groups) work:1 Create a random state-space model with one state, three inputs, and threeoutput

Pagina 632

LTI Properties2-39To do this, typeh = rss(1,3,3);set(h, 'InputGroup',{[1 2] 'controls'})set(h, 'OutputGroup', {[1] &apos

Pagina 633 - Syntax [z,p,k] = zpkdata(sys)

2 LTI Models2-40Notice that the middle column of the I/O group listing indicates whether thegroupisaninputgroup(I)oranoutputgroup(O).In general, to sp

Pagina 634

LTI Properties2-41You can use regular cell array syntax for accessing or modifying I/O groupcomponents. For example, to delete the first output group,

Pagina 635 - Specify zero-pole-gain models

2 LTI Models2-42Model ConversionThere are four LTI model types you can use with the Control System Toolbox:TF,ZPK,SS,andFRD.Thissection shows how toco

Pagina 636

Model Conversion2-43for continu ous-time models, andfor discret e-time models.Automatic Conversion Some algorithms operate only on one type of LTI mod

Pagina 637

2 LTI Models2-44balancing automatically when you convert any TF or ZPK model to statespace u s in gss.• Conversions to the transfer function represent

Pagina 638 - See state-space models

Time Delays2-45Time DelaysUsing the ioDelayMatrix, InputDelay,andOutputDelay properties of LTIobjects,youcanspecifydelaysinbothcontinuous-anddiscrete-

Pagina 639 - See time response

viiDisplayingResponseCharacteristicsonaPlot ... 6-9ImportingModels... 6-11Zooming ...

Pagina 640 - See also InputName

2 LTI Models2-46• Interconnections of continuous-time delay systems as long a s the resultingtransfer function from input to output is of t he formwhe

Pagina 641 - See delay

Time Delays2-47This creates the LTI model with the following transfer function.Here is the entry ofNote: State-space models with I/O delays have only

Pagina 642 - See LTI properties

2 LTI Models2-48Figure 2-3: Distillation ColumnSchematica lly, t he dis tillat io n p rocess functions as follo ws:• Stea m flow s into the reb oil e

Pagina 643 - See Simulink LTI Viewer

Time Delays2-49The regulated output variabl es are:• Percentage of methanol in the distillate• Percentage of methanol in the bottom products.The goal

Pagina 644 - See also OutputName

2 LTI Models2-50The resulti ng T F mod e l i s dis play ed asTransfer function from input "R" to output... 12.8 Xd: exp

Pagina 645

Time Delays2-51Note that the 0.1 second delay is on the input in the first model, and on theoutput in the second model.InputDelay and OutputDelay Prop

Pagina 646

2 LTI Models2-52The resulting model is displayed asTransfer function from input to output... 1 #1: exp(–0.1*s) * -

Pagina 647 - See transfer functions

Time Delays2-53produces the discrete-time transfer functionTransfer function: 1z^(–3) * ----------------- z^2 + 0.5 z + 0.2 Sa

Pagina 648 - See also noise

2 LTI Models2-54absorbs the input delay in H1 int o thetransfer functiondenom inatorto producethe third -ord e r tra nsf er functionTransfer function:

Pagina 649

Time Delays2-55channel delays. The resulting model has a minimum number of delays. Whenthis minimization takes place:• All orpartof theI/O delaymatrix

Comentarios a estos manuales

Sin comentarios