Application of the Continuation Method to Root ... - ACS Publications

The homotopy continuation method has been employed to solve many chemical engineering problems involving nonlinear equations. It has not been employed...
0 downloads 0 Views 71KB Size
332

Ind. Eng. Chem. Res. 1996, 35, 332-334

RESEARCH NOTES Application of the Continuation Method to Root Locus. A Natural Homotopy System Wen-Jia R. Chen Department of Chemical Engineering, Ohio University, Athens, Ohio 45701

The homotopy continuation method has been employed to solve many chemical engineering problems involving nonlinear equations. It has not been employed to draw root locus in process control. The application of the continuation method makes it possible to draw root locus more accurately and more efficiently, particularly for control systems with a time delay. For such systems, two problems related to the starting points and the crossings must be solved first. Methods to locate the starting points and to handle crossings are also discussed. Introduction The continuation method has attracted considerable attention in the current quest for a robust procedure to determine all the solutions to a general system of equations. In the past, most methods were designed to find only one solution. If the calculation succeeds, it is not clear whether there are other solutions or not. On the other hand, if the calculation fails, it is still not certain that there is no solution. With the development of the continuation method, it is now possible to determine all the solutions, at least for such systems as polynomial equations. A typical homotopy equation employed in the continuation method is represented by

H(s,t) ) (1 - t)G(s) + tF(s) ) 0

(1)

When the homotopy parameter, t, is 0,

H(s,0) ) G(s) ) 0

(2)

H(s,1) ) F(s) ) 0

(3)

When it is 1, The purpose of the continuation method is to determine the solutions of eq 3 from known solutions of eq 2 by tracking the solution paths of eq 1 while varying t from 0 to 1. The roots of eq 3 are known as the starting points, and the roots of eq 2, the terminating points. Many choices for G(s) are available (Wayburn and Seader, 1987), some with only one starting point and others with multiple starting points. Continuation methods have been successfully applied to many chemical engineering problems. Wayburn and Seader (1984) used a differential homotopy continuation method to solve the equilibrium-stage model equations for complex distillation columns. Kuno and Seader (1988) employed a global fixed-point homotopy continuation method to compute all steady-state solutions for a continuous stirred-tank reactor. This paper reports the first application of a continuation method for plotting root locus. Root Locus A root-locus diagram is a design method used in feedback control (Coughanowr, 1991). It is based on a plot, in the complex plane, of the roots of the charac0888-5885/96/2635-0332$12.00/0

teristic equation as the control gain varies from zero to infinity. It shows the characteristics of the control system. In fact, it is the only design method to specify the decay ratio of the control response. It is also an essential tool to calculate the response. Therefore, it plays an important role in both control design and simulation. The classical method for drawing root locus is a graphical method introduced by Evans (1948). The modern method, such as MATLAB, is based on the matrix software developed by the LINPACK and EISPACK projects (Etter, 1993). Unfortunately, for control systems with a time delay, neither one can draw root locus without approximations. The only method that deals with such systems with a delay time is a graphical method proposed by Chu (1952). It is tedious and unreliable. The development of a general continuation method may have a big impact on control design and simulation. For linear feedback control systems, the general characteristic equation is

1 + KN(s)/D(s) ) 0

(4)

D(s) + KN(s) ) 0

(5)

or where D(s) and N(s) are polynomials in the complex (s ) x + iy) plane if there is no delay element. Otherwise, N is a product of a polynomial and an exponential function. K, a constant, is the control gain. Comparing eq 5 with eq 1, it is obvious that they are similar. The root loci are called the homotopy paths, and the control gain plays the role of the homotopy parameter. Therefore, a continuation method can be used to draw root locus. The main difference is that, in a traditional continuation method, the goal is to find the solutions (terminating points). In this study, the goal is to find the paths between the starting points and the terminating points. In fact, the starting points (also called poles) play a more important role in root locus than the terminating points (called zeros). For systems without a delay, all the poles are known. However, for systems with a delay, there are an infinite number of poles and most of them are unknown (at infinity). Fortunately, asymptotes are derived for all branches starting at infinity. At low control gains, roots lie on horizontal © 1996 American Chemical Society

