Dr. Boris J. Lurie
HOME  |  RESUME  |  PUBLICATIONS  |  CONSULTING  |  LECTURES  |  SITE MAP 

 
LIST OF PUBLICATIONS

Books Patents Journal Publications NASA Tech Briefs Conference Proceedings Publications
Discussions Readers' Contributions Bode Step Toolbox Function Listings

BODE STEP TOOLBOX

MATLAB functions for design of control systems with maximized feedback

that requires shaping the loop with a Bode step


Copyright ©2000 by B. J. Lurie. The materials may be copied freely for nonprofit use. This document constitutes Appendix 14 of Classical Feedback Control by Boris J. Lurie and Paul J. Enright, Marcel Dekker, 2000; Chapter 4 (Shaping the Loop Frequency Response) and Appendix 11 are also on-line.

From the Bode integral of phase it follows that to maximize the area of negative feedback, and to provide the steepest possible loop gain roll-off at higher frequencies, the Nyquist diagram should follow the stability margin boundary curve as closely as possible. The loop phase lag must be (1 - y)180o until the loop gain becomes smaller than x dB. This is achieved by loop shaping using a Bode step. The Bode Step MATLAB toolbox simplifies design of servosystems with Bode step responses. The function listings and a tar file are available in the Function Listings page.

 

The toolbox includes the following MATLAB functions:

1. NYQLOG (Nyquist plot on logarithmic scale with frequency in octave marks)
2. BOLAGNYQ (Bode diagram for the gain and the lag margin, and the logarithmic Nyquist plot)
3. TFSHIFT (Frequency transform, frequency de-normalization, similar to lp2lp)
4. BONYQAS (Asymptotic Bode diagram, phase plot, and logarithmic Nyquist plot)
5. BOSTEP (Rational function approximation to optimal Bode step response)
6. BOCLOS (Prefilter design for closed-loop low overshoot and fast settling)
7. BOINTEGR (Breaking compensator into two parallel paths, one of which is dominant at low frequencies.)
8. BOCOMP (Calculation of the compensator function for a dc motor control)
9. NDCP (Nyquist plot for describing functions of NDC with parallel paths)
10. BNDCP (Bode plot for describing functions of NDC with parallel paths)
11. NDCB (Nyquist plot for describing functions of NDC with feedback path)
12. BNDCB (Bode plot for describing functions of NDC with feedback path)

These MATLAB functions simplify designing linear/nonlinear servo loops with Bode optimal loop responses and prefilters. The functions do the following:

A. Plotting routines

1 NYQLOG plots Nyquist diagram on logarithmic plane with octave marks. The marks allow reading the slope of the Bode diagram without plotting it. The loop shaping can be performed iteratively using this plot instead of the Bode diagrams.

2 BOLAGNYQ plots frequency responses of the gain and the phase lag stability margin, and plots the Nyquist diagram on the logarithmic plane with octave marks. This plots' arrangement is convenient for the loop shaping. Using the plot of the lag margin allows to pay attention to only a small area of the plot where the gain response crosses the 0-dB level, and to read there the value of the guard-point phase lag margin.

B. Calculations

3 TFSHIFT de-normalizes an initially normalized frequency response similarly to the MATLAB function lp2lp but is doing this by polynomial transform in s-domain instead of matrix manipulation in t-domain (lp2lp gives complex numbers as the answers for the gain and, sometimes, produces inaccurate answers). It can be used, for example, in problems like that described in Example 3 in Section 4.2.3.

C. Plant modeling, asymptotic diagrams, and conceptual design

4 BONYQAS simplifies the system conceptual design. In particular, it helps to accomplish the following two tasks:

I. Calculating and plotting the phase shift of the plant when only the plant gain has been estimated or measured (since the measurements of the plant gain are often less time-consuming then the measurements of the phase shift).

II. Completing the conceptual design of the feedback loop using asymptotic piece-linear Bode diagrams. The function generates the asymptotic Bode diagram and calculates and plots the phase and the Nyquist diagrams. It allows easy shaping the responses by changing the corner frequencies, the gain at the corner frequencies, the linear nonminimum phase lag coefficient, and the asymptotic slopes at low-frequencies (the Type of the loop) and at high-frequencies. The obtained parameters of the Bode step can be further used as the input file parameters for the BOSTEP function.

D. Feedback loop design

5 BOSTEP generates rational function approximation to the theoretical transcendental (or irrational, obtained with BONYQAS) loop response with Bode step for specified margins, asymptotic slope, non-minimum phase, and the feedback Type.

6 BOCLOS generates normalized closed-loop transfer function without and with prefilter, and the frequency response of 4th order Bessel filter. Also, it generates the step response. It is usable for designing a prefilter rendering a good closed-loop transient response.

7 BOINTEGR converts the linear compensator transfer function into a sum of two transfer functions, the low-pass one (a generalization of an integrator of a PID controller) and the rest. Then, saturation can be introduced into the low-frequency path to improve the transient response and to provide global stability.

E. Compensator design

8 BOCOMP calculates the compensator transfer function for the loop response with Bode step of a servo with a dc permanent magnet motor. The input file includes the loop transfer function generated by BOSTEP and the dc motor and the inertial load parameters.

F. Nonlinear dynamic compensator design

9 NDCP plots iso-e describing functions on the logarithmic Nyquist plane for an NDC with parallel paths, one of which including a variable or a nonlinear (typically, a saturation) link. A series link is also included that can imitate the rest of the feedback loop so that the loop Nyquist diagrams can be plotted, with the values of the describing function of the nonlinear element from 0 to 1.

