National Instruments Xmath manual

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

Go to page of

A good user manual

The rules should oblige the seller to give the purchaser an operating instrucion of National Instruments Xmath, along with an item. The lack of an instruction or false information given to customer shall constitute grounds to apply for a complaint because of nonconformity of goods with the contract. In accordance with the law, a customer can receive an instruction in non-paper form; lately graphic and electronic forms of the manuals, as well as instructional videos have been majorly used. A necessary precondition for this is the unmistakable, legible character of an instruction.

What is an instruction?

The term originates from the Latin word „instructio”, which means organizing. Therefore, in an instruction of National Instruments Xmath one could find a process description. An instruction's purpose is to teach, to ease the start-up and an item's use or performance of certain activities. An instruction is a compilation of information about an item/a service, it is a clue.

Unfortunately, only a few customers devote their time to read an instruction of National Instruments Xmath. A good user manual introduces us to a number of additional functionalities of the purchased item, and also helps us to avoid the formation of most of the defects.

What should a perfect user manual contain?

First and foremost, an user manual of National Instruments Xmath should contain:
- informations concerning technical data of National Instruments Xmath
- name of the manufacturer and a year of construction of the National Instruments Xmath item
- rules of operation, control and maintenance of the National Instruments Xmath item
- safety signs and mark certificates which confirm compatibility with appropriate standards

Why don't we read the manuals?

Usually it results from the lack of time and certainty about functionalities of purchased items. Unfortunately, networking and start-up of National Instruments Xmath alone are not enough. An instruction contains a number of clues concerning respective functionalities, safety rules, maintenance methods (what means should be used), eventual defects of National Instruments Xmath, and methods of problem resolution. Eventually, when one still can't find the answer to his problems, he will be directed to the National Instruments service. Lately animated manuals and instructional videos are quite popular among customers. These kinds of user manuals are effective; they assure that a customer will familiarize himself with the whole material, and won't skip complicated, technical information of National Instruments Xmath.

Why one should read the manuals?

It is mostly in the manuals where we will find the details concerning construction and possibility of the National Instruments Xmath item, and its use of respective accessory, as well as information concerning all the functions and facilities.

After a successful purchase of an item one should find a moment and get to know with every part of an instruction. Currently the manuals are carefully prearranged and translated, so they could be fully understood by its users. The manuals will serve as an informational aid.

