Abstract:
A method and apparatus are provided for estimating and/or precluding stick-slip, or other oscillatory or resonant behavior, through use of a virtual transducer, which precludes the need for having sensors located adjacent to a driven element of the system, or adjacent contact surfaces at which the stick-slip relative motion may occur. Parameters measurable at a drive mechanism are utilized for controlling a system in a manner which precludes stick-slip, or other oscillatory or resonant behavior, of the driven element. Relative motion between contacting surfaces in the driven element, prone to stick-slip behavior, is controlled such that, after sufficient force is applied by the drive element to overcome static friction forces between the contacting surfaces and break them free from one another, relative motion between the surfaces is maintained at a high enough relative speed that the surfaces are precluded from statically contacting one another, so that stick-slip behavior is precluded.

Description:
CROSS-REFERENCE TO RELATED PATENT APPLICATIONS  
       [0001]     This patent application claims the benefit of U.S. Provisional Patent Application No. 60/740,377, filed Nov. 29, 2005, the entire disclosure of which is incorporated by reference in its entirety herein. 
     
    
     FIELD OF THE INVENTION  
       [0002]     This invention relates generally to estimation and control of resonant behavior in a system, and more particularly to estimation and control of resonant behavior in systems having two inertias coupled by a compliant connection, with such systems including those prone to exhibiting stick-slip behavior, such as systems and plants related to drilling for, and pumping oil.  
       BACKGROUND  
       [0003]     In general, any drive connection in a mechanical system exhibits some degree of compliance, i.e. a tendency to yield or bend under load, within the elastic limit of the material, or materials, of the components making up the connection. As a result of this compliance, a driving force exerted at one end of the connection causes the connection to stretch, bend, and/or twist, depending upon the nature of the connection, in such a manner that the driving force will be out of phase with a corresponding reaction of a driven element at the opposite end of the connection, due to inertia of the driven component which must be overcome in order for the driving force to cause a motion of the driven element consistent with the motion of a driving element applying the driving force.  
         [0004]     Under certain circumstances, depending upon construction of the system, compliance in the connection will cause an undesirable oscillating or resonant motion to be set up between the driving and driven elements.  
         [0005]     Such oscillating behavior is sometimes observed in a system having an engine connected to an engine testing dynamo through a connection including an in-line torque sensor. Such torque sensors typically include a resilient element operatively joining an input element and an output element of the torque sensor. The resilient element allows the input and output elements to twist slightly, with respect to one another, in response to torque being transmitted through the torque sensor. This twisting can be measured and used to determine the torque being transmitted by the coupling.  
         [0006]     During an increase and/or decrease in torque, however, the resilient element may cause the system to oscillate as energy is alternately stored and released by the resilient element, until equilibrium is achieved. Such oscillation can be damaging or otherwise detrimental to operation of the system and its components. It is desirable, therefore, to provide an apparatus and method for estimating such behavior, and for controlling the system in such a manner that the undesirable oscillatory or resonant behavior is precluded and/or held within acceptable bounds. It is also highly desirable, in some circumstances, to provide for such control without having sensors located at the driven element, i.e. at the dynamo in the example given above, in order to remove complexity and cost and to improve reliability of the system.  
         [0007]     In some systems, oscillating or resonant behavior takes a form known as stick-slip behavior. Stick-slip behavior refers to an undesired intermittent form of motion that sometimes occurs between relatively moving parts where the coefficient of kinetic friction between the parts is less than the coefficient of static friction between the parts. Contacting surfaces of the parts will stick to one another until a driving force, being exerted on one of the parts by a drive element to cause relative movement between the parts, reaches a value high enough to overcome the static frictional force between the contact surfaces.  
         [0008]     Due to the fact that the static coefficient of friction is higher than the kinetic coefficient of friction, once the static friction force is overcome by the driving force, the contact surfaces of the parts will tend to move freely and rapidly with respect to one another.  
         [0009]     Because there is an inherent springiness (compliance) in the drive element applying force between the parts, the drive element will tend to stretch or compress, or wind up, as force is applied to the movable part while the contact surfaces are being held in contact by the static friction force. Once relative motion occurs, this compression, tension, or winding-up of the drive element will cause rapid movement between the parts, to release the energy stored in compression, tension or wind-up of the drive element. Once the stored energy is released, however, through rapid relative movement between the parts, the relative velocity between the contact surfaces will drop to the point that the static friction force will once again cause the parts to stick to one another, and thereby preclude further relative motion, until sufficient compression, tension, or wind-up of the drive element once again occurs, to overcome the static frictional force and cause slipping of the contact surfaces relative to one another.  
         [0010]     Such stick-slip behavior is known to sometimes occur in metal working equipment, for example, where a drill bit or milling cutter must be driven by a power source located some distance from the point at which material removal is occurring, such that the drill bit or cutter must have a long shank, and/or be connected to a long drive shaft.  
         [0011]     Stick-slip behavior is also sometimes encountered in machinery used in drilling for, or pumping fluids, such as gas, water, or oil, out of the ground. In such applications, long shafts, having lengths of hundreds or thousands of feet, may connect a drilling or pumping apparatus located far below ground level to a shaft drive mechanism located above ground level. Such long shafts have considerable inherent springiness, both axially and radially. This considerable springiness allows a significant amount of energy to be stored in the shaft, if the underground components stick to one another, such that when the torsional force due to wind-up of the shaft becomes high enough to cause the underground parts to break free from one another, they will slip relative to one another at a very high rotational speed, until the energy stored in the shaft is dissipated.  
         [0012]     In addition to placing significant undesirable strain on the working components of the system, stick-slip operation of a pump also will substantially reduce the pumping capacity of the pump. While the parts are stuck to one another no relative motion or pumping is occurring, and during a portion of the stick-slip cycle in which the parts are moving very rapidly with respect to one another, pumping may also not be occurring due to cavitation of the fluid or other effects.  
         [0013]     Stick-slip operation, and its detrimental effects, is further discussed in a United States Patent Application Publication No. US 2004/0062658 A1, published Apr. 1, 2004, to Beck, et al., assigned to the assignee of the present invention, the disclosure and teachings of which are incorporated herein in their entirety.  
         [0014]     Prior approaches to dealing with a system exhibiting stick-slip behavior, have sometimes utilized sensors located adjacent to the contacting surfaces subject to stick-slip behavior. In oil well drilling operations, for example, this has sometimes required placement of sensing equipment a mile or more below the earth&#39;s surface and making connections to a controller located above ground. Such sensors tend to be quite expensive to produce and maintain, and are prone to failure due to the hostile environment in which they are located. Should repair of the sensing elements be required, significant interruption to the drilling process is incurred, in pulling the sensing unit back up to the surface of the ground where it can be repaired and/or replaced.  
         [0015]     It is highly desirable, therefore, to provide an improved method and/or apparatus for estimating and controlling undesirable oscillatory or resonant behavior in a system prone to such behavior, and particularly in systems which may be prone to stick-slip behavior. It is also desirable to provide an apparatus and/or method for controlling such systems with a minimal number of transducers, and preferably without the necessity for having such transducers located near a driven element of the system.  
       BRIEF SUMMARY  
       [0016]     An improved method and apparatus for estimating and precluding stick-slip or other oscillatory behavior is provided. In some embodiments, estimating and precluding stick-slip, or other oscillatory behavior is accomplished with a “virtual transducer,” without the need for having sensors located adjacent to a driven element, or adjacent to contact surfaces at which stick-slip relative motion may occur. As a result, significant advantage is provided in an oil pumping system, for example, by eliminating the undesirable cost and difficulty of locating sensors in a hostile environment far below the surface of the ground.  
         [0017]     In one embodiment, stick-slip behavior, or other oscillatory behavior, of a system may be estimated and related to parameters measurable in a drive apparatus of the system. In an application such as, for example, an oil pumping system having a progressive cavity pump driven by an electric motor, parameters such as velocity, torque, rotational angle, and input power, all of which are measurable above ground at the drive apparatus, may be utilized in detecting and estimating stick-slip behavior.  
         [0018]     In another embodiment, parameters measurable at a drive mechanism, such as the speed, torque, rotational angle, and power of an electric motor driving a driven element in a system susceptible to stick-slip behavior, may be utilized, in a “virtual transducer,” for controlling the system in a manner which precludes stick-slip, or other oscillatory or resonant, behavior of the driven element. In some embodiments prone to stick-slip behavior, relative motion between contacting surfaces in the driven element is controlled in such a manner that, after sufficient force is applied to overcome the static friction force between the contacting surfaces and break them free from one another, relative motion between the surfaces is controlled at a high enough relative speed that the surfaces are precluded from statically contacting one another, so that stick-slip behavior is precluded.  
         [0019]     One embodiment provides a “virtual transducer,” for use in controlling a system prone to stick-slip, or other oscillatory or resonant, behavior, thereby precluding the need for providing one or more of the sensors which had to be located adjacent the driven element in prior approaches to controlling such systems.  
         [0020]     Other aspects, objects and advantages will become apparent from the following brief description of drawings and attachments, and the detailed descriptions provided within the attachments. 
     
    
     DESCRIPTION OF THE DRAWINGS  
       [0021]      FIG. 1  is an illustration of an exemplary environment in which the finite difference state estimator may operate;  
         [0022]      FIG. 2  is a block diagram of an exemplary control system of  FIG. 1  in which the finite difference state estimator may implemented;  
         [0023]      FIG. 3  is a block diagram of an exemplary controller in which the finite difference state estimator may be implemented;  
         [0024]      FIG. 4  is a block diagram of an exemplary embodiment of a finite difference state estimator;  
         [0025]      FIG. 5  is a block diagram illustration of a system in which the inputs to the finite difference state estimator are derived based upon voltage and current measurements;  
         [0026]      FIG. 6  is a block diagram illustration of the finite difference state estimator interfacing with a regulator structure;  
         [0027]      FIG. 7  is a series of graphs illustrating that a conventional PI (proportional integral) surface speed regulator does not handle a stick-slip load.  
         [0028]      FIG. 8  is a series of graphs illustrating that a linear quadratic regulator handles the stick-slip condition.  
         [0029]      FIG. 9  is a series of graphs of  FIG. 8  with the time scale expanded.  
         [0030]      FIG. 10  is a series of graphs illustrating that a Butterworth full state feedback regulator does not handle stick-slip.  
         [0031]      FIG. 11  is a series of graphs illustrating that a binomial full state feedback regulator handles stick-slip.  
         [0032]      FIG. 12  is a series of graphs illustrating that a Bessel fuss state feedback regulator handles stick-slip.  
         [0033]      FIG. 13  is a series of graphs illustrating that an ITAE (integral of time multiplied by the absolute value of error) full state feedback regulator handles stick-slip;  
         [0034]      FIG. 14  is a block diagram of an example of a multi-section finite difference state estimate of a rotational rod; and  
         [0035]      FIG. 15  is a block diagram of a j+1 node finite difference state estimate block of an example of a multi-section finite difference state estimate of the rotational rod of  FIG. 14 . 
     
    
       [0036]     While the invention will be described in connection with certain preferred embodiments, there is no intent to limit it to those embodiments. On the contrary, the intent is to cover all alternatives, modifications and equivalents as included within the spirit and scope of the invention as defined by the appended claims.  
       DETAILED DESCRIPTION  
       [0037]     Referring to  FIG. 1 , an exemplary environment  100  in which the present invention may operate shall be described with reference to an oil well  102  wherein oil is to be separated from an underground gas formation  110 . The well  102  includes an outer casing  104  and an inner tube  106  that extend from ground level to as much as 1000 feet or more below ground level. The casing  104  has perforations  108  to allow the fluid in the underground formation to enter the well bore. It is to be understood that water and gas can be combined with oil and the pump can be used for other liquids. The control apparatus described herein can also be used for water only. The bottom of the tube generally terminates below the underground formations.  
         [0038]     A progressing cavity pump (PCP)  112  is mounted at the lower end of the tube  106  and includes a helix type of pump member  114  mounted inside a pump housing. The pump member is attached to and driven by a pump rod string  116  which extends upwardly through the tube and is rotated by a drive motor  118  in a conventional well head assembly  120  above ground level. The tube  106  has a liquid outlet  122  and the casing  104  has a gas outlet  124  at the upper end above ground level  126 . These elements are shown schematically in  FIG. 1 . The construction and operation of the progressing cavity pump is conventional. An optional check valve  128  may be located either on the suction side, as shown, or the discharge side of the pump  112  to reduce back flow of fluid when the pump is off.  
         [0039]     The operation of the pump  112  is controlled by a pump control system and method including a stick-slip estimator and controller in accordance with the present invention. For purposes of illustration, the pump control system  130  is described with reference to an application in a pump system that includes a conventional progressing cavity pump. The progressing cavity pump includes an electric drive system  132  and motor  118  that rotates the rod string  116  that includes helix portion  114  of the pump  112 . The rod string  116  is suspended from the well head assembly  120  for rotating the helix  114  that is disposed near the bottom  134  of the well.  
         [0040]     The rod string  116  is driven by an electric motor  118 , the shaft of which can be coupled to the rod string through a gearbox  136  or similar speed reduction mechanism. The motor  118  can be a three-phase AC induction motor designed to be operated from line voltages in the range of 230 VAC to 690 VAC and developing 5 to 250 horsepower, depending upon the capacity and depth of the pump. The gearbox  136  converts motor torque and speed input to a suitable torque and speed output for driving the rod string  116  and helix  114  carried thereby.  
         [0041]     Turning now to  FIG. 2 , there is shown a simplified representation of the pump control system  130  for the pump  112  in which the stick-slip estimator/control may be implemented. It is to be understood that the estimator and control may be implemented into other control systems or as a separate component. The pump control system  130  controls the operation of the pump  112 . The pump control system  130  includes transducers, such as motor current and motor voltage sensors, to sense dynamic variables associated with motor torque and velocity. The pump control system further includes a controller  140 , a block diagram of which is shown in  FIG. 2 . Current sensors  142  of interface devices  148  are coupled to a sufficient number of the motor windings—two in the case of a three phase AC motor. Voltage sensors  144  are connected across the motor winding inputs. The motor current and voltage signals produced by the sensors  142  and  144  are supplied to a processing unit  150  of the controller  140  through suitable input/output devices  146 . The controller  140  further includes a storage unit  152  including storage devices which store programs and data files used in calculating operating parameters and producing control signals for controlling the operation of the pump system. The storage unit  152  has memory that may be volatile (such as RAM), non-volatile (such as ROM, flash memory, etc.) or some combination of the two. Additionally, the storage unit  152  may also have additional features/functionality. For example, the storage unit  152  may also include additional storage (removable and/or non-removable) including, but not limited to, magnetic or optical disks or tapes. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. The memory, the removable storage and the non-removable storage are all examples of computer storage media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by the controller  140 .  
         [0042]     Although not required, the stick slip estimator/controller will be described in the general context of computer-executable instructions, such as program modules, being executed by the processing unit  150 . Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. Moreover, those skilled in the art will appreciate that the invention may be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.  
         [0043]     The self-sensing control arrangement described above provides nearly instantaneous estimates of motor velocity, crank angle, and torque, which can be used for both monitoring and real-time, closed-loop control of the pump, including the stick-slip behavior. Voltages and currents are sensed to determine the instantaneous electric power drawn from the power source by the electric motor operating the pump and the crank angle of the motor  118 . As the rod  116  that drives the progressing cavity pump  112  is rotated, the motor  118  is loaded. By monitoring the motor current and voltage, the parameters for the stick-slip estimator/control can be calculated. More specifically, interface devices  148  contain the devices for interfacing the controller  140  with the outside world. Sensors in blocks  142  and  144  can include hardware circuits which convert and calibrate the motor current and voltage signals into current and flux signals. After scaling and translation, the outputs of the voltage and current sensors can be digitized by analog to digital converters in block  148 . The processing unit  150  combines the scaled signals with motor equivalent circuit parameters stored in the storage unit  152  to produce a calculation of electrical torque, crank angle, and crank velocity. In one embodiment, values of parameters are derived using measured values of instantaneous motor currents and voltages, together with pump and system parameters, without requiring down hole sensors, flow sensors, etc.  
         [0044]     Turning now to  FIG. 3 , which is a functional block diagram of the pump control system  130 , as previously described, the pump  112  is driven by a drive  132 , motor  118  gearbox  136  and rod  116  to transfer fluid within a system  200 . The pump  112  is coupled to the output of the drive motor  118  through a gearbox  136  (e.g., gear reducer) and the output of the gear reducer is referred to as the crank. Accordingly, the crank speed ωc is equal to ωm divided by Ng, where ωm is the motor speed and Ng is the gearbox ratio. The crank torque Tc is equal to Te multiplied by Ng, where Te is the electrical torque. The crank torque Tc and crank velocity ωc are transmitted to the pump through the rod  116 . The operation of the motor  118  is controlled by the drive  132  and controller  140  which includes a system model  202 , motor vector controller  204 , other controllers  206 , and interface devices  208 . The output of the gearbox is referred to as a crank in the exemplary embodiment shown in  FIG. 1  and it drives a long rod  116 .  
         [0045]     Motor vector controller  204  generates motor current commands Imc and voltage commands Vmc based upon signals from control modules  206 . Control modules  206  receives estimates of system parameters from system model  202  and may have, for example, a fluid level feedforward control module that outputs a motor torque feedforward signal and a fluid level feedback control module that outputs a motor speed command. The motor speed command and the motor torque feedforward signal can then be combined to generate motor current commands Imc and voltage commands Vmc. Interface devices in block  208 , which can be digital to analog converters, convert the current commands Imc and voltage commands Vmc into signals which can be understood by the drive  132 . These signals are shown as Ic for motor current commands and Vc for motor winding voltage commands.  
         [0046]     Turning now to  FIG. 4 , the system model  202  uses a finite difference state estimator  300  to estimate the un-measurable states in the pump  112 . In the embodiment shown in  FIG. 4 , the un-measurable states are the pump angle and pump speed. In  FIG. 4 , {circumflex over (b2)} is an estimate of the motor damping, {circumflex over (br)} is an estimate of the rod damping, {circumflex over (Ng)} is an estimate of the gear reduction ratio, {circumflex over (Kr)} is an estimate of the rod spring stiffness constant, {circumflex over (J2)} is an estimate of motor inertia and gearbox inertia (as seen at the motor), {circumflex over (θ)} c  is the crank angle, {circumflex over (ω)} c  is the crank speed, {circumflex over (T)} e  is the electrical torque, {circumflex over (θ)} p  is the estimated pump angle, and {circumflex over (ω)} p  is the estimated pump speed. These estimates can be based upon a user&#39;s intuition based on past experience and manufacturer&#39;s ratings of the components in the system. The estimated angle is derived from the calculation:  
             θ   ⁢           ⁢   p     ^     ⁢     (   z   )       =           θ   ⁢           ⁢   c     ^     ⁢     (   z   )       -         Ng   ^       Kr   ^       ⁢     (           T   ^     e     ⁡     (   z   )       -       (               ⁢         b   ⁢           ⁢   2     ^     +     br   ^           Ng   ^       )     *     ω   ^     ⁢           ⁢     c   ⁡     (   z   )         -       (           J   ⁢           ⁢   2     ^     *     Ng   ^       T     )     *     (           ω   ⁢           ⁢   c     ^     ⁢     (   z   )       -         ω   ⁢           ⁢   c     ^     ⁢     (     z   -   1     )         )                   
 
 where T is the sampling period. The estimated speed is derived from the calculation  
             ω   ⁢           ⁢   p     ^     ⁢     (   z   )       =       1   T     ⁢     (           θ   ⁢           ⁢   p     ^     ⁢     (   z   )       -         θ   ⁢           ⁢   p     ^     ⁢     (     z   -   1     )         )           
 
 where T is the sampling period.
 
{circumflex over (θ)} c =∫{circumflex over (ω)} c 
 
 Note that the {circumflex over (T)} e (z) and Ŵ c (z) inputs were passed through low pass filters prior to the above calculations. For best performance, the low pass filters on the {circumflex over (ω)} c  and {circumflex over (T)} e  inputs should have the same frequency response and delay as each other. 
 
         [0047]     In the embodiment shown in  FIG. 4 , {circumflex over (θ)} c , {circumflex over (ω)} c , and {circumflex over (T)} e  are measurable. In some applications, only voltage and current is known. In such applications, {circumflex over (θ)} c , {circumflex over (ω)} c , and {circumflex over (T)} e  have to be estimated. Turning now to  FIG. 5 , in an embodiment, the {circumflex over (θ)} c , {circumflex over (ω)} c , and {circumflex over (T)} e  parameters are estimated based upon voltage and current measurements. At block  400 , the {circumflex over (θ)} c , {circumflex over (ω)} c , and {circumflex over (T)} e  are estimated based upon the calculations:  
                 λ   ^     qds   s     =     ∫     (         V   qds   s     -       i   qds   s     ⁢       R   ^     s         ≅       1     s   +   b       ⁢     (       V   qds   s     -       i   qds   s     ⁢       R   ^     s         )                             λ   ^     qdr   s     =           L   ^     r         L   ^     m       ⁢     (         λ   ^     qds   s     -         σ   ^     LS     ⁢     i   qds   s         )                       T   ^     e     =     LPF   ⁡     (       3   2     ⁢       P   p     ⁡     (         λ   ds     ^   s       ⁢     i   qs     ^   s         -       λ   qs     ^   s       ⁢     i   ds     ^   s           )         )                       ω   ^     e     =         P   ⁢           ⁢     λ   ds     ^   s       ⁢     i   qs     ^   s         -     P   ⁢           ⁢     λ   qs     ^   s       ⁢     i   ds     ^   s               λ   qs     ^     s   2         +     λ   ds     ^     s   2                       
 
 where P is a derivative operator, LPF indicates a low pass filter and P p  is motor pole pairs  
                 ω   ^     s     =         L   m   ^         T   ^     r       ⁢     (           λ   dr     ^   s       ⁢     i   qs     ^   s         -       λ   qs     ^   s       ⁢     i   ds     ^   s               λ   qr     ^     s   2         +     λ   dr     ^     s   2             )                       ω   ^     r     =       1     P   P       ⁢     (         ω   ^     e     -       ω   ^     s       )                       ω   ^     c     =     LPF   ⁡     (         ω   ^     r         N   ^     ⁢   g       )                 
 
 In another embodiment, {circumflex over (T)} e  is estimated while {circumflex over (θ)} c  and {circumflex over (ω)} c  are measured with an encoder. 
 
         [0048]     Turning now to  FIG. 6 , one type of control module that can be used with the finite difference state estimator  300  is a regulator structure  500 . One such regulator structure has gain vectors K CMD  and K FBK , each consisting of [k1; k2; k3; k4] and applied to the command vector x*=[θc*, ωc*, θp*, ωp*] and the state estimates {circumflex over (x)}=[{circumflex over (θ)} c , {circumflex over (ω)} c , {circumflex over (θ)} p , {circumflex over (ω)} p ], respectively. The difference between the resulting scaled vectors constitutes the torque command. If the two K vectors are equal, tracking error during changing speed set points is minimized. If the k2 and k4 elements of the K CMD  vector are set to zero, overshoot is minimized. The values of the elements comprising the K vectors are calculated by: 
 
 (ωn is the regulator closed loop bandwidth or natural frequency. The natural frequency is normally manually chosen and typically set at or below the system resonant frequency.)  
               k   ⁢           ⁢   1     =       ⁢       1         J   ⁢           ⁢   1     ^     ⁢       Kr   ^     ⁡     (         -       b   ⁢           ⁢   1     ^       ⁢     br   ^       +         J   ⁢           ⁢   1     ^     ⁢     Kr   ^         )       ⁢     Ng   ^         ⁢     (             b   ⁢           ⁢   1     ^     2     ⁢       J   ⁢           ⁢   2     ^     ⁢       Kr   ^     2     ⁢       Ng   ^     2       +         b   ⁢           ⁢   1     ^     ⁢         Kr   ^     2     (         -   d     ⁢           ⁢   3   ⁢   ω   ⁢           ⁢   n   ⁢       J   ⁢           ⁢   1     ^     ⁢       J   ⁢           ⁢   2     ^     ⁢       Ng   ^     2       +                                 ⁢       br   ^     ⁡     (         J   ⁢           ⁢   1     ^     +         J   ⁢           ⁢   2     ^     ⁢       Ng   ^     2         )       )     -         J   ⁢           ⁢   1     ^     ⁢     (           J   ⁢           ⁢   2     ^     ⁢       Kr   ^     3     ⁢       Ng   ^     2       +         J   ⁢           ⁢   1     ^     ⁢     (         Kr   ^     3     -     ω   ⁢           ⁢     n   4     ⁢       br   ^     2     ⁢       J   ⁢           ⁢   2     ^     ⁢       Ng   ^     2       +                                   ⁢       d   ⁢           ⁢   1   ⁢   ω   ⁢           ⁢     n   3     ⁢     br   ^     ⁢           ⁢       J   ⁢           ⁢   2     ^     ⁢     Kr   ^     ⁢       Ng   ^     2       -     d   ⁢           ⁢   2   ⁢   ω   ⁢           ⁢     n   2     ⁢       J   ⁢           ⁢   2     ^     ⁢       Kr   ^     2     ⁢       Ng   ^     2         )     )     )                 k   ⁢           ⁢   2     =       ⁢     -             b   ⁢           ⁢   2     ^     ⁢       J   ⁢           ⁢   1     ^       +       (         b   ⁢           ⁢   1     ^     -     d   ⁢           ⁢   3   ⁢   ω   ⁢           ⁢   n   ⁢           ⁢       J   ⁢           ⁢   1     ^         )     ⁢       J   ⁢           ⁢   2     ^     ⁢       Ng   ^     2       +       br   ^     ⁡     (         J   ⁢           ⁢   1     ^     +         J   ⁢           ⁢   2     ^     ⁢       Ng   2     ^         )               J   ⁢           ⁢   1     ^     ⁢     Ng   ^                         k   ⁢           ⁢   3     =       ⁢         ω   ⁢           ⁢     n   4     ⁢       J   ⁢           ⁢   1     ^     ⁢       J   ⁢           ⁢   2     ^     ⁢     Ng   ^           Kr   ^     ⁢               +       1         J   ⁢           ⁢   1     ^     ⁢       Kr   ^     ⁡     (         -       b   ⁢           ⁢   1     ^       ⁢     br   ^       +         J   ⁢           ⁢   1     ^     ⁢     Kr   ^         )       ⁢     Ng   ^         ⁢     (         -   b     ⁢           ⁢     1   2     ⁢       J   ⁢           ⁢   2     ^     ⁢       Kr   ^     2     ⁢       Ng   ^     2       -         b   ⁢           ⁢   1     ^     ⁢       Kr   ^     2                               ⁢       (         -   d     ⁢           ⁢   3   ⁢   ω   ⁢           ⁢   n   ⁢           ⁢       J   ⁢           ⁢   1     ^     ⁢       J   ⁢           ⁢   2     ^     ⁢       Ng   ^     2       +       br   ^     ⁡     (         J   ⁢           ⁢   1     ^     +         J   ⁢           ⁢   2     ^     ⁢       Ng   ^     2         )         )     +         J   ⁢           ⁢   1     ^     ⁢     (           J   ⁢           ⁢   2     ^     ⁢       Kr   ^     3     ⁢       Ng   ^     2       +         J   ⁢           ⁢   1     ^     ⁢     (         Kr   ^     3     -                                     ⁢       ω   ⁢           ⁢     n   4     ⁢       br   ^     2     ⁢       J   ⁢           ⁢   2     ^     ⁢       Ng   ^     2       +     d   ⁢           ⁢   1   ⁢   ω   ⁢           ⁢     n   3     ⁢     br   ^     ⁢       J   ⁢           ⁢   2     ^     ⁢     Kr   ^     ⁢       Ng   ^     2       -     d   ⁢           ⁢   2   ⁢   ω   ⁢           ⁢     n   2     ⁢       J   ⁢           ⁢   2     ^     ⁢       Kr   ^     2     ⁢       Ng   ^     2         )     )     )                 k   ⁢           ⁢   4     =       ⁢       1         J   ⁢           ⁢   1     ^     ⁢       Kr   ^     ⁡     (         -       b   ⁢           ⁢   1     ^       ⁢     br   ^       +         J   ⁢           ⁢   1     ^     ⁢     Kr   ^         )       ⁢     Ng   ^         ⁢     (         -         b   ⁢           ⁢   1     ^     3       ⁢       J   ⁢           ⁢   2     ^     ⁢     Kr   ^     ⁢       Ng   ^     2       +         b   ⁢           ⁢   1     ^     2                           ⁢         (         -   2     ⁢     br   ^       +     d   ⁢           ⁢   3   ⁢   ω   ⁢           ⁢   n   ⁢       J   ⁢           ⁢   1     ^         )     ⁢       J   ⁢           ⁢   2     ^     ⁢     Kr   ^     ⁢       Ng   ^     2       -         b   ⁢           ⁢   1     ^     ⁢       Kr   ^     (         -   d     ⁢           ⁢   3   ⁢   ω   ⁢           ⁢   n   ⁢     br   ^     ⁢       J   ⁢           ⁢   1     ^     ⁢       J   ⁢           ⁢   2     ^     ⁢       Ng   ^     2       +                             ⁢           J   ⁢           ⁢   1     ^     ⁢       J   ⁢           ⁢   2     ^     ⁢     (       d   ⁢           ⁢   2   ⁢   ω   ⁢           ⁢     n   2     ⁢       J   ⁢           ⁢   1     ^       -     2   ⁢     Kr   ^         )     ⁢       Ng   ^     2       +         br   ^     2     ⁡     (         J   ⁢           ⁢   1     ^     +         J   ⁢           ⁢   2     ^     ⁢       Ng   ^     2         )         )     +                   ⁢         J   ⁢           ⁢   1     ^     ⁢     (       ω   ⁢           ⁢   n   ⁢       J   ⁢           ⁢   1     ^     ⁢       J   ⁢           ⁢   2     ^     ⁢       Kr   ^     ⁡     (       d   ⁢           ⁢   1   ⁢   ω   ⁢           ⁢     n   2     ⁢       J   ⁢           ⁢   1     ^       -     d   ⁢           ⁢   3   ⁢     Kr   ^         )       ⁢       Ng   ^     2       +       br   ^     (           J   ⁢           ⁢   1     ^     ⁢       Kr   ^     2       -                                 ⁢       ω   ⁢           ⁢     n   4     ⁢         J   ⁢           ⁢   1     ^     2     ⁢       J   ⁢           ⁢   2     ^     ⁢       Ng   ^     2       +         J   ⁢           ⁢   2     ^     ⁢       Kr   ^     2     ⁢       Ng   ^     2         )     )     )             
 
         [0049]     where {circumflex over (J1)} is an estimate of pump inertia. The damping coefficients d1, d2 and d3 are set by a desired filter form response from the following table:  
                                                                             d1   d2   d3                                        Butterworth   2.613   3.414   2.613           Binomial   4   6   4           Bessel   3.201   4.392   3.124           ITAE   2.7   3.4   2.1                      
 
         [0050]     Simulations were performed to analyze and determine which types of regulator schemes would work with respect to stick-slip. All regulation schemes were tuned for a natural frequency equivalent to the plant resonant frequency for consistency.  FIG. 7  shows that a conventional PI (proportional integral) surface speed regulator does not handle the stick-slip load. As can be seen, the stick-slip condition is never averted.  FIG. 8  shows that a linear quadratic regulator handles the stick-slip condition.  FIG. 9  shows the same plot as  FIG. 8  with the time scale expanded.  FIG. 10  shows that a Butterworth full state feedback regulator does not handle stick-slip.  FIG. 11  shows that a binomial full state feedback regulator handles stick-slip.  FIG. 12  shows that a Bessel full state feedback regulator handles stick-slip.  FIG. 13  shows that an ITAE (integral of time multiplied by the absolute value of error) full state feedback regulator handles stick-slip.  
         [0051]     Table 1 below documents the simulated regulator results. Vmax refers to the maximum crank rpm encountered. Tmax refers to the maximum electrical torque. Pmax refers to the maximum instantaneous horsepower. These maximum values should be minimized to reduce drive sizing requirements.  
                                       TABLE 1                                       Successful at                           handling stick-           Regulator   slip?   Vmax   Tmax   Pmax                           PI   No   —   —   —           Linear   Yes   1265   252   25           Quadratic           Regulator           Butterworth   No   —   —   —           Binomial   Yes   1822   360   50           Bessel   Yes   1490   313   36           ITAE   Yes   1329   297   31                      
 
         [0052]     The simulation results show that the linear quadratic regulator exhibits the best stick-slip control response (i.e., minimized surface velocity, torque, and power). One of the drawbacks with the linear quadratic regulator is that tuning of the regulator is a manual weighting process which, while intuitive, is required to be done for each system. The next best alternative to the linear quadratic is the ITAE full state feedback regulator which has an analytic solution for the regulator gains.  
         [0053]     From the foregoing, it can be seen that a finite difference state estimator has been described that provides accurate real-time estimates of unmeasurable states. In the embodiments described, the unmeasurable states are down-hole pump states (e.g., pump speed and angle). While a single-section state estimator has been described, a multi-section finite difference state estimator can also be used where each node of the multi-section finite difference state estimator estimates the angle and speed of each section in the multi-section system. An example of this would be in a pumping situation where there are multiple rod sections and the estimated speed and angle of each section is needed with higher precision than a single-section state estimator provides. An example of this would be the multi-spring finite difference state estimator shown in  FIG. 14 . The first stage estimator would be the same as the single-stage finite difference state estimator (see  FIG. 4 ) with the exception that the gain {circumflex over (N)}g/{circumflex over (K)}r is replaced by {circumflex over (N)}g/({circumflex over (K)}r*Nr) where Nr is the number of rod sections in the model and the output is intermediate angle θ(2) and speed ω(2) estimates. The remaining estimates of outputs are estimated with inputs of previous estimates and have gains indicated by Kfd(1,j) . . . KFD(4,j) where j is the j&#39;th section gains. For the example shown in  FIG. 14 , the gains are:  
               Kfd   ⁡     (     1   ,   j     )       =       -     (       -     1     T   2         -       3   2     ⁢         br   ^     *   Nr     T       -     2   ⁢       Vr   2       dx   2           )       *       dx   2       Vr   2                       Kfd   ⁡     (     2   ,   j     )       =       -     (       2     T   2       +     2   ⁢           ⁢         br   ^     *   Nr     T         )       *       dx   2       Vr   2                       Kfd   ⁡     (     3   ,   j     )       =       -     (       -     1     T   2         -       1   2     ⁢         br   ^     *   Nr     T         )       *       dx   2       Vr   2                       Kfd   ⁡     (     4   ,   j     )       =     -   1               
 
 where  
       dx   =       Xr   Nr     ⁢           ⁢     (     length   /   section     )           
 
 and Vr=velocity of sound in rod. 
 
         [0054]     Making Kfd a 4XNr matrix allows that gains to be varied along the rod length, which provides the capability to handle varying diameter rods.  
         [0055]     While the invention is described herein in connection with certain preferred embodiments, there is no intent to limit it to those embodiments. On the contrary, the intent is to cover all alternatives, modifications and equivalents within the spirit and scope of the invention.  
         [0056]     The use of the terms “a” and “an” and “the” and similar referents in the context of describing the invention (especially in the context of the following claims) is to be construed to cover both the singular and the plural, unless otherwise indicated herein or clearly contradicted by context. The terms “comprising,” “having,” “including,” and “containing” are to be construed as open-ended terms (i.e., meaning “including, but not limited to,”) unless otherwise noted. Recitation of ranges of values herein are merely intended to serve as a shorthand method of referring individually to each separate value falling within the range, unless otherwise indicated herein, and each separate value is incorporated into the specification as if it were individually recited herein. All methods described herein can be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The use of any and all examples, or exemplary language (e.g., “such as”) provided herein, is intended merely to better illuminate the invention and does not pose a limitation on the scope of the invention unless otherwise claimed. No language in the specification should be construed as indicating any non-claimed element as essential to the practice of the invention.  
         [0057]     Preferred embodiments of this invention are described herein, including the best mode known to the inventors for carrying out the invention. Variations of those preferred embodiments may become apparent to those of ordinary skill in the art upon reading the foregoing description. The inventors expect skilled artisans to employ such variations as appropriate, and the inventors intend for the invention to be practiced otherwise than as specifically described herein. Accordingly, this invention includes all modifications and equivalents of the subject matter recited in the claims appended hereto as permitted by applicable law. Moreover, any combination of the above-described elements in all possible variations thereof is encompassed by the invention unless otherwise indicated herein or otherwise clearly contradicted by context.