National Instruments 370753C-01 Bedienungsanleitung

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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157

Zur Seite of

Richtige Gebrauchsanleitung

Die Vorschriften verpflichten den Verkäufer zur Übertragung der Gebrauchsanleitung National Instruments 370753C-01 an den Erwerber, zusammen mit der Ware. Eine fehlende Anleitung oder falsche Informationen, die dem Verbraucher übertragen werden, bilden eine Grundlage für eine Reklamation aufgrund Unstimmigkeit des Geräts mit dem Vertrag. Rechtsmäßig lässt man das Anfügen einer Gebrauchsanleitung in anderer Form als Papierform zu, was letztens sehr oft genutzt wird, indem man eine grafische oder elektronische Anleitung von National Instruments 370753C-01, sowie Anleitungsvideos für Nutzer beifügt. Die Bedingung ist, dass ihre Form leserlich und verständlich ist.

Was ist eine Gebrauchsanleitung?

Das Wort kommt vom lateinischen „instructio”, d.h. ordnen. Demnach kann man in der Anleitung National Instruments 370753C-01 die Beschreibung der Etappen der Vorgehensweisen finden. Das Ziel der Anleitung ist die Belehrung, Vereinfachung des Starts, der Nutzung des Geräts oder auch der Ausführung bestimmter Tätigkeiten. Die Anleitung ist eine Sammlung von Informationen über ein Gegenstand/eine Dienstleistung, ein Hinweis.

Leider widmen nicht viele Nutzer ihre Zeit der Gebrauchsanleitung National Instruments 370753C-01. Eine gute Gebrauchsanleitung erlaubt nicht nur eine Reihe zusätzlicher Funktionen des gekauften Geräts kennenzulernen, sondern hilft dabei viele Fehler zu vermeiden.

Was sollte also eine ideale Gebrauchsanleitung beinhalten?

Die Gebrauchsanleitung National Instruments 370753C-01 sollte vor allem folgendes enthalten:
- Informationen über technische Daten des Geräts National Instruments 370753C-01
- Den Namen des Produzenten und das Produktionsjahr des Geräts National Instruments 370753C-01
- Grundsätze der Bedienung, Regulierung und Wartung des Geräts National Instruments 370753C-01
- Sicherheitszeichen und Zertifikate, die die Übereinstimmung mit entsprechenden Normen bestätigen

Warum lesen wir keine Gebrauchsanleitungen?

Der Grund dafür ist die fehlende Zeit und die Sicherheit, was die bestimmten Funktionen der gekauften Geräte angeht. Leider ist das Anschließen und Starten von National Instruments 370753C-01 zu wenig. Eine Anleitung beinhaltet eine Reihe von Hinweisen bezüglich bestimmter Funktionen, Sicherheitsgrundsätze, Wartungsarten (sogar das, welche Mittel man benutzen sollte), eventueller Fehler von National Instruments 370753C-01 und Lösungsarten für Probleme, die während der Nutzung auftreten könnten. Immerhin kann man in der Gebrauchsanleitung die Kontaktnummer zum Service National Instruments finden, wenn die vorgeschlagenen Lösungen nicht wirksam sind. Aktuell erfreuen sich Anleitungen in Form von interessanten Animationen oder Videoanleitungen an Popularität, die den Nutzer besser ansprechen als eine Broschüre. Diese Art von Anleitung gibt garantiert, dass der Nutzer sich das ganze Video anschaut, ohne die spezifizierten und komplizierten technischen Beschreibungen von National Instruments 370753C-01 zu überspringen, wie es bei der Papierform passiert.

Warum sollte man Gebrauchsanleitungen lesen?

In der Gebrauchsanleitung finden wir vor allem die Antwort über den Bau sowie die Möglichkeiten des Geräts National Instruments 370753C-01, über die Nutzung bestimmter Accessoires und eine Reihe von Informationen, die erlauben, jegliche Funktionen und Bequemlichkeiten zu nutzen.

Nach dem gelungenen Kauf des Geräts, sollte man einige Zeit für das Kennenlernen jedes Teils der Anleitung von National Instruments 370753C-01 widmen. Aktuell sind sie genau vorbereitet oder übersetzt, damit sie nicht nur verständlich für die Nutzer sind, aber auch ihre grundliegende Hilfs-Informations-Funktion erfüllen.