Table of contents for the manual

  • Page 1

    NI MA TRIXx TM Xmath TM Model Reduction Module Xmath Model Reduction Module April 2007 370755C-01[...]

  • Page 2

    Support Worldwide Technical Support and Product Info rmation ni.com National Instruments Corporate Headquarters 11500 North Mopac Expressway Aust in, Texas 78759-3504 USA Tel: 512 683 0100 Worldwide Offices Australia 1800 300 800, Austria 43 662 457990-0, Belgium 32 (0) 2 757 0020, Brazil 55 11 3262 3599, Canada 800 433 3488, China 86 21 5050 9800,[...]

  • Page 3

    Important Information Warranty The media on which you receive National In struments software are warranted not t o fail to execute p rogramm ing i nstru ction s, due to defects in materials and workmanship, for a period of 90 days from date of shipment, as eviden ced by receipt s or other documentation. N ational Instruments will , at i ts opt ion,[...]

  • Page 4

    Conventions The follo wing con ventions are used in this manual: [ ] Square brackets enclose op ti onal items—for example, [ response ]. Square brackets also cite bibliographic references. » The » symbol leads you th rough nested menu items and dialog bo x options to a final action. The sequence File»Page Setup»Options directs you to pull dow[...]

  • Page 5

    © National Instruments Corporatio n v Xmath Model Reducti on Module Contents Chapter 1 Introduction Using This Manual...................... .. .......................... ......................... .......................... .... 1-1 Document Organization........... ... ......................... .......................... .................. 1-1 Bibl[...]

  • Page 6

    Contents Xmath Model Reduction Module vi ni.com Onepass Algorithm .................. ......................... .......................... .................... 2-18 Multipass Algorithm . .............. .............. .......................... ......................... ...... 2-20 Discrete-Time Systems .... ......................... ................[...]

  • Page 7

    Contents © National Instruments Corporatio n vii Xmath Model Reducti o n Module fracred( ) .................... ......................... ......................... .......................... ...................... .. 4-15 Restrictions ..................... .......................... ......................... .......................... .... 4-15 De[...]

  • Page 8

    © National Instruments Corporatio n 1-1 Xmath Model Reducti o n Module 1 Introduction This chapter starts with an outline of the manual an d some useful notes. It also provides an overview of the Model Reduction Module, describes the functions in this module, and introduces no mencl ature and concepts used throughout this manual. Using This Manual[...]

  • Page 9

    Chapter 1 Introduction Xmath Model Reducti on Module 1-2 ni.com • Chapter 5, Utilities , describes three utilit y fun ctions: hankelsv( ) , stable( ) , and compare( ) . • Chapter 6, Tutorial , illustrates a number of the MRM functions and their underlying ideas. Bibliographic References Throughout this document, biblio graphic references are ci[...]

  • Page 10

    Chapter 1 Introduction © National Instruments Corporatio n 1-3 Xmath Model Reducti o n Module Related Publications For a complete list of MATRIXx publications, refer to C hapter 2, MATRIXx Publications, Onlin e Help, and Customer Support , of the MATRIXx Getting Started Guide. The following documents are particularly useful for topics covered in t[...]

  • Page 11

    Chapter 1 Introduction Xmath Model Reducti on Module 1-4 ni.com As shown in Figure 1-1, functions are provided to handle four broad tasks: • Model reduction w ith additi v e errors • Model reduction with multiplicativ e errors • Model reduction w ith frequency weighting of an additi v e error, including controller reduction • Utility functi[...]

  • Page 12

    Chapter 1 Introduction © National Instruments Corporatio n 1-5 Xmath Model Reducti o n Module Certain restrictions regarding minimality and stabil ity are required of the input data, and are summarized in T able 1-1. Documentation of the individual functions sometimes indicat es ho w the restrictions can be circumvented. Th ere are a number of mod[...]

  • Page 13

    Chapter 1 Introduction Xmath Model Reducti on Module 1-6 ni.com • L 2 approximation, in which the L 2 norm of impulse response error (or, by P ar se val’ s theorem, the L 2 norm of the transfer -function error along the imaginary axis) serves as the error measure • Markov parameter or impulse response matching, mo men t matching, cov ariance [...]

  • Page 14

    Chapter 1 Introduction © National Instruments Corporatio n 1-7 Xmath Model Reducti o n Module • An inequality or bound is tight if it can be met in practice, for example is tight because the inequali ty becomes an equality for x =1 . A g a i n , if F ( j ω ) denotes the Fourier transform of some , the Heisenberg inequality states, and the bound[...]

  • Page 15

    Chapter 1 Introduction Xmath Model Reducti on Module 1-8 ni.com • The controllability grammian is also E [ x ( t ) x ′ ( t )] when the system has been excited from time – ∞ b y zero mean white noise with . • The observability grammian can be thought of as measuring the information contained in the output concerning an initial state. If wi[...]

  • Page 16

    Chapter 1 Introduction © National Instruments Corporatio n 1-9 Xmath Model Reducti o n Module • Suppose the transfer-function matr ix corresponds to a di screte-time system, with state variable dimension n . Then the inf inite Hankel matrix, has for its singular values the n nonzero Hankel singular values, together with an infinite number of zer[...]

  • Page 17

    Chapter 1 Introduction Xmath Model Reduction Module 1-10 ni.com Internally Balanc ed Realizations Suppose that a reali zation of a transfer-function matrix has the controllability an d observability grammian p roperty that P = Q = Σ for some diagonal Σ . Then the realization is term ed internally balanced. Notice that the diagonal entries σ i of[...]

  • Page 18

    Chapter 1 Introduction © National Instruments Corporatio n 1-11 Xmath Mod el Reduction Module This is almost the algorithm set out in Section II of [LHPW87]. Th e one difference (and it is minor) is that in [LHPW87], lower triangular Cholesky factors of P and Q are used, in place of U c S c 1/2 and U O S O 1/ 2 in forming H in step 2. The grammian[...]

  • Page 19

    Chapter 1 Introduction Xmath Model Reduction Module 1-12 ni.com and also: Re λ i ( A 22 )<0 and . Usually , we expect that, in the sense that the intuitiv e argument hinges on this, but it is not necessary . Then a singular perturbation is obtained by replacing by zero; this means that: Accordingly, (1-2) Equation 1-2 may be an approximat ion f[...]

  • Page 20

    Chapter 1 Introduction © National Instruments Corporatio n 1-13 Xmath Mod el Reduction Module Similar considerations gov ern the discrete-time problem, where, can be approximated by: mreduce( ) can carry out singular perturbation. For further discussion, refer to Chapter 2, Additive Error Reduction . If Equation 1-1 is balanced, singular perturbat[...]

  • Page 21

    Chapter 1 Introduction Xmath Model Reduction Module 1-14 ni.com nonnegati ve hermitian for all ω . If Φ is scalar , then Φ ( j ω ) ≥ 0 for all ω . Normally one restricts attention to Φ (·) with lim ω→∞ Φ ( j ω )< ∞ . A key result is that, giv en a rational, non ne gativ e hermit ian Φ ( j ω ) with lim ω→∞ Φ ( j ω )<[...]

  • Page 22

    Chapter 1 Introduction © National Instruments Corporatio n 1-15 Xmath Mod el Reduction Module Low Order Controller Design Through Order Reduction The Model Reduction Module is particularly suitab le for achieving low order controller design for a high order plant. This section explai ns some of the broad issues involved. Most modern controller des[...]

  • Page 23

    Chapter 1 Introduction Xmath Model Reduction Module 1-16 ni.com multiplicative reduction, as described in Chapter 4, Frequency-Weighted Error Reduction , is a sound approach. Chapt er 3, Multiplicative Error Reduction , and Chapter 4, Frequency-Weighted Error Reduction , develop these arguments more fully .[...]

  • Page 24

    © National Instruments Corporatio n 2-1 Xmath Model Reducti o n Module 2 Additive Error Reduction This chapter describes additive error reductio n including discussions of truncation of, reduction by, and pert urbation of balanced realizations. Introduction Additive error reductio n focuses on errors of the form, where G is the originally giv en t[...]

  • Page 25

    Chapter 2 Additive Er ror Reduction Xmath Model Reducti on Module 2-2 ni.com T runcation of Balanced Realizations A group of functions can be used to achieve a reduction through truncation of a balanced realization. This m eans that if the original system is (2-1) and the realization is internally bala nced, then a truncation is provided by The fun[...]

  • Page 26

    Chapter 2 Additive Error Reduction © National Instruments Corporatio n 2-3 Xmath Model Reducti o n Module A very attracti ve feature of the truncation procedure is the av ail ability of an erro r bou nd. More precisely , s uppose that the contro llability and observability grammians for [Enn84] are (2-2) with the diagonal entri es of Σ in decreas[...]

  • Page 27

    Chapter 2 Additive Er ror Reduction Xmath Model Reducti on Module 2-4 ni.com proper . So, e v en if all zeros are uns table, the maximum phase shift when ω mov es from 0 to ∞ i s ( 2 n–3 ) π /2. It fo llo w s that if G ( j ω ) rem ains large in magnitude at frequencies when the phase shift has moved past (2n – 3) π /2, approximation of G [...]

  • Page 28

    Chapter 2 Additive Error Reduction © National Instruments Corporatio n 2-5 Xmath Model Reducti o n Module order model is not one in general obtainable by truncation of an internally-balanced realizatio n of the full order model. Figure 2-1 sets out sev eral routes to a reduced-order realization. In continuous time, a truncati on of a bala nced rea[...]

  • Page 29

    Chapter 2 Additive Er ror Reduction Xmath Model Reducti on Module 2-6 ni.com with controllability and observability grammians given b y , in which the diagonal entri es of Σ are in decreasing order , that is, σ 1 ≥σ 2 ≥ ···, and such that the last diagonal entry of Σ 1 exceeds the first diagonal entry of Σ 2 . It turns out that Re λ i [...]

  • Page 30

    Chapter 2 Additive Error Reduction © National Instruments Corporatio n 2-7 Xmath Model Reducti o n Module function matrix. Con si der th e way th e associated impulse response maps inputs d efin ed ov er (– ∞ ,0] in L 2 into outputs, and focus on the output ov er [0, ∞ ). Define the input as u ( t ) for t < 0, and set v ( t )= u (– t ).[...]

  • Page 31

    Chapter 2 Additive Er ror Reduction Xmath Model Reducti on Module 2-8 ni.com Further , the which is optimal for Hankel norm approximation also is optimal for this second type of approximat ion . In Xmath Hankel norm approximation is achieved with ophank( ) . The most comprehensive reference is [Glo84]. balmoore( ) [SysR,HSV,T] = balmoore(Sys, {nsr,[...]

  • Page 32

    Chapter 2 Additive Error Reduction © National Instruments Corporatio n 2-9 Xmath Model Reducti o n Module of the balanced system occurs, (assuming nsr is less than the number of states). Thus, if the state-space repr esentation of the balanced system is with A 11 possessing dimension nsr × nsr , B 1 poss essing nsr ro ws and C 1 possessing nsr co[...]

  • Page 33

    Chapter 2 Additive Er ror Reduction Xmath Model Reduction Module 2-10 ni.com The actual approximation error for discrete systems als o depends on frequency , and can be large at ω = 0. The error bound is almost n e ver tight, that is, the actual error magnitude as a function of ω almost ne ver attains the error bound, so that the bound can only b[...]

  • Page 34

    Chapter 2 Additive Error Reduction © National Instruments Corporatio n 2-11 Xmath Mod el Reduction Module Related Functions balance() , truncate() , redschur() , mreduce() truncate( ) SysR = truncate(Sys,nsr,{VD, VA}) The truncate( ) function reduces a system Sys b y r etaining the first nsr states and throwing aw ay th e rest to form a system Sys[...]

  • Page 35

    Chapter 2 Additive Er ror Reduction Xmath Model Reduction Module 2-12 ni.com redschur( ) [SysR,HSV,slbig,srbig,VD,VA] = redschur(Sys,{nsr,bound}) The redschur( ) function uses a Schur method (from Safonov and Chiang) to calculate a reduced version of a continuous or discrete system without balancing. Algorithm The objective of redschur( ) i s t h e[...]

  • Page 36

    Chapter 2 Additive Error Reduction © National Instruments Corporatio n 2-13 Xmath Mod el Reduction Module Next, Schur decompositions of W c W o are formed with the eigen v alues of W c W o in ascending and descending order . These eigen values are the square of the Hankel singular v alues of Sys , and if Sys is nonminimal, some can be zero. The ma[...]

  • Page 37

    Chapter 2 Additive Er ror Reduction Xmath Model Reduction Module 2-14 ni.com For the discrete-time case: When {bound} is specif ied, the error bound ju st enunciated is used to choose the number of states in SysR so that the bound is satisfied and nsr is as small as possible. If the desired error bound is smaller than 2 σ ns , no reduction is made[...]

  • Page 38

    Chapter 2 Additive Error Reduction © National Instruments Corporatio n 2-15 Xmath Mod el Reduction Module Algorithm The algorithm does the fo llowing. The system Sys and the reduced order system SysR are stable; the system SysU has all its poles in Re [ s ] > 0. If the transfer function matrices are G ( s ), G r ( s ) and G u ( s ) then: • G [...]

  • Page 39

    Chapter 2 Additive Er ror Reduction Xmath Model Reduction Module 2-16 ni.com By abuse of notation, when we say that G is reduced to a certain order , this corresponds to the order of G r ( s ) alone; the unstable part of G u ( s ) of the approximation is most frequent ly thro wn a w ay . The number of eliminated states (retaining G u ) refers to: ([...]

  • Page 40

    Chapter 2 Additive Error Reduction © National Instruments Corporatio n 2-17 Xmath Mod el Reduction Module Thus, the penalty for not being allowed to include G u in the approximati on is an increase in the error bound, by σ n i + 1 + ... + σ ns . A number of theoretical dev elopments hinge on boun ding the Hankel singular values of G r ( s ) and [...]

  • Page 41

    Chapter 2 Additive Er ror Reduction Xmath Model Reduction Module 2-18 ni.com being approximated by a stable G r ( s ) with the actual error (as opposed to just the error bou nd) satisfying: Note G r is optimal, that is, there is no other G r achieving a lower boun d. Onepass Algorithm The first steps of the algorithm are to obtain the Hankel singul[...]

  • Page 42

    Chapter 2 Additive Error Reduction © National Instruments Corporatio n 2-19 Xmath Mod el Reduction Module and finally: These four matrices are the constitu ents of the system matr ix of , where: Digression: This choice is related to the ideas of [Glo84 ] in th e following way; in [Glo84], the complete set is identified of satisfying with having a [...]

  • Page 43

    Chapter 2 Additive Er ror Reduction Xmath Model Reduction Module 2-20 ni.com to choose the D matrix of G r ( s ), by splitting between G r ( s ) and G u ( s ). This is done by using a separate function ophiter( ) . Suppose G u ( s ) is the unstable output of stable( ) , and let K ( s )= G u (– s ). By applying the multipass Hankel reduction algor[...]

  • Page 44

    Chapter 2 Additive Error Reduction © National Instruments Corporatio n 2-21 Xmath Mod el Reduction Module 2. Find a stable order ns – 2 approximation G ns –2 of G ns –1 ( s ), with 3. (Step ns–nr) : Find a stable order nsr approximation of G nsr +1 , with Then, because for , for , ..., this being a property of the algorithm, there follows:[...]

  • Page 45

    Chapter 2 Additive Er ror Reduction Xmath Model Reduction Module 2-22 ni.com We u s e sysZ to denote G(z) and def ine: bilinsys=makepoly([-1,a]/mak epoly([1,a]) as the mapping from the z-domain to th e s-domain. The specification is rev ersed because this function uses backward polynomial rotation. Hankel norm reduction is then applied to H(s) , to[...]

  • Page 46

    Chapter 2 Additive Error Reduction © National Instruments Corporatio n 2-23 Xmath Mod el Reduction Module It follows b y a result of [ BoD87 ] that the impulse response error for t >0 satisfies: Evidently , Hankel norm approximation ensures som e form of approximation of the impulse response too. Unstable System Approximation A transfer functio[...]

  • Page 47

    © National Instruments Corporatio n 3-1 Xmath Model Reducti o n Module 3 Multiplicative Error Reduction This chapter describes multipl i cative error reduction presenting two reasons to consider m ultiplicative rather th an additive error reduction, one general and one specific. Selecting Multiplicative Error Reduction The general reason to use mu[...]

  • Page 48

    Chapter 3 Multiplicative Error Re duction Xmath Model Reducti on Module 3-2 ni.com Multiplicative Robustness Result Suppose C stabilizes , that has no j ω -axis poles, and that G has the same number of poles in Re [ s ] ≥ 0 as . If for all ω, (3-1) then C stabilizes G . This result indicates that if a controller C is designed to stabilize a nom[...]

  • Page 49

    Chapter 3 Multiplicative Error R eduction © National Instruments Corporatio n 3-3 Xmath Model Reducti o n Module bandwidth at the expense of being larger outside this bandwidth, which would be preferable. Second, the previously used mu ltiplicati ve error is . In the algorithms t hat follo w , the er ror appears. It is easy to check that: and This[...]

  • Page 50

    Chapter 3 Multiplicative Error Re duction Xmath Model Reducti on Module 3-4 ni.com The objecti ve of the algorit hm is to approximate a high-order stable transfer function matrix G ( s ) by a lower -order G r ( s ) with either inv(g)(g -gr) or (g-gr)inv(g) minimized, under the condition that G r is stable and of the prescribed order . Restrictions [...]

  • Page 51

    Chapter 3 Multiplicative Error R eduction © National Instruments Corporatio n 3-5 Xmath Model Reducti o n Module These cases are secured with the ke ywords right and left , respecti vely . If the wrong option is req uested for a nonsquare G ( s ), an error message will result. The algorithm has the property that right half plane zeros of G ( s ) r[...]

  • Page 52

    Chapter 3 Multiplicative Error Re duction Xmath Model Reducti on Module 3-6 ni.com 2. W ith G ( s )= D + C ( sI – A ) –1 B and stable, with DD ´ nonsingular and G ( j ω ) G '(– j ω ) nonsingular for all ω , part of a state va riable realization of a minimum phase stable W ( s ) is determined such that W´(–s)W(s) = G(s)G´(–s) wi[...]

  • Page 53

    Chapter 3 Multiplicative Error R eduction © National Instruments Corporatio n 3-7 Xmath Model Reducti o n Module strictly proper stable part of θ ( s ), as the square roots of the eigen v alues of PQ . Call these quantities ν i . The Schur decompositions are, where V A , V D are orthogonal and S as c , S des are upper triangular . 4. Def ine sub[...]

  • Page 54

    Chapter 3 Multiplicative Error Re duction Xmath Model Reducti on Module 3-8 ni.com state-v ariable representation of G . In this case, the user is ef fectively asking for G r = G . When the phase matrix has repeated Hankel singul ar v alues, they must all be included or all excluded from the model, that is, ν nsr = ν nsr + 1 is not permitted; the[...]

  • Page 55

    Chapter 3 Multiplicative Error R eduction © National Instruments Corporatio n 3-9 Xmath Model Reducti o n Module Hankel Singular V alues of Phase Matrix of G r The ν i , i = 1,2,..., ns have been termed above the Hankel singular values of the phase matrix associated with G . The corresponding quantities for G r are ν i , i = 1,..., nsr . Further[...]

  • Page 56

    Chapter 3 Multiplicative Error Re duction Xmath Model Reduction Module 3-10 ni.com which also can be relev ant in finding a reduced order model of a plant. The procedure requires G again to be nonsingu lar at ω = ∞ , and to have no j ω -axis poles. It is as follo ws: 1. F orm H = G –1 . If G is described b y state- variable matrices A , B , C[...]

  • Page 57

    Chapter 3 Multiplicative Error R eduction © National Instruments Corporatio n 3-11 Xmath Mod el Reduction Module The values of G ( s ), as shown in Figure 3-2, along the j ω -axis are the same as the v alues of around a circle with diameter defi ned by [ a – j 0, b –1 + j 0] on the positi ve real axis. Figure 3-2. Bilinear Mapping from G ( s [...]

  • Page 58

    Chapter 3 Multiplicative Error Re duction Xmath Model Reduction Module 3-12 ni.com Any zero (or rank reduction) on the j ω -axis o f G ( s ) becomes a zero (or rank reduction) in Re [ s ] > 0 of , and if G ( s ) has a zero (or rank reduction) at infinity , this is shifted to a zero (o r rank reduction) of at the point b –1 , (in Re [ s ] >[...]

  • Page 59

    Chapter 3 Multiplicative Error R eduction © National Instruments Corporatio n 3-13 Xmath Mod el Reduction Module again with a bilinear transf ormation to s ecure multiplicativ e approximations over a limited frequency band. Suppose that Create a system that corresponds to with: gtildesys=subs(gsys,(makep([ -eps,1])/makep([1,-])) bilinsys=makep([ep[...]

  • Page 60

    Chapter 3 Multiplicative Error Re duction Xmath Model Reduction Module 3-14 ni.com There is one potential source of fa ilure of the algorithm. Because G ( s ) is stable, certainly will be, as its pol es will be in the left half plane circle on diameter . If acquires a pole outside this circle (but still in the left ha lf pl ane of course)— and th[...]

  • Page 61

    Chapter 3 Multiplicative Error R eduction © National Instruments Corporatio n 3-15 Xmath Mod el Reduction Module The conceptual basis of the algorithm can best be grasped by considering the case of scalar G ( s ) of degree n . Then one can form a minimum phase, stable W ( s ) with | W ( j ω )| 2 = | G ( j ω )| 2 and then an all-pass function (th[...]

  • Page 62

    Chapter 3 Multiplicative Error Re duction Xmath Model Reduction Module 3-16 ni.com eigen v alues of A – B/D * C with the aid of schur( ) . If any real part of the eigenvalues is less than eps , a warning is displayed. Next, a stabilizing solution Q is found for the following Riccati equation: The functio n singriccati( ) is used; failure of the n[...]

  • Page 63

    Chapter 3 Multiplicative Error R eduction © National Instruments Corporatio n 3-17 Xmath Mod el Reduction Module singular values of F ( s ) lar ger than 1– ε (refer to steps 1 through 3 of the Restrictions sect ion). The maximum order permitted is the number of nonzero eigen values of W c W o larger than ε . 4. Let r be the multiplicity of ν [...]

  • Page 64

    Chapter 3 Multiplicative Error Re duction Xmath Model Reduction Module 3-18 ni.com Note The expression is the strictly proper part of . The matrix is all pass; this property is not always secured in the multiv ariable case when ophank( ) is used to find a Hank el norm approximation of F ( s ). 5. The algorithm constructs and , which satisfy , and, [...]

  • Page 65

    Chapter 3 Multiplicative Error R eduction © National Instruments Corporatio n 3-19 Xmath Mod el Reduction Module • and stand in the same relation as W ( s ) and G ( s ), that is: – – W ith , there holds or – W ith there holds or – – is the stable strictly proper part of . • The Hankel singular v alues of (and ) are the first as – r[...]

  • Page 66

    Chapter 3 Multiplicative Error Re duction Xmath Model Reduction Module 3-20 ni.com Error Bounds The error bound form ula (Equation 3-3) is a simple consequence of iterating (Equation 3 -5). To illustrate, suppose there ar e three reductions →→ → , each by degree one. Then, Also, Similarly , Then: The error bound (Equation 3-3 ) is onl y ex ac[...]

  • Page 67

    Chapter 3 Multiplicative Error R eduction © National Instruments Corporatio n 3-21 Xmath Mod el Reduction Module For mulhank( ) , this translates for a scalar system into and The bounds are double for bst( ) . The error as a function of frequency is always zero at ω = ∞ for bst( ) (or at ω = 0 if a transformation s → s –1 is used), whereas[...]

  • Page 68

    Chapter 3 Multiplicative Error Re duction Xmath Model Reduction Module 3-22 ni.com The values of G ( s ) along the j ω -axis are the same as the v alues of around a circle with diameter defined by [ a – j 0, b –1 + j 0] on the positi ve real axis (refer to Figure 3-2 ). Also, the values of along the j ω -axis are the same as the v alues of G [...]

  • Page 69

    Chapter 3 Multiplicative Error R eduction © National Instruments Corporatio n 3-23 Xmath Mod el Reduction Module The error will be ov erbounded by the error , and G r will contain the same zeros in Re [ s ] ≥ 0 as G . If there is no zero (or rank reduction) of G ( s ) at the origin, one can take a =0 a n d b –1 = ban dwid th ov er which a good[...]

  • Page 70

    Chapter 3 Multiplicative Error Re duction Xmath Model Reduction Module 3-24 ni.com Multiplicativ e approxi mation of (along the j ω -axis) corresponds to multiplicative approximation of G ( s ) around a circle in the right half plane, touching t he j ω -axis at the origin. For those points on the j ω -axis near the circle, there will be good mul[...]

  • Page 71

    © National Instruments Corporatio n 4-1 Xmath Model Reducti o n Module 4 Frequency-W eighted Error Reduction This chapter describes frequency-weighted error reduction problems. This includes a discussion of controller red uction and fractional representations. Introduction Frequency-weighted error reducti on m ean s that the error is measured not,[...]

  • Page 72

    Chapter 4 F requency-Weighted Error R eduction Xmath Model Reducti on Module 4-2 ni.com (so that ) is logical. Howe ver , a major use of weighting is in controller reduction, which i s no w described. Controller Reduction Frequency weighted error reduction becomes particularly importan t in reducing controller dim ension. The LQG and design procedu[...]

  • Page 73

    Chapter 4 Frequency-Weig hted Error Re duction © National Instruments Corporatio n 4-3 Xmath Model Reducti o n Module is minimized (and of course is less than 1). Notice that these two error measures are like those of Equation 4- 1 and Equation 4-2. The fact that the plant ought to show up in a good formulation of a controller reduction problem is[...]

  • Page 74

    Chapter 4 F requency-Weighted Error R eduction Xmath Model Reducti on Module 4-4 ni.com Most of these ideas are discussed in [Enn 84], [A nL89], and [AnM89]. The function wtbalance( ) implements weighted red ucti on, w ith f ive choices of error measure, namely E IS , E OS , E M , E MS , and E 1 w ith arbitrary V( j ω ). The f irst four are specif[...]

  • Page 75

    Chapter 4 Frequency-Weig hted Error Re duction © National Instruments Corporatio n 4-5 Xmath Model Reducti o n Module Fractional Representations The treatment of j ω -axis or right half plane poles in the above schemes is crude: they are simply copied into th e reduced order controller. A different approach comes when one uses a so-called matrix [...]

  • Page 76

    Chapter 4 F requency-Weighted Error R eduction Xmath Model Reducti on Module 4-6 ni.com • Form the reduced controller by interconnecting using negativ e feedback the second output of G r to the input , th at is, set Nothing has been said as to how should be cho sen—and the end resul t of the reduction, C r ( s ), depends on . Nor has the reduct[...]

  • Page 77

    Chapter 4 Frequency-Weig hted Error Re duction © National Instruments Corporatio n 4-7 Xmath Model Reducti o n Module Matrix algebra sho ws that C ( s ) can be described through a left or right matrix fraction descript ion with D L , and related values, all stable transfer function matrices. In particular: For matrix C(s), the left and right matri[...]

  • Page 78

    Chapter 4 F requency-Weighted Error R eduction Xmath Model Reducti on Module 4-8 ni.com The left MFD corresponds to the setup of Figure 4-3. Figure 4-3. C( s) Implemente d to Display Lef t MFD Repres entation The setup of Figure 4-2 suggests approximat ion of: whereas that of Figure 4- 3 suggests approximati on of: In the LQG optimal case, the sign[...]

  • Page 79

    Chapter 4 Frequency-Weig hted Error Re duction © National Instruments Corporatio n 4-9 Xmath Model Reducti o n Module Figure 4-4. Redrawn; Individual Signal Paths as Vector Paths It is possible to verify that and accordingly the output weight can be used in an error measure . It turns out that the calculations for frequency weighted balanced trunc[...]

  • Page 80

    Chapter 4 F requency-Weighted Error R eduction Xmath Model Reduction Module 4-10 ni.com (Here, the W i and V i are submatrices of W ,V .) Evidently , Some manipulation shows that trying to preserve these identities after approximation of D L , N L or N R , D R suggests use of the error measures and . For further details, refer to [AnM89] and [LAL90[...]

  • Page 81

    Chapter 4 Frequency-Weig hted Error Re duction © National Instruments Corporatio n 4-11 Xmath Mod el Reduction Module • Reduce the order of a tr ansfer function matrix C ( s ) through frequency-weighted balanced truncation, a stable frequency weight V ( s ) being prescribed. The syntax is more accented tow ards the f irst use. F or the second us[...]

  • Page 82

    Chapter 4 F requency-Weighted Error R eduction Xmath Model Reduction Module 4-12 ni.com This rather crude approach to the handling of the unstable part of a controller is avoided in fracred( ) , which provides an alternati ve to wtbalance( ) for controller reduction, at least for an important family of controllers. Algorithm The major steps of the [...]

  • Page 83

    Chapter 4 Frequency-Weig hted Error Re duction © National Instruments Corporatio n 4-13 Xmath Mod el Reduction Module 3. Compute weighted Hankel Singular V alues σ i (described in more detail later). If the order o f C r ( s ) is not specif ied a pr iori , it must be input at this time. Certain v alues may be flagged as unacceptable for various r[...]

  • Page 84

    Chapter 4 F requency-Weighted Error R eduction Xmath Model Reduction Module 4-14 ni.com and the observ ability grammian Q , defined in the obvious way , is written as It is trivial to v erify that so that Q cc is the observability gramian of C s ( s ) alone, as well as a submatrix of Q . The weighted Hankel singular v alues of C s ( s ) are the squ[...]

  • Page 85

    Chapter 4 Frequency-Weig hted Error Re duction © National Instruments Corporatio n 4-15 Xmath Mod el Reduction Module From these quantities the transforma tion matrices used for calculating C sr ( s ), the stable part of C r ( s ), are def ined and then Just as in unweighted balanced tr uncation, the reduced order transfer function matrix is guara[...]

  • Page 86

    Chapter 4 F requency-Weighted Error R eduction Xmath Model Reduction Module 4-16 ni.com 3. Only continuous systems are accep ted; for discrete systems use makecontinuous( ) before calling bst( ) , then discre tize the result. Sys=fracred(makecontinuous(S ysD)); SysD=discretize(Sys); Defining and Reducing a Controller Suppose P ( s ) = C ( sI – A [...]

  • Page 87

    Chapter 4 Frequency-Weig hted Error Re duction © National Instruments Corporatio n 4-17 Xmath Mod el Reduction Module to, for example, through, for example, balanced truncation, and then def ining: For the second rationale, consider Figure 4-5. Figure 4-5. Internal Structure of Controller Recognize that the controller C ( s ) (sho wn within the ha[...]

  • Page 88

    Chapter 4 F requency-Weighted Error R eduction Xmath Model Reduction Module 4-18 ni.com Controller reduction proceeds by imple menting the same connection rule but on reduced v e rsi ons of th e two transfer function matrices. When K E has been def i ned th rough Kalman filtering considerations, the spectrum of the signal driving K E in Figure 4-5 [...]

  • Page 89

    Chapter 4 Frequency-Weig hted Error Re duction © National Instruments Corporatio n 4-19 Xmath Mod el Reduction Module 6. Check the stability of th e closed-loop system with C r ( s ). When the type="left perf" is specif ied, one works with (4-11) which is formed from the numerator and denominator of the MFD in Equation 4-5. The grammian [...]

  • Page 90

    Chapter 4 F requency-Weighted Error R eduction Xmath Model Reduction Module 4-20 ni.com Additional Background A discussion of the stabil ity robustness measure can b e found in [AnM89] and [LAL90]. The idea can be unders t ood w ith reference to the transfer functions E ( s ) and E r ( s ) used in discussing type="right perf" . It is poss[...]

  • Page 91

    Chapter 4 Frequency-Weig hted Error Re duction © National Instruments Corporatio n 4-21 Xmath Mod el Reduction Module The four schemes all produce different HSVs; it follows that it may be prudent to try all four schemes for a particular con troller reduction. Recall again that their relati ve sizes are only a guide as to what can be thrown a way [...]

  • Page 92

    © National Instruments Corporatio n 5-1 Xmath Model Reducti o n Module 5 Utilities This chapter describes three utilit y functions: hankelsv( ) , stable( ) , and compare( ) . The background to hankelsv( ) , which calculates Hankel singular v alues, was presented in Chapter 1, Introduction . Hankel singular values are also calculated in other funct[...]

  • Page 93

    Chapter 5 Utilities Xmath Model Reducti on Module 5-2 ni.com The gramian matrices are defined by solving the equations (in continuous time) and, in discrete time The computations are ef fected with lyapunov( ) and stability is check ed, which is time-consu ming. The Hankel si ngular values are the square roots of the eigen values of the product. Re[...]

  • Page 94

    Chapter 5 Utilities © National Instruments Corporatio n 5-3 Xmath Model Reducti o n Module Doubtful ones are those for which th e real part of the eigen value has magnitude less than or equal to tol for contin uous-time, or eigen value magnitude within the following range for discrete time: A warning is gi ven if doubtful eigenv alues exist. The a[...]

  • Page 95

    Chapter 5 Utilities Xmath Model Reducti on Module 5-4 ni.com After this last transformation, and wit h it follows that and By combining the transformati on yieldi ng the real ordered Schur form for A with the transformation defined using X, the ov erall transformati on T is readily identified. In case all eigen value s of A are stable or all are un[...]

  • Page 96

    © National Instruments Corporatio n 6-1 Xmath Model Reducti o n Module 6 T utorial This chapter illustrates a number of the MRM functions and their underlying ideas. A plant and fu ll-order controller are de fined, an d then the effects of various reduction algorith ms are examined. The data for this example is stored in the file mr_disc.xmd in th[...]

  • Page 97

    Chapter 6 T utorial Xmath Model Reducti on Module 6-2 ni.com A minimal realization in mo dal coor dinates is C ( sI – A ) –1 B where: The specifications seek high loop gain at low frequencies (for performance) and low loop ga in at high frequencies (to gu arantee stability in the presence of unstructured uncertainty). More specifical ly, the lo[...]

  • Page 98

    Chapter 6 T utorial © National Instruments Corporatio n 6-3 Xmath Model Reducti o n Module With a state weighting matrix, Q = 1e-3*diag([2,2,80,80,8,8 ,3,3]); R = 1; (and unity control wei ghting), a state-feedback control-gain i s determined through a linear-quadratic performance index minimizati on as: [Kr,ev] = regulator(sys,Q,R) ; A – B × K[...]

  • Page 99

    Chapter 6 T utorial Xmath Model Reducti on Module 6-4 ni.com recovery at low frequencie s; there is consequently a faster roll-off of the loop gain at high frequen cies than for , and this is desired. Figure 6-2 displays the (magnitu des of the) plant transfer fun ction, the compensator transfer function and the loop gain, as well as the constraint[...]

  • Page 100

    Chapter 6 T utorial © National Instruments Corporatio n 6-5 Xmath Model Reducti o n Module Controller Reduction This section contrasts the effect of unweighted and weighted cont roller reduction. Unweighted reduction is at first exam ined, throug h redschur( ) (using balance( ) or balmoore( ) will give similar results). The Hankel singular values [...]

  • Page 101

    Chapter 6 T utorial Xmath Model Reducti on Module 6-6 ni.com Figures 6-3, 6-4, and 6-5 display the outcome of the reducti on. The loop gain is shown in Figure 6-3. The error near the unit y gain cro ssover frequency may not look large, but it i s considerably larger than that obtained through frequency weig hted reduction methods, as described late[...]

  • Page 102

    Chapter 6 T utorial © National Instruments Corporatio n 6-7 Xmath Model Reducti o n Module Generate Figure 6-4: compare(syscl,sysclr,w,{radi ans,type=5}) f4=plot({keep,legend=["origi nal","reduced"]}) Figure 6-4. Closed-Loop Gain with redschur[...]

  • Page 103

    Chapter 6 T utorial Xmath Model Reducti on Module 6-8 ni.com Generate Figure 6-5: tvec=0:(140/99):140; compare(syscl,sysclr,tvec,{t ype=7}) f5=plot({keep,legend=["origi nal","reduced"]}) Figure 6-5. Step Response with redschur[...]

  • Page 104

    Chapter 6 T utorial © National Instruments Corporatio n 6-9 Xmath Model Reducti o n Module ophank( ) ophank( ) is next used to reduce the cont roller with the results shown in Figures 6-6, 6-7, and 6-8. Generate Figure 6-6: [syscr,sysu,hsv]=ophank(sysc ,2); svalsrol = svplot(sys*syscr, w,{radians}); plot(svalsol, {keep}) f6=plot(wc, constr, {keep,[...]

  • Page 105

    Chapter 6 T utorial Xmath Model Reduction Module 6-10 ni.com Generate Figure 6-7: syscl = feedback(sysol); sysolr=sys*syscr; sysclr=feedback(sysolr); compare(syscl,sysclr,w,{radi ans,type=5}) f7=plot({keep,legend=["origi nal","reduced"]}) Figure 6-7. Closed-Loop Gain with ophank[...]

  • Page 106

    Chapter 6 T utorial © National Instruments Corporatio n 6-11 Xmath Mod el Reduction Module Generate Figure 6-8: tvec=0:(140/99):140; compare(syscl,sysclr,tvec,{t ype=7}) f8=plot({keep,legend=["origi nal","reduced"]}) Figure 6-8. Step Response with ophank The open-loop gain, closed-loop gain and step response are all inferior to[...]

  • Page 107

    Chapter 6 T utorial Xmath Model Reduction Module 6-12 ni.com wtbalance The next command examined is wtbalance with the option "match" . [syscr,ysclr,hsv] = wtbalanc e(sys,sysc,"match",2) Recall that this command should prom ote matching o f closed-loop transfer functions. The weighted Hank el singular values are: 1.486 4.513 × [...]

  • Page 108

    Chapter 6 T utorial © National Instruments Corporatio n 6-13 Xmath Mod el Reduction Module The following function calls produ ce Figu re 6-9: svalsrol = svplot(sys*syscr, w,{radians}) plot(svalsol, {keep}) f9=plot(wc, constr, {keep,!grid, legend=["reduced","original" ,"constrained"], title="Open-Loop Gain Using w[...]

  • Page 109

    Chapter 6 T utorial Xmath Model Reduction Module 6-14 ni.com Generate Figure 6-10: syscl = feedback(sysol); sysolr=sys*syscr; sysclr=feedback(sysolr); compare(syscl,sysclr,w,{radi ans,type=5}) f10=plot({keep,legend=["orig inal","reduced"]}) Figure 6-10. Clo sed-Loop Gain with wtbalance[...]

  • Page 110

    Chapter 6 T utorial © National Instruments Corporatio n 6-15 Xmath Mod el Reduction Module Generate Figure 6-11: tvec=0:(140/99):140; compare(syscl,sysclr,tvec,{t ype=7}) f11=plot({keep,legend=["orig inal","reduced"]}) Figure 6-11. Step Response with wtbalance Figures 6-9, 6-10, and 6 -11 are obtained for wtbalance with the opt[...]

  • Page 111

    Chapter 6 T utorial Xmath Model Reduction Module 6-16 ni.com Generate Figure 6-12: vtf=poly([-0.1,-10])/poly([- 1,-1.4]) [,sysv]=check(vtf,{ss,conver t}); svalsv = svplot(sysv,w,{radi ans}); Figure 6-12. Frequency Response of the Weight V( j ω )[...]

  • Page 112

    Chapter 6 T utorial © National Instruments Corporatio n 6-17 Xmath Mod el Reduction Module Generate Figure 6-13: [syscr,sysclr,hsv] = wtbalan ce(sys,sysc, "input spec",2,sysv) svalsrol = svplot(sys*syscr, w,{radians}) plot(svalsol, {keep}) f13=plot(wc,constr,{keep, !g rid, legend=["reduced","original" ,"constrain[...]

  • Page 113

    Chapter 6 T utorial Xmath Model Reduction Module 6-18 ni.com Generate Figure 6-14: syscl = feedback(sysol); sysolr=sys*syscr; sysclr=feedback(sysolr); compare(syscl,sysclr,w,{radi ans,type=5}) f14=plot({keep,legend=["orig inal","reduced"]}) Figure 6-14. System Singular Values of wtbalance with "input spec"[...]

  • Page 114

    Chapter 6 T utorial © National Instruments Corporatio n 6-19 Xmath Mod el Reduction Module Generate Figure 6-15: tvec=0:(140/99):140; compare(syscl,sysclr,tvec,{t ype=7}) f15=plot({keep,legend=["orig inal","reduced"]}) Figure 6-15. Step Response of wtbalance wi th "input spec"[...]

  • Page 115

    Chapter 6 T utorial Xmath Model Reduction Module 6-20 ni.com fracred fracred , the next command exami ned, has four options— "right stab" , "left stab" , "right perf" , and "left perf" . The options "left stab" , "right perf" , a nd "left perf" all produce instability. Giv e n [...]

  • Page 116

    Chapter 6 T utorial © National Instruments Corporatio n 6-21 Xmath Mod el Reduction Module Generate Figure 6-17: syscl = feedback(sysol); sysolr=sys*syscr; sysclr=feedback(sysolr); compare(syscl,sysclr,w,{radi ans,type=5}) f17=plot({keep,legend=["orig inal","reduced"]}) Figure 6-17. Closed-Loop Response with fracred[...]

  • Page 117

    Chapter 6 T utorial Xmath Model Reduction Module 6-22 ni.com Generate Figure 6-18: tvec=0:(140/99):140; compare(syscl,sysclr,tvec,{t ype=7}) f18=plot({keep,legend=["orig inal","reduced"]}) Figure 6-18. Step Response with fracred The end result is comp arable to that from wtbalance( ) with option "match" . We can create[...]

  • Page 118

    Chapter 6 T utorial © National Instruments Corporatio n 6-23 Xmath Mod el Reduction Module hsvtable = [... "right stab:", string(hsvrs' ); "left stab:", string(hsvls'); "right perf:", string(hsvrp' ); "left perf:", string(hsvlp')]? hsvtable (a rectangular matr ix of strings) = right stab:[...]

  • Page 119

    © National Instruments Corporatio n A- 1 Xmath Mod el Reduction Module A Bibliography [AnJ] BDO Anderson and B. James, “ Algorith m fo r multiplicativ e appro ximation of a stable linear system, ” in preparation. [AnL89] BDO Anderson and Y . Liu, “Controlle r reduction: Concepts and approaches, ” IEEE T ransactions on Automatic Contr ol , [...]

  • Page 120

    Appendix A B ibliography Xmath Model Reducti on Module A-2 ni.com [GrA90] M. Green and BDO Anderson, “General ized balanced stochastic truncation, ” Pr oceedings for 29th CDC , 1990. [Gre88] M. Green, “Balanced stochastic realization, ” Linear Algebra and Applicati ons , V ol. 98, 1988, pp. 211–2 47. [Gre88a] M. Green, “ A relati ve err[...]

  • Page 121

    Appendix A B ibliography © National Instruments Corporatio n A- 3 Xmath Mod el Reduction Module [SaC88] M. G. Safonov and R. Y . Chiang, “Mod el reductio n for rob ust control: a Schur relativ e -er ror meth od, ” Pr oceedings for the Americ an Contr ols Conferenc e , 1988, pp. 1685–1690. [Saf87] M. G. Safonov , “Imagina ry-axis zeros in m[...]

  • Page 122

    Appendix A B ibliography Xmath Model Reducti on Module A-4 ni.com [Doy82] J. C. Doyle. “ Analysis of Feedback Systems with Structured Uncertainties. ” IEEE Pr oceedings , November 1982. [DWS82] J. C. Doyle, J. E. W all, and G. Stein. “P erformance and Rob ustness Analysis for Structure Uncertainties, ” Proceedings IEEE Confer ence on D ecis[...]

  • Page 123

    Appendix A B ibliography © National Instruments Corporatio n A- 5 Xmath Mod el Reduction Module [SLH81] M. G. Safonov , A. J. Laub, and G. L. Hartmann, “Feedback Prope rties of Multiv ariabl e Systems: The Role and Use of the Return Difference Matrix, ” IEEE T ransactions on Automatic Contr ol , V ol. A C-26, Februa ry 1981. [SA88] G. Stein an[...]

  • Page 124

    © National Instruments Corporatio n B- 1 Xmath Mod el Reduction Module B T echnical Support and Professional Ser vices Visit the following sections of the National Instruments Web site at ni.com for technical support an d professional services: • Support —Online technical support resources at ni.com/support include the following: – Self-Help[...]

  • Page 125

    © National Instruments Corporatio n I-1 Xmath Model Reduction Module Index Symbols *, 1-6 ´, 1-6 A additive error, reduction, 2-1 algorithm balanced stochastic truncation (bst), 3-4 fractional representation reduction, 4-18 Hankel multi-pass, 2-20 optimal Hankel norm reduction , 2-15 stable, 5-2 weighted balance, 4-12 all-pass transfer function, [...]

  • Page 126

    Index Xmath Model Reducti on Module I-2 ni.com G grammians controllability, 1-7 description of, 1-7 observability, 1-7 H Hankel matrix, 1-9 Hankel norm approximation, 2-6 Hankel singular values, 1-8, 3-9, 5-1 hankelsv, 1-5, 5-1 algorithm, multipass, 2-20 help, technical support, B-1 I instrument drivers (NI resources), B-1 internal balancin g, 1-10[...]

  • Page 127

    Index © National Instruments Corporatio n I-3 Xmath Model Reduction Module spectral factorization, 1-13 stability requirements, 1 -5 stable, 1-5, 5-2 sup, 1-6 support, technical, B-1 T technical support, B-1 tight equality bounds, 1-7 training and certificatio n (NI resources), B-1 transfer function, allp ass, 1-6 troubleshooting (NI resources), B[...]