Abstract:
A portable pumping system provides insulin or other drugs to a user. A shape memory element is used to actuate the pump and an intelligent system controls the actuator in order to minimize stresses within the system and provide accurate and reliable dosage delivery. The control system utilizes various types of feedback to monitor and optimize the position of the pumping mechanisms. Physical design aspects also minimize stress and the combination of the physical design aspects and the intelligent operation of the system results in a lightweight and cost effective pump that may be used in a disposable fashion if desired.

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
       [0001]    The present application is a continuation-in-part of U.S. application Ser. No. 10/683,659 of Benjamin M. Rush et al., filed on Oct. 9, 2003, which is related to and claims priority based on U.S. Provisional Application No. 60/417,464, entitled “Disposable Pump for Drug Delivery System,” filed on Oct. 9, 2002, and U.S. Provisional Application No. 60/424,613, entitled “Disposable Pump and Actuation Circuit for Drug Delivery System,” filed on Nov. 6, 2002, each of which is hereby incorporated by this reference in its entirety. The parent application, U.S. application Ser. No. 10/683,659, was published as U.S. Patent Application Publication No. 2004/0115067 A1. The present application is related to U.S. application Ser. No. ______, of Benjamin M. Rush, entitled “Fluid Delivery Device with Auto Calibration,” and U.S. application Ser. No. ______ of Benjamin M. Rush, entitled “Devices And Methods For Use in Assessing a Flow Condition of a Fluid,” each of which is filed concurrently with the present application and is hereby incorporated herein, in its entirety, by this reference. 
     
    
     FIELD OF THE INVENTION 
       [0002]    The present invention is generally related to portable insulin or other liquid delivery systems and more specifically related to a pump for use in such systems. 
       BACKGROUND OF THE INVENTION 
       [0003]    Insulin pumps are widely available and are used by diabetic people to automatically deliver insulin over extended periods of time. Many currently available insulin pumps employ a common pumping technology, the syringe pump. In a syringe pump, the plunger of the syringe is advanced by a lead screw that is turned by a precision stepper motor. As the plunger advances, fluid is forced out of the syringe, through a catheter to the patient. The choice of the syringe pump as a pumping technology for insulin pumps is motivated by its ability to precisely deliver the relatively small volume of insulin required by a typical diabetic (about 0.1 to about 1.0 cm3 per day) in a nearly continuous manner. The delivery rate of a syringe pump can also be readily adjusted through a large range to accommodate changing insulin requirements of an individual (e.g., basal rates and bolus doses) by adjusting the stepping rate of the motor. While the syringe pump is unparalleled in its ability to precisely deliver a liquid over a wide range of flow rates and in a nearly continuous manner, such performance comes at a cost. Currently available insulin pumps are complicated and expensive pieces of equipment costing thousands of dollars. This high cost is due primarily to the complexity of the stepper motor and lead screw mechanism. These components also contribute significantly to the overall size and weight of the insulin pump. Additionally, because of their cost, currently available insulin pumps have an intended period of use of up to two years, which necessitates routine maintenance of the device such as recharging the power supply and refilling with insulin. These syringe type pumps, even if described as disposable, are simply too expensive to be truly disposable, or are alternatively disposed at a very high cost to patients and insurance companies alike. 
         [0004]    Shape memory alloys are a part of a class of materials that change shape when power is applied to them but that return to their natural state when the power is removed. The materials can be used to form an actuator by harnessing this unique attribute of the materials. A pump can be made with a shape memory alloy actuator. However, a shape memory alloy does not have the inherent accuracy and repeatability of the precision stepper motor used in a syringe pump. Although price is always important, precision is also essential in a pump used to deliver insulin or other drugs. It is therefore necessary to provide a system to precisely control and actuate a pump utilizing a shape memory material as an actuator. 
       SUMMARY OF INVENTION 
       [0005]    The present invention employs a cost effective yet precise pumping system and method to deliver insulin or other liquid to a user. Unique physical design aspects and an intelligent control system employed in the present invention allow for a shape memory alloy to actuate a pumping mechanism with excellent reliability and repeatability. 
         [0006]    The present invention allows for not only a cost effective pumping system, but also for a robust, precise, light weight, and fault tolerant system. Although the pumping system is precise, light weight, and fault tolerant, in the medical applications where the pump will be most advantageous, numerous reasons may make it desirable to dispose of and replace portions of the pumping system relatively frequently. The low cost of the pumping mechanism of the present invention allows for such disposable usage, while at the same time the pump is able to provide precision doses throughout the life of the pump. Stresses in the pump are minimized with the control system, and warnings can be generated if the pump is not primed properly or if an occlusion is detected within the pumping system. The reduction of stresses within the pump provides for a smaller and lighter weight pump with a longer lifetime, which is of obvious benefit to a user of the pump. Furthermore, the intelligent control system allows the pump to operate even if a fault is detected. For example, if the full stroke of the pump is unavailable for some reason, a lesser stroke can be utilized (at a higher frequency) and the pump can continue to provide the necessary dosage to the user. 
         [0007]    Additional aspects, advantages and features of the present invention are included in the following description of exemplary examples thereof, which description should be taken in conjunction with the accompanying figures, and wherein like (and similar) numerals are used to describe the same feature throughout the figures. While the prefix of a numbering element may change based upon the figure number, if the remainder of the numbering element is the same in the various embodiments, the component is the same or similar to that described regarding an earlier described embodiment. For example, capacitor  304  of  FIG. 3  is the same or similar to capacitor  504  of  FIG. 5 . When this is the case, the element will not be described again, and reference should be made to the description of the earlier figure ( FIG. 3  in this example). All patents, patent applications, articles and other publications referenced herein are hereby incorporated herein by this reference in their entirety for all purposes. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0008]      FIGS. 1A ,  1 B, and  1 C illustrate pump  100  at various stages of operation. 
           [0009]      FIGS. 1D  is a block diagram of pumping system or “pump”  150 . 
           [0010]      FIGS. 2A ,  2 B, and  2 C illustrate pump  200  at various stages of operation. 
           [0011]      FIGS. 3A and 3B  illustrate different embodiments of pump drive circuits for use with pump  200  or other pump embodiments. 
           [0012]      FIGS. 4A and 4B  illustrate pump  400  at various stages of operation. 
           [0013]      FIG. 5  illustrates an embodiment of a pump drive circuit for use with pump  400  or other pump embodiments. 
           [0014]      FIGS. 6A and 6B  illustrate pump  600  at various stages of operation. 
           [0015]      FIGS. 7A and 7B  illustrate pump  700  at various stages of operation. 
           [0016]      FIG. 8  illustrates an embodiment of a pump drive circuit for use with pump  700  or other pump embodiments. 
           [0017]      FIGS. 9A and 9B  illustrate pump  900  at various stages of operation. 
           [0018]      FIGS. 9C ,  9 D, and  9 E illustrate different embodiments of position encoding utilized for linear feedback. 
           [0019]      FIG. 10  illustrates an embodiment of a pump drive circuit for use with pump  900  or other pump embodiments. 
           [0020]      FIG. 11A  is a graph of a pump operating in an unprimed state. 
           [0021]      FIG. 11B  is a graph of a pump operating in a primed state. 
           [0022]      FIG. 11C  is a graph of occlusion detection within a pump. 
           [0023]      FIGS. 12A and 12B  are graphs of pump operation over time. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0024]    The present invention employs a cost effective yet precise pumping system and method to deliver insulin or other liquid to a user. Unique physical design aspects and an intelligent control system employed in the present invention allow for a shape memory alloy to actuate a pumping mechanism with excellent reliability and repeatability. 
         [0025]    The present invention allows for not only a cost effective pumping system, but also for a robust, precise, light weight, and fault tolerant system. Although the pumping system is precise, light weight, and fault tolerant, in the medical applications where the pump will be most advantageous, numerous reasons may make it desirable to dispose of and replace portions of the pumping system relatively frequently. The low cost of the pumping mechanism of the present invention allows for such disposable usage, while at the same time the pump is able to provide precision doses throughout the life of the pump. Stresses in the pump are minimized with the control system, and warnings can be generated if the pump is not primed properly or if an occlusion is detected within the pumping system. The reduction of stresses within the pump provides for a smaller and lighter weight pump with a longer lifetime, which is of obvious benefit to a user of the pump. Furthermore, the intelligent control system allows the pump to operate even if a fault is detected. For example, if the full stroke of the pump is unavailable for some reason, a lesser stroke can be utilized (at a higher frequency) and the pump can continue to provide the necessary dosage to the user. 
         [0026]    As mentioned briefly above, a shape memory alloy is used to actuate a pump made in accordance with the present invention. In the process of undergoing a dimensional change, the shape memory material goes through a reversible phase transition or transformation, or a reversible structural phase transition, upon a change in temperature. Generally, such a transition represents a change in the material from one solid phase of the material to another, for example, by virtue of a change in the crystal structure of the material or by virtue of a reordering of the material at a molecular level. In the case of nitinol, for example, the superelastic alloy has a low temperature phase, or martensitic phase, and a high temperature phase, or austenitic phase. These phases can also be referred to in terms of a stiff phase and a soft and malleable phase, or responsive phase. The particular phase transition associated with a particular alloy material may vary. Shape memory materials are well understood by those of ordinary skill in the art. 
         [0027]    Pump  100 , an embodiment of a pump (or a portion thereof) of the present invention, is shown in the inactive state in  FIG. 1A , the fully activated state in  FIG. 1B , and the stress-loaded state in  FIG. 1C . The pump body comprises a case  101 , a top cap  102 , and a plunger cap  103 . Within the pump is a plunger  104  that is normally (in the inactive state) held against the plunger cap  103  by a plunger bias spring  105 . Similarly, an overload piston  106  is normally (in inactive state) held against the top cap  102  by an overload piston spring  107  which is stronger (has a higher spring constant k) than the plunger bias spring  105 . The plunger  104  is connected to the overload piston  106  by a shape memory alloy wire  108  which contracts when heated by a pulse or pulses of current flowing from the V+  109  contact to the V−  110  contact through the shape memory alloy wire  108  where the V−  110  contact may be the system ground (GND) reference. The power in each pulse is determined by the voltage applied to the shape memory alloy wire  108  through the V+  109  and V−  110  contacts. It is worth noting that the case is made of an insulating material while the plunger  104  and overload piston  106  are either made of a conductive material (e.g. metal) or are coated with an appropriately conductive material. The top cap  102  and plunger cap  103  may be made of insulating or conductive material as is best suited to a given design. 
         [0028]      FIG. 1A  shows the pump in the inactive state where the shape memory alloy wire  108  is not contracted, the plunger  104  is held against the plunger cap  103  by the plunger bias spring  105  and the overload piston  106  is held against the top cap  102  by the overload piston spring  107 . This is the state to which the pump  100  returns after each activation or pumping cycle. 
         [0029]      FIG. 1B  shows the pump in the fully activated state where the shape memory alloy wire  108  has contracted enough to pull the plunger  104  up against a stop built into the case  101  without moving, while overload piston  106  which is held against the top cap  102  by the overload piston spring  107 . This state realizes a full stroke of the plunger  104 . 
         [0030]      FIG. 1C  shows the pump in the stress-loaded state where the shape memory alloy wire  108  has contracted sufficiently to pull the overload piston  106  up against a second stop built into the case  101 . In this state the case  101 , plunger  104 , overload piston  106 , and shape memory alloy wire  108  are under maximum stress. 
         [0031]    The design of the basic pump  100  is such that there is no feedback to the circuit driving the pump (open loop) and the action of the pump after the fully activated state shown in  FIG. 1B  is accommodated by the design margin to ensure that the pump reaches a fully activated state. If the pulse or pulses of current applied to the shape memory alloy wire  108  are reduced to the minimum value required to achieve the fully activated state under worst case conditions, such as a cold wire, then the action of the basic pump  100  under best case conditions, such as a warm wire, will drive the pump toward the stress-loaded state shown in  FIG. 1C . The design of the pump  100 , and the selection of the overload piston spring  107  is driven by the differences between the worst-case and best-case conditions. Under normal operating (non-fault) conditions the pump always completes the full stroke (the fully activated state) as shown in  FIG. 1B  and operates reliably over the expected life of the pump because excess contraction and the resultant stress are minimized (as seen in the stress-loaded state shown in  FIG. 1C ). Considerations for the worst-case and best-case conditions include operating temperature range, the minimum pumping rate (e.g. the minimum basal delivery rate), and the maximum pumping rate (e.g. the maximum bolus rate). 
         [0032]    It is important to note that the open-loop design of pump  100  lacks feedback and thus cannot adaptively accommodate faults as they are not sensed. For example, a pump failure such as a jammed plunger  104  could cause a reduced or zero insulin delivery output and the pump would be assumed by the user (patient) to be operating correctly when an improper dose was delivered. 
         [0033]      FIG. 1D  is a block diagram that shows the overall system of which the various pump embodiments are a part. The overall system  150  comprises a microprocessor  150 A, drive circuitry  150 B, and pump element  150 C. All of these components can be considered to form the pump, even though pump element  150 C alone is also sometimes referred to as the pump among those skilled in the art. Many different embodiments of the pump  150 C and of a portion of the drive circuitry  150 B are described in detail below, and throughout the application. In an insulin delivery system  150 , all of the components (that are shown) may be packaged together or alternatively they may be grouped separately. For example, it may be desirable to group the pump and drive circuitry together while remotely locating the pump element. Other components such as user input devices and a display are not shown, but are all controlled by the processor in conjunction with the pump and drive circuitry. 
         [0034]    Another embodiment is illustrated in  FIG. 2 . The design shown in  FIG. 2  comprises feedback that indicates the completion of the fully activated state but is otherwise similar to the pump shown in  FIG. 1 . The pump  200  incorporates feedback from a switch (“PISTON_NC  211 ”) that indicates that the overload piston  206  is at the top of the pump or in contact with top cap  202 . A switch, such as switch  211  (that provides feedback) may alternatively be referenced for the feedback it provides in the following description. The pump with PISTON_NC  211  feedback shown in  FIG. 2  is constructed and operates in a similar fashion to the basic pump  100  shown in  FIG. 1 . The feedback comes from a normally-closed (NC) switch that indicates the overload piston  206  is in contact with the top cap  202  as in  FIG. 2A  and  FIG. 2B . When the pump  200  enters the overload state as shown in  FIG. 2C  then the switch opens and feedback is fed to the drive circuit. If the feedback is not received during the maximum pulse period used for pump  100  then an error has occurred and pump  200  operation can be discontinued. The PISTON_NC  211  feedback is shown as connected directly to the top cap  202  which indicates that the top cap  202  is either made of a conductive material (e.g. metal) or is coated with an appropriately conductive material. If the design of a given pump requires the top cap  202  to be made of an insulating material then the PISTON_NC  211  feedback can be moved to the inner surface of the top cap  202  so that the PISTON_NC  211  feedback is in direct contact with the overload piston  206  in the inactive state as shown in  FIG. 2A . 
         [0035]    An advantage of pump  200  is fault detection based on the feedback from (normally closed) switch  211  (if the switch is not activated in the maximum pulse duration). The pump also saves energy because it terminates the activation pulse when full pump action is achieved. Minimizing energy consumption is extremely important for a portable insulin pump, as it maximizes the time the pump can be used without inconveniencing the user. 
         [0036]      FIG. 2C  shows the pump in the stress-loaded state where the shape memory alloy wire  108  has contracted sufficiently to pull the overload piston  206  down, but not up against a stop built into the case  201 . In this state, the case  201 , plunger  204 , overload piston  206  and shape memory alloy wire  208 , are under stress. However, that stress is limited to the spring constant (k) of the overload piston spring  207  and is thus reduced as compared to the stress-loaded state shown in  FIG. 1C  where the overload piston  106  is against a hard stop of the case  101 . The method used to further reduce the already minimized stress is the termination of the pulse or pulses of current that are flowing from the V+  209  contact to the V−  210  contact through the shape memory alloy wire  208 . This causes the shape memory alloy wire  208  to stop contracting and thus reduces the stress on the pump  200 . 
         [0037]    There are two primary methods to terminate the pulse or pulses to the shape memory alloy wire  208  as shown in  FIG. 3A  and  FIG. 3B . The actual drive circuits are identical and the only difference between  FIG. 3A  and  FIG. 3B  is in the Voltage Output (Vout) and feedback connections as discussed below. Each drive circuit is connected to a power source VCC  301  and to the system ground GND  302 . Each has a pull-up resistor R  303  from the feedback to VCC  301  and an optional filtering or “debounce” capacitor C  304  from the feedback to GND  302 . The feedback is digital and detects a logic ‘0’ when approximately 0V or GND  302  is present (i.e. the switch is closed) and a logic ‘1’ when a voltage approximately equal to the supply voltage or VCC  301  is present (i.e. through the function of the pull-up resistor R  303  when the switch is opened). If the optional filtering or “debounce” capacitor C  304  is not present then the feedback may oscillate briefly when the switch opens or closes due to mechanical vibration related to the switch contact. If the optional filtering or “debounce” capacitor C  304  is present then the feedback actually detects the voltage on the capacitor C  304  which can not change instantaneously. When the switch closes the capacitor C  304  will be discharged quickly to approximately 0V or GND  302 ; when the switch opens the capacitor will be charged at a rate proportional to the values of the resistor R  303  and the capacitor C  304  to approximately the supply voltage or VCC  301 . For example, a resistor R  303  value of 10,000 Ohms (10 kΩ) and a capacitor C  304  value of 100 pF would have a time-constant of one microsecond (1 μsec) and the state of the feedback would change from a logic ‘0’ to a logic ‘1’ in about two microseconds (2 μsec) without any oscillations (noise) on the feedback that could be acted upon by the drive circuit inappropriately. 
         [0038]    The first method as shown in  FIG. 3A  is to connect the PISTON_NC  211  to the feedback to gate the drive signal Vout that is created by the drive circuit and which is connected to the pump V+  209  contact. When the drive circuit receives feedback that the overload state is entered as shown in  FIG. 2C  then the pulse or pulses can be terminated and both the stress is reduced and power is saved. The second method as shown in  FIG. 3B  is to provide power to the pump  200  through the PISTON_NC  211  contact rather than the V+  209  contact. This method automatically removes power from the shape memory alloy wire  208  whenever the PISTON_NC  211  switch opens as shown in  FIG. 2C . If the feedback is ignored (i.e. the drive circuit is simplified to remove the feedback), then the overload piston  209  may oscillate between the states shown in  FIG. 2B  and  FIG. 2C  until the pulse or pulses from the drive circuit are terminated and only a partial power saving is realized. If the feedback is utilized as in  FIG. 3A  then when the drive circuit receives feedback that the overload state is entered as shown in  FIG. 2C , the pulse or pulses can be terminated to prevent oscillations, and maximum power saving is realized as in the first method. 
         [0039]    Addition of the PISTON_NC  211  feedback reduces the overall forces generated within the pump and allows the pump to be made smaller and lighter with improved reliability. Unfortunately, if the plunger  204  jams then the overload piston will begin moving and provide feedback that indicates the pump is operating properly. Again, a jammed plunger  204  could cause a reduced or zero insulin delivery output, but in this situation the pump would be assumed by the user (patient) to be operating correctly when in fact an improper dose may have been delivered. 
         [0040]    Another embodiment of the invention is seen in pump  400  of  FIGS. 4A and 4B . Pump  400  incorporates feedback that (more directly) indicates the completion of the fully activated state. Pump  400  uses (PLUNGER_NO) switch  411  to indicate that the plunger  404  is against the upper stop. This switch is used in place of (or in conjunction with) switch  211 , and all of the feedback control and stress limitation features described with respect to pump  200  are present in pump  400 . Drive circuit  500  seen in  FIG. 5  is similar to drive circuit  300 , as previously described. Pump  400  can also detect a fault with the pump if the plunger is not where it is expected to be based upon the potential applied to the actuator, as was also described previously. Similarly, the pump can detect a jam if the plunger is not where it is expected to be based upon the potential applied to the actuator. 
         [0041]    Another embodiment of the invention is seen in pump  600  of  FIGS. 6A and 6B . Pump  600  is functionally the same as pump  400  but lacks overload piston  406  and overload spring  407 . Because of the lack of these items, the top cap  607  preferably has some amount of compliance and acts as a simplified spring. Pump  600  has fewer parts and is thus lighter and smaller than pump  600 . Fewer parts also generally result in improved reliability over the life of the pump. 
         [0042]    Yet another embodiment of the invention is seen in pump  700  of  FIGS. 7A and 7B . Pump  700  is similar to pump  600  with the added advantage of feedback switch  710  (PLUNGER_NC) that directly indicates the completion of the fully activated state and return to the inactive state (at the completion of a pump cycle). Because pump  700  “knows” when a pump cycle is completed (and when it should be completed) it therefore “knows” when there is a fault, and can accommodate for the fault in what is known as a fault tolerant design. The fault tolerance is in both the direct measurement of the plunger  704  action and in ensuring that the plunger is resting in the fail safe state after the maximum permissible pump cycle time (this may also indicate a major occlusion in the pump system). If the power (GND) to the V−  708  contact is switched (via a series switch) to provide additional fault tolerance as is done in some pump systems, then the added feedback will also indicate the state of the V−  708  switch (not shown for clarity sake) as the value of switch  710  (PLUNGER_NC) will be 0V (GND) when the series power switch is closed and VCC when the series power switch is open. The pump can also detect an occlusion if the plunger does not return to the fully down state in the maximum pump cycle time. 
         [0043]    The PLUNGER_NC  710  feedback is shown as connected directly to the plunger cap  703  which indicates that the plunger cap  703  is either made of a conductive material (e.g. metal) or is coated with an appropriately conductive material similar to the top cap  202  of  FIG. 2 . If the design of a given pump requires the plunger cap  703  to be made of an insulating material then the PLUNGER_NC  710  feedback can be moved to the inner surface of the plunger cap  703  so that the PLUNGER_NC  710  feedback is in direct contact with the plunger  704  in the inactive state as shown in  FIG. 7A . Drive circuit  800  illustrated in  FIG. 8  is similar to the drive circuits previously described. The pump  700  and drive circuit  800  comprise the minimum configuration for a fault tolerant system. All of the linear feedback techniques described below add fault resolution and improve fault tolerance at the expense of added cost and complexity. 
       Linear Feedback 
       [0044]    Embodiments of a pump as previously described may also comprise linear feedback that directly indicates the position of the plunger. The linear feedback may be analog or digital and is used to detect the position of the plunger. The linear feedback may also indicate if there is a fault based upon the position of the plunger during various phases of operation of the pump. The linear feedback system can employ conductive encoding marks. This is a simple and economical way to detect the position of the plunger. Alternatively, optical position sensing utilizing optical encoding marks may be employed. This is more precise but is also more complex and expensive. 
         [0045]      FIGS. 9A and 9B  illustrate pump  900 , another embodiment of the present invention. Pump  900  is similar to pump  700  but employs direct linear feedback in addition to the feedback provided by the switches. This feedback is contained in a linear feedback signal (“LINEAR_FB”)  911  shown in the figures. Linear feedback may also be used to detect priming of the pump, which will be described later with regard to  FIG. 11 . 
         [0046]      FIG. 9C  illustrates one possible embodiment of position encoding, one way of providing linear feedback. In this embodiment the encoding scheme utilizes conductive encoding marks. One way to create the encoding grid is with insulating paint silk-screened onto a conductive surface so as to insulate certain areas. This conductive coating would be on the side of the moving part. For example, it could be directly on the piston or on an attachment to the piston. The black areas of the grid are the metal surface without paint on top of them. The white areas of the grid are covered with the insulating paint. The black row (long conducting strip) at the top is a reference ground. When contacts  930  touch the black squares then they are shorted to ground. When shorted to ground they are said to form a “1” whereas when they are not they form a “0.” This logic can be inverted if desired. 
         [0047]    In the position depicted in  FIG. 9C , the ground contact is insulated from the most significant bit (“MSB”) contact and the least significant bit (“LSB”) contact. Therefore it is at position 0 (binary position 00). As this moving part slides left under the contacts  930 , then position 1 (binary position 01) will next be sensed. When the part slides left again position 2 (binary position 10) will next be sensed etc. . . .  FIG. 9C  illustrates 4 positions, that is 2 bits of encoding for illustrative purposes. However, this can be extended to any number of positions. For example, 32 positions would require 5 bits. This digital position sensing can be used for digital feedback and control of the piston, and thus can be used to control position of the piston and the amount of insulin delivered. 
         [0048]    Optical encoding may be employed instead of the conductive encoding described above. Instead of shorted contacts, an optical sensor (an LED+photocell, for example) is used to sense if the shiny metal is present or if light absorbing black paint is present. 
         [0049]    A minor modification to the encoding shown in  FIG. 9C  is shown in  FIG. 9D . In  FIG. 9D  the encoding marks or bits are laid down in a Grey code. That is, only one bit change is allowed per position. Grey codes have several desirable properties that are well known in the art. 
         [0050]    Degradation of the contacts and various other parts can occur over time. For example, contacts can be dirty, worn, or broken, and contamination may cause faulty contact readings, etc. This would normally cause an error or misread. There are various ways to minimize the errors and to correct any errors that may occur. In one method, additional bits are added to the surface. A single bit (called a parity bit) can be added to detect some kinds of errors. Multiple bits can be added for even more error protection. With several added bits errors can be both detected and corrected. A measure of this is the Hamming distance, which is well known in the art. Briefly stated, the Hamming distance can be interpreted as the number of bits which need to be changed to turn one string into the other. Sometimes the number of characters is used instead of the number of bits. 
         [0051]    Error detection and correction theory is a well known science used as a part of radio communications theory, and can be applied to the encoding and position recognition mechanisms of the present invention. This includes BCH codes, parity codes, and Reed-Solomon codes, etc. The system of  FIG. 9E  includes a parity bit that can be used for error correction encoded on the moving object. 
         [0052]    Analog sensing of position can be made by plating two plastic, insulated surfaces with metal, or alternatively simply providing two metal surfaces. The two surfaces are used as capacitor plates—and together form a capacitor. One capacitor plate would be stationary, while the other capacitor plate would be part of the moving assembly including the piston. The measured capacitance is proportional to the distance between the plates, and therefore can be used to measure the position of the piston. This analog position sensing can be used for feedback and control of the moving part. 
         [0053]    Analog sensing of position can also be achieved with magnetic measurements by adding a magnet to the moving part and sensing on the stationary part. Similar to the capacitance measurement described above, the magnetic field will vary depending on the distance between the moving and stationary parts. Therefore, the magnetic sensor may be used to measure the position of the piston and this type of analog position sensing can be used for feedback and control of the moving part. One type of well known magnetic sensor is a Hall Effect sensor, but any magnetic sensor may be utilized. 
         [0054]    Resistance measurements may be used to implement analog linear feedback. Similar to a potentiometer, the piston will have different resistance values the further a measurement is taken along the length of the plunger. In other words, the resistance will increase with distance a current must travel. 
         [0055]    Usage of the linear feedback has many advantages. One advantage of employing the feedback is that the drive circuit can “servo” the plunger or control the position or stroke of the plunger with a relatively high degree of accuracy. Thus, a partial plunger stroke may be used to give finer dose delivery, and that dose can be any fraction of the pump cylinder volume. By measuring and controlling the plunger movement variable size rather than only discrete volume doses may be administered. Additionally, a partial plunger stroke may not only be detected when it is undesirable (as in pump  700 ), but the volume of the partial stroke may be measured and compared to the expected volume thus adding fault resolution. For instance, if a full stroke was supposed to take place and deliver a certain volume, the system can detect that less than the desired volume was pumped and make up for the missing volume or indicate a failure condition with a measure of the error being reported. A pump having position detection and control is more fault tolerant than a pump without it. For example, if a certain portion of the full stroke range is unavailable for some reason, the pump can control the stroke to only use the available range. This could provide invaluable additional operating time in what would otherwise be a malfunctioning or inoperative pump. For a diabetic who must have insulin the value of this is potentially life-saving. 
       Priming, Fault Tolerance, and Servo Control 
       [0056]    Another improvement to the basic pump design is to monitor the feedback as an indication of the operation of the entire pump system and not just the proper functioning of the plunger.  FIG. 11A  shows a pump prior to being “primed” where there is air in the pump system leading to the patient including the tubing and infusion set (the portion attached to the user where insulin is delivered to the user&#39;s tissue). 
         [0057]    Using pump  900  as an example, although application in other embodiments such as pump  700  is also possible, at time t=0 (the initial time reference) the pump  900  is activated (the V−  908  switch is enabled if present and power is applied to the V+  907  contact by the drive circuit  1000 ) as is shown in  FIG. 9A . At time t=1 the plunger  904  begins to move and PLUNGER_NC  910  changes state from a Logic ‘0’ to a Logic ‘1’ to indicate plunger  904  movement. At time t=2 the plunger  904  activates the PLUNGER_NO  909  contact which changes state from a Logic ‘1’ to a Logic ‘0’ to indicate the plunger  904  has achieved a full upward stroke as is shown in  FIG. 9B . This causes power to be removed by the drive circuit  1000  via the feedback (FB_NO) and shortly thereafter the plunger begins to fall and the PLUNGER_NO  909  contact changes state from a Logic ‘0’ to back to a Logic ‘1’ as affirmed by the drive circuit  1000  feedback. At time t=3 the plunger  904  has completed a full pump cycle and PLUNGER_NC  910  changes state back from a Logic ‘1’ to a Logic ‘0’ to indicate the completion of a full pump cycle as shown again in  FIG. 9A  (at this time the V−  908  series power switch is disabled if present to prevent possible pump “misfires” due to noise or other system errors). The digital feedback provides a simple and clear indication of a fault. 
         [0058]    The same cycle is shown in  FIG. 11B  where the pump system is fully primed and operating as compared to the unprimed state shown in  FIG. 11A . The time from t=1 to t=2 is shorter in  FIG. 11A  than in  FIG. 11B  as the pump  900 , specifically the plunger  904 , is pulling air from the reservoir versus insulin. This may be due to the initial priming where air is being purged from the system or due to a reservoir failure. Similarly the time from t=2 to t=3 is shorter in  FIG. 11A  than in  FIG. 11B  as the pump  900 , specifically the plunger  904 , is pushing air through the tubing and infusion set versus insulin. In fact, the time from t=2 to t=3 may be used to detect a fully primed pump that is ready for insertion. If the tubing or infusion set were to break after insertion than the time from t=2 to t=3 would decrease and a fault could be detected. This phenomenon is similar to the affect of having air in brake hydraulic lines on an automobile where the brake feels soft due to the compressibility of air versus fluid. Priming the pump is analogous to “bleeding” the brakes. When the pump is primed it takes more energy to push the fluid through the tubing and infusion set. This pressure may increase even more when the insulin is pushed into the user&#39;s body (tissue). Since the plunger  904  is driven by the plunger spring  906 , the extra force becomes related to time and is measured as the time from t=2 to t=3. 
         [0059]    In fact, the priming techniques described above may be used to automatically prime a pump under the control of the microprocessor  150 A. Rather than have the user prime the pump manually, and stop when fluid, such as insulin, begins to emerge from the tip of an infusion set (not shown), the pump can use the feedback described above to prime the pump automatically and optionally ask the user to confirm that priming is complete. The priming can include the entire infusion set or other attachment to the pump, and not just the pump itself. This enhancement is especially important for young pump users and those who are vision impaired or otherwise have poor eyesight. Those users can rely on the automatic priming and can (optionally) confirm the priming by feeling the liquid as it exits the final point to be primed. 
         [0060]    This automatic priming technique also applies in a similar fashion to other pump systems. For example, on a syringe pump system with a stepper motor, the power to the motor when monitored is an indication of the work done by the motor in a fashion analogous to work done by the plunger spring  906 . The work would be monitored by a shunt resistor used to measure the motor current, or alternatively the droop in the battery or power supply would be monitored to indicate power used by the motor and thus work done by the pump. 
         [0061]      FIG. 11C  illustrates the occurrence and detection of an input occlusion (increase in time from t=1 to t=2) and output occlusion (increase in time from t=2 to t=3). This system preferably accounts for circuit variation and battery voltage droops so that these conditions are erroneously interpreted as an input or output occlusion. 
         [0062]    The actuation of the plunger or piston can be modified or servo controlled to make the pump operate more efficiently and to reduce stress on the pump. This would allow for a smaller and lighter pump with improved reliability. 
         [0063]      FIG. 12A  is a graph illustrating pumping operation over time. The times in  FIG. 12A  correspond to the times shown in  FIG. 11B . The rate of change of the position, as indicated by linear feedback signal  911  increases over time until the piston reaches the top of its travel at time t=2. This will result in significant stress when the piston hits the hard stop. 
         [0064]      FIG. 12B  is a graph illustrating pumping operation over time where the piston movement is modulated to reduce the acceleration and velocity of the piston before it hits the hard stop. This will reduce the amount of stress encountered by all of the moving parts of the pump. At time t=0.5 the power from the drive circuit  1000  is reduced to reduce the stress (impact) at time t=2. This can include pulse width modulation (“PWM”) of the potential applied to the shape memory element. For example, the PWM rate may be modified to a new value or changed per a specified profile. Similar modification to the action of the piston could modify the profile leading to t=3 by adding occasional small pulses of energy to slow the descent of the plunger  904 . 
         [0065]    Although the various aspects of the present invention have been described with respect to exemplary embodiments thereof, it will be understood that the present invention is entitled to protection within the full scope of the appended claims.