10 BNDCP plots iso-e describing functions Bode diagrams for an NDC with parallel paths, one of which including a variable or a nonlinear link (typically, a saturation). A series link is also included that can imitate the rest of the feedback loop so that the loop Bode diagrams can be plotted, with the values of the describing function of the nonlinear element from 0 to 1.

11 NDCB plots iso-e describing functions on the logarithmic Nyquist plane for an NDC with a feedback paths which includes a variable or a nonlinear link (typically, a dead zone). A series link is also included that can imitate the rest of the feedback loop so that the loop Nyquist diagrams can be plotted, with the values of the describing function of the nonlinear element from 0 to 1.

12 BNDCB plots iso-e describing functions Bode diagrams for an NDC with a feedback paths which includes a variable or a nonlinear link (typically, a dead zone). A series link is also included that can imitate the rest of the feedback loop so that the loop Bode diagrams can be plotted, with the values of the describing function of the nonlinear element from 0 to 1.

The functions' HELP files include demo/defaults that generate plots by typing the name of the function without arguments. The plots are shown in Figs. A14.1-8 and A14.9-12.

Fig. A14.1  Default/demo for nyqlog and bostep

Fig. A14.2  Default/demo for bolagnyq .
Plot of the phase lag margin is shown by a dashed line.

 

Fig. A14.3  Default/demo 1 for bonyqas, calculating and plotting a band-pass plant phase. Circles on the gain response mark the corner frequencies of the piece-linear approximation.

 

Fig. A14.4  Default/demo 2 for bonyqas, asymptotic loop response.
Circles on the gain response mark the corner frequencies of the piece-linear asymptotic Bode diagram for loop response with Bode step.

Dc motor servo design

A dc motor control system design can be designed with the following sequence of using the toolbox functions.

First, with bonyqas, an asymptotic Bode diagram with Bode step is chosen such that the feedback satisfies the disturbance rejection requirements, and the attenuation in the feedback loop is sufficient at the frequencies of structural modes to guarantee the system stability with the chosen stability margins. An example of the diagram is shown in Fig. A14.4. The stability margins, the frequencies of the beginning and the end of the Bode step, the asymptotic slope, the nonminimum phase lag, and the system Type are determined during this conceptual feedback loop design.

Second, with the function bostep a rational function approximation for the loop response is obtained, and a compensator function for the nominal single-integrator plant with a small nonminimum phase lag is calculated (like it was done in Example 1 in Section 4.2.3). The responses at this point are normalized in frequency, i.e. the loop gain response has unity crossover frequency, like that shown in Fig. A14.1.

Third, with the function boclos the closed-loop frequency response is plotted, the prefilter calculated, and the closed-loop with the prefilter response is plotted, like that shown in Fig. 14.5. The MATLAB function can be used to calculate the closed-loop response with prefilter comprising two notches, one peak, and a low-pass or only some of these.

The goal for the closed-loop response with the prefilter is a response close to a de-normalized Bessel filter response. The de-normalized filter response can be obtained by shifting the nominal filter response along the logarithmic frequency axis.

Fig. A14.5  Default/demo for boclos plots several responses: open-loop gain response (the one with large gain at low frequencies); closed-loop responses, without a prefilter (the one with a 7 dB hump) and with a prefilter that consists of a notch, a peak, and a 3rd-order Bessel filter (the response with the widest bandwidth); 4th-order Bessel filter response with nominal bandwidth 1 rad/sec that has 15 dB attenuation at this frequency. The phase responses (the lower three) are of the Bessel filter, of the closed loop with prefilter, and of closed-loop without prefilter. The lower plot shows the closed-loop transient response with the prefilter.

 

Fourth, using the motor and load parameters, the compensator and the plant transfer functions are calculated and plotted with bocomp, as were those in Fig. A14.6.

Fifth, with the function bointegr, the compensator transfer function is split into a parallel connection of the low-frequency path and the second path (for the medium and higher frequencies), as exemplified by the plots in Fig. A14.7.

 

Fig. A14.6  Default/demo for bocomp, gain and phase responses
for the compensator and the plant of a dc motor control system

Fig. A14.7  Default/demo for bointegr, the gain and phase responses
for the entire compensator and its two parallel paths

Next, a SIMULINK model of the system should be built like that shown in Fig. 7.26. The model must include flexible modes of the load and the nonlinear elements in the actuator (saturation in current and voltage), in the friction model, and in the compensator (saturation is introduced in front of the low-frequency path of the compensator). With the model, the controller is fine-tuned to perform well over the specified range of the plant parameter variations, and the system performance and robustness are evaluated.

Nonlinear Dynamic Compensation iso-E describing functions

The iso-E responses for signal paths shown in Fig. A14.8 are exemplified in Figs. A14.9-12 with the DF values 0; 0.2; 0.4; 0.6; 0.8; 1. These values correspond to the signal levels E/e ; 6.3; 3; 2; 1.5; < 1 for the saturation and E/edz < 1; 1.5; 2; 3.5; 8; for the dead zone.

 
(a) (b)

Fig. A14.8  NDCs with (a) parallel paths and (b) with a feedback path
 

Fig. A14.9  Default/demo for ndcp

Fig. A14.10  Default/demo for bndcp

Fig. A14.11  Default/demo for ndcb

Fig. A14.12  Default/demo for bndcb