NI MATRIXx TM Xmath Interactive Control Design Module TM Xmath Interactive Control Design Module April 2007 370754C-01
Support Worldwide Technical Support and Product Information ni.
Important Information Warranty The 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. National Instruments will, at its option, repair or replace software media that do not execute programming instructions if National Instruments receives notice of such defects during the warranty period.
Conventions The following conventions are used in this manual: » The » symbol leads you through nested menu items and dialog box options to a final action. The sequence File»Page Setup»Options directs you to pull down the File menu, select the Page Setup item, and select Options from the last dialog box. This icon denotes a note, which alerts you to important information. bold Bold text denotes items that you must select or click in the software, such as menu items and dialog box options.
Contents Chapter 1 Introduction Using This Manual.........................................................................................................1-1 Document Organization...................................................................................1-1 Commonly-Used Nomenclature......................................................................1-3 Related Publications ........................................................................................1-3 MATRIXx Help.....................
Contents Graphically Manipulating Poles and Zeros..................................................... 2-13 Editing Poles and Zeros .................................................................... 2-13 Editing Poles and Zeros Graphically .............................................................. 2-14 Complex Poles and Zeros ................................................................. 2-14 Isolated Real Poles and Zeros...........................................................
Contents Chapter 5 Root Locus Synthesis Overview........................................................................................................................5-1 Window Anatomy..........................................................................................................5-1 Opening the Root Locus Synthesis Window .................................................................5-3 Terminology...............................................................................................
Contents Manipulating the Design Parameters............................................................................. 7-7 Manipulating the Design Parameters Graphically .......................................... 7-7 Ranges ............................................................................................................. 7-8 Chapter 8 H-Infinity Synthesis H-Infinity Synthesis Window Anatomy........................................................................
Contents Chapter 11 Introduction to MIMO Design Basic Terminology for MIMO Systems ........................................................................11-1 Feedback System Configuration......................................................................11-1 Transfer Functions .........................................................................................................11-2 Integral Action.................................................................................................
Contents Chapter 13 Multi-Loop Synthesis Multi-Loop Window Anatomy...................................................................................... 13-1 Setup and Synthesis Method ......................................................................................... 13-3 Multi-Loop Versus Multivariable Design....................................................... 13-3 Opening the Multi-Loop Synthesis Window .................................................. 13-7 Designing a Multi-Loop Controller...
1 Introduction The Xmath Interactive Control Design Module (ICDM) is a complete library of classical and modern interactive control design functions that takes full advantage of Xmath’s powerful, object-oriented, graphical environment. It provides a flexible, intuitive interactive control design framework.
Chapter 1 Introduction • Chapter 5, Root Locus Synthesis, describes the user interface, terminology, and parameters used for root locus synthesis. • Chapter 6, Pole Place Synthesis, discusses the Pole Place synthesis window, which is used to design a SISO controller by assigning the closed-loop poles. • Chapter 7, LQG Synthesis, discusses the LQG synthesis window which is used to synthesize a linear quadratic Gaussian (LQG) controller for a SISO plant.
Chapter 1 Introduction Commonly-Used Nomenclature This manual uses the following general nomenclature: • Matrix variables are generally denoted with capital letters; vectors are represented in lowercase. • G(s) is used to denote a transfer function of a system where s is the Laplace variable. G(q) is used when both continuous and discrete systems are allowed. • H(s) is used to denote the frequency response, over some range of frequencies of a system where s is the Laplace variable.
Chapter 1 Introduction MATRIXx Help Interactive Control Design Module function reference information is available in the MATRIXx Help. The MATRIXx Help includes all Interactive Control Design functions. Each topic explains a function’s inputs, outputs, and keywords in detail. Refer to Chapter 2, MATRIXx Publications, Help, and Customer Support, of the MATRIXx Getting Started Guide for complete instructions on using the MATRIXx Help feature.
Chapter 1 Introduction • Have a user’s understanding of Xmath (enough to create a plant transfer function). • Know the basics of how to interact with an Xmath GUI application—for example, using a slider to set a parameter value, a variable-edit box for typing in values, data-viewing, and plot zooming. • Know the basics of classical control system design (for SISO design) and state-space design (for MIMO design).
2 Introduction to SISO Design 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 mathematically. Operations on these systems are likewise defined using operators that mirror as closely as possible the notation control engineers use.
Chapter 2 Introduction to SISO Design The equations describing this system are as follows: y = Pu u = Ce e = r–y where y denotes the plant output or sensor signal u denotes the plant input or actuator signal r denotes the reference or command input signal e denotes the error signal P denotes the plant transfer function C denotes the controller transfer function In ICDM, the plant and controller transfer function are required to be rational, that is, the ratio of two polynomials: n p(s) P(s) = ---------d
Chapter 2 Introduction to SISO Design • The closed-loop transfer function T is given by T = PC/(1 + PC). T is the transfer function from r to y. • The characteristic polynomial of the system is defined as X = nc np + dc dp. Its degree is equal to the order of the plant plus the order of the controller. • The closed-loop poles are the zeros of the characteristic polynomial. This definition avoids any problem with unstable pole-zero cancellations between the plant and controller.
Chapter 2 Introduction to SISO Design These are briefly described in the following sections, and in more detail in later chapters. Several of these windows have different forms for SISO and MIMO design. This chapter restricts the discussion to the SISO forms. Refer to Chapter 11, Introduction to MIMO Design, for a discussion of the MIMO forms.
Chapter 2 Introduction to SISO Design LQG Synthesis Window The LQG Synthesis window synthesizes LQG controllers, and therefore can be used only with strictly proper plants. The user can vary weights for the ratio of control (input) to regulation (output) cost and the ratio of sensor (output) noise power to process (input) noise power. Optionally, the user can specify a guaranteed decay rate and integral time constant.
Chapter 2 Introduction to SISO Design The plant and the alternate plant have very different uses in ICDM, and therefore different data flow characteristics. The plant transfer function is read from Xmath into the ICDM Main window, and is then exported to the synthesis windows that need it—Pole Place, LQG, and H∞. In other words, the controllers designed using the Pole Place, LQG, or H∞ Synthesis windows are based on the plant transfer function.
Chapter 2 Introduction to SISO Design list. The current controller is the active or selected entry on the list of saved controllers. Only one synthesis window, or the History window, is allowed to be open at any given time, which eliminates any possible confusion over the source of the current controller. Remember the simple rule: If any synthesis window, or the History window, is open, it is the source of the current controller.
Chapter 2 Introduction to SISO Design window. Thus, the Root Locus Synthesis window can be used to interactively tweak or model-reduce a controller designed by another method such as LQG. • The Pole Place window accepts any controller with the same number of poles as the plant, or one more pole than the plant if it has integral action. In particular, the Pole Place window can accept any LQG or H∞ controller with or without integral action.
Chapter 2 Introduction to SISO Design controller. Using the Root Locus window, the user could reduce the controller to a PI controller by deleting poles and zeros, at which point the PID window can be opened, initialized at the current controller. Using ICDM ICDM can be used in many ways. For example, you might: • Interactively design a controller. • Switch synthesis methods and continue designing. • Review and compare your best designs, and perhaps start designing again from a previous design.
Chapter 2 Introduction to SISO Design Figure 2-3 shows a simplified schematic representation of the interactive robustness analysis loop. Here, the user interacts with the Alternate Plant window, interactively changing the alternate plant transfer function Palt, which is automatically exported to the ICDM Main window for analysis and display. The user receives graphical information from the Alternate Plant window displays and also the ICDM Main window.
Chapter 2 Introduction to SISO Design Figure 2-4. Simple ICDM Session General Plotting Features All of the plots in the ICDM Main and other windows support several useful features: arbitrary re-ranging, zooming, data-viewing, and interactive (graphical) re-ranging. Ranges of Plots and Sliders Every ICDM window has an associated Ranges window that can be used to set the ranges of the sliders and plots appearing in the window, as well as other parameters such as numbers of points plotted.
Chapter 2 Introduction to SISO Design window has an autoscale feature, which can be invoked by selecting Autoscale on the View or Plot menu of the window. When you invoke Autoscale, ICDM tries to assign some reasonable values to the slider and plot scales. Zooming You can enlarge any portion of an ICDM plot using plot zooming. Clicking the middle mouse button with the cursor anywhere in the plot creates a small box containing a magnified version of the plot near the cursor.
Chapter 2 Introduction to SISO Design poles and zeros are (and indeed, the only way on a black-and-white display) is to use data-viewing. As a general rule: To find out the meaning, purpose, or value of an object (pole, zero, curve, and so on.) in an ICDM plot, use data-viewing. Most objects in the ICDM Plot windows support data-viewing. Interactive Plot Re-ranging The range for any plot can be set in the appropriate Ranges window.
Chapter 2 Introduction to SISO Design contains variable edit boxes for the value of the pole or zero (the real and imaginary part when the pole or zero is complex) and, if appropriate, its multiplicity. After you enter new values, you can select OK, which will make the changes and dismiss the dialog box, or Cancel, which will dismiss the dialog box without making the changes. The values you type in will not be accepted if they are invalid—for example, a negative multiplicity for a pole or zero.
Chapter 2 Introduction to SISO Design (if it was not already) but otherwise does not move. Thus, to make a pair of complex poles real, you first drag one of them near the real axis and release. Then you select one of these poles again, and this time drag it left or right. This will cause the pair to become real. Adding/Deleting Poles and Zeros This section describes how you are allowed to add or delete poles or zeros in some windows.
Chapter 2 Introduction to SISO Design To add a pole-zero pair, click the Add Pair button, select the Add Pair entry on the Edit menu, or press in the window. As with poles and zeros, the pole-zero pair you create will be either real or a complex conjugate pair, depending on how close the cursor is to the real axis when you click the left mouse button. After the pair is created, you can drag the pole and zero away from each other, which results in a smooth change to the transfer function.
3 ICDM Main Window This chapter describes the use of the ICDM Main window, which is used to perform the following functions: • Communicate with Xmath—for example, transfer plants/controllers from/to Xmath • Display warning and log messages • Display a variety of standard plots • Select a synthesis method for controller design • Control several auxiliary windows (for example, Ranges, Alternate Plant) Notice that the ICDM Main window is not directly used to design the controller.
Chapter 3 ICDM Main Window • A line that identifies the type and source of the current controller. The source is either the currently active synthesis window or the history list. • A plotting area for the various plots. Figure 3-1. ICDM Main Window Communicating with Xmath The File menu is used to communicate with Xmath—that is, to read controllers and/or plants from Xmath into ICDM, and to write controllers and/or plants from ICDM back to Xmath. Xmath Interactive Control Design Module 3-2 ni.
Chapter 3 ICDM Main Window Most Common Usage In most cases, you will read a plant from Xmath at the beginning of an ICDM design session, and write one or more controllers back to Xmath during or at the end of an ICDM design session. This is done by selecting the appropriate entries in the File menu. Reading a plant into ICDM is often the first thing you do in a design session. Before a plant is read in, the plots will be empty and you will be unable to open any synthesis windows.
Chapter 3 ICDM Main Window to a simple transfer function representation, which means that you cannot read them back into the Pole Place, LQG, or synthesis windows because these types depend on the plant. Also, all synthesis windows will be reset to their initial (default) settings. Because these side effects may be undesired, the user is warned before these actions are taken. Reading a Controller from Xmath into ICDM You can read a controller from Xmath into ICDM using the FileRead Controller entry.
Chapter 3 ICDM Main Window ICDM Plots Various plots can be shown at the bottom of the main ICDM window. The Plot menu is used to select which plots are shown, and also to magnify a plot or set the plotting ranges.
Chapter 3 ICDM Main Window In the ICDM Main window, the Plot Choices dialog box is used to select any combination of the eight plots. This dialog box is modal so you cannot interact with any other Xmath window until you dismiss it. Ranges of Plots The ranges for the plots can be set in the Ranges window, shown in Figure 3-3. The Ranges window can be made to appear by selecting Plot»Ranges or pressing in the ICDM Main window.
Chapter 3 ICDM Main Window Figure 3-3. ICDM Ranges Window Plot Magnify Windows In addition to the standard plotting features (zooming, data-viewing, and interactive re-ranging) described in the General Plotting Features section of Chapter 2, Introduction to SISO Design, the plots in the ICDM Main window support another feature: plot magnify windows. Selecting Plot»Plot Magnify or pressing or in the ICDM Main window will cause the cursor to change into a crosshairs symbol.
Chapter 3 ICDM Main Window of Plots section. If another plot is subsequently selected for magnifying, it will replace the current plot in the plot magnify window. The Plot Magnify window is a separate window that shows one of the ICDM main plots. The Plot Magnify window, shown in Figure 3-4, can be independently resized by the window manager. The ranges of the Plot Magnify window can also be independently set. Figure 3-4.
Chapter 3 ICDM Main Window Selecting a Synthesis or History Window The Synthesis menu in the ICDM Main window is used to select which synthesis window will be active. If the current controller is compatible with the requested synthesis window, then the synthesis window opens, and is initialized with the current controller. If the current controller is not compatible with the Synthesis menu selected, then a dialog box appears that gives the user several options.
4 PID Synthesis This chapter discusses the PID Synthesis window. This window is used to synthesize various types of standard classical SISO controllers such as P, PI, PD, PID, lead-lag, and lag-lead. However, the controller that is designed by the PID Synthesis window will be referred to as a PID controller even if it has some other form such as PI. Multivariable (MIMO) PID controllers can be synthesized using the Multiloop Synthesis window. Refer to Chapter 13, Multi-Loop Synthesis.
Chapter 4 PID Synthesis Table 4-1. PID Controller Terms and Parameters (Continued) Term Parameter Symbol Controller HF rolloff 1 HF rolloff time 1 Thf 1 1 + 1/(sThf 1) HF rolloff 2 HF rolloff time 2 Thf 2 1 + 1/(sThf 2) Toggling Controller Terms On and Off For each parameter, the toggle button at the left of the row is used to toggle the terms on and off.
Chapter 4 PID Synthesis Figure 4-1. PID Synthesis Window As an example, suppose that the P and I toggle buttons are on, and the D and HF rolloff buttons are off.
Chapter 4 PID Synthesis Notice that there are at least two other commonly used forms for a PID control law that differ from the one used in ICDM: C ( s ) = K p + ( 1 + 1 ⁄ T int s + T diff s ) and C ( s ) = K p + 1 ⁄ T int s + T diff s ICDM enforces a proper controller transfer function, that is, a finite high frequency gain. Therefore, if the D term is on, ICDM will require at least one HF rolloff term also to be on.
Chapter 4 PID Synthesis Time Versus Frequency Parameters Notice that the sliders and variable-edit boxes use time parameters, whereas the Bode plot handles use frequencies, that is, the inverses of the time parameters. If you think of integral action as being parameterized by a characteristic time, then you may prefer to use the slider. If you think of integral action as being parameterized by a characteristic frequency (reset rate), then you may prefer to manipulate the Bode plot handle.
Chapter 4 PID Synthesis Derivative Term Normalization The derivative term is low-frequency normalized, which means that at low frequencies (below 1/Tdiff) it is nearly one, and so has little effect on the overall controller transfer function at low frequencies. In particular, the loop transfer function at s = 0 is not affected by the derivative term at all, so static tracking, static actuator effort, and so on are not affected by the derivative term.
5 Root Locus Synthesis This chapter describes the user interface, terminology, and parameters used for root locus synthesis. Overview The Root Locus window performs two main functions: • Displays selected gain and phase contours in the complex plane of the loop transfer function. • Allows the user to manipulate the controller transfer function graphically by dragging controller poles and zeros, or dragging the closed-loop poles along the root locus plot. The Root Locus window only works in SISO mode.
Chapter 5 Root Locus Synthesis Figure 5-1. Root Locus Synthesis Window The Root Locus Synthesis window consists of, from top to bottom: • A menu bar with entries Special, Edit, View, and Help. • A slider and variable edit box for the gain. These controls are used to show and also to change the controller gain. The gain also can be changed graphically by dragging the closed-loop poles along the root locus. • (Bottom left) The root locus plot.
Chapter 5 Root Locus Synthesis Edit menu or by typing the accelerators in the Root Locus window. A more detailed description appears following. The Root Locus Synthesis window is shown in Figure 5-1 with the standard (default) 180° contour. The branches of the locus connect the zeros and poles of the loop transfer function, which are shown in the plot. The closed-loop poles, which are on the locus, are also shown.
Chapter 5 Root Locus Synthesis Plotting Styles Selecting View»Locus Select or pressing in the Root Locus window produces a dialog box in which the user can choose one of many possible plotting styles. In all cases, the (open-loop) controller and plant poles and zeros are shown on the plot. On color displays: • Controller poles and zeros are black • Plant poles and zeros are red This serves as a mnemonic: you can manipulate black but not red poles or zeros.
Chapter 5 Root Locus Synthesis Phase Contours For each of magnitude and phase contours, you can choose one of three possible plotting styles. • 180° The plot shows the locus of points where the phase angle of the loop transfer function is 180°. This yields a conventional root locus display. This is the default phase contour plotting style. The plot shows the set of all possible closed-loop pole locations as the gain is swept from 0 to ∞.
Chapter 5 Root Locus Synthesis All of the plots support data viewing: click the right mouse button with the cursor positioned near a pole, zero, or one of the plots. This allows you to find the gain associated with a particular point on a phase contour, for example. Slider and Plot Ranges To change the ranges of the Gain slider or the root locus plot, select View»Ranges or press in the Root Locus window.
Chapter 5 Root Locus Synthesis Design This section gives short descriptions of how the Root Locus window can be used to design or analyze controllers. This section also provides some interpretations and describes some uses of the nonstandard contour plots. Adding a Pole-Zero Pair Adding a pole-zero pair is a good way to add a little lead or lag action to an existing controller. When you first add the pole-zero pair, you will not have changed the controller transfer function.
Chapter 5 Root Locus Synthesis Interpreting the Nonstandard Contour Plots The Root Locus window can display phase contours other than the standard 180° as well as various magnitude contour plots. The meaning of these curves is simple: if L(s) = a, then s would be a closed-loop pole if the loop transfer function were multiplied by –1/a at the frequency s.
Chapter 5 Root Locus Synthesis Figure 5-3.
6 Pole Place Synthesis This chapter discusses the Pole Place Synthesis window, which is used to design a SISO controller by assigning the closed-loop poles. Pole Place operates in two modes: • Normal mode (integral action not enforced) • Integral action mode The Pole Place Synthesis window cannot be used to design MIMO controllers. Window Anatomy The Pole Place window is shown in Figure 6-1. From top to bottom, it consists of: • A menu bar with entries Special, Edit, View, and Help.
Chapter 6 Pole Place Synthesis Figure 6-1. Pole Place Synthesis Window Pole Place Modes In Pole Place, the user selects either closed-loop poles (in normal mode) or 2n + 1 closed-loop poles (in integral action mode). These poles uniquely determine the controller transfer function. This process can be described in terms of the coefficients of the plant and controller numerators and denominators. The plant transfer function is given by P(s) = np(s)/dp(s) Xmath Interactive Control Design Module 6-2 ni.
Chapter 6 Pole Place Synthesis where dp(s) = sn + a1sn–1 + a2sn–2 + ... + an np(s) = b0sn + b1sn–1 + ... + abn Notice that the order of the plant is n, and allow the possibility that the plant transfer function is not strictly proper; that is, the plant can have as many zeros as poles. Normal Mode In normal mode, the order (number of poles) of the controller is fixed and equal to n (the order of the plant), so there are a total of 2n closed-loop poles.
Chapter 6 Pole Place Synthesis We can write this polynomial equation as follows: b0 0 … 0 b1 b0 … 0 b2 b1 … 0 … bn – 1 bn – 2 … b0 bn bn – 1 b1 0 bn b2 0 0 b3 0 … bn … 0 … x1 · 1 a1 0 1 … … 0 0 a2 a1 … 0 … an – 1 an – 2 … 1 · an an – 1 a1 xn 0 an a2 0 0 a3 0 … an · + … 0 … y1 · · + · yn a1 … α1 a n + = … 0 α 2n … 0 These 2n linear equations are solved to find the 2n controller parameters x1, ..., xn and y1, ..., yn.
Chapter 6 Pole Place Synthesis State-Space Interpretation In a state-space framework, it is common to classify the closed-loop poles as n “control eigenvalues” and n “estimator eigenvalues.” But, in fact, it makes no difference in the final controller transfer function how you classify the closed-loop poles. In other words, in a state-space framework, swapping a “control eigenvalue” and an “estimator eigenvalue” will result in different feedback and estimator gains, but the same final controller.
Chapter 6 Pole Place Synthesis A circle of radius Favg also is displayed in the plot. You also can drag the circle to change Favg. Butterworth Configuration Click the Butterworth button to move the poles to a Butterworth configuration, preserving Favg. The initial pole configuration also is set to Butterworth. Editing the Closed-Loop Poles You can change the closed-loop poles two ways: by editing or by grabbing and dragging them.
7 LQG Synthesis This chapter discusses the LQG Synthesis window, which is used to synthesize a linear quadratic Gaussian (LQG) controller for a SISO plant. If you select LQG synthesis with a MIMO plant, you will get the MIMO LQG Synthesis window described in Chapter 12, LQG/H-Infinity Synthesis. LQG Synthesis Window Anatomy The LQG Synthesis window is shown in Figure 7-1. From top to bottom, it contains: • A menu bar with entries Special, Edit, View, and Help.
Chapter 7 LQG Synthesis Figure 7-1. LQG Synthesis Window • A control panel used to graphically edit the output weight transfer function. • A plotting area that contains the following plots: – Xmath Interactive Control Design Module The symmetric root locus plots of the control and estimator closed-loop poles. The control cost and sensor noise parameters can be changed by dragging the closed-loop poles along the plot. 7-2 ni.
Chapter 7 LQG Synthesis If the decay rate is enabled, it is shown as a vertical line that can be dragged. – A plot showing the poles and zeros of the output weight transfer function. If weight zero editing is enabled, the zeros can be edited graphically. – A plot showing the magnitude of the output weight transfer function.
Chapter 7 LQG Synthesis Setup and Terminology The different modes are described using the following basic terminology: y = P ( u + w proc ) u = ( – C ) ( y + w sens ) ỹ = Wy Figure 7-1 shows a block diagram with the basic setup for LQG synthesis, where u is the actuator signal (output of the controller) wproc is an (input referred) process noise y is the (plant) output signal ỹ is the weighted output signal wsens is a sensor noise P is the plant transfer function C is the controller transfer functio
Chapter 7 LQG Synthesis Integral Action When integral action is enabled, the controller minimizes a variation on the LQG cost: 2 2 2 J = lim E ( ρu ( t ) + y ( t ) + z ( t ) ) t→∞ where t ∫ z ( t ) = ( 1 ⁄ T int ) y ( τ ) dτ 0 As in the standard mode, the sensor noise parameter ν is the ratio of the sensor noise intensity to the input-referred process noise intensity.
Chapter 7 LQG Synthesis Output Weight Editing When Weight Zero Edit is enabled, the LQG controller is based on ỹ = Wy, which is a filtered version of the plant output signal y. Without integral action, the controller minimizes the quantity: 2 2 J = lim E ( ρu ( t ) + y ( t ) ) t→∞ and with integral action, the quantity: 2 2 2 J = lim E ( ρu ( t ) + y ( t ) + z ( t ) ) t→∞ where t ∫ z ( t ) = ( 1 ⁄ T int ) ỹ ( τ ) dτ 0 The transfer function W is the output weighting transfer function.
Chapter 7 LQG Synthesis State-Space Interpretation In LQG theory, the closed-loop poles consist of n “optimal control eigenvalues” and n “estimator (Kalman filter) eigenvalues.” For multivariable systems, the optimal control and the optimal estimator play different roles in the control system. But in the single-actuator, single-sensor case, the roles are completely symmetric. In particular, swapping the parameters ρ and ν yields the same final LQG controller.
Chapter 7 LQG Synthesis Ranges To change the ranges of the sliders or plots, select View»Ranges or enter R in the LQG window. The slider ranges also will be changed automatically if you type a new value which is outside the current range into the corresponding variable edit box. The plot also can be re-ranged interactively by grabbing and dragging the plot axes; refer to the Interactive Plot Re-ranging section of Chapter 2, Introduction to SISO Design.
8 H-Infinity Synthesis This chapter describes the H∞ Synthesis window used for SISO plants. The H∞ Synthesis window is used to synthesize a central controller. Such controllers are sometimes called linear exponential quadratic Gaussian (LEQG) or minimum entropy controllers. For a description of the MIMO Synthesis window, refer to Chapter 12, LQG/H-Infinity Synthesis. H-Infinity Synthesis Window Anatomy The H∞ Synthesis window is shown in Figure 8-1.
Chapter 8 H-Infinity Synthesis Figure 8-1. H-Infinity Synthesis Window Xmath Interactive Control Design Module 8-2 ni.
Chapter 8 H-Infinity Synthesis Opening the Synthesis Window The H∞ window can only accept H∞ controllers. If the current controller is of type H∞ (perhaps from the History window) and the H∞ window is opened, the current controller is read into the H∞ window; that is, the parameters are set to the appropriate values.
Chapter 8 H-Infinity Synthesis z1 u r=0 z2 y C(s) W(s) P(s) w1 w2 Figure 8-2. Block Diagram Showing the Basic Setup for H-Infinity Synthesis Figure 8-2 shows a block diagram with the basic setup for H∞ synthesis where closed-loop transfer matrix H relates the two exogenous inputs w1 and w2 to the two outputs z1 and z2. The design is based on H, the closed-loop transfer matrix relating the noises w1 and w2 to the signals z1 and z2.
Chapter 8 H-Infinity Synthesis If either of these singular values is equal to or exceeds γ, the γ-entropy is defined to be +∞. In other words, the γ-entropy is finite only for H ∞ < γ , and rapidly increases to +∞ as H ∞ becomes close to γ, where the H∞-norm is defined as: H ∞ = max σ 1 ( H ( jω ) ) 0≤ ω ≤ ∞ Refer to Chapters 5 and 12 of Linear Controller Design, Boyd and Barratt, Prentice-Hall 1991, for some interpretations of the γ-entropy.
Chapter 8 H-Infinity Synthesis Manipulating the Design Parameters The parameters γ, ρ, and ν can be changed using the associated slider or variable edit box. If the user types in a value that is outside the current slider range, the slider range will automatically adjust. The user can change the ranges for the sliders using the Ranges window. Refer to the Infeasible Parameter Values section for what happens when the requested value of γ is infeasible.
Chapter 8 H-Infinity Synthesis Ranges To change the ranges of the sliders or plots, select View»Ranges or press in the H∞ window. The slider ranges also will be changed automatically if you type a new value which is outside the current range in the corresponding variable edit box. The plot also can be re-ranged interactively by grabbing and dragging the plot axes; refer to the Interactive Plot Re-ranging section of Chapter 2, Introduction to SISO Design.
9 History Window This chapter describes the History window used for SISO plants. The History window is used to display and manipulate the design history list, which is a list of controllers that have been explicitly saved during the design process. For a description of the History window used for MIMO design, refer to Chapter 11, Introduction to MIMO Design.
Chapter 9 History Window • A Variable-Edit box which shows which history list entry is active or currently selected. The selected entry is the controller exported to ICDM for plotting. • Buttons for manipulating the history list. Selecting the Active Controller You can type a number in the Variable-Edit box that shows the selected controller, or you can select a controller in the list (which will become highlighted) and then click Select at the bottom of the History window.
Chapter 9 History Window Deleting History List Entries Any number of designs on the history list can be deleted by selecting them and then clicking Delete. To renumber the remaining designs, you can select Edit»Renumber. Refer to Appendix A, Using an Xmath GUI Tool, for a discussion of how to select multiple, non-contiguous entries in a list. To Continue Designing from a Saved Controller First, select the desired design to make it the ICDM current controller.
Chapter 9 History Window Using the History List The history list can be used in several ways. You can save controllers as “benchmarks” whose performance you want to match with a simpler controller. You also can save any promising designs that you find so you can later use them as the initial conditions for designing. Xmath Interactive Control Design Module 9-4 ni.
10 Alternate Plant Window This chapter describes the form of the Alternate Plant window used for SISO design; refer to Chapter 11, Introduction to MIMO Design, for the form used for MIMO design. Role and Use of Plant and Alternate Plant In addition to the plant P, ICDM can optionally maintain an alternate plant Palt. These two transfer functions have different uses and purposes: • The plant is always used for the synthesis windows (that need it).
Chapter 10 Alternate Plant Window Alternate Plant Window Anatomy The Alternate Plant window is shown in Figure 10-1. From top to bottom, it consists of: • A menu bar with Special, Edit, and View menus. • A toggle button for controlling whether the plots in ICDM main will include the response with the alternate plant. • A toggle button that is used to display the plant poles and zeros in the plot (refer to Figure 10-1).
Chapter 10 Alternate Plant Window Figure 10-1. Alternate Plant Window Opening the Alternate Plant Window When the Alternate Plant window is first opened, the alternate plant is initialized to the plant transfer function. This is convenient because in most cases the alternate plant is some sort of variation on the plant. Using the Special menu, you can read the plant from ICDM or any transfer function from Xmath into the alternate plant.
Chapter 10 Alternate Plant Window Normalization The form of the transfer function of the alternate plant depends on the normalization selected. With high-frequency normalization, the alternate plant transfer function is: ( s – z 1 )… ( s – z m ) P alt ( s ) = K -----------------------------------------( s – p 1 )… ( s – p n ) where K is the gain (shown in the slider and Variable Edit box), z 1, …, z m are the zeros, and p 1, …, p n are the poles shown in the plot.
Chapter 10 Alternate Plant Window You can switch between high frequency and DC normalization by clicking the appropriate buttons. If the alternate plant has a pole or zero at s = 0, then you cannot switch to DC normalization. Using the Alternate Plant Window The Alternate Plant window is used to analyze the robustness of a given controller to changes or unmodeled dynamics in the plant.
Chapter 10 Alternate Plant Window Ranges of Sliders and Plot To change the ranges of the Gain slider or the pole zero plot, select View»Ranges or press in the Alternate Plant window. The slider range also will be changed automatically if you type a new value which is outside the current range into the variable edit box. The plot can also be re-ranged interactively by grabbing and dragging the plot axes; refer to the Interactive Plot Re-ranging section of Chapter 2, Introduction to SISO Design.
Introduction to MIMO Design 11 The following chapters describe the use of ICDM for MIMO design. NI assumes the reader is familiar with the use of ICDM for SISO design. In many cases, the texts describe the differences between SISO and MIMO design. This chapter provides an introduction to MIMO design. ICDM automatically switches between SISO and MIMO modes depending on the plant that is read in.
Chapter 11 Introduction to MIMO Design u denotes the plant input or actuator signal, which is a vector of size nu r denotes the reference or command input signal, which is a vector of size ny e denotes the error signal, which is a vector of size ny dact denotes the actuator disturbance signal, which is a vector of size nu P denotes the plant transfer function, which is a matrix of size ny × nu C denotes the controller transfer function, which is a matrix of size ny × nu Figure 11-1 shows standard feedback
Chapter 11 Introduction to MIMO Design The standard feedback system has two vector input signals, r and dact, and three vector output signals, e, u, and y.
Chapter 11 Introduction to MIMO Design Notice that in the SISO case, these “complementary pairs” of transfer functions (obtained by swapping P and C) are the same. It is important to remember that in the MIMO case they can be different; they even have different dimensions if ny ≠ nu. In addition to these transfer functions you encounter two (complementary) open-loop transfer functions: • The loop transfer function L is defined as L = PC.
Chapter 11 Introduction to MIMO Design or disturbance rejection only on a subspace of dimension r, so do not be surprised if some (or many) diagonal entries of T are not one, or off diagonal entries are not zero. Finally, unlike a SISO plant, a MIMO plant can have both poles and zeros at s = 0, and such situations will constraint what types of integral action are possible. In all cases, however, ICDM will warn you if the integral action you have selected results in an unstable closed-loop system.
Chapter 11 Introduction to MIMO Design options, the user clicks the Show all options button after which the plot options window shown in Figure 11-3 opens. From this window, all transfer functions mentioned in the Transfer Functions section can be selected. Figure 11-2. Plot Choices Window for the MIMO Case MIMO Plot Window For a more detailed MIMO transfer function plot, an option labeled MIMO plot is available under the Main window menu bar.
Chapter 11 Introduction to MIMO Design Notice that having the MIMO Plot window on the screen may increase the required computational response time of ICDM. Closing the window using the Special option of the MIMO Plot menu bar will then result in a speed-up. Figure 11-3. Complete Set of Plot Choices History Window The History window is exactly the same in SISO and MIMO modes. Alternate Plant Window (MIMO Version) The MIMO version of the alternate plant window differs from the SISO version.
Chapter 11 Introduction to MIMO Design plants. Therefore, the (MIMO) Alternate Plant window looks very much like the History window—the user can read various alternate plants into a list, and select one as the alternate plant. The semantics of the Alternate Plant window are identical in SISO and MIMO versions. Figure 11-4. MIMO Plot Window with a Step Response Plot of the Transfer Function Xmath Interactive Control Design Module 11-8 ni.
12 LQG/H-Infinity Synthesis This chapter describes the MIMO LQG/H∞ Synthesis window. The LQG/H∞ window is used to synthesize both LQG and H∞ controllers. The two design methods have been combined in a single window because of the similarity regarding the use of weights: constant weights, frequency-dependent weights, and integrators.
Chapter 12 LQG/H-Infinity Synthesis Figure 12-1. LQG/H-Infinity Main Window • A pull-down menu for frequency-dependent weight selection on inputs: W u , i , i = 1, … , n u and outputs: W y , j , j = 1, … , n y • A button for recomputing the controller. These parameters are described in greater detail later in this chapter. LQG/H-Infinity Weights Window The Weights window is for defining control cost and noise level parameters and is shown in Figure 12-2.
Chapter 12 LQG/H-Infinity Synthesis descriptions are for the control cost parameter display. The noise level display is similar in appearance.
Chapter 12 LQG/H-Infinity Synthesis • A table with ny rows with, in each row: – A toggle button to include the output in the set of measured outputs – A toggle button to include the output in the set of costed outputs, labeled with the signal name – A slider defining the constant weight factor of the output: ρ y , j , i = 1, …, n y – • A variable edit box for the same constant weight factor A slider representing the logarithmic average of the weights for each output (ρy), that is, nu 1 log ρ y =
Chapter 12 LQG/H-Infinity Synthesis The weights ρu, i, ρy, j, ρu, and ρy are then replaced with noise variances νu, i, νy, j, νu, and νy. The noise level parameter in the main LQG/H∞ window is related to the noise levels in this window by υ = υy /υu. Decay Rate Window The Decay Rate window is shown in Figure 12-3. From top to bottom, it consists of: • A menu bar with entries Special, Edit, View, and Help.
Chapter 12 LQG/H-Infinity Synthesis value. If a lower bound on the minimal value of γ is known, it also is displayed. Figure 12-4. LQG/H-Infinity Performance Level Window Frequency Weights Window The Frequency Weights window is shown in Figure 12-5. From top to bottom, it consists of: • A menu bar with entries Special, Edit, View, and Help. • A plot area with two plots: – A plot that shows the poles and zeros of the selected input or output weight transfer function.
Chapter 12 LQG/H-Infinity Synthesis Figure 12-5. LQG/H-Infinity Frequency Weights Window Synthesis Modes and Window Usage In addition to the standard LQG/H∞ synthesis, any combination of three additional features is supported: • Integral action • Exponential time weighting (guaranteed decay rate). This feature is only enabled in the case of LQG design. • Input and output weight editing In the Main window, the synthesis mode is reported in the text in the titlebar at the top.
Chapter 12 LQG/H-Infinity Synthesis Opening the LQG/H-Infinity Synthesis Window The LQG/H∞ window can only accept LQG/H∞ controllers. If the current controller is of type LQG/H∞ (perhaps, from the History window) and the LQG/H∞ window is opened, the current controller is read into the LQG/H∞ window; that is, the push buttons and parameters are set to the appropriate values.
Chapter 12 LQG/H-Infinity Synthesis The weighted output vector z consists of the following: • Filtered inputs ( ũ ) • Plant states (xp) • Filtered plant outputs ( ỹ ) • Integrated, filtered plant outputs (yI) The disturbance input vector (w) consists of the following: • General LQG state disturbances (wx) • General LQG output disturbances (wy) • Input-referred disturbances or process noise (wp) • Measurement, or sensor noise (ws) • Filter noise (wF) • Reference noise for the purpose o
Chapter 12 LQG/H-Infinity Synthesis Wu ˜F u xp z ỹ w yI P act u uact ∫ Wy yI yI,sens sens y˜ sens ỹ sens y yp,sens yp sens –C Figure 12-6. LQG/H-Infinity Control Design Configuration In the block diagram, σsens represents a matrix that selects a subset of the set of plant outputs as measurements. Similarly, σact selects a subset of the plant inputs as control inputs. These subsets are determined by the toggle buttons in the weights window.
Chapter 12 LQG/H-Infinity Synthesis The system equations of plant, filters, and integrators are as follows: x· p = A p x p + B p u act + B p w p + w x Plant (P): yp = Cp xp + ws + wy x· ỹ = A ỹ x ỹ + B ỹ y p + W p w F Output filter (Fy): ỹ = C ỹ x ỹ + w ỹ x· ũ = A ũ x ũ + B ũ u act Input filter (Fu): ũ = C ũ x ũ + D ũ u act x· I = ỹ + W I w r Integrator: yI = xI + wr Standard LQG (All Toggle Buttons “Off”) In LQG synthesis mode, the controller C minimizes a weighted sum of the st
Chapter 12 LQG/H-Infinity Synthesis Penalizing the “running integral” of the plant output forces the power spectral density of the plant output to vanish at zero frequency. In classical control terms, this forces a pole at s = 0 in the loop transfer function, that is, integral control. As with PID design, the parameter Tint gives the time scale over which the effects of the integral action will take place.
Chapter 12 LQG/H-Infinity Synthesis The transfer functions Wu, i and Wy, j are the input and output weighting transfer functions, respectively. When Wu, i = 1 and Wu, j = 1, this reduces to the previously described standard LQG controller. Notice that integral action also can be accomplished by defining filters that have poles on s = 0. This is useful if integral action is required for a subset of the outputs. The standard toggle button for integral action applies to all outputs.
Chapter 12 LQG/H-Infinity Synthesis By clicking the button at the bottom of the Weights window, arbitrary weight matrices can be loaded from Xmath. The noise variances and weights selected in this way are simply added to the diagonal weight and noise matrices determined by the push buttons and sliders of the Weights window. There are certain limitations and restrictions: • If Ruu is zero, none of the weight sliders on the actuators can be disabled.
Chapter 12 LQG/H-Infinity Synthesis 1 --2 Here Q ww is a square matrix such that Q ww = T 1 ----2 2 Q ww Q ww 1 --2 and R zz is a square matrix such that T --2 1 --2 R zz = R zz R zz The H∞ solution is defined as the one that minimizes the maximum singular value of the transfer function from wn to zn. The only difference in the user interface with the LQG design is that the decay rate option cannot be selected.
Chapter 12 LQG/H-Infinity Synthesis Manipulating the Design Parameters Main Window The design parameters ρ and ν can be changed using the associated sliders or the variable edit boxes. If the user types in a value that is outside the current slider range, the slider range will automatically adjust. Notice that the slider positions in the Weights window are simultaneously updated when the ρ and ν sliders are moved. The user can change the ranges for the sliders using the Ranges window.
Chapter 12 LQG/H-Infinity Synthesis Ranges To change the ranges of the sliders or plots, select View»Ranges or press in the LQG window. The slider ranges also will be changed automatically if the user types a new value which is outside the current range into the corresponding variable edit box. The plot also can be re-ranged interactively by grabbing and dragging the plot axes; refer to the Interactive Plot Re-ranging section of Chapter 2, Introduction to SISO Design.
Multi-Loop Synthesis 13 This chapter describes multi-loop synthesis. The Multi-Loop window is used to synthesize a MIMO controller using PID and Root Locus methods, applying them one-loop-at-a-time. In many practical industrial applications, this is the way control systems are designed for complex multivariable plants. Multi-Loop Window Anatomy The Multi-Loop Synthesis window is shown in Figure 13-1. From top to bottom, it consists of: • A menu bar with entries Special, Edit, and Help.
Chapter 13 Multi-Loop Synthesis Figure 13-1. Multi-Loop Main Window After the Multi-Loop window is opened, two plots are added at the bottom of the ICDM Main window for display of the loop gain magnitude and phase of the control loops that will be synthesized with the Multi-Loop method (refer to Figure 13-2). Xmath Interactive Control Design Module 13-2 ni.
Chapter 13 Multi-Loop Synthesis Figure 13-2. Multi-Loop Gain and Phase Plots Added to the ICDM Main Window Setup and Synthesis Method This section describes the setup and synthesis method for multi-loop synthesis. Multi-Loop Versus Multivariable Design In most multivariable control design methods such as synthesis, no specific assumptions are made about which loops should be closed and which ones not. In general, all components of the resulting controller transfer function will be nonzero.
Chapter 13 Multi-Loop Synthesis one loop at a time. The loops that are not closed are considered to have a transfer function equal to zero. During the design phase, the user can modify, delete, disable, or enable controller components of loops that were designed earlier. When the user is designing a controller for one specific sensor and one specific actuator of a multivariable plant, this SISO plant has no obvious direct relationship with the original multivariable open-loop transfer function.
Chapter 13 e1 r1 – e2 r2 r3 – e3 y1 u1 C(1) u2 C(2) Multi-Loop Synthesis P y2 y3 – Figure 13-4.
Chapter 13 Multi-Loop Synthesis Figure 13-5. Root Locus Window During the Multi-Loop Design Figure 13-4 shows an example multiloop configuration for the 3-sensor, 2-actuator plant. There are two loops: one from sensor 1 to actuator 1, and one from sensor 3 to actuator 2. In multiloop design you can alternate between designing each of the (SISO) controller transfer functions, with the other fixed.
Chapter 13 Multi-Loop Synthesis Opening the Multi-Loop Synthesis Window The multi-loop window can accept any type of MIMO controller and will decompose it into its SISO components, one for each loop. Control loops are categorized as being of type PID or type Root Locus. If a loop is not of type PID, then it will be categorized as a Root Locus controller. Remember that the Root Locus Synthesis window accepts any type of SISO controller.
Chapter 13 Multi-Loop Synthesis Editing and Deleting Loops When a loop is highlighted, it can be edited, deleted, disabled, or enabled. Here, “editing” means designing a SISO controller for the selected loop. The editing and deleting options are accessible under the Edit pull-down menu. Disabling or enabling a loop is done by clicking the button at the bottom of the Multi-Loop window. A loop that has been disabled is represented by a dashed line in the graphical editor.
A Using an Xmath GUI Tool This appendix describes the basics of using an Xmath GUI tool. Overview ICDM was developed using the programmable Xmath GUI (Graphical User Interface). Using a graphical tool such as ICDM is quite different from using a toolbox that has a traditional command-line user interface. To see a menu of Programmable GUI examples, enter guidemo from the Xmath command area. This displays the menu of GUI demos shown in Figure A-1. 1. Select a demo (for example, Variable Binding). 2.
Appendix A Using an Xmath GUI Tool Figure A-1. Programmable GUI Examples Each demo has a Help menu in its menu bar, near the upper right side of the window. The Help messages explain how to interact with the demo and what it does. It may be helpful to read the rest of this appendix before (or while) you try the demos. You can exit a demo by selecting the Special»Exit option. Interacting with a GUI Application This section describes the mechanics of interacting with GUI windows.
Appendix A Using an Xmath GUI Tool Figure A-2. Programmable GUI Examples Do It Dialog GUI Functions Many functions are controlled by the left mouse button. For example, a button is activated or selected by pointing at the button and clicking the left mouse button. The PGUI Example dialog has two buttons: Do It and 12. GUI Objects Other objects behave as follows: • A button (square shaped) is either on or off. Its indicator is filled in when it is on.
Appendix A Using an Xmath GUI Tool • A list is a vertical list of items (strings) that can be selected (highlighted). Depending on the application, a list can be configured to allow various types of selection: – A single-selection list allows only a single line to be selected. Clicking the left mouse button selects a line. This is the type of list that appears in the window shown in Figure A-1. – A multiple-selection list allows multiple lines to be selected.
Appendix A Using an Xmath GUI Tool • GUI windows might contain buttons that display some value. The value can be changed by clicking the button, whereupon a text entry area will appear in place of the button. You can enter a new value followed by pressing . If the GUI tool does not like your new value, it reserves the right to change it to an acceptable value that is displayed again in the button. These buttons are called variable edit boxes.
Appendix A Using an Xmath GUI Tool A slider might also appear like a bar graph. Its tip represents the value, but it will be read-only, that is, the user cannot change its value by dragging the handle. Often a value is displayed with a slider and a variable edit box (refer to for example, the leadlag demo). This allows the value to be changed either by dragging the slider or entering a new value from the keyboard. • GUI windows might contain plots, which can accept graphical input from the user.
Technical Support and Professional Services B Visit the following sections of the National Instruments Web site at ni.com for technical support and professional services: • Support—Online technical support resources at ni.
Index A denominator, 2-2 numerator, 2-2 order, 2-2 transfer function, 2-2, 2-5, 11-2 conventions used in the manual, iv Cycle button, 9-3 actuator disturbance signal, 11-2 effort transfer function, 11-3 loop transfer function, 11-4 signal, 2-2, 11-2 step response, 2-3 actuator-referred actuator effort transfer function, 11-3 closed-loop transfer function, 11-3 sensitivity transfer function, 11-3 Alternate Plant display, 10-1 transfer function, 2-5, 3-4 window, 2-5, 2-10, 10-2 Autoscale, 2-12 D data-viewi
Index G LQG synthesis window, 2-5 window, 2-8 LTR design, 2-5 gain loop, 2-2 graphical editor, 13-1 H M Help, 1-5 help, technical support, B-1 high-frequency normalization, 10-4 H-Infinity performance level, 12-1 Synthesis Window, 2-5 History window, 2-5, 2-6, 2-8, 9-1 MATRIXx Help, 1-4, 1-5 MIMO LQG/H-Infinity synthesis window, 12-1 Plot window, 11-6 transfer function plot, 11-6 model reduction, 2-7 multi-loop synthesis, 13-1 I N ICDM Help, 1-5 ICDM Main Window, 2-4, 3-2 elements, 3-1 input-refer
Index software (NI resources), B-1 step response, 2-3 plot, 2-7 support, technical, B-1 system object, 2-1 Pole Place Modes, 6-2 Synthesis window, 2-4, 6-1 window, 2-8 poles, 1-1 closed-loop, 2-3, 2-4 polynomial, 2-3 process noise, 12-9 programming examples (NI resources), B-1 proper polynomials, 2-2 T technical support, B-1 training and certification (NI resources), B-1 transfer function, 2-2, 2-5 alternate plant, 2-5 closed-loop, 2-3 controller, 2-2 current controller, 2-5 loop, 2-2 plant, 2-2 troubles