Abstract:
In tuning a PID controller for a process in a feedback control system, a method is provided for bringing the system into symmetric self-excited oscillations for measuring the frequency and the amplitude of the oscillations, and tuning the controller in dependence on the measurements obtained. A control algorithm (modified relay feedback test) is introduced into the system in series with the process to excite self-excited oscillations in the system. Data and formulas are given for the computation of the specific parameter of the modified relay feedback test and for tuning the parameters of the PID controller. An apparatus for performing the method is disclosed.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]      
         [0000]    
       
         
               
             
               
               
               
               
             
           
               
                   
               
               
                 U.S. Patent Documents: 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                 4,214,300 
                 July, 1980 
                 Barlow et al. 
                 364/105. 
               
               
                 4,549,123 
                 October, 1985 
                 Hagglund et al. 
                 364/157. 
               
               
                 4,602,326 
                 July, 1986 
                 Kraus 
                 364/158. 
               
               
                 4,754,391 
                 June, 1988 
                 Suzuki 
                 364/157. 
               
               
                 4,836,319 
                 June, 1989 
                 Haseda et al. 
                 180/142. 
               
               
                 Re33267 
                 July, 1990 
                 Kraus 
                 364/158. 
               
               
                 5,124,626 
                 June, 1992 
                 Thoen 
                 364/161. 
               
               
                 5,222,022 
                 June, 1993 
                 Adams et al. 
                 364/431. 
               
               
                 5,223,778 
                 June, 1993 
                 Svarovsky et al. 
                 364/157. 
               
               
                 5,229,699 
                 July, 1993 
                 Chu et al. 
                 364/162. 
               
               
                 5,283,729 
                 February, 1994 
                 Lloyd 
                 364/157. 
               
               
                 5,311,421 
                 May, 1994 
                 Nomura et al. 
                 364/157. 
               
               
                 5,325,288 
                 June, 1994 
                 Satou 
                 364/162. 
               
               
                 5,396,415 
                 March, 1995 
                 Konar et al. 
                 364/162. 
               
               
                 5,412,557 
                 May, 1995 
                 Lauw 
                 363/37. 
               
               
                 5,453,925 
                 September, 1995 
                 Wojsznis et al. 
                 364/157. 
               
               
                 5,535,117 
                 July, 1996 
                 Hiroi 
                 364/158. 
               
               
                 5,568,377 
                 October, 1996 
                 Seem et al. 
                 364/157. 
               
               
                 5,587,899 
                 December, 1996 
                 Ho et al. 
                 364/157. 
               
               
                 5,587,896 
                 December, 1996 
                 Hansen et al. 
                 700/28 
               
               
                 5,742,503 
                 April, 1998 
                 Yu 
                 700/42 
               
               
                 7,035,695 
                 April, 2006 
                 Boiko 
                 700/28 
               
               
                 7,249,882 
                 July, 2007 
                 Lin 
                 374/101 
               
               
                   
               
             
          
         
       
     
       Other References 
       [0000]    
       
         Cheng et al., 1999, Identification and Control of Nonlinear Systems Using Multiple Models: Relay Feedback Approach. Proc. American Control Conference 1999, 3327-3331. 
         Chiang et al., 1992, Derivation of Transfer Function from Relay Feedback Systems. Ind. Eng. Chem. Res. 31, 855-860. 
         I. Boiko, Discontinuous Control Systems: Frequency-Domain Analysis and Design, Boston, Birkhauser, 212 p., 2009. 
       
     
       STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT 
       [0005]    Not Applicable 
         [0006]    Reference to Sequence Listing, a Table, or a Computer Program Listing Compact Disk Appendix 
         [0007]    Not Applicable 
       BACKGROUND OF THE INVENTION 
       [0008]    Despite the apparent success of advanced process control, the proportional-integral-derivative (PID) control still remains the main type of control in the process industries. PID controllers and their variations such as proportional-integral (PI), proportional-derivative (PD), and proportional (P) controllers are implemented as either stand-alone controllers or configurable software modules within the distributed control systems (DCS). The DCS software is constantly evolving providing a number of new features, among which the controller autotuning functionality is one of most useful. 
         [0009]    Tuning of PID controllers based on relay feedback tests proposed by Astrom and Hagglund in 1981 (respective U.S. Pat. No. 4,549,123 issued in 1985) received a lot of attention after that (W. L. Luyben, “Derivation of Transfer Functions for Highly Nonlinear Distillation Columns”, Ind. Eng. Chem. Res. 26, 1987, pp. 2490-2495; Tore Hagglund, Karl J. Astrom, “Industrial Adaptive Controllers Based on Frequency Response Techniques”, Automatica 27, 1991, pp. 599-609). It identifies the important dynamic information, ultimate gain and ultimate frequency, in a straightforward manner. The success of this type of tuners lies on the fact that they are simple and reliable. These features of the relay feedback autotuning have lead to a number of commercial tuners (Tore Hagglund, Karl J. Astrom, “Industrial Adaptive Controllers Based on Frequency Response Techniques”, Automatica 27, 1991, pp. 599-609) and industrial applications (H. S. Papastathopoulou, W. L. Luyben, “Tuning Controllers on Distillation Columns with the Distillate-Bottoms Structure”, Ind. Eng. Chem. Res. 29, 1990, pp. 1859-1868). 
         [0010]    Despite the apparent success of relay based tuning, it can lead to reduced or vice versa excessively large gain and phase margins because of the choice of the test point (frequency of the oscillations) corresponding to the phase lag of the process equal to −180° (phase cross-over frequency ω π ) while inclusion of the controller in the loop introduces additional phase shift, which was not accounted for at the selection of the test point and designing the tuning rules. 
       BRIEF SUMMARY OF THE INVENTION 
       [0011]    The present invention completely eliminates this source of inaccuracy via the selection of a different test point, development of the test for excitation of oscillation in the selected test point, and designing the tuning rules that account for the phase shift due to the controller introduction. Therefore, the proposed test and tuning rules ensure that either the specified gain margin of the system or the specified phase margin of the system will be provided. The present invention defines a method and an apparatus for bringing the system (comprising the process, and the developed control algorithm) into symmetric oscillations (further referred to as modified relay feedback test) for determining (measuring) quantities essential for the tuning of the controller. The method is based on the measurement of the frequency and the amplitude of the oscillations in the system under the modified relay feedback test and calculation of the controller tuning parameters in dependence on the measurements obtained. The invention includes all variations and combinations (P, PI, PID, etc.) of the control type of the PID controller. 
     
    
     
       BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING 
         [0012]      FIG. 1 . Nyquist plots for process ( 1 ) and first-order-plus-dead-time (FOPDT) approximation ( 3 ). 
           [0013]      FIG. 2 . Nyquist plots for open-loop system with PI controller and process. 
           [0014]      FIG. 3 . Modified relay feedback test. 
           [0015]      FIG. 4 . Finding periodic solution. 
           [0016]      FIG. 5 . Modified RFT and tuning with specification on phase margin. 
           [0017]      FIG. 6 . Nyquist plots of open-loop systems for Example 2. 
           [0018]      FIG. 7 . Embodiment of the controller and the process. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0019]    Referring to the drawings, a description will be given of an embodiment of a controller tuning method according to the present invention. 
         [0020]    The practice of the use of tuning algorithms shows that simple non-parametric methods (the ones that are not based on any model of the process) such as Ziegler-Nichols&#39;s closed-loop tuning method (J. G. Ziegler, and N. B. Nichols, “Optimum settings for automatic controllers”,  Trans. Amer. Soc. Mech. Eng ., Vol. 64, 1942, pp. 759-768) and Astrom-Hagglund&#39;s relay feedback test (RFT) (K. J. Astrom and T. Hagglund, “Automatic tuning of simple regulators with specifications on phase and amplitude margins,”  Automatica,  20, 1984, p. 645-651) provide a satisfactory and consistent performance even in the conditions characterized by the presence of measurement noise and varying disturbances, when deterioration of more sophisticated methods becomes significant. However, the use of only ultimate gain and frequency cannot ensure sufficient accuracy of tuning There is one more factor that contributes to the issue of relatively low precision. This is the fact that the test point in the closed-loop test is selected to be the one in which the phase characteristic of the process is equal to −180° (phase cross-over frequency ω π ). This approach does not account for the change of frequency ω π  due to the controller introduction, which is the factor that contributes to the deterioration of tuning accuracy. 
         [0021]    The present invention aims to introduce a tuning method in which the above-noted problem of the cross-over frequency shift is compensated for by the respective design of the modified relay feedback test (modified RFT). Respective tuning rules matching to the modified relay feedback test are also proposed that allows for the better accuracy of tuning 
         [0022]    It has been a popular notion that the most important point on the frequency response of the system is the point where the phase characteristic of the process is equal to −180° (phase cross-over frequency ω π ). However, in publication (I. Boiko, “Modified relay feedback test and its use for non-parametric loop tuning” Proc. 2008 American Control Conference, Seattle, Jun. 11-13, 2008, pp. 4755-4760) it was shown that this point remains the most important one only in the system with the proportional controller, when introduction of the controller does not change the value of ω π . This circumstance is often neglected, and the principle is applied to all types of PID control. We consider the following example that shows how the introduction of the controller affects the results of tuning Example 1. We assume that the process is given by the following transfer function (which was used in a number of works as a test process): 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         W 
                         p 
                       
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                     = 
                     
                       
                          
                         
                           
                             - 
                             2 
                           
                            
                           s 
                         
                       
                        
                       
                         1 
                         
                           
                             ( 
                             
                               
                                 2 
                                  
                                 s 
                               
                               + 
                               1 
                             
                             ) 
                           
                           5 
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
     
         [0023]    We find the first order plus dead time (FOPDT) approximating model Ŵ p (s) to the process ( 1 ) based on matching the values of the two transfer functions at frequency ω π : 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           W 
                           ^ 
                         
                         p 
                       
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           K 
                           p 
                         
                          
                         
                            
                           
                             - 
                             τs 
                           
                         
                       
                       
                         
                           
                             T 
                             p 
                           
                            
                           s 
                         
                         + 
                         1 
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where K p  is the process static gain, T v  is the time constant, and τ is the dead time. Let us apply method (J. G. Ziegler, and N. B. Nichols, “Optimum settings for automatic controllers”,  Trans. Amer. Soc. Mech. Eng ., Vol. 64, 1942, pp. 759-768) to the tuning of process ( 1 ) and note that both ( 1 ) and ( 2 ) should produce the same ultimate gain and ultimate frequency in the Ziegler-Nichols closed-loop test or the same values of the amplitude and the ultimate frequency in the RFT (K. J. Astrom and T. Hagglund, “Automatic tuning of simple regulators with specifications on phase and amplitude margins,”  Automatica,  20, 1984, p. 645-651). This problem has infinite number of solutions, as there are three unknown parameters of ( 2 ) and only two measurements obtained from the test. Assume that the value of the process static gain is known: K p =1, and determine T p  and τ. These parameters can be found from the following equation: 
         [0000]        Ŵ   p ( jω   π )= W   p ( jω   π ), 
         [0000]    where ω π  is the phase cross-over frequency for both transfer functions. Therefore, arg W p (jω π )=−π. The value of ω π  is 0.283, which gives W p (jω π )=(−0.498,j0), and the first-order-plus-dead-time (FOPDT) approximation is, therefore, as follows (found via solution of the set of two algebraic equations): 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         W 
                         ^ 
                       
                       p 
                     
                      
                     
                       ( 
                       s 
                       ) 
                     
                   
                   = 
                   
                     
                       
                          
                         
                           
                             - 
                             7.393 
                           
                            
                           s 
                         
                       
                       
                         
                           6.153 
                            
                           s 
                         
                         + 
                         1 
                       
                     
                     . 
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
         [0024]    The Nyquist plots of the process  1  given by formula (I) and its approximation  2  given by formula ( 3 ) are depicted in  FIG. 1 . The point of intersection of the two plots (denoted as Ωhd  0 ) is also the point of intersection with the real axis. Also Ω 0 =ω π  for both process dynamics ( 1 ) and ( 3 ), and therefore Ŵ p (jΩ 0 )=W p (jω 0 ). If the designed controller is of proportional type then the gain margins for processes ( 1 ) and ( 3 ) are the same. However, if the controller is of PI type then the stability margins for ( 1 ) and ( 2 ) are different. We illustrate that below. We design the PI controller given by the following transfer function: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         W 
                         c 
                       
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                     = 
                     
                       
                         K 
                         c 
                       
                        
                       
                         ( 
                         
                           1 
                           + 
                           
                             1 
                             
                               
                                 T 
                                 c 
                               
                                
                               s 
                             
                           
                         
                         ) 
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
         [0000]    using the Ziegler-Nichols tuning rules (J. G. Ziegler, and N. B. Nichols, “Optimum settings for automatic controllers”,  Trans. Amer. Soc. Mech. Eng ., Vol. 64, 1942, pp. 759-768). This results in the following transfer function of the controller: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         W 
                         c 
                       
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                     = 
                     
                       0.803 
                        
                       
                         ( 
                         
                           1 
                           + 
                           
                             1 
                             
                               17.76 
                                
                               s 
                             
                           
                         
                         ) 
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
         [0025]    The Nyquist plot of the open-loop systems containing the process ( 1 ) and the controller ( 5 ) denoted as  1  and the Nyquist plot of the open-loop systems containing the process approximation ( 3 ) denoted as  2  are depicted in  FIG. 2 . It follows from the frequency-domain theory of linear systems and the used tuning rules that the mapping of point Ω 0  in  FIG. 1  into point Ω 0  in  FIG. 2  is done via clockwise rotation of vector  W   p (jΩ 0 ) by the angle ψ=arctan(1/(0.8×2π)=11.25° and multiplication of its length by such value, so that its length becomes equal to 0.408. However, for the open-loop system containing the PI controller, the points of intersection of the Nyquist plots of the system and of the real axis are different for the system with process ( 1 ) and with process approximation ( 3 ). They are shown as points Ω 1  and Ω 2  in  FIG. 2 . The mapping of these points to the Nyquist plots of the process and its approximation is shown in  FIG. 1 . Therefore, the stability margins of the systems containing a PI controller are not the same any more. It is revealed as different points of intersection of the plots and of the real axis in  FIG. 2 . In fact, the position of vector  W   ol (jΩ 0 )=  W   c (jΩ 0 )  W   p (jΩ 0 ) is fixed, but this vector does not reflect the stability of the system. As one can see in  FIG. 2 , the gain margin of the system containing the FOPDT approximation of the process is higher than the one of the system with the original process. The considered example illustrates the drawback of methods of tuning based on the measurements of process response in the critical point Ω 0 . This drawback is because of the shift of the critical point due to the introduction of the controller. 
         [0026]    The present invention aims to eliminate the noted drawback by generating oscillations in the critical point that is not necessarily located on the real axis but in the point Ω 0 , which would correspond to certain desired phase lag of the process, so that the introduction of the controller is accounted for in the test itself. 
         [0027]    It is proposed that the modified RFT should be designed as the following control: 
         [0000]    
       
         
           
             
               
                 
                   
                     u 
                      
                     
                       ( 
                       t 
                       ) 
                     
                   
                   = 
                   
                     { 
                     
                       
                         
                           
                             
                               h 
                                
                               
                                   
                               
                                
                               if 
                                
                               
                                   
                               
                                
                               
                                 σ 
                                  
                                 
                                   ( 
                                   t 
                                   ) 
                                 
                               
                             
                             ≥ 
                             
                               
                                 Δ 
                                 1 
                               
                                
                               
                                   
                               
                                
                               or 
                                
                               
                                   
                               
                                
                               
                                 ( 
                                 
                                   
                                     
                                       σ 
                                        
                                       
                                         ( 
                                         t 
                                         ) 
                                       
                                     
                                     &gt; 
                                     
                                       
                                         - 
                                         
                                           Δ 
                                           2 
                                         
                                       
                                        
                                       
                                           
                                       
                                        
                                       and 
                                        
                                       
                                           
                                       
                                        
                                       
                                         u 
                                          
                                         
                                           ( 
                                           
                                             t 
                                             - 
                                           
                                           ) 
                                         
                                       
                                     
                                   
                                   = 
                                   h 
                                 
                                 ) 
                               
                             
                           
                         
                       
                       
                         
                           
                             
                               
                                 - 
                                 h 
                               
                                
                               
                                   
                               
                                
                               if 
                                
                               
                                   
                               
                                
                               
                                 σ 
                                  
                                 
                                   ( 
                                   t 
                                   ) 
                                 
                               
                             
                             ≤ 
                             
                               
                                 Δ 
                                 2 
                               
                                
                               
                                   
                               
                                
                               or 
                                
                               
                                   
                               
                                
                               
                                 ( 
                                 
                                   
                                     
                                       σ 
                                        
                                       
                                         ( 
                                         t 
                                         ) 
                                       
                                     
                                     &lt; 
                                     
                                       
                                         Δ 
                                         1 
                                       
                                        
                                       
                                           
                                       
                                        
                                       and 
                                        
                                       
                                           
                                       
                                        
                                       
                                         u 
                                          
                                         
                                           ( 
                                           
                                             t 
                                             - 
                                           
                                           ) 
                                         
                                       
                                     
                                   
                                   = 
                                   
                                     - 
                                     h 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where Δ 1 =βσ max , Δ 2 =−βσ min , σ max  and σ min  are last “singular” points of the error signal  2  ( FIG. 3 ) corresponding to the last maximum and minimum values of σ(τ) after crossing the zero level, β is a positive constant. 
         [0028]    Assume that the reference signal r(τ)  1  in the system containing the process  6 , the control algorithm (modified RFT)  5 , and the summer  7  ( FIG. 3 ), is zero and show that in the steady mode, the motions of the control  3  provided by the algorithm  5  given by ( 6 ) and of the output  4  are periodic. Apply the describing function (DF) method (Derek P. Atherton, “Nonlinear Control Engineering”, Van Nostrand Reinhod New York, 1982) to the analysis of motions in  FIG. 3 . Assume that the steady mode periodic, and show that this is a valid assumption by finding parameters of this periodic motion (Note: a rigorous proof is presented in the article I. Boiko, L. Fridman, I. M. Castellanos, “Analysis of second-order sliding mode algorithms in the frequency domain,” IEEE Trans. Automat. Contr., Vol. 49, No. 6, pp. 946-950, 2004). If the motions in the system are periodic then σ max  and σ min  represent the amplitude of the oscillations: α 0 =σ max =−σ min , and the equivalent hysteresis value of the relay is Δ=Δ 1 =Δ 2 =βσ max =−βσ min . The DF of the hysteretic relay is given as the following function of amplitude α: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       N 
                        
                       
                         ( 
                         a 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           
                             4 
                              
                             h 
                           
                           
                             π 
                              
                             
                                 
                             
                              
                             a 
                           
                         
                          
                         
                           
                             1 
                             - 
                             
                               
                                 ( 
                                 
                                   Δ 
                                   a 
                                 
                                 ) 
                               
                               2 
                             
                           
                         
                       
                       - 
                       
                         j 
                          
                         
                           
                             4 
                              
                             h 
                              
                             
                                 
                             
                              
                             Δ 
                           
                           
                             π 
                              
                             
                                 
                             
                              
                             
                               a 
                               2 
                             
                           
                         
                       
                     
                   
                   , 
                   
                     a 
                     &gt; 
                     Δ 
                   
                 
               
               
                 
                   ( 
                   7 
                   ) 
                 
               
             
           
         
       
     
         [0029]    However, the system  FIG. 3  with control ( 6 ) is not a conventional relay system. This system has the hysteresis value that is unknown a-priori and depends on the amplitude value: Δ=βα. Therefore, ( 7 ) can be rewritten as follows: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       N 
                        
                       
                         ( 
                         a 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           4 
                            
                           h 
                         
                         
                           π 
                            
                           
                               
                           
                            
                           a 
                         
                       
                        
                       
                         ( 
                         
                           
                             
                               1 
                               - 
                               
                                 β 
                                 2 
                               
                             
                           
                           - 
                           jβ 
                         
                         ) 
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   8 
                   ) 
                 
               
             
           
         
       
     
         [0030]    The modified RFT will generate oscillations in the system under control ( 6 ). Parameters of the oscillations can be found from the harmonic balance equation: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         W 
                         p 
                       
                        
                       
                         ( 
                         
                           jΩ 
                           0 
                         
                         ) 
                       
                     
                     = 
                     
                       - 
                       
                         1 
                         
                           N 
                            
                           
                             ( 
                             
                               a 
                               0 
                             
                             ) 
                           
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   9 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where α 0  and Ω 0  are the amplitude and the frequency of the periodic motions. The negative reciprocal of the DF is given as follows: 
         [0000]    
       
         
           
             
               
                 
                   
                     - 
                     
                       1 
                       
                         N 
                          
                         
                           ( 
                           a 
                           ) 
                         
                       
                     
                   
                   = 
                   
                     
                       - 
                       
                         
                           π 
                            
                           
                               
                           
                            
                           a 
                         
                         
                           4 
                            
                           h 
                         
                       
                     
                      
                     
                       ( 
                       
                         
                           
                             1 
                             - 
                             
                               β 
                               2 
                             
                           
                         
                         + 
                         jβ 
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   10 
                   ) 
                 
               
             
           
         
       
     
         [0031]    Finding a periodic solution in system  FIG. 3  with control ( 6 ) has a simple graphic interpretation ( FIG. 4 ) as finding the point of intersection of the Nyquist plot of the process  1  and of the negative reciprocal of the DF  2 , which is a straight line that begins in the origin and makes a counterclockwise angle ψ=arcsin)β with the negative part of the real axis. In the problem of analysis, frequency Ω 0  and amplitude α 0  are unknown variables and are found from the complex equation ( 9 ). In the problems of tuning, Ω 0  and α 0  are measured from the modified RFT, and on the basis of the measurements obtained the tuning parameters are calculated from Ω 0  and α 0 . 
         [0032]    The modified RFT allows for the exact design of the gain margin. Since the amplitude of the oscillations α 0  is measured from the test, the process gain at frequency Ω 0  can be obtained as follows: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                        
                       
                         
                           W 
                           p 
                         
                          
                         
                           ( 
                           
                             jΩ 
                             0 
                           
                           ) 
                         
                       
                        
                     
                     = 
                     
                       
                         π 
                          
                         
                             
                         
                          
                         
                           a 
                           0 
                         
                       
                       
                         4 
                          
                         h 
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   11 
                   ) 
                 
               
             
           
         
       
     
         [0000]    which after introduction of the controller will become the process gain at the critical frequency. 
         [0033]    The PID controller transfer function is 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       W 
                       c 
                     
                      
                     
                       ( 
                       s 
                       ) 
                     
                   
                   = 
                   
                     
                       
                         K 
                         c 
                       
                       ( 
                       
                         1 
                         + 
                         
                           1 
                           
                             
                               T 
                               ic 
                             
                              
                             s 
                           
                         
                         + 
                         
                           
                             T 
                             dc 
                           
                            
                           s 
                         
                       
                       ) 
                     
                     . 
                   
                 
               
               
                 
                     
                 
               
             
           
         
       
     
         [0000]    The tuning rules for a PID controller are then defined as follows: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       K 
                       c 
                     
                     = 
                     
                       
                         c 
                         1 
                       
                        
                       
                         
                           4 
                            
                           h 
                         
                         
                           π 
                            
                           
                               
                           
                            
                           
                             a 
                             0 
                           
                         
                       
                     
                   
                   , 
                   
                     
                       T 
                       ic 
                     
                     = 
                     
                       
                         c 
                         2 
                       
                        
                       
                         
                           2 
                            
                           π 
                         
                         
                           Ω 
                           0 
                         
                       
                     
                   
                   , 
                   
                     
                       T 
                       dc 
                     
                     = 
                     
                       
                         c 
                         3 
                       
                        
                       
                         
                           2 
                            
                           π 
                         
                         
                           Ω 
                           0 
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   12 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where c 1 , c 2 , and c 3  are constant parameters that define the tuning rule. It can be noted that if the tuning rules are assigned as ( 12 ) then the closed-loop system characteristics become invariant to the time constants of the process, so that if all time constants of the process were increased by the factor α then the critical frequency would decrease by the same factor α, and the product of every time constant by the critical frequency would remain unchanged. If the tuning rules ( 12 ) are used then the frequency response of the PID controller at Ω 0  becomes 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         W 
                         c 
                       
                        
                       
                         ( 
                         
                           jΩ 
                           0 
                         
                         ) 
                       
                     
                     = 
                     
                       
                         c 
                         1 
                       
                        
                       
                         
                           4 
                            
                           h 
                         
                         
                           π 
                            
                           
                               
                           
                            
                           
                             a 
                             0 
                           
                         
                       
                        
                       
                         ( 
                         
                           1 
                           - 
                           
                             j 
                              
                             
                               1 
                               
                                 2 
                                  
                                 π 
                                  
                                 
                                     
                                 
                                  
                                 
                                   c 
                                   2 
                                 
                               
                             
                           
                           + 
                           
                             j2π 
                              
                             
                                 
                             
                              
                             
                               c 
                               3 
                             
                           
                         
                         ) 
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
           
         
       
     
         [0000]    so that if the tuning rules are established through the choice of parameters c 1 , c 2 , and c 3 , and the test provides oscillations of the frequency Ω u  which is equal to the phase cross-over frequency ω π  of the open-loop system (including the controller), then the controller phase lag at the frequency ω π =Ω u  is constant and depends only on the values of c 2 , and c 3 : 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             ϕ 
                             c 
                           
                            
                           
                             ( 
                             
                               ω 
                               π 
                             
                             ) 
                           
                         
                         = 
                         
                           arctan 
                           ( 
                           
                             
                               
                                 c 
                                 3 
                               
                                
                               
                                 T 
                                 u 
                               
                                
                               
                                 Ω 
                                 u 
                               
                             
                             - 
                             
                               1 
                               
                                 
                                   c 
                                   2 
                                 
                                  
                                 
                                   T 
                                   u 
                                 
                                  
                                 
                                   Ω 
                                   u 
                                 
                               
                             
                           
                           ) 
                         
                       
                     
                   
                   
                     
                       
                         = 
                         
                           arctan 
                           ( 
                           
                             
                               2 
                                
                               π 
                                
                               
                                   
                               
                                
                               
                                 c 
                                 3 
                               
                             
                             - 
                             
                               1 
                               
                                 2 
                                  
                                 π 
                                  
                                 
                                     
                                 
                                  
                                 
                                   c 
                                   2 
                                 
                               
                             
                           
                           ) 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   14 
                   ) 
                 
               
             
           
         
       
     
       Tuning Rules for Specification on Gain Margin. 
       [0034]    Let the specified gain margin be γ m &gt;1 (in absolute values). Then taking absolute values of both sides of ( 13 ) and considering ( 11 ) we obtain the following equation: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         γ 
                         m 
                       
                        
                       
                         c 
                         1 
                       
                        
                       
                         
                           1 
                           + 
                           
                             
                               ( 
                               
                                 
                                   2 
                                    
                                   π 
                                    
                                   
                                       
                                   
                                    
                                   
                                     c 
                                     3 
                                   
                                 
                                 - 
                                 
                                   1 
                                   
                                     2 
                                      
                                     π 
                                      
                                     
                                         
                                     
                                      
                                     
                                       c 
                                       2 
                                     
                                   
                                 
                               
                               ) 
                             
                             2 
                           
                         
                       
                     
                     = 
                     1 
                   
                   , 
                 
               
               
                 
                   ( 
                   15 
                   ) 
                 
               
             
           
         
       
     
         [0000]    which is a constraint complementary to the tuning rules ( 11 ). To provide the specified gain margin, the modified RFT must be carried out with parameter 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         β 
                         = 
                         
                           
                             - 
                             sin 
                           
                            
                           
                               
                           
                            
                           
                             ϕ 
                             c 
                           
                            
                           
                             Ω 
                             0 
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                         
                           
                             - 
                             sin 
                           
                            
                           
                               
                           
                            
                           arc 
                            
                           
                               
                           
                            
                           
                             tg 
                             ( 
                             
                               
                                 2 
                                  
                                 π 
                                  
                                 
                                     
                                 
                                  
                                 
                                   c 
                                   3 
                                 
                               
                               - 
                               
                                 1 
                                 
                                   2 
                                    
                                   π 
                                    
                                   
                                       
                                   
                                    
                                   
                                     c 
                                     2 
                                   
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   16 
                   ) 
                 
               
             
           
         
       
     
         [0035]    In the example considered above, if we keep parameter c 2  the same as in Ziegler-Nichols tuning rules (J. G. Ziegler, and N. B. Nichols, “Optimum settings for automatic controllers”,  Trans. Amer. Soc. Mech. Eng ., Vol. 64, 1942, pp. 759-768): c 2 =0.8, then to obtain, for example, gain margin γ m =2 the tuning parameter c 1  for the modified RFT should be selected as c 1 =0.49, and parameter)β for the test should be selected in accordance with ( 16 ) as)β=0.195. For any process, the system will have gain margin γ m =2 (6 dB). Therefore, the modified RFT with parameter)β calculated as ( 16 ) and tuning rules ( 12 ) satisfying the constraint ( 15 ) can ensure the desired gain margin. However, ( 15 ) is an equation containing three unknown variables, which gives one a freedom to vary parameters c 1 , c 2 , and c 3 . Some optimal sets of tuning rule parameters c 1 , c 2 , and c 3  (for gain margin γ m =2) that were obtained via simulations, along with the values of φ c  (Ω o ) and parameter)β for the test, are given in Table 1. One should note the difference between the values of the critical frequency of the conventional RFT and the frequency of oscillations in the modified RFT (except for the proportional controller). Therefore, even if the coefficients c 2 , c 3  of Table 1 have the same values as corresponding coefficients of Ziegler-Nichols tuning rules (J. G. Ziegler, and N. B. Nichols, “Optimum settings for automatic controllers”,  Trans. Amer. Soc. Mech. Eng ., Vol. 64, 1942, pp. 759-768), they will actually produce different values of controller parameters T ic  and T dc . In fact, due to the negative value of φ c  (Ω 0 ) for the PI controller (and consequently, lower frequency of oscillations of the modified RFT), one would get higher value of T ic  computed through the modified RFT and data of Table 1. And vice versa, due to the positive value of φ c  (Ω 0 ) for the PID controller, one would get lower values of T ic  and T dc , computed through the modified RFT and data of Table 1. 
         [0000]    
       
         
               
             
               
               
               
               
               
               
               
             
               
               
               
               
               
               
               
             
           
               
                 TABLE 1 
               
             
             
               
                   
               
               
                 Tuning rules for gain margin γ m  = 2 
               
             
          
           
               
                   
                 Controller 
                 c 1   
                 c 2   
                 c 3   
                 φ c  (Ω 0 ) 
                 β 
               
               
                   
                   
               
             
          
           
               
                   
                 P 
                 0.50 
                 0 
                 0 
                 0 
                 0 
               
               
                   
                 PI 
                 0.49 
                 0.80 
                 0 
                 −11.2° 
                 0.195 
               
               
                   
                 PID 
                 0.46 
                 0.50 
                 0.12 
                 23.5° 
                 −0.399 
               
               
                   
                   
               
             
          
         
       
     
       Tuning Rules for Specification on Phase Margin. 
       [0036]    The relationship that would allow one to tune PID controllers with specification on phase margin for the open-loop system can also be derived. Using the same format of the tuning rules ( 12 ), and considering that if the parameter β of the modified RFT is calculated from the sum of φ c  (Ω 0 ) and the phase margin φ m  as: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         β 
                         = 
                         
                           sin 
                            
                           
                               
                           
                            
                           
                             ( 
                             
                               
                                 φ 
                                 m 
                               
                               - 
                               
                                 
                                   ϕ 
                                   c 
                                 
                                  
                                 
                                   ( 
                                   
                                     Ω 
                                     0 
                                   
                                   ) 
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                   
                     
                       
                         
                           = 
                           
                             sin 
                             ( 
                             
                               
                                 φ 
                                 m 
                               
                               + 
                               
                                 arc 
                                  
                                 
                                     
                                 
                                  
                                 
                                   tg 
                                   ( 
                                   
                                     
                                       1 
                                       
                                         2 
                                          
                                         π 
                                          
                                         
                                             
                                         
                                          
                                         
                                           c 
                                           2 
                                         
                                       
                                     
                                     - 
                                     
                                       2 
                                        
                                       π 
                                        
                                       
                                           
                                       
                                        
                                       
                                         c 
                                         3 
                                       
                                     
                                   
                                   ) 
                                 
                               
                             
                             ) 
                           
                         
                         , 
                       
                     
                   
                 
               
               
                 
                   ( 
                   17 
                   ) 
                 
               
             
           
         
       
     
         [0000]    we formulate the constraint for the tuning rules ensuring φ m  as follows: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       c 
                       1 
                     
                      
                     
                       
                         1 
                         + 
                         
                           
                             ( 
                             
                               
                                 2 
                                  
                                 π 
                                  
                                 
                                     
                                 
                                  
                                 
                                   c 
                                   3 
                                 
                               
                               - 
                               
                                 1 
                                 
                                   2 
                                    
                                   π 
                                    
                                   
                                       
                                   
                                    
                                   
                                     c 
                                     2 
                                   
                                 
                               
                             
                             ) 
                           
                           2 
                         
                       
                     
                   
                   = 
                   1. 
                 
               
               
                 
                   ( 
                   18 
                   ) 
                 
               
             
           
         
       
     
         [0037]    The graphical interpretation of modified RFT and tuning with specification on phase margin are presented in  FIG. 5 , where the Nyquist plot of the process  5  intersects with the negative reciprocal of 
         [0000]    the DF of the modified RFT  2  in the point that defines the circle of radius 
         [0000]    
       
         
           
             R 
             = 
             
               
                 
                   π 
                    
                   
                       
                   
                    
                   
                     a 
                     0 
                   
                 
                 
                   4 
                    
                   h 
                 
               
                
               3. 
             
           
         
       
     
         [0000]    
       
         
               
             
               
               
               
               
               
               
               
             
               
               
               
               
               
               
               
             
           
               
                 TABLE 2 
               
             
             
               
                   
               
               
                 Tuning rules for phase margin φ m  = 45° 
               
             
          
           
               
                   
                 Controller 
                 c 1   
                 c 2   
                 c 3   
                 φ c  (Ω 0 ) 
                 β 
               
               
                   
                   
               
             
          
           
               
                   
                 P 
                 1.0 
                 0 
                 0 
                 0° 
                 0.707 
               
               
                   
                 PI 
                 0.98 
                 0.80 
                 0 
                 −11.2° 
                 0.831 
               
               
                   
                 PID 
                 0.92 
                 0.50 
                 0.12 
                 23.5° 
                 0.367 
               
               
                   
                   
               
             
          
         
       
     
         [0038]    Therefore, if tuning rules ( 12 ) are subject to constraint ( 18 ) then at frequency Ω 0  of the modified RFT: (a) the absolute value of the open-loop frequency response, in accordance with ( 11 ), ( 13 ), is 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                            
                           
                             
                               W 
                               ol 
                             
                              
                             
                               ( 
                               
                                 jΩ 
                                 0 
                               
                               ) 
                             
                           
                            
                         
                         = 
                         
                           
                              
                             
                               
                                 W 
                                 c 
                               
                                
                               
                                 ( 
                                 
                                   jΩ 
                                   0 
                                 
                                 ) 
                               
                             
                              
                           
                            
                           
                              
                             
                               
                                 W 
                                 p 
                               
                                
                               
                                 ( 
                                 
                                   jΩ 
                                   0 
                                 
                                 ) 
                               
                             
                              
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                         
                           
                             
                               π 
                                
                               
                                   
                               
                                
                               
                                 a 
                                 
                                     
                                 
                               
                             
                             
                               4 
                                
                               h 
                             
                           
                            
                           
                             c 
                             1 
                           
                            
                           
                             
                               4 
                                
                               h 
                             
                             
                               π 
                                
                               
                                   
                               
                                
                               
                                 a 
                                 
                                     
                                 
                               
                             
                           
                            
                           
                             
                               1 
                               + 
                               
                                 
                                   ( 
                                   
                                     
                                       2 
                                        
                                       π 
                                        
                                       
                                           
                                       
                                        
                                       
                                         c 
                                         3 
                                       
                                     
                                     - 
                                     
                                       1 
                                       
                                         2 
                                          
                                         π 
                                          
                                         
                                             
                                         
                                          
                                         
                                           c 
                                           2 
                                         
                                       
                                     
                                   
                                   ) 
                                 
                                 2 
                               
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         
                           = 
                           
                             
                               
                                 c 
                                 1 
                               
                                
                               
                                 
                                   1 
                                   + 
                                   
                                     
                                       ( 
                                       
                                         
                                           2 
                                            
                                           π 
                                            
                                           
                                               
                                           
                                            
                                           
                                             c 
                                             3 
                                           
                                         
                                         - 
                                         
                                           1 
                                           
                                             2 
                                              
                                             π 
                                              
                                             
                                                 
                                             
                                              
                                             
                                               c 
                                               2 
                                             
                                           
                                         
                                       
                                       ) 
                                     
                                     2 
                                   
                                 
                               
                             
                             = 
                             1 
                           
                         
                         , 
                       
                     
                   
                 
               
               
                 
                     
                 
               
             
           
         
       
     
         [0000]    that constitutes the magnitude cross-over frequency, and (b) the phase of the open-loop frequency response is 
         [0000]      arg  W   ol ( jΩ   0 )=arg  W   c ( jΩ   0 )+arg  W   p ( jΩ   0 )=−180°+(φ m −φ c (Ω 0 ))+φ c (Ω 0 )=−180°+φ m    
         [0000]    which shows that the specification on the phase margin is satisfied. Assuming that the controller at frequency Ω 0  of the modified RFT should provide the same phase response as at critical frequency of the conventional RFT, we can obtain the following values of parameters c 1 , c 2 , c 3  (see Table 2 for φ m =45°. Like in the tuning with specification on gain margin, one should note the difference between the values of the critical frequency of the conventional RFT and the frequency of oscillations in the modified RFT, which will result in different values of the controller parameters. The proposed method of tuning is illustrated by the following example. 
       Example 2 
       [0039]    Consider the process transfer function ( 1 ) that was used in Example 1. (a) Apply the modified RFT with amplitude h=1, parameter)β=0.195 and c 1 , c 2  values from Table 1 for tuning a PI controller with specification on gain margin γ m =2. (b) After that use the modified RFT with amplitude h=1, parameter)β=0.659 and c 1 , c 2  values from Table 2 for tuning a PI controller with specification on phase margin φ m =45°. The controller tuning that is done according to the presented method produces the following results. (a) The modified RFT gives Ω 0 =0.188 and α 0 =0.393; for tuning with specification on gain margin the controller parameters calculated per ( 12 ) are K c =0.978, T ic =26.74; (b) The modified RFT gives Ω 0 =0.133 and α 0 =0.544; for tuning with specification on gain margin the controller parameters calculated per ( 12 ) are K c =1.416, T ic =37.85. The frequency response (Nyquist plots) of the open-loop systems for the system tuned with specification on gain margin  1  and for the system tuned with specification on gain margin  2 , is presented in  FIG. 6 . One can see that, indeed, the gain margin is two for option “a”, and the phase margin is 45° for option “b”. 
         [0040]    It was assumed above that the reference signal  1  in  FIG. 3  was zero. Therefore, it can be further noted that the values of the control and the process variable should be understood as increments from the corresponding values in a steady operating point. To realize that, the system must be brought to a steady state first (by means of not optimally tuned but stable PID controller). After that the modified RFT should be carried out with increments of the control +h and −h from the value in the steady state. The amplitude of the oscillations must be measured with respect to the value of the process variable in the steady state. 
         [0041]    Eventually, the designed self-tuning PID (or another type) controller is supposed to be realized as a processor based (micro-computer or controller) device and all above formulas, the nonlinear element, the tuning rules are realized as computer programs with the use of applicable programming languages. The preferred embodiment of the controller is depicted in  FIG. 7 . The controller  1  has two A/D converters  2  and  3  on its input for the process output and set point signals respectively (alternatively it may have only one A/D converter for the process output signal, and the set point may be realized within the controller software), a processor (CPU)  4 , a read-only memory (ROM)  5  for program storage, a random access memory (RAM)  6  for buffering the data, an address/data/control bus  7  for data transfer to/from the processor, and an D/A converter  8  that converts digital control signal generated by the controller into analog format. The analog control signal is applied to the process  9  (to a control valve, etc.). All elements of the controller interact with each other in a known manner. Some elements of the controller listed above (for example A/D and D/A converters) may be missing as well as the controller may also contain elements other than listed above-depending on specific requirements and features of the control system.