National Instruments 370753C-01 - Manuals
National Instruments 370753C-01 – Manual in PDF format online.
Manuals:
Manual National Instruments 370753C-01
Summary
Support Worldwide Technical Support and Product Information ni.com National Instruments Corporate Headquarters 11500 North Mopac Expressway Austin, 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 3...
Important Information Warranty TThe media on which you receive National Instruments software are warranted not to fail to execute programming instructions, due to defects in materials and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. Nat...
Conventions The following conventions are used in this manual: < > Angle brackets that contain numbers separated by an ellipsis represent a range of values associated with a bit or signal name—for example, DIO<3..0>. [ ] Square brackets enclose optional items—for example, [ response ]. »...
© National Instruments Corporation v Xmath Control Design Module Contents Chapter 1Introduction Using This Manual......................................................................................................... 1-1 Document Organization...........................................................
Contents Xmath Control Design Module viii ni.com Appendix ATechnical References Appendix BTechnical Support and Professional Services Index
© National Instruments Corporation 1-1 Xmath Control Design Module 1 Introduction The Control Design Module (CDM) is a complete library of classical and modern control design functions that provides a flexible, intuitive control design framework. This chapter starts with an outline of the manual and...
Chapter 1 Introduction Xmath Control Design Module 1-2 ni.com particular system properties or to change the format of a system. These topics include continuous/discrete system conversion, as well as finding equivalent transfer function state-space representations. • Chapter 3, Building System Connec...
Chapter 1 Introduction © National Instruments Corporation 1-3 Xmath Control Design Module • H ( s ) is used to denote the frequency response, over some range of frequencies of a system where s is the Laplace variable. H ( q ) is used to indicate that the system can be continuous or discrete. • A sin...
Chapter 1 Introduction Xmath Control Design Module 1-4 ni.com Control Design Tutorial This tutorial illustrates the use of functions and commands provided in Xmath and the Xmath Control Design Module to solve control problems. The emphasis of the tutorial is on using a number of different approaches...
Chapter 1 Introduction © National Instruments Corporation 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 --...
Chapter 1 Introduction Xmath Control Design Module 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 complex plane and therefore is open-loop unstable. Checking the pole and zero location...
Chapter 1 Introduction © National Instruments Corporation 1-7 Xmath Control Design Module One approach to stabilizing this system is to try to cancel the pole at –0.656513 by adding a compensator, K 1 ( s ), with a zero at –0.656513. Note It is important to understand that this is primarily an acade...
Chapter 1 Introduction Xmath Control Design Module 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 . To close the interactive root locus dialog box, select File...
Chapter 1 Introduction © National Instruments Corporation 1-9 Xmath Control Design Module Close the loop using the single-input syntax of feedback( ) , which implements direct unity-gain negative feedback, and obtain the system’s step response using step( ) : Kc = 2; cl_syscomp1 = feedback(Kc*K1s*K2...
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 closed-loop controller 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...
Chapter 1 Introduction © National Instruments Corporation 1-11 Xmath Control Design Module Because cl_syscomp2 contains an internal pole-zero cancellation, you can rewrite it in minimal form and then check the closed-loop pole and zero locations: cl_syscomp2m = minimal(cl_syscomp2); The system has 1...
Chapter 1 Introduction Xmath Control Design Module 1-12 ni.com Figure 1-5. Helicopter Velocity Tracking Step Input at the Rotor You also can look 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)...
Chapter 1 Introduction © National Instruments Corporation 1-13 Xmath Control Design Module Figure 1-6. Closed-Loop System Bode Plot The domain of the gain and phase margin PDMs indicates the frequency (in hertz) at which the margin occurs. So the gain can be increased by about 26.1 dB before the sys...
Chapter 1 Introduction Xmath Control Design Module 1-14 ni.com You can verify that your system is controllable, then define the closed-loop poles you want and use poleplace( ) to find the feedback gains required given the system A and B matrices. [,,nuc] = controllable(Gs) nuc (a scalar) = 0 Because...
Chapter 1 Introduction © National Instruments Corporation 1-15 Xmath Control 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 You connect the controller to the observer using lq...
Chapter 1 Introduction Xmath Control Design Module 1-16 ni.com You can choose to scale the system output here for zero steady-state error in the step response. This is accomplished in an intuitive manner, dividing the system sys_cl by the desired scaling factor. sys_cl = sys_cl/51.76; v_obc = step(s...
Chapter 1 Introduction © National Instruments Corporation 1-17 Xmath Control Design Module When you create the estimator system sys_est , you use the original A matrix for the state-update equation, but you provide a zero external input (a B matrix of zero). The output matrix is an identity matrix p...
Chapter 1 Introduction Xmath Control Design Module 1-18 ni.com Figure 1-10. Multiple Plots Showing Time Needed for States to be Correctly Tracked by Estimator, Given Incorrect Initial Values Helicopter Hover Problem: Discrete Formulation Discrete-time control systems are most frequently designed in ...
Chapter 1 Introduction © National Instruments Corporation 1-19 Xmath Control Design Module You can use the default exponential discretization method with dt = 0.01 and compare frequency responses between the original system and the discretized system: ssysd = discretize(ssys, 0.01); f = freq(ssys,lo...
Chapter 1 Introduction Xmath Control Design Module 1-20 ni.com Figure 1-12. Step Response of a Discrete System Using Discretized Observer-Based Controller As you discretize the compensator, form the closed-loop, scaled system, and simulate its response to a step input, you must ensure that the sampl...
Chapter 1 Introduction © National Instruments Corporation 1-21 Xmath Control Design Module The linearized state-space equations, including the actuator and sensor dynamics, are as follows: θ is the angle (in radians) the wedge makes with the vertical axis, x is the position of the sliding mass, and ...
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 make sure it can bring the effect of an external disturbance (such as a sharp push to the cart) to zero as quickly as possible...
Chapter 1 Introduction © National Instruments Corporation 1-23 Xmath Control Design Module Figure 1-13. Response of Full-State Feedback Controller to a Unit Step Disturbance Having established your regulator design, you build the estimator and simulate performance of the closed-loop system feeding b...
Chapter 1 Introduction Xmath Control Design Module 1-24 ni.com Figure 1-14. Response of Observer-Based Controller to a Unit Step Disturbance
© National Instruments Corporation 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 mathematic...
Chapter 2 Linear System Representation Xmath Control Design Module 2-2 ni.com Transfer Function System Models One way of representing continuous-time finite-dimensional linear time-invariant systems is with the transfer function: with num(s) and den(s) being polynomials in s . They can be specified ...
Chapter 2 Linear System Representation © National Instruments Corporation 2-3 Xmath Control Design Module form the same transfer function as that derived 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...
Chapter 2 Linear System Representation © National Instruments Corporation 2-5 Xmath Control Design Module State-Space System Models State-space models comprise the second category of linear system representations in Xmath. In state-space form, first-order differential (continuous-time) and differenc...
Chapter 2 Linear System Representation Xmath Control Design Module 2-6 ni.com Again, you create the system using the system( ) function. This time 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...
Chapter 2 Linear System Representation © National Instruments Corporation 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 p...
Chapter 2 Linear System Representation Xmath Control Design Module 2-8 ni.com Example 2-3 Using system( ) to Change the Attributes of an Existing System sys4=system([0,1;-0.75,0],[1,0]',[0,1],[], {dt=0.5}); sys4 = system(sys4, {inputNames = "Current", outputNames = "Velocity", stateN...
Chapter 2 Linear System Representation © National Instruments Corporation 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 proper. Using the systems defined in Examples 2-1 and 2-2,...
Chapter 2 Linear System Representation Xmath Control Design Module 2-10 ni.com numden( ) [num,den] = numden(Sys) The numden( ) function returns the numerator and denominator polynomials comprising a single-input, single-output system in transfer function form. If the system is in state-space form, a...
Chapter 2 Linear System Representation © National Instruments Corporation 2-11 Xmath Control Design Module these polynomials into a transfer-function and uses period( ) to set the sampling interval to match that of sys4 . Example 2-6 Using period( ) to Extract the Sampling Period [num,den]=numden(sy...
Chapter 2 Linear 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 syste...
Chapter 2 Linear System Representation © National Instruments Corporation 2-13 Xmath Control 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...
Chapter 2 Linear System Representation Xmath Control Design Module 2-14 ni.com discretization methods used based on the specification of each keyword are discussed in the following sections. Numerical Integration Methods: forward, backward, tustins Xmath provides three methods of numerical integrati...
Chapter 2 Linear System Representation © National Instruments Corporation 2-15 Xmath Control Design Module Pole-Zero Matching: polezero The pole-zero matching method of discretizing a continuous system follows from the relation between the continuous s and discrete z frequency domains: where T is th...
Chapter 2 Linear System Representation Xmath Control Design Module 2-16 ni.com The exponential keyword assumes that the response value between samples is constant and can, therefore, be represented by a zero-order hold polynomial. When exponential is specified, the continuous-time step response is d...
Chapter 2 Linear System Representation © National Instruments Corporation 2-17 Xmath Control 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,gain_z,gain_e], {legend = ["Continuous...
Chapter 2 Linear System Representation Xmath Control Design Module 2-18 ni.com Many of the discretization techniques discussed in the Hold Equivalence Methods: exponential and firstorder section can be easily reversed to obtain a continuous equivalent to a discrete system. The makecontinuous( ) func...
Chapter 2 Linear System Representation © National Instruments Corporation 2-19 Xmath Control Design Module Now convert 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....
© National Instruments Corporation 3-1 Xmath Control Design Module 3 Building System Connections Large system models are frequently built by connecting smaller models together. You can perform different types of linear system interconnections using the Xmath functions discussed in this chapter. Math...
Chapter 3 Building System Connections Xmath Control Design Module 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 inverted Sys2 where Sys = Sys 1 * inv(Sys 2 ) , u = u 2 , and y = ...
Chapter 3 Building System Connections © National Instruments Corporation 3-3 Xmath Control Design Module Dynamic systems also can be flexibly combined with scalars and compatibly sized matrices using the operators in Table 3-1. A compatibly sized matrix is one having the same dimensions as the dynam...
Chapter 3 Building System Connections Xmath Control Design Module 3-4 ni.com Linear System Interconnection Functions afeedback( ) , append( ) , connect( ) , and feedback( ) connect dynamic systems in state–space or transfer–function form to produce a larger system in state-space form. The following ...
Chapter 3 Building System Connections © National Instruments Corporation 3-5 Xmath Control Design Module • By default, feedback is defined to be negative. • The number of outputs from the first system must equal the number of inputs to the second system. • The number of outputs from the second syste...
Chapter 3 Building System Connections Xmath Control Design Module 3-6 ni.com if the condition 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 ...
Chapter 3 Building System Connections © National Instruments Corporation 3-7 Xmath Control Design Module is created by appending the inputs, outputs, and states of Sys1 and Sys2 . A larger number of systems can be appended by appending two at a time. • Both systems must have the same sample rate. • ...
Chapter 3 Building System Connections © National Instruments Corporation 3-9 Xmath Control Design Module • By default, feedback is defined to be positive. To enforce negative feedback, specify connect(Sys,-K) . • A “selection matrix” has a single 1 in each row; the rest of the row contains zeros. Th...
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 equations with the equation for the positive feedback input term: and multiplyin...
Chapter 3 Building System Connections © National Instruments Corporation 3-11 Xmath Control Design Module feedback( ) Sys = feedback(Sys1,{Sys2}) The feedback( ) function connects two dynamic systems together in a feedback loop as shown in Figure 3-4. • By default, feedback is defined to be negative...
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...
© National Instruments Corporation 4-1 Xmath Control Design Module 4 System Analysis This chapter discusses time-domain solutions of the equations underlying transfer functions and state-space system models, and what these solutions tell us about the stability of the system. Xmath provides a number ...
Chapter 4 System Analysis Xmath Control Design Module 4-2 ni.com The time-response of discrete systems is found directly as a summation of the information from preceding time points in the state and input histories. Using * to indicate discrete convolution, you can express the time domain output as ...
Chapter 4 System Analysis © National Instruments Corporation 4-3 Xmath Control Design Module and define the zeros of S( λ ) as any values of λ for which the system matrix drops rank. For single-input single-output systems this is equivalent to the polynomial zeros of the transfer-function numerator....
Chapter 4 System Analysis Xmath Control Design Module 4-4 ni.com directly from the roots of the transfer function numerator. If Sys is in state-space form, the definition of its zeros arises from the system matrix, (4-3) and its MIMO transfer function: (4-4) Defining n as the number of states in the...
Chapter 4 System Analysis © National Instruments Corporation 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-space zero computation creates a reduced-order S ( λ ), using Householder reflectio...
Chapter 4 System Analysis Xmath Control Design Module 4-6 ni.com Example 4-3 Dynamic Response through Partial Fraction Expansion To illustrate how you can examine the stability and dynamic response of a system using Xmath, start with the open-loop transfer function system You close a unity feedback ...
Chapter 4 System Analysis © National Instruments Corporation 4-7 Xmath Control Design Module 0 0 Input Names ----------- Input 1 Output Names ------------ Output 1 System is continuous You can examine the stability of G cl ( s ) by representing it as a sum of partial fractions, using the residue( ) ...
Chapter 4 System Analysis Xmath Control Design Module 4-8 ni.com Figure 4-2. Transient Response of the Closed-Loop System as a Function of Time You also can calculate the impulse response directly with t = [0 : 0.1 : 350 ]; hi = impulse(syscl,t); plot(hi, { xlab = "Time (sec)", ylab = "T...
Chapter 4 System Analysis © National Instruments Corporation 4-9 Xmath Control Design Module and orders for which the residue(s) should be found. If a user-specified value for pls is not actually a pole of the system or if the order requested is greater than the multiplicity of the pole, the corresp...
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 Ti...
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) construct for performing time-domain simulation is used analogously no matter how many inputs the system has. For a multi-input, multi-output system, the ...
Chapter 4 System Analysis © National Instruments Corporation 4-13 Xmath Control Design Module Impulse Response of a System An impulse input to a system is defined somewhat differently depending on whether the system is discrete or continuous. For a continuous-time system, an impulse is a unit-area s...
Chapter 4 System Analysis Xmath Control Design Module 4-14 ni.com Note A continuous system and its discrete-time equivalent (computed using the impulse-invariant z-transform) have impulse responses differing only by a factor of 1/ dt . impulse( ) computes the impulse response by using the B matrix f...
Chapter 4 System Analysis © National Instruments Corporation 4-15 Xmath Control Design Module Figure 4-4. 15-Second Impulse Response deftimerange( ) tvec = deftimerange(Sys) deftimerange( ) computes a regular time vector (in units of seconds) that can be used in time-domain simulations to observe th...
Chapter 4 System Analysis Xmath Control Design Module 4-16 ni.com The maximum time, Tmax , is computed as follows, with vP denoting the vector of scaled poles and dt the period: Tmax=abs(log(.05)/... max(real(vP(find(real(vP)<>0))))) If Tmax == null # all poles purely imaginary Tmax=100*dt end...
Chapter 4 System Analysis © National Instruments Corporation 4-17 Xmath Control Design Module The simulation performed in initial( ) uses an input of zero for each point in the time vector. The output Y is a PDM where domain is the time vector. By varying the initial values of the states individuall...
Chapter 4 System Analysis Xmath Control Design Module 4-18 ni.com Step Response The response of a system to a unit step input is one of the most commonly 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 beginni...
Chapter 4 System Analysis © National Instruments Corporation 4-19 Xmath Control Design Module From Figure 4-6 you see that the delay 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 ...
Chapter 4 System Analysis Xmath Control Design Module 4-20 ni.com Get indices of all values > 0.9 * final value: gt_9_10 = find(Y > 0.9*Yf); Subtract domain values 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: max...
© National Instruments Corporation 5-1 Xmath Control Design Module 5 Classical Feedback Analysis The open-loop systems analyzed 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 condition...
Chapter 5 Classical Feedback Analysis Xmath Control Design Module 5-2 ni.com Because open-loop systems are generally easier to study and model than closed-loop systems, you want to design closed-loop systems based on information obtainable from the open-loop system. Root Locus In Chapter 4, System A...
Chapter 5 Classical Feedback Analysis © National Instruments Corporation 5-3 Xmath Control Design Module rlocus( ) rlroots=rlocus(sys,K,{xmin,xmax,ymin,ymax,pattern,graph}) rlocus(sys,{xmin,xmax,ymin,ymax,pattern})# (interactive) The rlocus( ) function computes and draws root locus diagrams for cont...
Chapter 5 Classical Feedback Analysis Xmath Control Design Module 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 interactive form. Within this form, you can change the gain value through either a slider or an editable label wher...
Chapter 5 Classical Feedback Analysis © National Instruments Corporation 5-5 Xmath Control Design Module As the gain varies, 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 values the closed-loop...
Chapter 5 Classical Feedback Analysis Xmath Control Design Module 5-6 ni.com For discrete-time state-space systems with a sampling interval of T , the frequency response for each frequency point ω is shown in the following equation: Algorithm The algorithm, based on [Lau86], uses a Hessenberg decomp...
Chapter 5 Classical Feedback Analysis © National Instruments Corporation 5-7 Xmath Control Design Module For an example of frequency response of a simple system, refer to Example 5-2. Given the single-input, single-output open-loop plant in Figure 5-3, where U ( s ) and Y ( s ) are the frequency dom...
Chapter 5 Classical Feedback Analysis Xmath Control Design Module 5-8 ni.com because they can be used to assess the relative stability of a closed-loop system given the frequency response of the open-loop system. It should be noted that the open-loop system should be stable and minimum phase , havin...
Chapter 5 Classical Feedback Analysis © National Instruments Corporation 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 magni...
Chapter 5 Classical Feedback Analysis Xmath Control Design Module 5-10 ni.com Referring to Figure 5-4, notice the additional lines drawn on the plots at the frequencies where the gain crosses the 0 dB line and where the phase crosses the 180 ° line. When the gain crosses the 0 dB line, the phase is ...
Chapter 5 Classical Feedback Analysis © National Instruments Corporation 5-11 Xmath Control Design Module Figure 5-4. Bode Plot Showing System Gain and Phase Margins These plots illustrate how the location of the system poles and zeros shapes the gain and phase curves. Each pole contributes a factor...
Chapter 5 Classical Feedback Analysis Xmath Control Design Module 5-12 ni.com Each of these contributes a phase angle φ defined 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 by atan2( ) in Xmath...
Chapter 5 Classical Feedback Analysis © National Instruments Corporation 5-13 Xmath Control Design Module margin( ) loops over all the frequency points in the response and performs the following computation for phase and gain margins at each, denoting gain margin as Mg and phase margin as Mp : This ...
Chapter 5 Classical Feedback Analysis © National Instruments Corporation 5-15 Xmath Control Design Module The result is shown 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 sys...
Chapter 5 Classical Feedback Analysis Xmath Control Design Module 5-16 ni.com plant is open-loop stable, then there should be no encirclements. If the plant has one open-loop unstable pole, there should be one negative (counter-clockwise) encirclement. The stability criterion is most easily derived ...
Chapter 5 Classical 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
Chapter 5 Classical Feedback Analysis © National Instruments Corporation 5-19 Xmath Control Design Module By combining the information from the two plots, reflecting them across the real axis to account for the negative frequency response and augmenting them with a line closing the contour in the cl...
Chapter 5 Classical Feedback Analysis Xmath Control Design Module 5-20 ni.com -0.52263 0.00336213 + 3.75217 j 0.00336213 - 3.75217 j -11.4841 Two of the poles of the closed-loop system are now unstable. Linear Systems and Power Spectral Density A key characteristic of the linear, time-invariant syst...
Chapter 5 Classical Feedback Analysis © National Instruments Corporation 5-21 Xmath Control Design Module values at which the power spectral density is to be computed and where dependent matrices are the input power spectral density matrix at each frequency. psd( ) computes a cross power spectral de...
© National Instruments Corporation 6-1 Xmath Control Design Module 6 State-Space Design The functions in this chapter are generally termed “modern control” tools. They are based on the state-space linear system representation, and employ methods which are generally applicable to both SISO and MIMO p...
Chapter 6 State-Space Design Xmath Control Design Module 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 SISO transfer function case as a cancellation between a numerator and denominator r...
Chapter 6 State-Space Design © National Instruments Corporation 6-3 Xmath Control Design Module Figure 6-1. Full-State Feedback Being Used to Relocate the Eigenvalues of a Controllable System Based on the Value of the Gain K controllable( ) [SysC,T,nuc]=controllable(Sys,{tol}) The question that natu...
Chapter 6 State-Space Design Xmath Control Design Module 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 the sy...
Chapter 6 State-Space Design © National Instruments Corporation 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 successive derivatives of the output term, thus forming a ...
Chapter 6 State-Space Design Xmath Control Design Module 6-6 ni.com Figure 6-2. General Observer Block Diagram If the observability matrix is nonsingular, you will be able to put the eigenvalues (pole locations) of ( A – LC ), shown in Equation 6-4, anywhere you want. Thus, you can choose them to ma...
Chapter 6 State-Space Design © National Instruments Corporation 6-7 Xmath Control Design Module Example 6-2 Observability 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 syste...
Chapter 6 State-Space Design Xmath Control Design Module 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 given system. This comprises the controllable and obser...
Chapter 6 State-Space Design © National Instruments Corporation 6-9 Xmath Control Design Module ans (a scalar) = 1 zeros(SysM) ans is null stair( ) [SysT,T,nc] = stair(Sys,tol) The stair( ) converts a dynamic system to staircase form. In the staircase form, the A and B system matrices are linearly t...
Chapter 6 State-Space Design Xmath Control Design Module 6-10 ni.com Duality and Pole Placement The new state-update equation in the Controllability section and the Observability and Estimation section, the time-update equation in the Observability and Estimation section, along with the correspondin...
Chapter 6 State-Space Design © National Instruments Corporation 6-11 Xmath Control Design Module poleplace( ) is unusual among Xmath’s modern control design functions in that only the A and B matrix variables are used as input, rather than a complete system variable. This is done because the other s...
Chapter 6 State-Space Design Xmath Control Design Module 6-12 ni.com pairs as poles( ) . For each pole value in poles( ) , poleplace( ) forms a vector by subtracting the pole’s value from each diagonal element of S except for the last element (0). The resulting matrix is then divided by the correspo...
Chapter 6 State-Space Design Xmath Control Design Module 6-14 ni.com The optimal estimator and regulator problems illustrate the principle of duality—that for any given system realization {A,B,C} there is a dual realization {A',C',B'} with related controllability and observability. Refer to the Dual...
Chapter 6 State-Space Design © National Instruments Corporation 6-15 Xmath Control 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 initial reference point along the line of its motion...
Chapter 6 State-Space Design Xmath Control Design Module 6-16 ni.com Ruu is a scalar because you have 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 You will use this regulator gain later in designing a comp...
Chapter 6 State-Space Design © National Instruments Corporation 6-17 Xmath Control Design Module Figure 6-5. Diagram of the Estimator Representation estimator( ) inputs include the dynamic system Sys , and the noise intensity matrices Q xx , Q yy , or Q xy . For a linear–time–invariant process descr...
Chapter 6 State-Space Design Xmath Control Design Module 6-18 ni.com numerical difficulties are encountered, the algorithm will attempt to determine whether or not the problem is well posed. Checks are made to determine the reachability and the positive definiteness or semipositive-definiteness of t...
Chapter 6 State-Space Design Xmath Control Design Module 6-20 ni.com this measurement update, derived in [Kal60], are shown in the following equations. Substituting the system and noise matrices for the steady-state case, you solve the discrete Riccati equation to obtain P and thence K e , as shown ...
Chapter 6 State-Space Design © National Instruments Corporation 6-21 Xmath Control Design Module If you want the closed-loop system eigenvalues, compute them as the eigenvalues of A – K e C . For an example of how to design a state estimator for the inverted pendulum problem, refer to Example 6-6. E...
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 the regulator and estimator, you can simplify...
Chapter 6 State-Space Design © National Instruments Corporation 6-23 Xmath Control 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 ret...
Chapter 6 State-Space Design Xmath Control Design Module 6-24 ni.com simulate the system’s response to a slow sine input, starting with the cart at rest and the pendulum initially held in the upright ( φ = 0) position to obtain Figure 6-7: t = 0:0.01:15; u = pdm([sin(t/2); zeros(t);zeros(t)],t);ycl ...
Chapter 6 State-Space Design © National Instruments Corporation 6-27 Xmath Control 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]=ricc...
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 seconds. [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-...
Chapter 6 State-Space Design Xmath Control Design Module 6-30 ni.com or the following for the discrete case: (6-16) These results derive from the Lyapunov method of stability analysis for linear systems. Steady state means that at some point the states no longer change. The derivative term approache...
Chapter 6 State-Space Design © National Instruments Corporation 6-31 Xmath Control Design Module of the diagonal elements of the Schur-decomposed A and B matrices sum to zero, a warning is given that the continuous equation solution may not be unique. A similar warning appears for the discrete equat...
Chapter 6 State-Space Design Xmath Control Design Module 6-32 ni.com Special Lyapunov 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,U...
Chapter 6 State-Space Design © National Instruments Corporation 6-33 Xmath Control 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 Line...
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 the grammians are obtained as the solutions of the discrete-time Lyapunov equations: (6-19) The controllability grammian must...
Chapter 6 State-Space Design © National Instruments Corporation 6-35 Xmath Control Design Module and σ 1 2 through σ n 2 are the singular values of the matrix H satisfying Σ 2 = H'H. They are termed the Hankel singular values. The σ k 2 terms are ordered so that σ 1 2 ≥ σ 2 2 ≥ … ≥ σ n 2 ≥ 0. The ba...
Chapter 6 State-Space Design Xmath Control Design Module 6-36 ni.com T is the transformation relating the states of the original system to the states of the balanced system Transforming to balanced coordinates can be useful in model reduction because the relative importance of the state to the syste...
Chapter 6 State-Space Design © National Instruments Corporation 6-37 Xmath Control 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 Th...
Chapter 6 State-Space Design Xmath Control Design Module 6-38 ni.com accurate. Given a variable Sys built from the matrices {A,B,C,D}, the modal decomposition SysMod is built from T –1 AT , T –1 B , CT , and D , where T is the transformation matrix to modal form. If you have complex poles, then T –1...
Chapter 6 State-Space Design © National Instruments Corporation 6-39 Xmath Control Design Module the derivative 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 ...
Chapter 6 State-Space Design Xmath Control Design Module 6-42 ni.com Figure 6-8. Modal System and Reduced Modal System
© National Instruments Corporation I-1 Xmath Control Design Module Index A abcd, 1-16, 2-8adjoint system, 3-3afeedback, 3-4append, 3-6appending dynamic systems, 3-6autocorrelation function, 5-20 B balance, 6-35bilinear transform, 2-14Bode default frequency range (deffreqrange), 5-10 format, 5-8frequ...
Index Xmath Control Design Module I-2 ni.com converting to continuous equivalent, 2-19 from a continuous system (example), 1-18 discrete-time Riccati equation, 6-25discretize, 2-13discretizing a system backward rectangular method, 2-14forward rectangular method, 2-14hold equivalence methods, 2-15pol...
Index © National Instruments Corporation I-3 Xmath Control Design Module I impulse, 4-13 input, 4-13 continuous time, 4-13discrete time, 4-13 response, 4-13, 6-33 initial, 4-16initial conditions, 4-14, 4-16input disturbance matrix, 6-17names, extracting, 2-11 instability, 5-9instrument drivers (NI r...
Index Xmath Control Design Module I-4 ni.com steady-state response to white noise, 6-29white process, 6-23 nomenclature, 1-2numden, 2-10numerical integration methods, 2-14Nyquist contour, 5-19plot, 5-17stability criterion, 5-15 nyquist, 5-16 O observability, 6-4, 6-35 grammians, 6-30matrix, 6-5 obse...
Index © National Instruments Corporation I-5 Xmath Control Design Module rms, 6-32root locus, plotting, 5-3root-mean-square response, 6-32 S sample period, extract with period, 2-10sample rate, 2-4 choosing, 1-18 scale system output, 1-16Schur decomposition, 6-30solver, 6-26 selection matrix for add...
Index Xmath Control Design Module I-6 ni.com T technical support, B-1time domain simulation, general, 4-10update, 6-19 training and certification (NI resources), B-1transfer function checking for, 2-12coefficients form, 2-3converted to state space before decomposition, 2-9 creating, 2-3form, definit...
National Instruments Manuals
-
National Instruments SCC-AI01
Manual
-
National Instruments USB-6008/6009
Manual
-
National Instruments 7334
Manual
-
National Instruments NI 9403E
Manual
-
National Instruments DIO 6533
Manual
-
National Instruments NI PCI-5114
Manual
-
National Instruments 1000DC
Manual
-
National Instruments 321518A-01
Manual
-
National Instruments NI 5672
Manual
-
National Instruments USB-9221
Manual
-
National Instruments PCI
Manual
-
National Instruments NI 9229
Manual
-
National Instruments 6211
Manual
-
National Instruments NI 9217
Manual
-
National Instruments NI USB-6009
Manual
-
National Instruments NI sbRIO-960x
Manual
-
National Instruments 6024E
Manual
-
National Instruments 3.x
Manual
-
National Instruments NI 784xR
Manual
-
National Instruments NI-Motion
Manual