Nonlinear Control Design Blockset    

Adjusting Constraints

With the error signals as defined above, we simply want to drive them as close to zero as possible. Thus we intend to design constraint bars that merely bracket zero. Since the errors signals have been magnified via the gain blocks, we constrain both (magnified) error responses to within ±1 of zero. You might define these constraints in a number of ways.

Method 1: Click and drag constraints: First open the Nonlinear Control Design Blockset constraint figures as in the previous section by double-clicking on the NCD blocks. Then simply click and drag constraint bound segments around as in the previous section.

Method 2: Use the Constraint Editor dialog box: To use the Constraint Editor, first open the Nonlinear Control Design Blockset constraint figures as in the previous section by double-clicking on the NCD blocks. Then open the Constraint Editor dialog box by clicking the right mouse button on a constraint bound segment. If you opened the editor on a lower bound segment, enter[0 -1 5 -1] into the Position editor [x1 y1 x2 y2]: editable text field. Otherwise, you have opened the editor on an upped bound constraint, therefore, type [0 1 5 1] into the editable text field.

Since the lower constraint bounds are now outside the default y-axis range, open the Y-axis Range dialog box and change the Y-axes limits to [-1.5 1.5] on both the constraint figures. You can open the Y-axes Range dialog box by selecting Y-Axis... from the Options menu. For more information on the Y-axis Range dialog box, see the "Options Menu" section of Reference.

When you open a constraint figure by double clicking on an NCD block, the global variable ncdStruct is created and initialized as a structure with various fields. The lower bound information is stored in ncdStruct.CnstrLB, the upper bounds in ncdStruct.CnstrUB, and the axes range information saved in ncdStruct.RngLmts. The data you input into the Constraint Editor and the Y-axes Range dialog boxes gets saved into the these fields of ncdStruct, and you can see the format in which the lower bound information is stored by typing ncdStruct.CnstrLB at the MATLAB prompt. See the Appendix for more information regarding these variables and other data fields of ncdStruct.

Though the ncdStruct is available to you in the workspace, we strongly urge you not to modify it directly. We mention this at this point so that you aware that the Nonlinear Control Design Blockset does create this global variable in your MATLAB workspace, and typing clear or clear global during an Nonlinear Control Design Blockset session would require closing down all constraint windows and beginning the session anew.

Before starting the optimization, you must tell the Nonlinear Control Design Blockset which parameters are tunable for optimization. Open the Optimization Parameters dialog box by selecting Parameters... from the Optimization menu of either constraint figure. Input changes to the dialog box's editable text fields to make the dialog box look like the one below.


  Nonlinear Control Design Blockset Startup Running the Optimization