Inhaltsverzeichnis der Gebrauchsanleitungen

  • Seite 1

    NI MA TRIXx TM Xmath ™ Control Design Module Xmath Control Design Module April 2007 370753C-01[...]

  • Seite 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,[...]

  • Seite 3

    Important Information Warranty TThe media on which you receive National In struments software are warranted not to fa il to execute progra mming i nstructions, du e to defects in materials and workmanship, for a period of 90 days from date of shipment, as eviden ced by receipts or other documentat ion. N ational Instruments will , at its option, re[...]

  • Seite 4

    Conventions The follo wing con ventions are used in this manual: < > Angle brackets that cont ain numbers s eparated by an ellipsis represent a range of v alues associated with a bit or signal name—for example, DIO<3..0>. [ ] Square brackets enclose op tional items—for example, [ response ]. » The » symbol leads you through nested[...]

  • Seite 5

    © National Instruments Corporatio n v Xmath Control Design Module Contents Chapter 1 Introduction Using This Manual...................... .............. .............. .............. .............. .............. ............. 1-1 Document Organization........... ... ........... .............. .............. .............. .............. .. 1-1 Bi[...]

  • Seite 6

    Contents Xmath Control Design Module vi ni.com Chapter 3 Building System Connections Linear System Interconnection Operators ............... .............. .............. .............. ............ 3-1 Linear System Interconnection Fun ctions ......... .............. ............... .............. .............. ... 3-4 afeedback( ) ..............[...]

  • Seite 7

    Contents © National Instruments Corporatio n vii Xmath Control Design Module Bode Frequency Analysis ........ .............. .............. .............. .............. .............. .............. .. 5-7 bode( ) ............... .............. ............ .............. .............. .............. .............. ............. 5-10 margin( ) .[...]

  • Seite 8

    Contents Xmath Control Design Module viii ni.com Appendix A Technical References Appendix B Technical Support and Professional Services Index[...]

  • Seite 9

    © National Instruments Corporatio n 1-1 Xmath Control Design Module 1 Introduction The Control Design Module (CDM) is a complete library of classical and modern control design fun ctions that provides a fl exible, intuitive cont rol design framework. This chapter starts with an outline of the manual and some user notes. It also contains a tutorial[...]

  • Seite 10

    Chapter 1 Introduction Xmath Control Design Modul e 1-2 ni.com particular system properti es or to change the format of a system. These topics include continuous/discret e system con v ersion, as well as fi nding equi v alent transfer f unction state-space representations. • Chapter 3, Building System Connections , d etails Xmath functions that p[...]

  • Seite 11

    Chapter 1 Introduction © National Instruments Corporatio n 1-3 Xmath Control Design Module • H ( s ) is used to denote t he frequency response, over some range of frequencies of a system where s is the Laplace varia ble. H ( q ) is used to indicate that the system can be continuous or discrete. • A single apostrophe following a matrix v ariabl[...]

  • Seite 12

    Chapter 1 Introduction Xmath Control Design Modul e 1-4 ni.com Control Design T utorial This tutorial illustrates the use of functions and commands provided in Xmath and the Xmath Control Desig n Module to solve control pro blems. The emphasis of the tutorial is on usin g a number of different approaches, not on any one “correct” way to solv e [...]

  • Seite 13

    Chapter 1 Introduction © National Instruments Corporatio n 1-5 Xmath Control Design Module ssys (a state space system) = A -0.4 0 -0.01 1 0 0 -1.4 9.8 -0.02 B 6.3 0 9.8 C 0 0 1 D 0 X0 0 0 0 State Names ----------- Pitch Rate Pitch Angle Horizontal v Input Names ----------- Rotor Angle Output Names ------------ Horizontal v System is continuous Use[...]

  • Seite 14

    Chapter 1 Introduction Xmath Control Design Modul e 1-6 ni.com Input Names ----------- Rotor Angle Output Names ------------ Horizontal v System is continuous The system has poles and zeros in the right half of the compl ex plane and therefore is open-loop unstable. Ch ecking the pole and zero locations conf irms this: ol_poles=poles(ssys) ol_poles[...]

  • Seite 15

    Chapter 1 Introduction © National Instruments Corporatio n 1-7 Xmath Control Design Module One approach to stabilizing this syst em is to try to cancel th e pole at –0.656513 by adding a com pensator , K 1 ( s ), with a zero at –0.656513. Note It is important to understa nd that this is primarily an academic e xercise. Accurate pole-zero cance[...]

  • Seite 16

    Chapter 1 Introduction Xmath Control Design Modul e 1-8 ni.com Figure 1-2. Locus of all Open-Loop and Closed-Loop Roots of Gs If you cannot move the slider so that the gain is exactly 2, click the box to the right of the slider and enter 2 . T o close the interactiv e root locus dialog box, select File»Exit .[...]

  • Seite 17

    Chapter 1 Introduction © National Instruments Corporatio n 1-9 Xmath Control Design Module Close the loop using the single-input syntax of feedback( ) , which implements direct unity-gain negati ve feedback, and obtain the system’ s step response using step( ) : Kc = 2; cl_syscomp1 = feedback(Kc*K1 s*K2s*Gs); v = step(cl_syscomp1, 0:.2:25); plot[...]

  • Seite 18

    Chapter 1 Introduction Xmath Control Design Module 1-10 ni.com Figure 1-4. Block Diagram of the Closed-Loop Controller This is a block diagram of the clos ed-loop contro ller with compensator K c 1 K 1 ( s ) in the feedforward path and K c 2 K 2 ( s ) in the feedback path. This time, instead of having all your g ain K c in the forward path of the c[...]

  • Seite 19

    Chapter 1 Introduction © National Instruments Corporatio n 1-11 Xmath Contr ol Design Module Because cl_syscomp2 contains an internal pole-zero cancellation, you can rewrite it in minimal form and then check the closed-l oop pole and zero locations: cl_syscomp2m = minimal(cl_syscomp2); The system has 1 uncontrollable stat e cl_poles = poles(cl_sys[...]

  • Seite 20

    Chapter 1 Introduction Xmath Control Design Module 1-12 ni.com Figure 1-5. Helicopter Velocity T racking Step Input at the Rotor Y ou also can lo ok at the gain and phase margins of the system. H = bode(cl_syscomp2m, {npts = 200, !wrap}); [gm,pm] = margin(H) There are no 0 dB gain crossings. gm (a pdm) = domain | ---------+---------- 0.250101 | 26.[...]

  • Seite 21

    Chapter 1 Introduction © National Instruments Corporatio n 1-13 Xmath Contr ol Design Module Figure 1-6. Closed-Loop Syst em Bode Plot The domain of the gain and phase ma rgin PDMs indicates the freq uency (in hertz) at which the margin occurs. So the gain can be increased by about 26.1 dB before the system becomes unstable. Helicopter Hover Probl[...]

  • Seite 22

    Chapter 1 Introduction Xmath Control Design Module 1-14 ni.com Y ou can verify that your system is cont rollable, then defi ne the closed-loop poles you want and use poleplace( ) to fi nd the feedback gains required gi ven the system A and B matrices. [,,nuc] = controllable(Gs) nuc (a scalar) = 0 Because the number of uncont rollable states is zero[...]

  • Seite 23

    Chapter 1 Introduction © National Instruments Corporatio n 1-15 Xmath Contr ol Design Module Specify the observer poles at [–3 + 3j, –4] and call poleplace( ) again: op = [-3+3*jay, -4]; L = poleplace(A',C',op) L (a row vector) = 5.46645 4.67623 9.58 Y ou connect the controller to the observer using lqgcomp( ) . L needs to be a colum[...]

  • Seite 24

    Chapter 1 Introduction Xmath Control Design Module 1-16 ni.com Y ou can choose to scale the system output here for zero steady-state error in the step response. This is accompli shed in an intuitiv e manner , dividing the system sys_cl b y the desired scaling factor . sys_cl = sys_cl/51.76; v_obc = step(sys_cl, 0:.1:10); plot (v_obc, {xlab = "[...]

  • Seite 25

    Chapter 1 Introduction © National Instruments Corporatio n 1-17 Xmath Contr ol Design Module When you create the estimator system sys_est , you use the original A matrix for the state-update equatio n, but you pro vide a zero external input (a B matri x of zero). The output matrix is an identity matrix passing back the three real state values and [...]

  • Seite 26

    Chapter 1 Introduction Xmath Control Design Module 1-18 ni.com Figure 1-10. Multiple Plots Showing Time Needed for States to be C orrectly T rac ked by Estimator , Given Incorrect Initial V alues Helicopter Hover Problem: Discrete Formulation Discrete-time control systems are most frequently designed in one of two ways: either directly implemented [...]

  • Seite 27

    Chapter 1 Introduction © National Instruments Corporatio n 1-19 Xmath Contr ol Design Module Y ou can use the default exponential discretization m ethod with dt =0 . 0 1 and compare frequency responses between the original system and the discretized system: ssysd = discretize(ssys, 0.01); f = freq(ssys,logspace(.001,10,200)) ; fd = freq(ssysd,logs[...]

  • Seite 28

    Chapter 1 Introduction Xmath Control Design Module 1-20 ni.com Figure 1-12. Step Respon se of a Discrete System Us ing Discretized Observer -Based Controlle r As you discretize the compensator, form the closed-loop, scaled system, and simulate its response to a step in put, you must ensure that the samplin g interv al is the same ( dt = 0.01). sys_[...]

  • Seite 29

    Chapter 1 Introduction © National Instruments Corporatio n 1-21 Xmath Contr ol Design Module The linearized state-space equations, including the actuator and sensor dynamics, are as follo ws: θ is the angle (in radians) the we dge makes with the v ertical axis, x is the position of the sliding mass, and u is the control input vo ltage. The output[...]

  • Seite 30

    Chapter 1 Introduction Xmath Control Design Module 1-22 ni.com Because this system is open-loop unstable and has fairly fast poles in both halves of the s-plane, you want to mak e sure it can bring the effect of an external disturbance (such as a sharp pu sh to the cart) to zero as quickly as possible. [Kr,EVr,Pr] = regulator(wsys,diag([1e8,1,1,1])[...]

  • Seite 31

    Chapter 1 Introduction © National Instruments Corporatio n 1-23 Xmath Contr ol Design Module Figure 1-13. Response of Full-State Fee dback Controller to a Unit Step Disturbance Having established your regulator design, you build the estimator and simulate performance of the closed-loop system feeding back state estimates. Y ou select the weights f[...]

  • Seite 32

    Chapter 1 Introduction Xmath Control Design Module 1-24 ni.com Figure 1-14. Respo nse of Observer -Based Controller to a Unit Step Disturbance[...]

  • Seite 33

    © National Instruments Corporatio n 2-1 Xmath Control Design Module 2 Linear System Representation Xmath provides a structure for system representation called a system object . This object includes system parameters in a data structure designed to reflect the way these systems are analyzed mathemati cally. Operations on these systems are likewise [...]

  • Seite 34

    Chapter 2 Linea r System Representation Xmath Control Design Modul e 2-2 ni.com T ransfer Function System Models One way of representing continuous -time finite-dim ensional linear time-invariant systems is with the transfer function: with num(s) and den(s) being polynomials in s . They can be specified either by their roots or their coef ficients.[...]

  • Seite 35

    Chapter 2 Linear S ystem R epresentation © National Instruments Corporatio n 2-3 Xmath Control Design Module form the same transfer function as that deri v ed in the preceding transfer function equation using known pole, zero, and gain values: (2-4) The systems represented in Equations 2-3 and 2-4 can be represented using Xmath’ s system objects[...]

  • Seite 36

    Chapter 2 Linea r System Representation Xmath Control Design Modul e 2-4 ni.com be used so long as a consistent choice of va riable is used for bo th numerator and denominator polyno mials. The transfer function in pole-zero-gain fo rm from the preceding equation can be similarly implemented using the polynomial( ) function to specify the numerator[...]

  • Seite 37

    Chapter 2 Linear S ystem R epresentation © National Instruments Corporatio n 2-5 Xmath Control Design Module State-Space System Models State-space models comprise the second category of linear system representations in Xmath. In stat e-space form, first- order differential (continuous-time) and difference (discr ete-time) equations are repres ente[...]

  • Seite 38

    Chapter 2 Linea r System Representation Xmath Control Design Modul e 2-6 ni.com Again, you create the system using the system( ) function. This tim e you use the optional dt keyword to indicate that this system is discrete. A = [0,1;-0.75,0]; B = [1,0]'; C = [0,1]; D = 0; sys4 = system(A,B,C,D, {dt = 0.5}) sys4 (a state space system) = A 0 1 -[...]

  • Seite 39

    Chapter 2 Linear S ystem R epresentation © National Instruments Corporatio n 2-7 Xmath Control Design Module The system( ) function can create both the transfer-function and state-space forms of the system object. It requires four compatibly-sized matrices to create a state-space system , or a pair of polynomials to create a transfer function. Y o[...]

  • Seite 40

    Chapter 2 Linea r System Representation Xmath Control Design Modul e 2-8 ni.com Example 2-3 Using system( ) to Change t he Attributes of an Existing System sys4=system([0,1;-0.75,0],[1,0]',[0, 1],[], {dt=0.5}); sys4 = system(sys4, {inputNames = "C urrent", outputNames = "Velocity", stateNames = ["Torque","Ang[...]

  • Seite 41

    Chapter 2 Linear S ystem R epresentation © National Instruments Corporatio n 2-9 Xmath Control Design Module done internally to return A, B, C, and D, though the format of the variable Sys itself remains unchanged . The transfer function must be prop er . Using the systems defined in Examples 2-1 and 2-2, Example 2-4 illustrates the use of abcd( )[...]

  • Seite 42

    Chapter 2 Linea r System Representation Xmath Control Design Module 2-10 ni.com numden( ) [num,den] = numden(Sys) The numden( ) function returns the numerator and deno minator polynomials comprising a sin gle-input, single-output system in transfer function form. If the system is in st ate-space form, an in ternal con version is performed to find t[...]

  • Seite 43

    Chapter 2 Linear S ystem R epresentation © National Instruments Corporatio n 2-11 Xmath Contr ol Design Module these polynomials into a tr ansfer-function and uses period( ) to set the sampling interval to match that of sys4 . Example 2-6 Using period( ) to Extract the Samp ling Period [num,den]=numden(sys4); H4 = system(num,den,{dt = period(sys 4[...]

  • Seite 44

    Chapter 2 Linea r System Representation Xmath Control Design Module 2-12 ni.com outputNames = "Velocity", stateNames = ["Torque","Angle"]}); [,,stateNames] = names(sys5)? statenames (a row vector of strings) =Torque Angle Size and Indexing of Dynamic Systems The size of a system object is defined by how many outputs, i[...]

  • Seite 45

    Chapter 2 Linear S ystem R epresentation © National Instruments Corporatio n 2-13 Xmath Contr ol Design Module check(sys, {stable}) ans (a scalar) = 0 check(sys, {discrete, ss}) ans (a scalar) = 1 [, tfsys] = check(sys, {tf, convert}) tfsys (a transfer function) = (z + 0.26) --------------------- (z + 0.26)(z - 1.875) initial delay outputs 0 0 Sys[...]

  • Seite 46

    Chapter 2 Linea r System Representation Xmath Control Design Module 2-14 ni.com discretization methods used based on the specification of each keyw ord are discussed in the following sections. Numerical Integration Met hods: for ward, backward, tustins Xmath provides three methods of numerical integration of a differential transfer function: the fo[...]

  • Seite 47

    Chapter 2 Linear S ystem R epresentation © National Instruments Corporatio n 2-15 Xmath Contr ol Design Module Pole-Zero Matching: polezero The pole-zero matching method of discretizin g a continuous system follows from the relation be tween the continuous s and discrete z freque ncy domains: where T is the sampling interval to be used for the dis[...]

  • Seite 48

    Chapter 2 Linea r System Representation Xmath Control Design Module 2-16 ni.com The exponential ke yword assumes that the response value between samples is constant and can , therefore, be represen ted by a zero-ord er hold polynomial. Wh en exponential is specified, the continuous-time step response is discretized u s i n g t h e Z-transform, then[...]

  • Seite 49

    Chapter 2 Linear S ystem R epresentation © National Instruments Corporatio n 2-17 Xmath Contr ol Design Module gain_z = 20*log10(abs(freq(Hd_z,F))) ; gain_e = 20*log10(abs(freq(Hd_e,F))) ; and plot it (as shown in Figure 2-1). plot ([gainc,gain_f,gain_b,gain_t,ga in_z,gain_e], {legend = ["Continuous", "Forward", "Backward&[...]

  • Seite 50

    Chapter 2 Linea r System Representation Xmath Control Design Module 2-18 ni.com Many of the discretization techniques discussed in the Hold Equivalence Methods: exponential and first order section can be easily re vers ed to obtain a continuous equiv alent to a discrete system. The makecontinuous( ) function implements these reverse algorithms base[...]

  • Seite 51

    Chapter 2 Linear S ystem R epresentation © National Instruments Corporatio n 2-19 Xmath Contr ol Design Module No w con vert back to the continuous form: Hc = makecontinuous(Hd_f, {forward}) ; [num,den] = numden(Hc) num (a polynomial) = (s + 0.36) den (a polynomial) = 2 (s + 0.999998)(s + 1)(s + 0.79s + 0. 16) Although makecontinuous( ) restores t[...]

  • Seite 52

    © National Instruments Corporatio n 3-1 Xmath Control Design Module 3 Building System Connections Large system models are frequently built by connectin g smaller models together. You can perform different ty pe s of linear system intercon nections using the Xmath functions discussed in this chapter. MathScript allo ws operators ( * , + , and so on[...]

  • Seite 53

    Chapter 3 Building System Connections Xmath Control Design Modul e 3-2 ni.com Sys = Sys2 * Sys1 Cascade connection of Sys 1 and Sys 2 where the output of Sys is y 2 and the input is u 1 . Sys = Sys1/Sys2 Cascade connection of Sys1 and in v erted Sys2 where Sys = Sys 1 * inv(Sys 2 ) , u=u 2 , and y = y 1 . Sys = Sys1Sys2 Cascade connection of in ve[...]

  • Seite 54

    Chapter 3 Building System Connections © National Instruments Corporatio n 3-3 Xmath Control Design Module Dynamic systems also can be flex ibly combined with scalars and compatibly sized matrices using the operators in T able 3-1. A compatibly sized matrix is one h aving the same dimensions as t he dynamic system’ s D matrix (row size equal to t[...]

  • Seite 55

    Chapter 3 Building System Connections Xmath Control Design Modul e 3-4 ni.com Linear System Interconnection Functions afeedback( ) , append( ) , connect( ) , and feedback( ) connect dynamic systems in state–space or transfer–function fo rm to produce a larger system in state-space form. Th e following restrictions ap ply to all of these functio[...]

  • Seite 56

    Chapter 3 Building System Connections © National Instruments Corporatio n 3-5 Xmath Control Design Module • By default, feedback is defined to be ne gati ve. • The number of out puts from the f irst syst em must equal the number of inputs to the second system. • The number of outputs from th e s econd system must equal the number of inputs i[...]

  • Seite 57

    Chapter 3 Building System Connections Xmath Control Design Modul e 3-6 ni.com if the conditio n estimate for either matrix is less than eps . For more information on this condition estimate, refer to the MATRIXx Help for the Xmath function rcond( ) . Using Sys to denote the state-space representation for the complete feedback loop, you can ex press[...]

  • Seite 58

    Chapter 3 Building System Connections © National Instruments Corporatio n 3-7 Xmath Control Design Module is created by appending the in put s, outputs, and sta tes of Sys1 and Sys2 . A larger number of systems can be appended by appending two at a time. • Both systems mu st hav e the same sample rate. • Improper dynamic systems—systems wit [...]

  • Seite 59

    Chapter 3 Building System Connections Xmath Control Design Modul e 3-8 ni.com append( ) performs a check to make sure both Sys 1 and Sys 2 have the same sample rate, and adopts this rate for the appended system . Any initial conditions on the states are also appended columnwise. connect( ) Sys = connect(Sys1,{K,M,N}) The connect( ) function perform[...]

  • Seite 60

    Chapter 3 Building System Connections © National Instruments Corporatio n 3-9 Xmath Control Design Module • By default, feedback is defined to be positi ve. T o enforce negati ve feedback, specify connect(Sys,-K) . • A “selection matrix” has a single 1 in each ro w; the rest of the ro w contains zeros. This is useful for in d icating the s[...]

  • Seite 61

    Chapter 3 Building System Connections Xmath Control Design Module 3-10 ni.com 2 C -1.5 1.5 D 0 X0 0 0 Algorithm For the feedback system shown in Example 3-3, you can write the following system equations: Combining these eq uations with the eq uation for the pos itive feedback input term: and multiplying by the input and output gains M and N , you o[...]

  • Seite 62

    Chapter 3 Building System Connections © National Instruments Corporatio n 3-11 Xmath Contr ol Design Module feedback( ) Sys = feedback(Sys1,{Sys2}) The feedback( ) function connects two dynamic systems together in a feedback loop as sho wn in Figure 3-4. • By default, feedback is defined to be ne gati ve. • Both systems mu st hav e the same sa[...]

  • Seite 63

    Chapter 3 Building System Connections Xmath Control Design Module 3-12 ni.com -1 1 D 0 X0 0 0 State Names ----------- Input Names ----------- Input 1 Output Names ------------ Output 1 System is continuous Algorithm The system used for the feedback loop, Sys2 , is optional. If it is not specified, a default state-space system is used with NULL matr[...]

  • Seite 64

    Chapter 3 Building System Connections © National Instruments Corporatio n 3-13 Xmath Contr ol Design Module The single system resulting from the feedback combination of Sys1 and Sys2 has u 1 as its input, y 1 as its output, and a stat e vector consisting of the appended states of Sys1 and Sys2 . Using these f iv e equations to find the state-space[...]

  • Seite 65

    © National Instruments Corporatio n 4-1 Xmath Control Design Module 4 System Analysis This chapter discusses time-domain solutions of the equations underlying transfer functions and state-space syst em models, and what these solutions tell us about the stabilit y of the system. Xmath provid es a number of functions for performing this system anal [...]

  • Seite 66

    Chapter 4 System Analysis Xmath Control Design Modul e 4-2 ni.com The time-response of discrete systems i s found directly as a summ ation of the information from preceding time point s in the state and input histories. Using * to indicate discrete conv olution, you can express the time domain output as a function of the discrete impulse respo nse:[...]

  • Seite 67

    Chapter 4 System Analysis © National Instruments Corporatio n 4-3 Xmath Control Design Module and define the zeros of S( λ ) as any v alues of λ for which the system ma trix drops rank. For single-input single-ou tput systems this is equiv alent to the polynomial zeros of the transf er-function numerator . This definition is some what more compl[...]

  • Seite 68

    Chapter 4 System Analysis Xmath Control Design Modul e 4-4 ni.com directly from the roots of the transfer function numerat or . If Sys is in state-space form, the definition of its zer os arises from the system matrix, (4-3) and its MIMO transfer function: (4-4) Defining n as the number of states in the system, p as the number of outputs, and m as [...]

  • Seite 69

    Chapter 4 System Analysis © National Instruments Corporatio n 4-5 Xmath Control Design Module ans (a column vector) = -0.98875 + 2.4773 j -0.98875 - 2.4773 j k (a scalar) = 1.34P Algorithm The algorithm used for state-sp ace zero computation creates a reduced-order S ( λ ), using Householder reflections to do the necessary orthogonal row and colu[...]

  • Seite 70

    Chapter 4 System Analysis Xmath Control Design Modul e 4-6 ni.com Example 4-3 Dynamic Response th roug h Partial Fraction Expansion To illustrate how you can examine the stability and dynamic response of a system using Xmath, start with th e open-loop transf er function sy stem Y ou close a unity feedback loop around this system, as shown in Figure[...]

  • Seite 71

    Chapter 4 System Analysis © National Instruments Corporatio n 4-7 Xmath Control Design Module 0 0 Input Names ----------- Input 1 Output Names ------------ Output 1 System is continuous Y ou can examine the stability of G cl ( s ) by representing it as a sum of partial fractions, using the residue( ) function. residue(syscl) ans (a pdm) = Poles | [...]

  • Seite 72

    Chapter 4 System Analysis Xmath Control Design Modul e 4-8 ni.com Figure 4-2. T ransient Response of the Closed- Loop System as a Function of Time Y ou also can calculate the im pul se response directly with t = [0 : 0.1 : 350 ]; hi = impulse(syscl,t); plot(hi, { xlab = "Time (sec)", ylab = "Transient Response"}) Calculating the[...]

  • Seite 73

    Chapter 4 System Analysis © National Instruments Corporatio n 4-9 Xmath Control Design Module and orders for which the residue(s) should be found. If a user-specif ied va lu e f or pls is not actuall y a pole of the system or if the order requested is greater than the multiplicity of the pole, the correspond ing residue is returned as zero. C cont[...]

  • Seite 74

    Chapter 4 System Analysis Xmath Control Design Module 4-10 ni.com (s + 1) (s + 0.79s + 0.16) initial integrator outputs 0 0 0 0 Input Names ----------- Input 1 Output Names ------------ Output 1 System is continuous Note G2 matches the system G where residues were computed in Example 4-4. General T ime-Domain Simulation When modeling a dynamic syst[...]

  • Seite 75

    Chapter 4 System Analysis © National Instruments Corporatio n 4-11 Xmath Contr ol Design Module Often it is desirable to run sev eral simu lation s with different inputs. In this case, you can define a PDM whose co lumns contain the input vectors for the dif ferent simulations. Then u will be n y × q × N samp , where q is the number of different[...]

  • Seite 76

    Chapter 4 System Analysis Xmath Control Design Module 4-12 ni.com Figure 4-3. System Time Response to a Series of Step Signals The (system)*( PDM) construc t for performin g time-domain sim ulation is used analogously no matter how many inputs the system has. For a multi-input, m ulti-output sy stem, the number of rows of the input PDM must match t[...]

  • Seite 77

    Chapter 4 System Analysis © National Instruments Corporatio n 4-13 Xmath Contr ol Design Module Impulse Response of a System An impulse input to a system is defined somewhat differently depending o n whether the system is discrete or continu ous. For a continuous-time system , an impulse is a unit-area signal of in finite amplitude and infin itely[...]

  • Seite 78

    Chapter 4 System Analysis Xmath Control Design Module 4-14 ni.com Note A continuous system and its discrete-time equiv alent (computed using the impulse-in variant z-transform) ha ve impulse responses dif fering only by a f actor of 1/ dt . impulse( ) computes the impulse response by using the B matrix from the system’ s state-space representatio[...]

  • Seite 79

    Chapter 4 System Analysis © National Instruments Corporatio n 4-15 Xmath Contr ol Design Module Figure 4-4. 15-Second Impulse Response deftimerange( ) tvec = deftimerange(Sys) deftimerange( ) computes a regular time v ector (in units of seconds) that can be used in time-domain simula tions to observe the effects of all or most of the input system?[...]

  • Seite 80

    Chapter 4 System Analysis Xmath Control Design Module 4-16 ni.com The maximum time, Tmax , is computed as fo llows, with vP denoting the vector of scaled pole s and dt the period: Tmax=abs(log(.05)/... max(real(vP(find(real(vP)<>0))))) If Tmax == null # all poles purely i maginary Tmax=100*dt endIf Tmax=max(Tmax,10*dt) tvec=0:dt:Tmax Though d[...]

  • Seite 81

    Chapter 4 System Analysis © National Instruments Corporatio n 4-17 Xmath Contr ol Design Module The simulation perfor med in initial( ) uses an input of zero for each point in the tim e vector . The output Y is a PDM where domain is the time vector . By varying the initial v alues of the states individually , you can determine which is the most se[...]

  • Seite 82

    Chapter 4 System Analysis Xmath Control Design Module 4-18 ni.com Step Response The response of a system to a unit step in put is one of the most com monly used measures of how well a given control system’s output tracks the system input. A unit step is a time signal which is zero up until the beginning of the tim e period of interest, and one th[...]

  • Seite 83

    Chapter 4 System Analysis © National Instruments Corporatio n 4-19 Xmath Contr ol Design Module From Figure 4-6 you see that the d elay time ( t d ) is about 0.5 seconds, the rise time ( t r ) is 0.8 seconds, the peak time ( t p ) is 1.6 seconds, the settling time ( t s ) is about 5.5 seconds, and the maximum overshoot ( M p ) is about 24%. Figure[...]

  • Seite 84

    Chapter 4 System Analysis Xmath Control Design Module 4-20 ni.com Get indices of all v alues > 0.9 * f inal v alue: gt_9_10 = find(Y > 0.9*Yf); Subtract domain v alues to get time duration: tr = domain(Y(gt_9_10(1,1)))-... domain(Y(gt_1_10(1,1))) tr (a scalar) = 0.8 Get peak value of response: maxY = max(Y, {channels}); Index and time corresp[...]

  • Seite 85

    © National Instruments Corporatio n 5-1 Xmath Control Design Module 5 Classical Feedback Analysis The open-loop systems an alyzed in Chapter 4, System Analysis , generally perform in a satisfactory manner only if the system model is very accurate and there are no external disturbances. These conditions usually are not met. Feedback presents an eff[...]

  • Seite 86

    Chapter 5 Classica l Feedback Analysis Xmath Control Design Modul e 5-2 ni.com Because open-loop systems are genera lly easier to study and model than closed-loop systems, you want to design closed-loop systems based on information obtainable from the open-loop sy stem. Root Locus In Chapter 4, System Analysis , you learned how the location of the [...]

  • Seite 87

    Chapter 5 Classical Feedback Analysis © National Instruments Corporatio n 5-3 Xmath Control Design Module rlocus( ) rlroots=rlocus(sys,K,{xmin,xmax,ymin ,ymax,pattern,graph}) rlocus(sys,{xmin,xmax,ymin,ymax,patt ern})# (interactive) The rlocus( ) function computes and draws root locus diagrams for continuous-time an d discrete-time SI SO systems. [...]

  • Seite 88

    Chapter 5 Classica l Feedback Analysis Xmath Control Design Modul e 5-4 ni.com Figure 5-2. Root Locus of H for Gain K = 0.07 This syntax allows you to vary the root locus gain through an in teractiv e form. Within this form, you can change the gain v alue through either a slider or an editable label where v a lue correspond s to the curr ent slider[...]

  • Seite 89

    Chapter 5 Classical Feedback Analysis © National Instruments Corporatio n 5-5 Xmath Control Design Module As the gain va ries, small ✱ ’ s appear on the locus indicating the closed-loop pole location for that choice of gain. The locus shown in Figure 5-2 shows that for small gain v alues the closed-l oop system is stable, with all of its roots[...]

  • Seite 90

    Chapter 5 Classica l Feedback Analysis Xmath Control Design Modul e 5-6 ni.com For discrete-time state-space system s with a sampling interv al of T , the frequency response for each frequency point ω is sho wn in the following equation: Algorithm The algorithm, based on [Lau86], us es a Hessenberg decomposition to simplify the previous equations [...]

  • Seite 91

    Chapter 5 Classical Feedback Analysis © National Instruments Corporatio n 5-7 Xmath Control Design Module For an e xample of frequency response of a simple system, refer to Example 5-2. Gi ven the single-input, single-output open-loo p plant in Figure 5-3, where U ( s ) and Y ( s ) are the frequency domain input and output, respectively , you can [...]

  • Seite 92

    Chapter 5 Classica l Feedback Analysis Xmath Control Design Modul e 5-8 ni.com because they can be used to assess th e relative stability of a closed-loop system given the frequency response of the open-loop system. It should be noted that the open-loop syst em should be stable and minimum phase , having no right-half plane poles or zeros, for this[...]

  • Seite 93

    Chapter 5 Classical Feedback Analysis © National Instruments Corporatio n 5-9 Xmath Control Design Module Referring to the entire closed -loop system in Figure 5-1 as G cl , the poles of G cl are the roots of its denominator—that is, the values of s such that either of the following is true: The magnitude (absolute value) of G ( s ) is 1 at each[...]

  • Seite 94

    Chapter 5 Classica l Feedback Analysis Xmath Control Design Module 5-10 ni.com Referring to Figure 5-4, notice the add itional lines drawn on the plots at the frequencies where the gain crosse s the 0 dB line and where the phase crosses the 180 ° line. When the gain crosses the 0 dB line, the phase is about –168 ° , 12 ° away from –180 ° . [...]

  • Seite 95

    Chapter 5 Classical Feedback Analysis © National Instruments Corporatio n 5-11 Xmath Contr ol Design Module Figure 5-4. Bode Plot Showi ng Syst em Gain and Phase Margins These plots illustrate ho w the location of the syst em poles and zeros shapes the gain and phase curves. Each pole contrib utes a factor of –20 dB per decade (frequency interv [...]

  • Seite 96

    Chapter 5 Classica l Feedback Analysis Xmath Control Design Module 5-12 ni.com Each of these contrib utes a phase angle φ def ined by: with ω and p n expressed in the same units, either radians per second or Hz, and using a four-quadrant arctangent function similar to that provided b y atan2( ) in Xmath. Thus the amount of phase con tributed b y [...]

  • Seite 97

    Chapter 5 Classical Feedback Analysis © National Instruments Corporatio n 5-13 Xmath Contr ol Design Module margin( ) loops o ver all the frequenc y points in the response and performs the following computation for phase a nd g ain margins at each, denoting gain margin as Mg and phase mar gin as Mp : This loop finds all the frequency interv als wi[...]

  • Seite 98

    Chapter 5 Classica l Feedback Analysis Xmath Control Design Module 5-14 ni.com Note margin( ) also returns the frequencies at which the phase crosses the –180 ° line and the gain crosses the 0 dB line. These results match the gain and phase margins shown graphically in Figure 5-4. nichols( ) [H,dB,Phase] = nichols(Sys,{F,keywor ds}) The nichols([...]

  • Seite 99

    Chapter 5 Classical Feedback Analysis © National Instruments Corporatio n 5-15 Xmath Contr ol Design Module The result is sho wn in Figure 5-5. Figure 5-5. nichols( ) Gain-Phase Plot Nyquist Stability Analysis Nyquist analysis is a frequency domain method for examining system performance of dynamic systems. Nyquist plots typicall y consist of the [...]

  • Seite 100

    Chapter 5 Classica l Feedback Analysis Xmath Control Design Module 5-16 ni.com plant is open-loop stable, then th ere should be no encirclements. If the plant has on e open-loop unstable p ole, there should be one negativ e (counter-clockwise) encirclement. The stability criterion is most easily der iv ed from the SISO transfer-function represen ta[...]

  • Seite 101

    Chapter 5 Classical Feedback Analysis © National Instruments Corporatio n 5-17 Xmath Contr ol Design Module The Nyquist plot Xmath generates is complete only for the frequencies you specify . Ideally you would obtain a plot based on the frequency response from ω = 0 to ω = ∞. Howe v er , a good choice of frequenc y range usually comes close en[...]

  • Seite 102

    Chapter 5 Classica l Feedback Analysis Xmath Control Design Module 5-18 ni.com Figure 5-7. Nyquist Plot of the Open- Loop System for Frequencies from 0.01 Hz to 10 Hz Figure 5-8. Nyquist Plot of the Open- Loop System for Frequencies from 0.5 Hz to 5 Hz[...]

  • Seite 103

    Chapter 5 Classical Feedback Analysis © National Instruments Corporatio n 5-19 Xmath Contr ol Design Module By combining th e information from the two plots, r eflecting them acr oss the real axis to account for the negati ve frequenc y response and augmenting them with a line closing the contour in the clockwise direction, you obtain the sketch o[...]

  • Seite 104

    Chapter 5 Classica l Feedback Analysis Xmath Control Design Module 5-20 ni.com -0.52263 0.00336213 + 3.75217 j 0.00336213 - 3.75217 j -11.4841 T wo of t he poles of the closed-l oop system are now unstable. Linear Systems and Power Spectral Density A key characteristic of the linear, tim e-invariant systems represented in Xmath is that the transf e[...]

  • Seite 105

    Chapter 5 Classical Feedback Analysis © National Instruments Corporatio n 5-21 Xmath Contr ol Design Module v alues at which the po wer spectral density is to be computed and where dependent matrices are the input po wer spectral dens ity matrix at each frequency . psd( ) computes a cross po wer spectral density matrix for each of a user–specifi[...]

  • Seite 106

    © National Instruments Corporatio n 6-1 Xmath Control Design Module 6 State-Space Design The functions in this chapt er are generally termed “modern control” tools. They are based on the st ate-space linear system re presentation, and employ methods which are generally appli cable to both SISO and MIMO problems. For a review of the state- spac[...]

  • Seite 107

    Chapter 6 State-Space Design Xmath Control Design Modul e 6-2 ni.com matrix B, then the mode of the system associated with the corresponding eigenvalue cannot be controlled with any input. You can think of this in the S ISO transfer function case as a cancellation between a numerator and denominator root—where you cannot control the system in the[...]

  • Seite 108

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-3 Xmath Control Design Module Figure 6-1. Full-Stat e Feedback Bein g Used to Relocate the Eigenva lues of a Controllable System Ba sed on the Value of the Gain K controllable( ) [SysC,T,nuc]=controllable(Sys,{tol}) The question that naturally arises is , “How do you kno w which[...]

  • Seite 109

    Chapter 6 State-Space Design Xmath Control Design Modul e 6-4 ni.com X0 0 Input Names ----------- Input 1 Output Names ------------ Output 1 System is continuous T (a square matrix) = 2.22045e-16 0 -1 0 1 0 -1 0 2.22045e-16 nuc (a scalar) = 2 These results indicate that only the first state of th e system corresponds to a controllable mode, and the[...]

  • Seite 110

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-5 Xmath Control Design Module Beginning with the basic state-space equations (the Du output term can be omitted without loss of generality): you can obtain expressions for the successi ve deri vati v es of the output term, thus forming a complete descrip tion of the initial condi [...]

  • Seite 111

    Chapter 6 State-Space Design Xmath Control Design Modul e 6-6 ni.com Figure 6-2. General Observer Block Diagram If the observability matrix is nonsingular , you will be able to put the eigen v alues (pole locations) of ( A – LC ), sh own in Equation 6-4, anywhere you want. Thus, you can c hoose them to mak e decay to zero as quickly as possible. [...]

  • Seite 112

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-7 Xmath Control Design Module Example 6-2 Observ ability of a System A system is described by: A = [1,0,0.01;0,1,0;0,0,1]; B = [1,0,0]';C = [0.6,0.8,0];D = 0; Sys = system(A,B,C,D); Performing, [SysO,T,nuo] = observable(Sys); The system has 1 unobservable state This example i[...]

  • Seite 113

    Chapter 6 State-Space Design Xmath Control Design Modul e 6-8 ni.com minimal( ) [SysM,T,nuco] = minimal(Sys,{tol}) Because nonminimal systems are uncontrollable, unobservable, or both, you want to be able to compute the minimal realization for a giv en system. This comprises the controllable an d observ able parts of the dynamic system. The minimal[...]

  • Seite 114

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-9 Xmath Control Design Module ans (a scalar) = 1 zeros(SysM) ans is null stair( ) [SysT,T,nc] = stair(Sys,tol) The stair( ) con verts a dynamic system to staircase fo rm. In the staircase form, the A and B system matrices are linearly transformed so that they are partitioned into [...]

  • Seite 115

    Chapter 6 State-Space Design Xmath Control Design Module 6-10 ni.com Duality and Pole Placement The new state-update equation in the Controllabi lity section and the Observability and Est imation section, the time-updat e equation in the Observability and Est imation section, along with the corresponding block diagrams in Figures 6-1 and 6-2 , indi[...]

  • Seite 116

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-11 Xmath Contr ol Design Module poleplace( ) is unusual among Xmath’ s modern control design functions in that only the A and B matr ix variables are used as input, rather than a complete system variab le. This is done because the other state-space matrices are not needed in the[...]

  • Seite 117

    Chapter 6 State-Space Design Xmath Control Design Module 6-12 ni.com pairs as poles( ) . For eac h pole v alue in poles( ) , pol eplace( ) forms a v ector by subt racting the pole’ s v alue from each diag onal element of S e xcept for the last element (0). The resulting mat rix is then divided by the corresponding v alue in the random complex v e[...]

  • Seite 118

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-13 Xmath Contr ol Design Module For continuous-time systems, the quadratic performan ce index tak es the form: For the discrete case where the system is def ined as a multistage process: the performance index is defined si milarly except that a summation sign replaces the integral[...]

  • Seite 119

    Chapter 6 State-Space Design Xmath Control Design Module 6-14 ni.com The optimal estimator and regulator problems illust rate the principle of duality—that for any giv en system r ealization {A,B,C} there is a dual realization {A',C',B'} with related cont rollability and observability . Refer to the Duality and Pole Placement secti[...]

  • Seite 120

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-15 Xmath Contr ol Design Module Figure 6-4. Diagram of Plant for the Inverted Pendulum Problem Figure 6-4 shows the pendulum at φ = 0 and φ > 0. The distance of the cart from some initi al reference point along the lin e of its motion is represen ted by the state v ariable x [...]

  • Seite 121

    Chapter 6 State-Space Design Xmath Control Design Module 6-16 ni.com Ruu is a scalar because you ha ve only one input for this particular model. [Kr,ev,P] = regulator(ipsys,Rxx,Ruu) ; Kr Kr (a row vector) = -348.778 -32.1056 -100 -27.3036 Note Y ou will use this regulator gain later in designing a compensator . Linear Quadratic Estimator The LQR ap[...]

  • Seite 122

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-17 Xmath Contr ol Design Module Figure 6-5. Diagram of the Estimator Representat ion estimator( ) inputs include the dynamic syst em Sys , and the noise intensity matrices Q xx , Q yy , or Q xy . For a linear–time– in v ariant pr ocess described by: Sys = system(A,B,C,D) The f[...]

  • Seite 123

    Chapter 6 State-Space Design Xmath Control Design Module 6-18 ni.com numerical diff iculties are encounte red, the algorithm will attempt to determine whether or not the prob lem is well posed. Checks are made to determine the reachability a nd the positi v e definiteness or semipositi ve-def initeness of the co v ariance matrices. Because not all [...]

  • Seite 124

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-19 Xmath Contr ol Design Module The discrete-time estimator follo ws fr om a similar system description, using the discrete-time dif ference e quation representation of the system, as sho wn in the following equations. Y ou ob tain the discrete-tim e estimator by considering the s[...]

  • Seite 125

    Chapter 6 State-Space Design Xmath Control Design Module 6-20 ni.com this measurement up date, deriv ed in [Kal60], are shown in the follo wing equations. Substituting the system and noise matr ices for the steady-state case, you solve the discrete Riccati equation to obtain P and thence K e , as sho wn in Equation 6-7 and Equation 6-8. (6-7) where[...]

  • Seite 126

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-21 Xmath Contr ol Design Module If you want the closed-loop system eigen v alues, compute them as the eigen v alues of A – K e C . F or an example of ho w to design a state estimator for the in verted pendulum problem, refer to Example 6-6. Example 6-6 Designing a State Estimato[...]

  • Seite 127

    Chapter 6 State-Space Design Xmath Control Design Module 6-22 ni.com a compensator is shown in Figure 6-6. This figure combines full-state regulator with gain K r and state estimator with gain K e . Combining the plant , or system, equations with those of th e regulator and estimator , you can simplify the system e quations for the compensator as f[...]

  • Seite 128

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-23 Xmath Contr ol Design Module lqgcomp( ) SysC = lqgcomp(Sys,Kr,Ke,{direct}) The lqgcomp( ) function creates a dynamic compensator given a dynamic system having at least one state and the regulator and estimator gain matrices. The returned compensator SysC is al ways in state-spa[...]

  • Seite 129

    Chapter 6 State-Space Design Xmath Control Design Module 6-24 ni.com simulate the system’ s response to a slo w sine input, starting with the cart at rest and the pendulum initially held in the upright ( φ = 0) po sition to obtain Figure 6-7: t = 0:0.01:15; u = pdm([sin(t/2); zeros(t);zeros(t) ],t);ycl = ipsyscl*u; [outNames] = names(ycl); Set p[...]

  • Seite 130

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-25 Xmath Contr ol Design Module Figure 6-7. f and x as a Function of Time, Starting from Zero, as a Result of a Sinusoidal Force Applied to the Syst em Input Riccati Equation Riccati equations, which take one of tw o distinct forms, arise in a number of linear systems and controls[...]

  • Seite 131

    Chapter 6 State-Space Design Xmath Control Design Module 6-26 ni.com continuous-time Riccati equation , which is used if B and S are not specified, is: Note The meaning of R is qu ite different in this case. riccati( ) [P,resid, Kr, ev] = riccati(A,Q,R,{B ,tol,S,d}) Here, A can be either a matrix or a system object. If A is a matrix, riccati( ) sol[...]

  • Seite 132

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-27 Xmath Contr ol Design Module 0 0 0 -4 B 0 -2 0 1 C 0.211325 0.756044 0.000221135 0.330327 D 0 X0 0 0 0 0 System is continuous [P,resid] = riccati(A,Q,R); norm(A'*P+P*A-P*R*P+Q,1) ans (a scalar) = 2.53297e-13 R = 1e-5; [P,resid]=riccati(Sys,Q,R); norm(A'*P+P*A-P*B*inv([...]

  • Seite 133

    Chapter 6 State-Space Design Xmath Control Design Module 6-28 ni.com 0 1 0 B 1 0 0 C 1 0 0 D 0 X0 0 0 0 System is discrete, sampling at 1 se conds. [P,resid]=riccati(Sys,Q,RD,B); norm(A'*P*A-P-A'*P*B*inv(RD+B'*P*B)* B'*P*A+Q,1) resid (a scalar) = 7.90593e-12 [P,resid]=riccati(Sys,Q,RD,B); norm(A'*P*A-P-A'*P*B*inv(RD+B&[...]

  • Seite 134

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-29 Xmath Contr ol Design Module all the eigen values of the system A matrix are neg ati ve. Th e discrete L yapun ov equation is: (6-12) Analogously , the preceding equa tion has a unique solution X when λ i (A) λ j (A) ≠ 1 for all i and j . Again, this means that a unique X e[...]

  • Seite 135

    Chapter 6 State-Space Design Xmath Control Design Module 6-30 ni.com or the follo wing for the discrete case: (6-16) These results deri ve from the L y apunov method of stability analysis for linear systems. Steady state means that at some poi nt the states no longer change. The deri v ativ e term approach es zero in the lar ge for continuous syste[...]

  • Seite 136

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-31 Xmath Contr ol Design Module of the diagonal elements of the Sc hur-decomposed A and B matrices sum to zero, a warning is given that the continuo us equation solution may not be unique. A similar warning appears for the discrete equation solution if the product of any of the ei[...]

  • Seite 137

    Chapter 6 State-Space Design Xmath Control Design Module 6-32 ni.com Special L yapunov Equation A = [-4,10;2,7]; C = [.3,6;2,9]; X = lyapunov(A,C) X (a square matrix) = 1.1816 -0.209028 1.12431 -0.773611 A*X + X*A' + C; norm(A*X + X*A' + C,1) ans (a scalar) = 5.4956e-15 rms( ) [Yrms,Ycov] = rms(Sys,Ucov) The rms( ) function computes the r[...]

  • Seite 138

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-33 Xmath Contr ol Design Module Example 6-11 rms( ) Response Sys = system([-2.3,0.01,5.1;0,-0.35, -2; 0,2,-.35],[1,.25,.25]',[1.34,0,0],0) ; w = logspace(0.01,1,50); Uspec = pdm(ones(w),w); [Ypsd,Yspec] = psd(Sys,Uspec); Balancing a Linear System Given a particular system mod[...]

  • Seite 139

    Chapter 6 State-Space Design Xmath Control Design Module 6-34 ni.com For discrete-time systems, the integrals in the W c and W o equations are replaced by summation signs and th e grammians are obtaine d as the solutions of the discrete-tim e L yapunov equations: (6-19) The controllabil ity grammian m ust be full-rank for the system to be completel[...]

  • Seite 140

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-35 Xmath Contr ol Design Module and σ 1 2 through σ n 2 are the singular values of the matrix H satisfying Σ 2 = H'H. They are termed the Hank el singular v alues. The σ k 2 terms are ordered so that σ 1 2 ≥ σ 2 2 ≥ … ≥ σ n 2 ≥ 0. The balanced system essentia[...]

  • Seite 141

    Chapter 6 State-Space Design Xmath Control Design Module 6-36 ni.com T is the transforma tion relating the states of the original system to the states of the balanced system T ransforming to balanced coordinates can be useful in model reduc tion because the relativ e im portance of the state to the system’ s inpu t/output performance is highlight[...]

  • Seite 142

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-37 Xmath Contr ol Design Module and compare the condition numbers of the balanced system’ s grammians: WcB=lyapunov(Ab,Bb*Bb'); WoB=lyapunov(Ab',Cb'*Cb); condition(WcB) ans (a scalar) = 12.7394 condition(WoB) ans (a scalar) = 12.7394 The condition numbers are now [...]

  • Seite 143

    Chapter 6 State-Space Design Xmath Control Design Module 6-38 ni.com accurate. Gi ven a v ariable Sys b uilt from the matrices {A,B,C,D}, the modal decomposition SysMod is built from T –1 AT , T –1 B , CT , an d D , where T is the transformation matr ix to modal form. If you have complex poles, then T –1 AT is in block diagonal form. Initial [...]

  • Seite 144

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-39 Xmath Contr ol Design Module the deri v ati v e of x 2 is set to zero, resulting in reduced-order state equations of the form: In the discrete case, x 2 k + 1 is taken to be equal to x 2 k so that the state equations become: When using mreduce( ) , remember t o remov e states c[...]

  • Seite 145

    Chapter 6 State-Space Design Xmath Control Design Module 6-40 ni.com 0 0 0 0.924711 B -0.00116788 0.00272531 0.00334243 -0.00162497 C 1 0.866186 -0.848754 -1.0118 D 0 X0 0 0 0 0 State Names ----------- State 1 State 2 State 3 State 4 Input Names ----------- Input 1 Output Names ------------ Output 1 System is discrete, sampling at 0.2 seconds. T (a[...]

  • Seite 146

    Chapter 6 State-Space D esign © National Instruments Corporatio n 6-41 Xmath Contr ol Design Module 0 0.52 1.94289e-16 6.66134e-16 0 0 0.665289 4.44089e-16 0 0 0 0.924711 SysMR = mreduce(SysM, [1,2,4]) SysMR (a state space system) = A 0.37 0 0 0 0.52 0 0 0 0.924711 B -0.00116788 0.00272531 -0.00162497 C 1 0.866186 -1.0118 D -0.00847566 X0 0 0 0 0 [...]

  • Seite 147

    Chapter 6 State-Space Design Xmath Control Design Module 6-42 ni.com Figure 6-8. Modal System and Reduced Modal Syst em[...]

  • Seite 148

    © National Instruments Corporatio n A -1 Xmath Co ntrol Design Modu le A T echnical References [BeV88] T . Beelen, P . V an D ooren, “ A n impr oved algorithm for the computation of Kronecker’ s canonical form of a singular pencil, ” Linear Algebra and Applications , 105, pages 9–65, 1988. [BH75] A.E. Bryson and Y .C. Ho, Applied Optimal C[...]

  • Seite 149

    Appendix A T echnical References Xmath Control Design Modul e A-2 ni.com [Kai80] T . Kailath, Linear Systems , Prentice-Hall, Inc., Engle wood Clif fs, New Jerse y , 1980. [Kai81] T . Kailath, Lectures on Wiener and Kalman Filtering , S pringer-V erlag , New Y ork, 1981. [Lau79] A.J. Laub, “ A Schur method fo r solving algebraic Riccati equations[...]

  • Seite 150

    © National Instruments Corporatio n B -1 Xmath Co ntrol Design Modu le 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[...]

  • Seite 151

    of fice W eb sites, which provide up-to-date contact informati on, support phone numbers, email addre sses, and current e vents.[...]

  • Seite 152

    © National Instruments Corporatio n I-1 Xmath Control Design Module Index A abcd, 1-16, 2-8 adjoint system, 3-3 afeedback, 3-4 append, 3-6 appending dynamic systems, 3-6 autocorrelation function, 5 -20 B balance, 6-35 bilinear transform, 2-14 Bode default frequency range (deffreqrange), 5-10 format, 5-8 frequency analysis, 5-7 plots, 5-7 bode, 5-1[...]

  • Seite 153

    Index Xmath Control Design Modul e I-2 ni.com converting to continuous equivalent, 2-19 from a continuous system (example) , 1-18 discrete-time Riccati equation, 6-25 discretize, 2-13 discretizing a system backward rectangular method , 2-14 forward rectangular method, 2-1 4 hold equivalence methods, 2-1 5 pole-zero matching, 2-15 trapezoid method, [...]

  • Seite 154

    Index © National Instruments Corporatio n I-3 Xmath Control Design Module I impulse, 4-13 input, 4-13 continuous time, 4-13 discrete time, 4-13 response, 4-13, 6-33 initial, 4-16 initial conditions, 4-14, 4-16 input disturbance matrix, 6-1 7 names, extracting, 2-11 instability, 5-9 instrument drivers (NI resources), B-1 internally balanced sy stem[...]

  • Seite 155

    Index Xmath Control Design Modul e I-4 ni.com steady-state response to white noise, 6-29 white process, 6-23 nomenclature, 1-2 numden, 2-10 numerical integration method s, 2-14 Nyquist contour, 5-19 plot, 5-1 7 stability criterion , 5-15 nyquist, 5-16 O observability, 6-4, 6-35 grammians, 6-30 matrix, 6-5 observable, 6-6 observable partition of a s[...]

  • Seite 156

    Index © National Instruments Corporatio n I-5 Xmath Control Design Module rms, 6-32 root locus, plotting, 5 -3 root-mean-square response, 6-32 S sample period, extract with period, 2-10 sample rate, 2-4 choosing, 1-18 scale system output, 1-16 Schur decomposition, 6-30 solver, 6-26 selection matrix for adding or removing inputs, 3-9 sensitivity of[...]

  • Seite 157

    Index Xmath Control Design Modul e I-6 ni.com T technical support, B-1 time domain simulation, general, 4-10 update, 6-19 training and certification (NI resources), B-1 transfer function checking for, 2-12 coefficients form, 2-3 converted to state space before decomposition, 2-9 creating, 2-3 form, definition, 4-2 formed from partial fractions, 4-9[...]