Manual National Instruments 370753C-01

157 pages 1.21 mb
Download

Go to site of 157

Summary
  • National Instruments 370753C-01 - page 1

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

  • National Instruments 370753C-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, ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 5

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

  • National Instruments 370753C-01 - page 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( ) .............. ...

  • National Instruments 370753C-01 - page 7

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

  • National Instruments 370753C-01 - page 8

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

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 . ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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. ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 = " ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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_ ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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]) ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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. ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 - ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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( ) ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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& ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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: ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 | ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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? ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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. ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ° . ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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( ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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. ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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( ...

  • National Instruments 370753C-01 - page 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& ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 147

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

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 151

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

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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, ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

  • National Instruments 370753C-01 - page 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 ...

Manufacturer National Instruments Category Fan

Documents that we receive from a manufacturer of a National Instruments 370753C-01 can be divided into several groups. They are, among others:
- National Instruments technical drawings
- 370753C-01 manuals
- National Instruments product data sheets
- information booklets
- or energy labels National Instruments 370753C-01
All of them are important, but the most important information from the point of view of use of the device are in the user manual National Instruments 370753C-01.

A group of documents referred to as user manuals is also divided into more specific types, such as: Installation manuals National Instruments 370753C-01, service manual, brief instructions and user manuals National Instruments 370753C-01. Depending on your needs, you should look for the document you need. In our website you can view the most popular manual of the product National Instruments 370753C-01.

A complete manual for the device National Instruments 370753C-01, how should it look like?
A manual, also referred to as a user manual, or simply "instructions" is a technical document designed to assist in the use National Instruments 370753C-01 by users. Manuals are usually written by a technical writer, but in a language understandable to all users of National Instruments 370753C-01.

A complete National Instruments manual, should contain several basic components. Some of them are less important, such as: cover / title page or copyright page. However, the remaining part should provide us with information that is important from the point of view of the user.

1. Preface and tips on how to use the manual National Instruments 370753C-01 - At the beginning of each manual we should find clues about how to use the guidelines. It should include information about the location of the Contents of the National Instruments 370753C-01, FAQ or common problems, i.e. places that are most often searched by users in each manual
2. Contents - index of all tips concerning the National Instruments 370753C-01, that we can find in the current document
3. Tips how to use the basic functions of the device National Instruments 370753C-01 - which should help us in our first steps of using National Instruments 370753C-01
4. Troubleshooting - systematic sequence of activities that will help us diagnose and subsequently solve the most important problems with National Instruments 370753C-01
5. FAQ - Frequently Asked Questions
6. Contact detailsInformation about where to look for contact to the manufacturer/service of National Instruments 370753C-01 in a specific country, if it was not possible to solve the problem on our own.

Do you have a question concerning National Instruments 370753C-01?

Use the form below

If you did not solve your problem by using a manual National Instruments 370753C-01, ask a question using the form below. If a user had a similar problem with National Instruments 370753C-01 it is likely that he will want to share the way to solve it.

Copy the text from the picture

Comments (0)