Ind. Eng. Chem. Res., Vol. 35, No. 1, 1996 333

lines with the imaginary part, y, defined by

y ) (2k + n - m + 1)π/Td

(6)

where k is any integer or zero, n the number of poles not at infinity, m the number of zeros not at infinity, and Td the delay time. Starting points (x, y) at arbitrarily low control gain can be calculated using a onedimensional search. Hence, it is possible to determine as many starting points as needed according to eqs 4 and 6. It is then possible to track all the branches near the origin. Figure 1. Example 1, PI control of the third-order process.

Implementation In the general application of the continuation method, each homotopy path is tracked in steps beginning at the starting point. The homotopy parameter is increased from zero by an increment, and then the resulting equation is solved by Newton’s method using the starting value as an initial guess. The increment is made small enough to guarantee a converged solution along the path. This procedure is repeated, each time with an increment in the homotopy parameter and the previous solution as an initial guess to calculate a new solution, until the complete path is obtained. An alternative tracking method is to use an initial guess predicted along the tangential direction of the path. These methods succeed when there is no crossing between paths. However, root locus is known to have crossings. The crossings are the singular points. At these points, Newton’s method fails. One natural solution is to locate the crossings first. Keller (1977) reported an advanced algorithm based on the parametrization of solution arcs. Fortunately, in root-locus calculations, it is not required to locate the crossings. Nevertheless, when the continuation calculation reaches the neighborhood of a crossing, Newton’s method does fail. To overcome this problem, the orthogonal property of the crossing can be employed. Whenever Newton’s method fails, it indicates a crossing is in the neighborhood. The tracking is continued along the perpendicular direction instead of the usual tangential direction. Newton’s method is then resumed using an initial guess in the new direction to calculate a new solution. To implement this algorithm using BASIC language, it is necessary to rewrite eq 4 to avoid complex arithmetic

K|N(s)/D(s)| ) 1

(7)

∠(N(s)/D(s)) ) (2k + 1)π

(8)

Equation 7 represents the magnitude of the complex expression, and eq 8 is the phase angle. Thus, at each step, Newton’s method is used to solve eqs 7 and 8 simultaneously for the real part (x) and the imaginary part (y) of the complex root (s). The algorithm can be summarized as follows: 1. Read parameters. 2. Normalize the dynamic parameters by the dominant time constant. 3. Determine the starting points. 4. Take one starting point as an initial guess to begin the calculations for a whole branch. 5. Increase K by a fixed step size. 6. Solve eqs 7 and 8 for x and y using Newton’s method.

Figure 2. Example 2, PID control of the fourth-order process.

7. Check for path crossing. If there is a crossing, get a new initial guess along the perpendicular direction and repeat the calculation. Set the new solution as an initial guess. 8. Repeat steps 5-7 until enough data for this branch of root locus is obtained. 9. Repeat steps 4-8 until all branches of root locus are obtained. A computer program, CHENCO, has been developed to implement the above procedure. It is written in BASIC and is installed on an IBM compatible PC. The program is general enough to handle any process models and controller models. Examples Four examples are presented for illustration. The first example is a proportional-integral (PI) control of three first-order elements in series. The characteristic equation is

1 + 6K(s + 3.2)/[s(s + 1)(s + 2)(s + 3)] ) 0

(9)

Figure 1 shows the root locus plotted by CHENCO. It has four poles indicated by “x” and one zero indicated by “o”. The root locus is indicated by points on the graph, each of which represents a solution of eq 9 for a particular value of K. The first and second branches start at (0, 0) and (-1, 0), move toward each other along the real axis, and break away at the intersection into the complex plane. The third and fourth branches start at (-2, 0) and (-3, 0), move toward each other, leave the real axis at one intersection, and return at the other. So, there is a total of three path crossings. The second example is a proportional-integralderivative (PID) control of four first-order elements in series. The characteristic equation is

1 + K(0.8s2 + s + 0.4)/[s(s + 1)4] ) 0

(10)

The root locus is shown in Figure 2. It has five poles and two zeros. It is interesting to see that there are two intersections in the complex plane in addition to two intersections on the real axis.

334

Ind. Eng. Chem. Res., Vol. 35, No. 1, 1996

For systems with a delay, an asymptote equation is developed to aid the calculation of starting points at low control gain. The conventional path tracking method fails near the neighborhood of a path crossing. When a path crossing is detected, the path is turned 90° and then the conventional tracking method can be resumed. Nomenclature Figure 3. Example 3, PI control of the first-order process with delay.

Figure 4. Example 4, PID control of the first-order process with delay.

Example 3 shows a PI control of a first-order element with a delay time. The corresponding characteristic equation is

1 + K[(s + 0.7) exp(-s)]/[s(s + 1)] ) 0

(11)

Figure 3 is the root locus. There are an infinite number of poles for an infinite number of branches. Two branches with poles at (0, 0) and (-1, 0) are shown. In addition, three branches with poles at infinity are drawn, including one on the real axis. The actual starting points for these three branches correspond to a control gain of 0.05. The other branches with poles at inifinity are parallel to the two in the complex plane and are not shown in this figure. Only one intersection is seen for this control system. The fourth example is a PID control of a first-order element with a dead time. The characteristic equation is

1 + K[(0.41s2 + s + 1.5) exp(-s)]/[s(s + 1)] ) 0 (12) Figure 4 shows the root locus. Only four branches are drawn, with two of them starting from infinity. There are one crossing on the real axis and two crossings in the complex plane.

D(s) ) denominator of the open-loop transfer function F(s) ) function selected for mapping G(s) ) arbitrary function H(s,t) ) homotopy function K ) control gain k ) integer m ) number of zeros not at infinity N(s) ) numerator of the open-loop transfer function n ) number of poles not at infinity s ) root Td ) delay time t ) homotopy parameter x ) real part of a root, s y ) imaginary part of a root, s

Literature Cited Chu, Y. Feedback Control Systems with Dead-Time Lag or Distributed Lag by Root-Locus Method. Trans. AIEE, Part II 1952, 71, 291-296. Coughanowr, D. R. Process Systems Analysis and Control; McGrawHill: New York, 1991; pp 177-195. Etter, D. M. Engineering Problem Solving with MATLAB; Prentice-Hall: Englewood Cliffs, NJ, 1993; pp 378-381. Evans, W. R. Graphical Analysis of Control Systems. Trans. AIEE 1948, 67, 547-551. Keller, H. B. Numerical Solution of Bifurcation and Nonlinear Eigenvalue Problems. In Applications of Bifurcation Theory; Rabinowitz, P. H., Ed.; Academic Press: New York, 1977. Kuno, M.; Seader, J. D. Computing All Real Solutions to Systems of Nonlinear Equations with a Global Fixed-Point Homotopy. Ind. Eng. Chem. Res. 1988, 27, 1320-1329. Wayburn, T. L.; Seader, J. D. Solution of Systems of Interlinked Distillation Columns by Differential Homotopy-continuation Methods. In Proceedings of the Second International Conference on Foundations of Computer-aided Process Design; Westerberg, A. W., Chien, H. H., Eds.; CACHE: University of Michigan, Ann Arbor, MI, 1984. Wayburn, T. L.; Seader, J. D. Homotopy Continuation Methods for Computer-Aided Process Design. Comput. Chem. Eng. 1987, 11, 7-25.

Received for review April 7, 1995 Revised manuscript received June 21, 1995 Accepted October 27, 1995X

Conclusions The continuation method is the best way to draw root locus. It can be employed for control systems with or without a time delay. This method is implemented and tested in a computer program, CHENCO.

IE950233C

Abstract published in Advance ACS Abstracts, December 1, 1995. X