Abstract:
A sensor module for a compressor having an electric motor connected to a power supply and a processor disposed within an electrical enclosure of the compressor is provided, with the electrical enclosure being configured to house electrical terminals for connecting the power supply to the electric motor. The sensor module includes a first input connected to a voltage sensor that generates a voltage signal corresponding to a voltage of the power supply and a second input connected to a current sensor that generates a current signal corresponding to a current of the power supply. The processor is connected to the first and second inputs. The processor may calculate a power factor of the compressor, detect an unexpected variation in the power supply, and/or detect a mechanical malfunction of the compressor based on the voltage measurements and the current measurements.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application claims the benefit of U.S. Provisional Application No. 60/984,902, filed on Nov. 2, 2007. The entire disclosure of the above application is incorporated herein by reference. 
     
    
     FIELD 
       [0002]    The present disclosure relates to compressors, and more particularly, to a compressor with a sensor module. 
       BACKGROUND 
       [0003]    The statements in this section merely provide background information related to the present disclosure and may not constitute prior art. 
         [0004]    Compressors are used in a variety of industrial and residential applications to circulate refrigerant within a refrigeration, heat pump, HVAC, or chiller system (generically “refrigeration systems”) to provide a desired heating or cooling effect. Compressors may include an electric motor to provide torque to compress vapor refrigerant. The electric motor may be powered by an alternating current (AC) or direct current (DC) power supply. In the case of an AC power supply, single or poly-phase AC may be delivered to windings of the electric motor. For example, the compressor may include an electric motor configured to operate with three phase AC. The electric motor may include at least one set of windings corresponding to each of the three phases. 
         [0005]    In each application, it is desirable for the compressor to provide consistent and efficient operation to ensure that the refrigeration system functions properly. Variations in the supply of electric power to the electric motor of the compressor may disrupt operation of the electric motor, the compressor, and the refrigeration system. Such variations may include, for example, excessive, or deficient, current or voltage conditions. In the case of a poly-phase AC power supply, such variations may include an unbalanced phase condition wherein the current or voltage of at least one phase of AC is excessively varied from the current or voltage of the other phases. Further, such variations may include a loss of phase condition wherein one phase of AC is interrupted while the remaining phases continue to be delivered. Excessive current or voltage conditions may cause the electric motor to overheat which may damage the electric motor or the compressor. Deficient current or voltage conditions, unbalanced phase conditions, and loss of phase conditions may disrupt operation of the electric motor, the compressor, or the refrigeration system and cause unnecessary damage. 
         [0006]    The electric motor of a compressor may be equipped with a temperature or current sensor to detect overheating of the electric motor during electrical power disturbances. For example, a bi-metallic switch may trip and deactivate the electric motor when the electric motor is overheated or drawing excessive electrical current. Such a system, however, does not detect variations in the power supply that may not immediately or drastically increase the temperature of the electric motor. In addition, such systems may not detect a variation in electrical power until the condition has increased the temperature of the electric motor or the electric motor windings. 
         [0007]    Further, such systems do not provide sufficient data to evaluate electrical efficiency of the electric motor overall. Variations in the supply of electric power may result in inefficient operation of the compressor, the electric motor, or the refrigeration system. Refrigeration systems generally require a significant amount of energy to operate, with energy requirements being a significant cost to retailers. As a result, it is in the best interest of retailers to closely monitor the supply of electric power to their refrigeration systems to maximize efficiency and reduce operational costs. 
       SUMMARY 
       [0008]    A sensor module for a compressor having an electric motor connected to a power supply is provided. The sensor module may comprise a first input connected to a first voltage sensor that generates a voltage signal corresponding to a voltage of said power supply, a second input connected to a first current sensor that generates a current signal corresponding to a current of said power supply, and a processor connected to the first and second inputs that calculates a power factor of the compressor based on voltage measurements from the first input and current measurements from the second input. The processor may be disposed within an electrical enclosure of the compressor and the electrical enclosure may being configured to house electrical terminals for connecting the power supply to the electric motor. 
         [0009]    In other features, the processor may be disposed within a tamper-resistant enclosure within the electrical enclosure. 
         [0010]    In other features, the processor may calculate an active power and an apparent power of the compressor based on the voltage measurements from the first input and current measurements from the second input and may calculate the power factor according to a ratio of the active power to the apparent power. 
         [0011]    In other features, the processor may determine a voltage waveform based on voltage measurements from the first input and a current waveform based on current measurements from the second input and may calculate the power factor according to an angular difference between the current waveform and the voltage waveform. 
         [0012]    In other features, the processor may calculate a power consumption of the compressor based on the voltage measurements from the first input and the current measurements from the second input. 
         [0013]    In other features, the processor may calculate an active power of the compressor based on the voltage measurements from the first input and the current measurements from the second input and calculates the power consumption by averaging the active power over a time period. 
         [0014]    In other features, the sensor module may further comprise a communication port for communicating information from the sensor module to a control module for the compressor, a system controller for a system associated with the compressor, a portable computing device, and/or a network device. 
         [0015]    In other features, the information communicated may include the power factor, a calculated active power, a calculated apparent power, and/or a calculated power consumption of the compressor. 
         [0016]    In other features, the power supply may includes first, second, and third phases, with the voltage signal generated by the first voltage sensor corresponding to the first phase, and the current signal generated by the first current sensor corresponding to the first phase. Further, the sensor module may further comprise a third input connected to a second voltage sensor that generates a voltage signal corresponding to a voltage of the second phase. A fourth input connected to a third voltage sensor may generate a voltage signal corresponding to a voltage of the third phase. The processor may be connected to the third and fourth inputs and may calculate the power factor based on voltage measurements received from the third and fourth inputs. 
         [0017]    In other features, the processor may estimate a current of the second phase and a current of the third phase and may calculate the power factor based on the estimated currents of the second and third phases. 
         [0018]    In other features, the processor may calculate an active power and an apparent power of the compressor based on the voltage measurements from the first input, the current measurements from the second input, the voltage measurements from the third input, the voltage measurements from the fourth input and the estimated currents of the second and third phases and may calculate the power factor according to a ratio of the active power to the apparent power. 
         [0019]    In other features, the sensor module may further comprise a fifth input connected to a second current sensor that generates a current signal corresponding to a current of the second phase. The processor may be connected to the fifth input and may calculate the power factor based on current measurements received from the fifth input. 
         [0020]    In other features, the processor may estimate a current of the third phase and may calculate the power factor based on the estimated current of the third phase. 
         [0021]    In other features, the processor may calculate an active power and an apparent power of the compressor based on the voltage measurements from the first input, the current measurements from the second input, the voltage measurements from the third input, the voltage measurements from the fourth input, the current measurements from the fifth input, and the estimated current of the third phase and calculates the power factor according to a ratio of the active power to the apparent power. 
         [0022]    In other features, the sensor module may further comprise a fifth input connected to a second current sensor that generates a current signal corresponding to a current of the second phase and a sixth input connected to a third current sensor that generates a current signal corresponding to a current of the third phase. The processor may be connected to the fifth and sixth inputs and may calculate the power factor based on current measurements received from the fifth and sixth inputs. 
         [0023]    In other features, the processor may calculate an active power and an apparent power of the compressor based on the voltage measurements from the first input, the current measurements from the second input, the voltage measurements from the third input, the voltage measurements from the fourth input, the current measurements from the fifth input, and the current measurements from the sixth input and calculates the power factor according to a ratio of the active power to the apparent power. 
         [0024]    In other features, a compressor having the sensor module is provided. 
         [0025]    A method for a sensor module with a processor disposed within an electrical enclosure of a compressor having an electric motor connected to a power supply is also provided. The electrical enclosure may be configured to house electrical terminals for connecting the power supply to the electric motor. The method may comprise receiving voltage measurements of the power supply from a first voltage sensor connected to the sensor module, receiving current measurements of the power supply from a first current sensor connected to the sensor module, calculating a power factor of the compressor based on the voltage measurements and the current measurements, and generating an output based on the power factor. 
         [0026]    In other features, calculating the power factor may comprise calculating an active power and an apparent power of the compressor based on the voltage measurements and the current measurements and calculating the power factor according to a ratio of the active power to the apparent power. 
         [0027]    In other features, calculating the power factor may comprise determining a voltage waveform based on the voltage measurements, determining a current waveform based on the current measurements, and calculating the power factor according to an angular difference between the current waveform and the voltage waveform. 
         [0028]    In other features, the method may further comprise calculating a power consumption of the compressor based on the voltage measurements and the current measurements. 
         [0029]    In other features, calculating the power consumption may comprise calculating an active power of the compressor based on the voltage measurements and the current measurements and calculating the power consumption by averaging the active power over a time period. 
         [0030]    In other features, generating the output based on the power factor may comprise communicating the power factor to a control module, a system controller, a portable computing device, and/or a network device, connected to the sensor module. 
         [0031]    In other features, power supply may include first, second, and third phases, with the voltage measurements from the first voltage sensor corresponding to the first phase, and the current measurements from the first current sensor corresponding to the first phase. The method may further comprise receiving voltage measurements corresponding to the second phase of the power supply from a second voltage sensor connected to the sensor module, receiving voltage measurements corresponding to the third phase of the power supply from a third voltage sensor connected to the sensor module. The calculating the power factor may comprise calculating the power factor based on the voltage measurements corresponding to the second phase and the voltage measurements corresponding to the third phase. 
         [0032]    In other features, the method may further comprise calculating a current estimate for the second phase and calculating a current estimate for the third phase. Calculating the power factor may comprise calculating the power factor based on the current estimates for the second and third phases. 
         [0033]    In other features, calculating the power factor may comprise calculating an active power and an apparent power of the compressor based on the voltage measurements for the first, second, and third phases, the current measurements for the first phase, and the current estimates for the second and third phases and calculating the power factor according to a ratio of the active power to the apparent power. 
         [0034]    In other features, the method may further comprise receiving current measurements corresponding to the second phase of the power supply from a second current sensor connected to the sensor module. Calculating the power factor may comprise calculating the power factor based on the current measurements corresponding to the second phase. 
         [0035]    In other features, the method may further comprise calculating a current estimate for the third phase. Calculating the power factor may comprise calculating the power factor based on the current estimate for the third phase. 
         [0036]    In other features, calculating the power factor may comprise calculating an active power and an apparent power of the compressor based on the voltage measurements for the first, second, and third phases, the current measurements for the first and second phases, and the current estimate for the third phase and calculating the power factor according to a ratio of the active power to the apparent power. 
         [0037]    In other features, the method may further comprise receiving current measurements corresponding to the third phase of the power supply from a third current sensor connected to the sensor module. Calculating the power factor may comprise calculating the power factor based on the current measurements corresponding to the third phase. 
         [0038]    In other features, calculating the power factor may comprise calculating an active power and an apparent power of the compressor based on the voltage measurements for the first, second, and third phases, and the current measurements for the first, second, and third phases and calculating the power factor according to a ratio of the active power to the apparent power. 
         [0039]    A computer-readable medium having computer executable instructions for performing the method is provided. 
         [0040]    Another sensor module for a compressor having an electric motor connected to a power supply is also provided. The sensor module may comprise a first input connected to a first voltage sensor that generates a voltage signal corresponding to a voltage of the power supply, a second input connected to a first current sensor that generates a current signal corresponding to a current of the power supply, and a processor connected to the first and second inputs that monitors the first and second inputs. The processor may detect an unexpected variation of electric power from the power supply and/or a mechanical malfunction based on voltage measurements from the first input and current measurements from the second input. The processor may be disposed within an electrical enclosure of the compressor, the electrical enclosure being configured to house electrical terminals for connecting the power supply to the electric motor. 
         [0041]    In other features, the processor may be disposed within a tamper-resistant enclosure within the electrical enclosure. 
         [0042]    In other features, the sensor module may further comprise a communication port for communicating a notification corresponding to the expected variation and/or the mechanical malfunction to a control module for the compressor, a system controller for a system associated with the compressor, a portable computing device, and/or a network device. 
         [0043]    In other features, the processor may detect the unexpected variation of electric power including a no-power condition. 
         [0044]    In other features, the processor may compare the voltage measurements from the first input with a predetermined voltage threshold and may determine that the no-power condition exists when the voltage measurements remain less than the predetermined voltage threshold for a predetermined time period. 
         [0045]    In other features, the sensor module may detects the unexpected variation of electric power including a low-voltage condition. 
         [0046]    In other features, the processor may determine a normal operating voltage of the compressor and may determine that the low-voltage condition exists when the voltage measurements from the first input are less than a predetermined percentage of the normal operating voltage. 
         [0047]    In other features, the processor may determine the normal operating voltage based on historical data of the compressor. 
         [0048]    In other features, the processor may determine the normal operating voltage based on an inputted normal operating voltage. 
         [0049]    In other features, the sensor module may detect the unexpected variation of electric power including a current-overload condition. 
         [0050]    In other features, the processor may determine a current maximum threshold, may compare the current measurements from the second input with the current maximum threshold, and may determine that the current-overload condition exists based on the comparison. 
         [0051]    In other features, the power supply may include first, second, and third phases, with the voltage signal generated by the first voltage sensor corresponding to the first phase, and with the current signal generated by the first current sensor corresponding to the first phase. The sensor module may further comprise a third input connected to a second voltage sensor that generates a voltage signal corresponding to a voltage of the second phase and a fourth input connected to a third voltage sensor that generates a voltage signal corresponding to a voltage of the third phase. The processor may be connected to the third and fourth inputs and may detect the unexpected variation of electric power from the power supply based on voltage measurements received from the third and fourth inputs. 
         [0052]    In other features, the unexpected variation of electric power may include a phase-loss condition. 
         [0053]    In other features, the processor may compare voltage measurements received from the first, third, and fourth inputs and may determine that the phase-loss condition exists when voltage measurements from the first input are less than a predetermined percentage of an average of voltage measurements from the third and fourth inputs. 
         [0054]    In other features, the unexpected variation of electric power may include a voltage-imbalance condition. 
         [0055]    In other features, the processor may calculate an average of voltage measurements received from the first, third, and fourth inputs and may determine that the voltage-imbalance condition based on the greatest of a difference between voltage measurements from the first input and the average, a difference between voltage measurements from the third input and the average, and a difference between voltage measurements from the fourth input and the average. 
         [0056]    In other features, the sensor module may further comprise a fifth input connected to a second current sensor that generates a current signal corresponding to a current of the second phase. The processor may be connected to the fifth input and may detect the unexpected variation of electric power from the power supply based on current measurements received from the fifth input. 
         [0057]    In other features, the unexpected variation of electric power may include a current-delay condition. 
         [0058]    In other features, the processor may determine that the current-delay condition exists when a current measurement from the second input is greater than a predetermined current threshold and a current measurement from the fifth input is not greater than the predetermined current threshold within a predetermined time period. 
         [0059]    In other features, the sensor module may detect the mechanical malfunction including a welded-contactor condition. 
         [0060]    In other features, the processor may receive run-state data corresponding to a current run-state of the compressor, may compare the voltage measurements from the first input with a voltage threshold, and may determine that the welded-contactor condition exists based on the current run-state and the comparison. 
         [0061]    In other features, the sensor module may detect the mechanical malfunction including a locked-rotor condition. 
         [0062]    In other features, the processor may compare the current measurements from the second input with a current threshold and may determine that the locked-rotor condition exists when the current measurements are greater than the current threshold. 
         [0063]    In other features, the processor may generate a buffer of the current measurements from the second input, may determine a greatest current value from the buffer, may compare the current measurements with the greatest current value from the buffer, and may determine that the locked-rotor condition exists when the current measurements are greater than a predetermined percentage of the greatest current value. 
         [0064]    In other features, the sensor module may detect the mechanical malfunction including a protection-trip condition. 
         [0065]    In other features, the processor may compare the voltage measurements with a voltage threshold and the current measurements with a current threshold and may determine that the protection-trip condition exists when the voltage measurements are greater than the voltage threshold and the current measurements are less than the current threshold. 
         [0066]    Another method for a sensor module with a processor disposed within an electrical enclosure of a compressor having an electric motor connected to a power supply is also provided. The electrical enclosure may be configured to house electrical terminals for connecting the power supply to the electric motor. The method may comprise receiving voltage measurements of the power supply from a first voltage sensor connected to the sensor module, receiving current measurements of the power supply from a first current sensor connected to the sensor module, detecting an unexpected variation of electric power from the power supply and/or a mechanical malfunction of the compressor based on the voltage measurements and the current measurements, and generating an output based on the detecting. 
         [0067]    In other features, generating the output based on the detecting may comprise communicating a result of the detecting to a control module, a system controller, a portable computing device, and/or a network device, connected to the sensor module. 
         [0068]    In other features, the detecting may include detecting the unexpected variation of electric power including a no-power condition. 
         [0069]    In other features, detecting the no-power condition may comprise comparing the voltage measurements with a predetermined voltage threshold, and determining that the no-power condition exists when the voltage measurements remain less than the predetermined voltage threshold for a predetermined time period. 
         [0070]    In other features, the detecting may include detecting the unexpected variation of electric power including a low-voltage condition. 
         [0071]    In other features, detecting the low-voltage condition may comprise determining a normal operating voltage of the compressor, and determining that the low-voltage condition exists when the voltage measurements are less than a predetermined percentage of the normal operating voltage. 
         [0072]    In other features, determining the normal operating voltage may comprise determining the normal operating voltage based on historical data of the compressor. 
         [0073]    In other features, determining the normal operating voltage may comprise determining the normal operating voltage based on an inputted normal operating voltage. 
         [0074]    In other features, the detecting may include detecting the unexpected variation of electric power including a current-overload condition. 
         [0075]    In other features, detecting the current-overload condition may comprise determining a current maximum threshold, comparing the current measurements with the current maximum threshold, and determining that the current-overload condition exists based on the comparison. 
         [0076]    In other features, the power supply may include first, second, and third phases, with the voltage measurements from the first voltage sensor corresponding to the first phase, and with the current measurements from the first current sensor corresponding to the first phase. The method may further comprise receiving voltage measurements corresponding to the second phase of the power supply from a second voltage sensor connected to the sensor module, and receiving voltage measurements corresponding to the third phase of the power supply from a third voltage sensor connected to the sensor module. Detecting the unexpected variation of electric power from the power supply may be based on the voltage measurements corresponding to the first, second, and third phases and the current measurements. 
         [0077]    In other features, detecting the unexpected variation of electric power may include detecting a phase-loss condition. 
         [0078]    In other features, detecting the phase-loss condition may comprise comparing voltage measurements corresponding to the first, second, and third phases, and determining that the phase-loss condition exists when voltage measurements corresponding to the first phase are less than a predetermined percentage of an average of voltage measurements corresponding to the second and third phases. 
         [0079]    In other features, detecting the unexpected variation of electric power may include detecting a voltage-imbalance condition. 
         [0080]    In other features, detecting the voltage-imbalance condition may comprise calculating an average of the voltage measurements corresponding to the first, second, and third phases and determining that the voltage-imbalance condition exists based on the greatest of a difference between voltage measurements corresponding to the first phase and the average, a difference between voltage measurements corresponding to the second phase and the average, and a difference between voltage measurements corresponding to the third phase and the average. 
         [0081]    In other features, the method may further comprise receiving current measurements corresponding to the second phase of the power supply from a second current sensor connected to the sensor module. The detecting the unexpected variation of electric power from the power supply may include detecting the unexpected variation of electric power based on the current measurements corresponding to the first and second phases. 
         [0082]    In other features, detecting the unexpected variation of electric power may include detecting a current-delay condition. 
         [0083]    In other features, detecting the current-delay condition may comprise comparing the current measurements corresponding with the first phase and the current measurements corresponding with the second phase with a predetermined current threshold and determining that the current-delay condition exists when the current measurements corresponding to the first phase are greater than the predetermined current threshold and the current measurements corresponding with the second phase are not greater than the predetermined current threshold within a predetermined time period. 
         [0084]    In other features, the detecting may include detecting the mechanical malfunction including a welded-contactor condition. 
         [0085]    In other features, the method may further comprise receiving run-state data corresponding to a current run-state of the compressor, comparing the voltage measurements with a voltage threshold, and determining that the welded-contactor condition exists based on the current run-state and the comparison. 
         [0086]    In other features, the detecting may include detecting the mechanical malfunction of the compressor including a locked-rotor condition. 
         [0087]    In other features, the detecting the locked-rotor condition may comprise comparing the current measurements with a current threshold and determining that the locked-rotor condition exists when the current measurements are greater than the current threshold. 
         [0088]    In other features, detecting the locked-rotor condition may comprise generating a buffer of the current measurements, determining a greatest current value from the buffer, comparing the current measurements with the current value from the buffer, and determining that the locked-rotor condition exists when the current measurements are greater than a predetermined percentage of the greatest current value. 
         [0089]    In other features, the detecting may include detecting the mechanical malfunction including a protection-trip condition. 
         [0090]    In other features, the detecting the protection-trip condition may comprise comparing the voltage measurements with a voltage threshold, comparing the current measurements with a current threshold, and determining that the protection-trip condition exists when the voltage measurements are greater than the voltage threshold and the current measurements are less than the current threshold. 
         [0091]    Further areas of applicability will become apparent from the description provided herein. It should be understood that the description and specific examples are intended for purposes of illustration only and are not intended to limit the scope of the present disclosure. 
     
    
     
       DRAWINGS 
         [0092]    The drawings described herein are for illustration purposes only and are not intended to limit the scope of the present disclosure in any way. 
           [0093]      FIG. 1  is a schematic view of a refrigeration system; 
           [0094]      FIG. 2  is a schematic view of a compressor with a sensor module and a control module; 
           [0095]      FIG. 3  is a schematic view of a compressor with a sensor module and a control module; 
           [0096]      FIG. 4  is a schematic view of a compressor with a sensor module and a control module; 
           [0097]      FIG. 5  is a perspective view of a compressor with a sensor module and a control module; 
           [0098]      FIG. 6  is a top view of a compressor with a sensor module and a control module; 
           [0099]      FIG. 7  is a schematic view of an electrical enclosure of a compressor including a sensor module; 
           [0100]      FIG. 8  is a schematic view of an electrical enclosure of a compressor including a sensor module; 
           [0101]      FIG. 9  is a schematic view of an electrical enclosure of a compressor including a sensor module; 
           [0102]      FIG. 10  is a schematic view of an electrical enclosure of a compressor including a sensor module; 
           [0103]      FIG. 11  is a schematic view of an electrical enclosure of a compressor including a sensor module; 
           [0104]      FIG. 12  is a schematic view of an electrical enclosure of a compressor including a sensor module; 
           [0105]      FIG. 13  is a flow chart illustrating an operating algorithm of a sensor module in accordance with the present teachings; 
           [0106]      FIG. 14  is a flow chart illustrating a diagnostic algorithm of a sensor module in accordance with the present teachings; 
           [0107]      FIG. 15  is a flow chart illustrating a diagnostic algorithm of a sensor module in accordance with the present teachings; 
           [0108]      FIG. 16  is a flow chart illustrating a diagnostic algorithm of a sensor module in accordance with the present teachings; 
           [0109]      FIG. 17  is a flow chart illustrating a diagnostic algorithm of a sensor module in accordance with the present teachings; 
           [0110]      FIG. 18  is a flow chart illustrating a diagnostic algorithm of a sensor module in accordance with the present teachings; 
           [0111]      FIG. 19  is a flow chart illustrating a diagnostic algorithm of a sensor module in accordance with the present teachings; 
           [0112]      FIG. 20  is a flow chart illustrating a diagnostic algorithm of a sensor module in accordance with the present teachings; 
           [0113]      FIG. 21  is a flow chart illustrating a diagnostic algorithm of a sensor module in accordance with the present teachings; 
           [0114]      FIG. 22  is a flow chart illustrating a diagnostic algorithm of a sensor module in accordance with the present teachings; and 
           [0115]      FIG. 23  is a flow chart illustrating a diagnostic algorithm of a sensor module in accordance with the present teachings. 
       
    
    
     DETAILED DESCRIPTION 
       [0116]    The following description is merely exemplary in nature and is not intended to limit the present disclosure, application, or uses. It should be understood that throughout the drawings, corresponding reference numerals indicate like or corresponding parts and features. 
         [0117]    As used herein, the terms module, control module, and controller refer to one or more of the following: an application specific integrated circuit (ASIC), an electronic circuit, a processor (shared, dedicated, or group) and memory that execute one or more software or firmware programs, a combinational logic circuit, or other suitable components that provide the described functionality. Further, as used herein, computer-readable medium refers to any medium capable of storing data for a computer. Computer-readable medium may include, but is not limited to, memory, RAM, ROM, PROM, EPROM, EEPROM, flash memory, punch cards, dip switches, CD-ROM, floppy disk, magnetic tape, other magnetic medium, optical medium, or any other device or medium capable of storing data for a computer. 
         [0118]    With reference to  FIG. 1 , an exemplary refrigeration system  10  may include a plurality of compressors  12  piped together with a common suction manifold  14  and a discharge header  16 . Compressor  12  may be a reciprocating compressor, a scroll type compressor, or another type of compressor. Compressor  12  may include a crank case. Compressors  12  may be equipped with electric motors to compress refrigerant vapor that is delivered to a condenser  18  where the refrigerant vapor is liquefied at high pressure, thereby rejecting heat to the outside air. The liquid refrigerant exiting the condenser  18  is delivered to an evaporator  20 . As hot air moves across the evaporator, the liquid turns into gas, thereby removing heat from the air and cooling a refrigerated space. This low pressure gas is delivered to the compressors  12  and again compressed to a high pressure gas to start the refrigeration cycle again. While a refrigeration system  10  with two compressors  12 , a condenser  18 , and an evaporator  20  is shown in  FIG. 1 , a refrigeration system  10  may be configured with any number of compressors  12 , condensers  18 , evaporators  20 , or other refrigeration system components. 
         [0119]    Each compressor  12  may be equipped with a control module (CM)  30  and a sensor module (SM)  32 . As described herein, SM  32  may be affixed to compressor  12  and may monitor electric power delivered to compressor  12  with one or more voltage sensors and one or more current sensors. Based on electrical power measurements, such as electric current (I) and voltage (V), SM  32  may determine apparent power, actual power, power consumption, and power factor calculations for the electric motor of compressor  12 . SM  32  may communicate the electric power measurements and calculations to CM  30 . SM  32  may also alert CM  30  of variations in the power supply, or of mechanical failures, based on the measurements and calculations. For example, SM  32  may alert CM  30  of an excessive current or voltage condition, a deficient current or voltage condition, a current or voltage imbalance condition, or a loss of phase or current delay condition (if poly-phase electric power is used). Based on the monitoring of the electric power supply and based on the communication with CM  30 , SM  32  may detect and alert CM  30  to a welded contactor condition, or a locked rotor condition. 
         [0120]    CM  30  may control operation of compressor  12  based on data received from SM  32 , based on other compressor and refrigeration system data received from other compressor or refrigeration system sensors, and based on communication with a system controller  34 . CM  30  may be a protection and control system of the type disclosed in assignee&#39;s commonly-owned U.S. patent application Ser. No. 11/059,646, Publication No. 2005/0235660, filed Feb. 16, 2005, the disclosure of which is incorporated herein by reference. Other suitable protection and control systems may be used. 
         [0121]    In addition to the data received by CM  30  from SM  32 , CM  30  may receive compressor and refrigeration system data including discharge pressure, discharge temperature, suction pressure, suction temperature, and other compressor related data from pressure and temperature sensors connected to or, embedded within, compressor  12 . In addition, oil level and oil pressure data may be received by SM  32  and communicated to CM  30  and/or received by CM  30  directly. In this way, CM  30  may monitor the various operating parameters of compressor  12  and control operation of compressor  12  based on protection and control algorithms and based on communication with system controller  34 . For example, CM  30  may activate and deactivate the compressor  12  according to a set-point, such as a suction pressure, suction temperature, discharge pressure, or discharge temperature set-point. In the case of a discharge pressure set-point, CM  30  may activate compressor  12  when the discharge pressure, as determined by a discharge pressure sensor, falls below the discharge pressure set-point. CM  30  may deactivate compressor  12  when the discharge pressure rises above the discharge pressure set-point. 
         [0122]    Further, CM  30  may activate or deactivate compressor  12  based on data and/or alerts received from SM  32 . For example, CM  30  may deactivate compressor  12  when alerted of an excessive current or voltage condition, a deficient current or voltage condition, a current or voltage imbalance condition, or a loss of phase or current delay condition (if poly-phase electric power is used). Further, CM  30  may activate compressor  12  when alerted of a welded contactor condition or deactivate compressor  12  when alerted of a locked rotor condition. CM  30  may communicate operating data of compressor  12 , including electric power data received from SM  32 , to system controller  34 . 
         [0123]    In this way, SM  32  may be specific to compressor  12  and may be located within an electrical enclosure  72  of compressor  12  for housing electrical connections to compressor  12  (shown in  FIGS. 5-12 ) at the time of manufacture of compressor  12 . CM  30  may be installed on compressor  12  after manufacture and at the time compressor  12  is installed at a particular location in a particular refrigeration system, for example. Different control modules may be manufactured by different manufacturers. However, each CM  30  may be designed and configured to communicate with SM  32 . In other words, SM  32  for a particular compressor  12  may provide data and signals that can be communicated to any control module appropriately configured to communicate with SM  32 . Further, manufacturers of different control modules may configure a control module to receive data and signals from SM  32  without knowledge of the algorithms and computations employed by SM  32  to provide the data and signals. 
         [0124]    System controller  34  may be used and configured to control the overall operation of the refrigeration system  10 . System controller  34  is preferably an Einstein Area Controller offered by CPC, Inc. of Atlanta, Ga., or any other type of programmable controller that may be programmed to operate refrigeration system  10  and communicate with CM  30 . System controller  34  may monitor refrigeration system operating conditions, such as condenser temperatures and pressures, and evaporator temperatures and pressures, as well as environmental conditions, such as ambient temperature, to determine refrigeration system load and demand. System controller  34  may communicate with CM  30  to adjust set-points based on operating conditions to maximize efficiency of refrigeration system  10 . System controller  34  may evaluate efficiency based on electric power measurements and calculations made by SM  32  and communicated to system controller  34  from CM  30 . 
         [0125]    With reference to  FIG. 2 , three phase AC electric power  50  may be delivered to compressor  12  to operate an electric motor. SM  32  and CM  30  may receive low voltage power from one of the phases of electric power  50  delivered to compressor  12 . For example, a transformer  49  may convert electric power  51  from one of the phases to a lower voltage for delivery to SM  32  and CM  30 . In this way, SM  32  and CM  30  may operate on single phase AC electric power at a lower voltage than electric power  50  delivered to compressor  12 . For example, electric power delivered to SM  32  and CM  30  may be 24 V AC. When low voltage power, for example 24V AC, is used to power CM  30  and SM  32 , lower voltage rated components, such as lower voltage wiring connections, may be used. 
         [0126]    SM  32  may be connected to three voltage sensors  54 ,  56 ,  58 , for sensing voltage of each phase of electric power  50  delivered to compressor  12 . In addition, SM  32  may be connected to a current sensor  60  for sensing electric current of one of the phases of electric power  50  delivered to compressor  12 . Current sensor  60  may be a current transformer or current shunt resistor. 
         [0127]    When a single current sensor  60  is used, electric current for the other phases may be estimated based on voltage measurements and based on the current measurement from current sensor  60 . Because the load for each winding of the electric motor may be substantially the same as the load for each of the other windings, because the voltage for each phase is known from measurement, and because the current for one phase is known from measurement, current in the remaining phases may be estimated. 
         [0128]    Additional current sensors may also be used and connected to SM  32 . With reference to  FIG. 3 , two current sensors  57 ,  60  may be used to sense electric current for two phases of electric power  50 . When two current sensors  57 ,  60  are used, electric current for the remaining phase may be estimated based on voltage measurements and based on the current measurements from current sensors  57 ,  60 . With reference to  FIG. 4 , three current sensors  55 ,  57 ,  60  may be used to sense electric current for all three phases of electric power  50 . 
         [0129]    In the case of a dual winding three phase electric motor, six electrical power terminals may be used, with one terminal for each winding resulting in two terminals for each of the three phases of electric power  50 . In such case, a voltage sensor may be included for each of the six terminals, with each of the six voltage sensors being in communication with SM  32 . In addition, a current sensor may be included for one or more of the six electrical connections. 
         [0130]    With reference to  FIGS. 5 and 6 , CM  30  and SM  32  may be mounted on or within compressor  12 . CM  30  may include a display  70  for graphically displaying alerts or messages. As discussed above, SM  32  may be located within electrical enclosure  72  of compressor  12  for housing electrical connections to compressor  12 . 
         [0131]    Compressor  12  may include a suction nozzle  74 , a discharge nozzle  76 , and an electric motor disposed within an electric motor housing  78 . 
         [0132]    Electric power  50  may be received by electrical enclosure  72 . CM  30  may be connected to SM  32  through a housing  80 . In this way, CM  30  and SM  32  may be located at different locations on or within compressor  12 , and may communicate via a communication connection routed on, within, or through compressor  12 , such as a communication connection routed through housing  80 . 
         [0133]    With reference to  FIGS. 7 through 12 , SM  32  may be located within electrical enclosure  72 . In  FIGS. 7 through 12 , a schematic view of electrical enclosure  72  and SM  32  is shown. SM  32  may include a processor  100  with RAM  102  and ROM  104  disposed on a printed circuit board (PCB) 106 . Electrical enclosure  72  may be an enclosure for housing electrical terminals  108  connected to an electric motor of compressor  12 . Electrical terminals  108  may connect electric power  50  to the electric motor of compressor  12 . 
         [0134]    Electrical enclosure  72  may include a transformer  49  for converting electric power  50  to a lower voltage for use by SM  32  and CM  30 . For example, electric power  51  may be converted by transformer  49  and delivered to SM  32 . SM  32  may receive low voltage electric power from transformer  49  through a power input  110  of PCB  106 . Electric power may also be routed through electrical enclosure  72  to CM  30  via electrical connection  52 . 
         [0135]    Voltage sensors  54 ,  56 ,  58  may be located proximate each of electrical terminals  108 . Processor  100  may be connected to voltage sensors  54 ,  56 ,  58  and may periodically receive or sample voltage measurements. Likewise, current sensor  60  may be located proximate one of electrical power leads  116 . Processor  100  may be connected to current sensor  60  and may periodically receive or sample current measurements. Electrical voltage and current measurements from voltage sensors  54 ,  56 ,  58  and from current sensor  60  may be suitably scaled for the processor  100 . 
         [0136]    PCB  106  may include a communication port  118  to allow communication between processor  100  of SM  32  and CM  30 . A communication link between SM  32  and CM  30  may include an optical isolator  119  to electrically separate the communication link between SM  32  and CM  30  while allowing communication. Optical isolator  119  may be located within electrical enclosure  72 . Although optical isolator  119  is independently shown, optical isolator  119  may also be located on PCB  106 . At least one additional communication port  120  may also be provided for communication between SM  32  and other devices. A handheld or portable device may directly access and communicate with SM  32  via communication port  120 . For example, communication port  120  may allow for in-circuit programming of SM  32  a device connected to communication port  120 . Additionally, communication port  120  may be connected to a network device for communication with SM  32  across a network. 
         [0137]    Communication with SM  32  may be made via any suitable communication protocol, such as I2C, serial peripheral interface (SPI), RS232, RS485, universal serial bus (USB), or any other suitable communication protocol. 
         [0138]    Processor  100  may access compressor configuration and operating data stored in an embedded ROM  124  disposed in a tamper resistant housing  140  within electrical enclosure  72 . Embedded ROM  124  may be a compressor memory system disclosed in assignee&#39;s commonly-owned U.S. patent application Ser. No. 11/405,021, filed Apr. 14, 2006, U.S. patent application Ser. No. 11/474,865, filed Jun. 26, 2006, U.S. patent application Ser. No. 11/474,821, filed Jun. 26, 2006, U.S. patent application Ser. No. 11/474,798, filed Jun. 26, 2006, or U.S. Patent Application No. 60/674,781, filed Apr. 26, 2005, the disclosures of which are incorporated herein by reference. In addition, other suitable memory systems may be used. 
         [0139]    Embedded ROM  124  may store configuration and operating data for compressor  12 . When configuration data for compressor  12  is modified, the modified data may likewise be stored in embedded ROM  124 . Configuration data for compressor  12  may be communicated to CM  30  or system controller  34 . When compressor and/or SM  32  are replaced, the default configuration data for the new compressor  12  may be communicated to CM  30  and/or system controller  34  upon startup. In addition, configuration data may be downloaded remotely. For example, configuration data in embedded ROM  124  may include operating and diagnostic software that may be upgraded via a network connection. In this way, operating and diagnostic software may be upgraded efficiently over the network connection, for example, via the internet. 
         [0140]    Relays  126 ,  127  may be connected to processor  100 . Relay  126  may control activation or deactivation of compressor  12 . When SM  32  determines that an undesirable operating condition exists, SM  32  may simply deactivate compressor  12  via relay  126 . Alternatively, SM  32  may notify CM  30  of the condition so that CM  30  may deactivate the compressor  12 . Relay  127  may be connected to a compressor related component. For example, relay  127  may be connected to a crank case heater. SM  32  may activate or deactivate the crank case heater as necessary, based on operating conditions or instructions from CM  30  or system controller  34 . While two relays  126 ,  127  are shown, SM  32  may, alternatively, be configured to operate one relay, or more than two relays. 
         [0141]    Processor  100  and PCB  106  may be mounted within a housing enclosure  130 . Housing enclosure  130  may be attached to or embedded within electrical enclosure  72 . Electrical enclosure  72  provides an enclosure for housing electrical terminals  108  and transformer  49 . Housing enclosure  130  may be tamper-resistant such that a user of compressor  12  may be unable to inadvertently or accidentally access processor  100  and PCB  106 . In this way, SM  32  may remain with compressor  12 , regardless of whether compressor  12  is moved to a different location, returned to the manufacturer for repair, or used with a different CM  30 . 
         [0142]    LED&#39;s  131 ,  132  may be located on, or connected to, PCB  106  and controlled by processor  100 . LED&#39;s  131 ,  132  may indicate status of SM  32  or an operating condition of compressor  12 . LED&#39;s  131 ,  132  may be located on housing enclosure  130  or viewable through housing enclosure  130 . For example, LED  131  may be red and LED  132  may be green. SM  32  may light green LED  132  to indicate normal operation. SM  32  may light red LED  131  to indicate a predetermined operating condition. SM  32  may also flash the LED&#39;s  131 ,  132  to indicate other predetermined operating conditions. 
         [0143]    In  FIG. 7 , one current sensor  60  is shown. Additional current sensors may also be used and connected to SM  32 . With reference to  FIG. 8 , two current sensors  57 ,  60  may be used to sense electric current for two phases of electric power  50 . When two current sensors  57 ,  60  are used, electric current for the remaining phase may be estimated based on voltage measurements and based on the current measurements from current sensors  57 ,  60 . With reference to  FIG. 9 , three current sensors  55 ,  57 ,  60  may be used to sense electric current for all three phases of electric power  50 . 
         [0144]    With reference to  FIGS. 10 to 12 , in the case of a dual winding three phase electric motor, electrical enclosure  72  may include additional electrical terminals  109  for additional windings. In such case, six electrical terminals  108 ,  109  may be located within electrical enclosure  72 . Three electrical terminals  108  may be connected to the three phases of electric power  50  for a first set of windings of the electric motor of compressor  12 . Three additional electrical terminals  109  may also connected to the three phases of electric power  50  for a second set of windings of the electric motor of compressor  12 . 
         [0145]    Voltage sensors  61 ,  62 ,  63  may be located proximate each of electrical terminals  109 . Processor  100  may be connected to voltage sensors  61 ,  62 ,  63  and may periodically receive or sample voltage measurements. With reference to  FIG. 10 , processor  100  may periodically receive or sample current measurements from a current sensor  64  for sensing electrical current flowing to one of the additional electrical terminals  109 . Additional current sensors may also be used. With reference to  FIG. 11 , four current sensors  57 ,  60 ,  64 ,  65  may be connected to processor  100 . Two current sensors  57 ,  60  may be associated with electrical terminals  108  and two current sensors  64 ,  65  may be associated with electrical terminals  109 . With reference to  FIG. 12 , six current sensors  55 ,  57 ,  60 ,  64 ,  65 ,  66  may be connected to processor  100 . Three current sensors  55 ,  57 ,  60  may be associated with electrical terminals  108  and three current sensors  64 ,  65 ,  66  may be associated with electrical terminals  109 . With six current sensors  55 ,  57 ,  60 ,  64 ,  65 ,  66 , processor  100  may receive current measurements for each winding of a dual winding three phase electric motor associated with compressor  12 . 
         [0146]    Processor  100  may sample current and voltage measurements from the various sensors periodically over each cycle of AC power to determine multiple instantaneous current and voltage measurements. For example, processor  100  may sample current and voltage measurements twenty times per cycle or approximately once every millisecond in the case of alternating current with a frequency of sixty mega-hertz. From these actual current and voltage measurements, processor  100  may calculate additional power related data such as true and apparent power, power consumption over time, and power factor. 
         [0147]    Based on actual current and voltage measurements, processor  100  may determine a root mean square (RMS) value for voltage and current for each phase of electric power  50 . Processor  100  may calculate an RMS voltage value by squaring each of the sampled voltage measurements, averaging the squared measurements, and calculating the square root of the average. Likewise, processor  100  may calculate an RMS current value by squaring each of the sampled current measurements, averaging the squared measurements, and calculating the square root of the average. 
         [0148]    From RMS voltage and RMS current calculations, processor  100  may calculate apparent power (S) according to the following equation: 
         [0000]        S=V   RMS   ×I   RMS   (1), 
         [0000]    where V RMS  is the calculated RMS of voltage over at least one cycle of AC and where I RMS  is the calculated RMS of current over at least one cycle of AC. Apparent power may be calculated in units of Volt-Amps (VA) or kilo-Volt-Amps (kVA) 
         [0149]    Processor  100  may calculate apparent power for each phase of electric power  50 . When current sensors  55 ,  57 ,  60 ,  64 ,  65 ,  66  are available for all three phases of electric power  50 , actual current measurements may be used to calculate apparent power. When current sensors are not available for all three phases, current for a missing phase may be estimated by interpolation from known current and voltage measurements. 
         [0150]    Processor  100  may calculate total apparent power (S Total ) for an electric motor of compressor  12  based on apparent power calculations for each of the phases, according to the following equation: 
         [0000]        S   Total   =V   RMS(1)   ×I   RMS(1)   +V   RMS(2)   ×I   RMS(2)   +V   RMS(3)   ×I   RMS(3)   (2), 
         [0000]    where V RMS(1) , V RMS(2) , and V RMS(3)  are the calculated RMS voltage over a cycle of AC for the first, second, and third phase of AC, respectively, and where I RMS(1) , I RMS(2) , and I RMS(3)  are the calculated RMS current a cycle of AC for the first, second, and third phase of AC, respectively. Apparent power is calculated in units of Volt-Amps (VA) or kilo-Volt-Amps (kVA) 
         [0151]    Active power (P), in units of watts (W) or kilo-watts (kW) may be calculated as an integral of the product of instantaneous currents and voltages over a cycle of AC, according to the following equation: 
         [0000]    
       
         
           
             
               
                 
                   
                     P 
                     = 
                     
                       
                         1 
                         T 
                       
                        
                       
                         
                           ∫ 
                           0 
                           T 
                         
                          
                         
                           
                             ( 
                             
                               
                                 v 
                                  
                                 
                                   ( 
                                   t 
                                   ) 
                                 
                               
                                
                               
                                 i 
                                  
                                 
                                   ( 
                                   t 
                                   ) 
                                 
                               
                             
                             ) 
                           
                            
                           
                               
                           
                            
                           
                              
                             t 
                           
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where v(t) is instantaneous voltage at time t, in units of volts; where i(t) is instantaneous current at time t, in units of amps; and where T is the period. 
         [0152]    Based on the actual instantaneous electrical current and voltage measurements sampled over a cycle of the AC power, processor  100  may calculate (P) as the sum of the products of instantaneous voltage and current samples for each sample interval (e.g., one millisecond), over one cycle of AC. Thus, P may be calculated by processor  100  according to the following equation: 
         [0000]    
       
         
           
             
               
                 
                   
                     P 
                     ≅ 
                     
                       
                         1 
                         T 
                       
                        
                       
                         
                           ∑ 
                           
                             k 
                             = 
                             1 
                           
                           
                             k 
                             = 
                             
                               T 
                               
                                 Δ 
                                  
                                 
                                     
                                 
                                  
                                 t 
                               
                             
                           
                         
                          
                         
                             
                         
                          
                         
                           
                             v 
                              
                             
                               ( 
                               k 
                               ) 
                             
                           
                            
                           
                             i 
                              
                             
                               ( 
                               k 
                               ) 
                             
                           
                            
                           Δ 
                            
                           
                               
                           
                            
                           t 
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where v(k) is the instantaneous voltage measurement for the kth sample; i(k) is the instantaneous current measurement for the kth sample; T is the period; and Δt is the sampling interval (e.g., 1 millisecond). 
         [0153]    P may be calculated for each phase of electric power. Processor  100  may calculate a total active power (P Total ) by adding the active power for each phase, according to the following equation: 
         [0000]        P   Total   =P   (1)   +P   (2)   +P   (3)   (5), 
         [0154]    Where P (1) , P (2) , and P (3)  are the active power for the first, second, and third phase of AC, respectively. 
         [0155]    Based on the active power calculations, processor  100  may calculate energy consumption by calculating an average of active power over time. Energy consumption may be calculated by processor  100  in units of watt-hours (WH) or kilo-watt-hours (kWH). 
         [0156]    Further, based on the active power calculation and the apparent power calculation, processor  100  may calculate the power factor (PF) according to the following equation: 
         [0000]    
       
         
           
             
               
                 
                   
                     PF 
                     = 
                     
                       P 
                       S 
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where P is active power in units of watts (W) or kilo-watts (kW); and where S is apparent power in units of volt-amps (VA) or kilo-volt-amps (kVA). Generally, PF is the ratio of the power consumed to the power drawn. Processor  100  may calculate PF for each phase of electric power. Processor  100  may also calculate a total PF as a ratio of total actual power to total apparent power, according to the following equation: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       PF 
                       Total 
                     
                     = 
                     
                       
                         P 
                         Total 
                       
                       
                         S 
                         Total 
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   7 
                   ) 
                 
               
             
           
         
       
     
         [0157]    where P total  and S Total  are calculated according to formulas 2 and 5 above. 
         [0158]    Alternatively, processor  100  may calculate power factor by comparing the zero crossings of the voltage and current waveforms. The processor may use the angular difference between the zero crossings as an estimate of PF. Processor  100  may monitor voltage and current measurements to determine voltage and current waveforms for electric power  50 . Based on the measurements, processor may determine where each waveform crosses the zero axis. By comparing the two zero crossings, processor  100  may determine an angular difference between the voltage waveform and the current waveform. The current waveform may lag the voltage waveform, and the angular difference may be used by processor  100  as an estimate of PF. 
         [0159]    PF may be used as an indication of the efficiency of the electric motor or the compressor. Increased lag between the current waveform and the voltage waveform results in a lower power factor. A power factor near one, i.e., a unity power factor, is more desirable than a lower power factor. An electric motor with a lower power factor may require more energy to operate, thereby resulting in increased power consumption. 
         [0160]    SM  32  may provide continually updated power factor calculations, as well as RMS voltage, RMS current, active power, apparent power, and energy consumption calculations, based on continually sampled instantaneous electrical current and voltage measurements, to CM  30  and/or system controller  34 . CM  30  and system controller  34  may utilize the electrical electric power measurements and calculations communicated from SM  32  to control and evaluate efficiency of compressor  12  or refrigeration system  10 . 
         [0161]    Further, electrical measurements and calculations, including PF, may be accessed by a user through system controller  34  or CM  30 . Additionally, electrical measurements and calculations may be accessed through direct communication with SM  32  via communication port  120 . Electrical measurements and calculations may be stored and periodically updated in embedded ROM  124 . 
         [0162]    In this way, electrical calculations and measurements, such as RMS voltage, RMS current, active power, apparent power, power factor, and energy calculations may be accurately and efficiently made at the compressor  12  and communicated to other modules or controllers or to a user of the compressor  12  or refrigeration system  10  for purposes of evaluating electrical power usage. 
         [0163]    In addition to communicating electrical calculations and measurements to other modules, controllers, or users, SM  32  may use the electrical calculations and measurements diagnostically to detect certain variations in operating conditions. SM  32  may alert CM  30  to certain operating conditions based on the electrical calculations and measurements. 
         [0164]    Referring now to  FIG. 13 , a flow chart illustrating an operating algorithm  1300  for SM  32  is shown. In step  1301 , SM  32  may initialize. Initialization may include resetting counters, timers, or flags, checking and initializing RAM  102 , initializing ports, including communication ports  118 ,  120 , enabling communication with other devices, including CM  30 , checking ROM  104 , checking embedded ROM  124 , and any other necessary initialization functions. SM  32  may load operating instructions from ROM  104  for execution by processor  100 . 
         [0165]    In step  1302 , SM  32  may receive actual electrical measurements from connected voltage and current sensors. SM  32  may receive a plurality of instantaneous voltage and current measurements over the course of a cycle of the AC electrical power. SM  32  may buffer the voltage and current measurements in RAM  102  for a predetermined time period. 
         [0166]    In step  1304 , SM  32  may calculate RMS voltage and RMS current based on the instantaneous voltage and current measurements. Based on the RMS voltage and RMS current calculations, SM  32  may calculate apparent power in step  1304 . Based on the instantaneous voltage and current measurements, SM  32  may also calculate active power. Based on the apparent power calculation and the active power calculation, SM  32  may calculate the power factor. SM  32  may also calculate the power factor from the instantaneous voltage and current measurements by examining an angular difference between the zero crossings of the electrical current waveform and the voltage waveform. 
         [0167]    In step  1306 , SM  32  may receive run state data from CM  30 . The run state data may include data indicating whether an electric motor of compressor  12  is currently in an activated or deactivated state. The run state data may also include timing data indicating a period of time that the electric motor has been in the current state. If the electric motor is a dual winding three phase electric motor, the run state data may also including data indicating whether one or both of the windings are activated. 
         [0168]    In step  1308 , based on the electrical measurements and calculations, and based on the data received from CM  30 , SM  32  may perform and/or monitor diagnostic algorithms as described in more detail below. Some diagnostic algorithms may be executed once per each iteration of operating algorithm  1300 . Some diagnostic algorithms may be executed concurrently with, and monitored by, operating algorithm  1300 . 
         [0169]    In step  1310 , SM  32  may communicate the results of the electrical measurements and calculations to CM  30 . SM  32  may also communicate the results of any diagnostic algorithms to CM  30 . As described below, SM  32  may set operating flags corresponding to operating conditions according to diagnostic algorithms. SM  32  may communicate any operating flags to CM  30  in step  1310 . 
         [0170]    In step  1312 , SM  32  may receive and respond to communications from CM  30 . For example, CM  30  may request particular data from SM  32 . CM  30  may also request certain data from embedded ROM  124 . CM  30  may update SM  32  with operating parameters or thresholds for use in diagnostic algorithms. CM  30  may direct SM  32  to activate or deactivate any compressor related devices, such as a crank case heater, controlled by SM  32  via relay  127 . 
         [0171]    After responding to communications from CM  30  in step  1312 , SM  32  may loop back to step  1302  and continue operation. 
         [0172]    Referring now to  FIG. 14 , a flow chart illustrating an algorithm  1400  for SM  32  to detect a no-power condition is shown. The algorithm  1400  may be one of the diagnostic algorithms performed/monitored by SM  32 , as described with reference to step  1308  of  FIG. 13  above. Prior to execution of the algorithm  1400 , a no-power flag may have been reset by SM  32 . 
         [0173]    In step  1401 , SM  32  may determine whether the current run state is set to run, based on run state data received from CM  30 , as described with reference to step  1306  of  FIG. 13  above. When the run state is not set to run, compressor  12  is not activated, and SM  32  may end execution of the algorithm in step  1402 . 
         [0174]    When the run state is set to run, SM  32  may proceed to step  1404  and check voltage measurements. When three phase power is used, SM  32  may check each of three voltage measurements, V 1 , V 2 , and V 3 . SM  32  may determine whether V 1 , V 2 , and V 3  are less than a minimum voltage threshold, V min-14 . In step  1404 , when V 1 , V 2 , and V 3  are greater than or equal to V min-14 , SM  32  may determine that compressor  12  has sufficient power, and end execution of algorithm  1400  in step  1402 . 
         [0175]    In step  1404 , when SM  32  determines that V 1 , V 2 , and V 3  are less than V min-14 , SM  32  may proceed to step  1406 . In step  1406 , SM  32  may determine whether the time since the compressor  12  was activated is greater than a time threshold, Tm Thr-14 . For example, Tm Thr-14  may be set to two seconds. In this way, SM  32  may allow for any bounce of any contactor coil relays. In step  1406 , when the time since compressor activation is not greater than Tm Thr-14 , SM  32  may return to step  1401 . 
         [0176]    In step  1406 , when the time since compressor activation is greater than TM Thr-14 , SM  32  may proceed to step  1408 . In step  1408 , SM  32  may set a no-power flag. By setting the no-power flag, SM  32  may indicate that compressor  12  does not have sufficient electrical power to operate. The no-power flag may be communicated to, or detected by, CM  30  and/or system controller  34 . CM  30  and/or system controller  34  may adjust compressor and refrigeration system operation accordingly. 
         [0177]    Referring now to  FIG. 15 , a flow chart illustrating an algorithm  1500  for SM  32  to detect a welded contactor condition is shown. The algorithm  1500  may be one of the diagnostic algorithms performed/monitored by SM  32 , as described with reference to step  1308  of  FIG. 13  above. Prior to execution of the algorithm  1500 , a welded-contactor flag may have been reset by SM  32 . A welded contactor may cause compressor  12  to continue to operate, even though SM  32  or CM  30  may have attempted to open a contactor to deactivate the compressor. 
         [0178]    In step  1501 , SM  32  may determine whether the current run state is set to run, based on run state data previously received from CM  30 , as described with reference to step  1306  of  FIG. 13  above. When the run state is set to run, the compressor  12  is activated, and SM  32  may end execution of the algorithm in step  1502 . 
         [0179]    When the run state is not set to run, SM  32  may proceed to step  1504  and check voltage measurements. When three phase power is used, SM  32  may check each of three voltage measurements, V 1 , V 2 , and V 3 . SM  32  may determine whether voltages V 1 , V 2 , or V 3  are greater than a maximum voltage threshold, V max-15 . In step  1504 , when V 1 , V 2 , or V 3  are not greater than or equal to V max-15 , SM  32  may determine that a welded contactor condition does not exist, and end execution of the algorithm in step  1502 . 
         [0180]    When V 1 , V 2 , or V 3  are greater than V max-15 , SM  32  may proceed to step  1506 . In step  1506 , SM  32  may determine whether the time since compressor  12  was deactivated is greater than a time threshold, Tm Thr-15 . For example, Tm Thr-15  may be set to two seconds. By waiting for the Tm Thr-15 , SM  32  may allow for any bounce of any contactor coil relays. In step  1506 , when the time since compressor deactivation is not greater than Tm Thr-15 , SM  32  may return to step  1501 . 
         [0181]    In step  1506 , when the time since compressor deactivation is greater than TM Thr-15 , SM  32  may proceed to step  1508 . In step  1508 , SM  32  may set a welded-contactor flag. By setting the welded-contactor flag, SM  32  may indicate that compressor  12  may have at least one welded contactor. In such case, power may be delivered to compressor  12 , due to the welded contactor, despite the attempt of CM  30  or SM  32  to deactivate compressor  12 . The welded-contactor flag may be communicated to, or detected by, CM  30  and/or system controller  34 . CM  30  and/or system controller  34  may adjust compressor and refrigeration system operation accordingly. Specifically, CM  30  may activate compressor  12  while it is in the welded-contactor state to avoid a voltage imbalance condition and prevent damage or overheating of compressor  12 . Further, CM  30  or system controller  34  may notify a user that compressor  12  is being operated in a welded-contactor state. 
         [0182]    Referring now to  FIG. 16 , a flow chart illustrating an algorithm  1600  for SM  32  to detect a locked rotor condition is shown. Algorithm  1600  may be one of the diagnostic algorithms performed/monitored by SM  32 , as described with reference to step  1308  of  FIG. 13  above. In a locked rotor condition, a rotor of the electric motor may be seized. Normally, when an electric motor is activated, electric current of the motor (I) increases for an initial period during startup, and then decreases as the motor reaches operating speed. If, however, the rotor is seized, I will not decrease after the initial period. Prior to execution of the algorithm  1600 , a locked-rotor flag may have been reset by SM  32 . 
         [0183]    In step  1601 , SM  32  may buffer electrical current measurements for a predetermined buffer period. For example, SM  32  may buffer electrical current measurements for  200  ms. 
         [0184]    In step  1602 , SM  32  may determine whether I is greater than a minimum electric current threshold (I min-16 ). When I is not greater than I min-16 , SM  32  may loop back to step  1601  and continue to buffer I. In step  1602 , when SM  32  determines that I is greater than I min-16 , SM  32  may proceed to step  1604 . 
         [0185]    In step  1604 , SM  32  may determine the greatest I value currently in the buffer (I grtst-16 ). In step  1606 , SM  32  may determine whether I grtst  is greater than an electric current threshold (I max-16 ). SM  32  may then wait in steps  1608  and  1610  for a time threshold (TM Thr-16 ) to expire. For example, Tm Thr-16  may be set to two seconds. In this way, SM  32  allows I to settle to a normal operating current if the electric motor does not have a locked rotor. 
         [0186]    When I grtst-16  is greater than I max-16  in step  1606 , then in step  1612 , SM  32  may use I max-16  as the current threshold. In step  1612 , when I is greater than I max-16 , SM  32  may determine that a locked rotor condition exists and may proceed to step  1614  to set the locked-rotor flag. In step  1612 , when I is not greater than I max-16 , SM  32  may end execution of the algorithm in step  1616 . 
         [0187]    In step  1606 , when I grtst-16  is not greater than I max-16 , SM  32  may use a predetermined percentage (X %) of I grtst-16  as the current threshold in step  1618 . In step  1618 , when I mtr-16  is greater than X % of I grtst-16 , SM  32  may determine that a locked rotor condition exists and may set the locked-rotor flag in step  1614 . SM  32  may end execution of the algorithm in step  1616 . The locked-rotor flag may be communicated to, or detected by, CM  30  and/or system controller  34 . CM  30  and/or system controller  34  may adjust compressor and refrigeration system operation accordingly. 
         [0188]    If a locked-rotor condition is detected a predetermined number of consecutive times, SM  32  may set a locked rotor lockout flag. SM  32  may cease operation of the compressor until the lockout flag is cleared by a user. For example, SM  32  may set the locked rotor lockout flag when it detects ten consecutive locked rotor conditions. 
         [0189]    Referring now to  FIG. 17 , a flow chart illustrating an algorithm  1700  for SM  32  to detect a motor protection trip is shown. Algorithm  1700  may be one of the diagnostic algorithms performed/monitored by SM  32 , as described with reference to step  1308  of  FIG. 13  above. Compressor  12  may be configured with internal line breaks. The internal line breaks may trip, or deactivate, compressor  12  when electric current is excessive or when compressor  12  is overheating. In such case, SM  32  may detect that an internal line break has occurred and notify CM  30 . Prior to execution of the algorithm  1700 , a protection-trip flag may have been reset by SM  32 . 
         [0190]    In step  1701 , SM  32  determines whether any voltage, V 1 , V 2 , or V 3  is greater than a voltage minimum threshold (V min-17 ). When V 1 , V 2 , or V 3  is not greater than V min-17 , SM  32  may end execution of algorithm  1700  in step  1702 . When V 1 , V 2 , or V 3  is greater than V min-17 , SM  32  may proceed to step  1704 . In step  1704 , SM  32  may determine whether I is less than a current minimum I min-17 . When I is not less than I min-17 , SM  32  may end execution of algorithm  1700  in step  1702 . When I is less than I min-17 , SM  32  may proceed to step  1706  and set a protection-trip flag. In this way, when voltage is present, but electric current is not present, SM  32  may determine that an internal line break condition has occurred. The protection-trip flag may be communicated to, or detected by, CM  30  and/or system controller  34 . CM  30  and/or system controller  34  may adjust compressor  12  and refrigeration system  10  operation accordingly. 
         [0191]    Referring now to  FIG. 18 , a flow chart illustrating an algorithm  1800  for SM  32  to detect a low voltage condition is shown. Algorithm  1800  may be one of the diagnostic algorithms performed/monitored by SM  32 , as described with reference to step  1308  of  FIG. 13  above. Prior to execution of the algorithm  1800 , a low-voltage flag may have been reset by SM  32 . 
         [0192]    In step  1801 , SM  32  may determine the normal operating voltage of compressor (V nml ). SM  32  may determine V nml  based on historical data of previous compressor operating voltages. For example, V nml  may be calculated by averaging the voltage over the first five electrical cycles of power during the first normal run. V nml  may alternatively be predetermined and stored in ROM  104 ,  124 , or calculated based on an average voltage over the operating life of the compressor. 
         [0193]    In step  1802 , SM  32  may monitor V 1, 2, and 3  for a predetermined time period TM thr-18 . For example, Tm Thr-18  may be set to two seconds. The time threshold may or may not be the same as the time threshold used in other diagnostic algorithms. In step  1804 , SM  32  may determine whether V 1, 2, and 3  are less than a predetermined percentage (X %) of V nml  for more than TM thr-18 . For example, the predetermined percentage may be 75 percent. In step  1804 , when V 1, 2, and 3  are not less than X % of V nml  for more than TM thr-18 , SM  32  loops back to step  1802 . In step  1804 , when V 1, 2, and 3  are less than X % of V nml  for more than TM thr-18 , SM  32  may proceed to step  1806 . 
         [0194]    In step  1806 , SM  32  may determine whether the run state is set to run. When the run state is not set to run in step  1806 , SM  32  ends execution of algorithm  1800  in step  1808 . When the run state is set to run, SM  32  may determine that a low-voltage condition exists and may set a low-voltage flag in step  1810 . The low-voltage flag may be communicated to, or detected by, CM  30  and/or system controller  34 . CM  30  and/or system controller  34  may adjust compressor  12  and refrigeration system  10  operation accordingly. 
         [0195]    Referring now to  FIG. 19 , a flow chart illustrating an algorithm  1900  for SM  32  to detect a phase loss condition for compressor  12 , when three phase electric power  50  is used. Algorithm  1900  may be one of the diagnostic algorithms performed/monitored by SM  32 , as described with reference to step  1308  of  FIG. 13  above. SM  32  may compare each voltage, V 1 , V 2 , and V 3 , to determine whether any particular voltage is lower than a predetermined percentage of the average of the other two voltages. Prior to execution of the algorithm  1900 , a phase-loss flag may have been reset by SM  32   
         [0196]    In step  1901 , SM  32  may monitor V 1 , V 2 , and V 3 . In step  1902 , SM  32  may determine whether V 1  is less than a predetermined percentage, X %, of the average of V 2  and V 3 , for a time (Tm) greater than a time threshold, Tm Thr-19 . When V 1  is less than X % of the average of V 2  and V 3 , SM  32  may set the phase-loss flag in step  1904  and end execution of algorithm  1900  in step  1906 . When V 1  is not less than X % of the average of V 2  and V 3 , SM  32  may proceed to step  1908 . 
         [0197]    In step  1908 , SM  32  may determine whether V 2  is less than X % of the average of V 1  and V 3 , for Tm greater than Tm Thr-19 . When V 2  is less than X %, of the average of V 1  and V 3 , SM  32  may set the phase-loss flag in step  1904  and end execution of algorithm  1900  in step  1906 . When V 2  is not less than X % of the average of V 1  and V 3 , SM may proceed to step  1910 . 
         [0198]    In step  1910 , SM  32  may determine whether V 3  is less than X % of the average of V 1  and V 2 , for Tm greater than Tm Thr-19 . When V 3  is less than X %, of the average of V 1  and V 2 , SM  32  may set the phase-loss flag in step  1904  and end execution of algorithm  1900  in step  1906 . When V 3  is not less than X % of the average of V 1  and V 2 , SM  32  may loop back to step  1901 . In this way, algorithm  1900  may operate concurrently with algorithm  1300 . The phase-loss flag may be communicated to, or detected by, CM  30  and/or system controller  34 . CM  30  and/or system controller  34  may adjust compressor  12  and refrigeration system  10  operation accordingly. 
         [0199]    If a phase-loss condition is detected a predetermined number of consecutive times, SM  32  may set a phase-loss lockout flag. SM  32  may cease operation of the compressor until the lockout flag is cleared by a user. For example, SM  32  may set the phase-loss lockout flag when it detects ten consecutive phase-loss conditions. 
         [0200]    Referring now to  FIG. 20 , a flow chart illustrating an algorithm  2000  for SM  32  to detect a voltage imbalance condition for compressor  12 , when three phase electric power  50  is used. Algorithm  2000  may be one of the diagnostic algorithms performed/monitored by SM  32 , as described with reference to step  1308  of  FIG. 13  above. SM  32  may determine whether the difference between any of voltages V 1 , V 2 , or V 3  is greater than a predetermined percentage of the average of V 1 , V 2 , and V 3 . When the difference between any of voltages V 1 , V 2 , or V 3  is greater than a predetermined percentage of the average of V 1 , V 2 , and V 3 , SM  32  may determine that a voltage imbalance condition exists. Prior to execution of the algorithm  2000 , a voltage-imbalance flag may have been reset by SM  32   
         [0201]    In step  2001 , SM  32  may monitor V 1 , V 2 , and V 3 . In step  2002 , SM  32  may calculate the average (V avg ) of V 1 , V 2 , and V 3 . In step  2004 , SM  32  may calculate the percentage of voltage imbalance (% V imb ) by determining the maximum of the absolute value of the difference between each of V 1  and V avg , V 2  and V avg , and V 3  and V avg . The maximum difference is then multiplied by V avg /100. 
         [0202]    In step  2006 , SM  32  determines whether the run state is set to run. In step  2006 , when the run state is not set to run, SM  32  may end execution of algorithm  2000  in step  2008 . In step  2006 , when the run state is set to run, SM  32  may proceed to step  2010 . 
         [0203]    In step  2010 , SM  32  may determine whether % V imb  is greater than a voltage imbalance threshold (% V Thr-20 ). When % V imb  is not greater than % V Thr-20 , SM  32  loops back to step  2001 . In this way, algorithm  2000  may execute concurrently with operating algorithm  1300 . When % V imb  is greater than % V Thr-20 , a voltage imbalance condition exists, and SM  32  may set the voltage-imbalance flag in step  2012 . SM  32  may end execution of algorithm  2000  in step  2008 . The voltage-imbalance flag may be communicated to, or detected by, CM  30  and/or system controller  34 . CM  30  and/or system controller  34  may adjust compressor  12  and refrigeration system  10  operation accordingly. 
         [0204]    Referring now to  FIG. 21 , a flow chart illustrating an algorithm  2100  for SM  32  to detect a current overload condition is shown. Algorithm  2100  may be one of the diagnostic algorithms performed/monitored by SM  32 , as described with reference to step  1308  of  FIG. 13  above. Prior to execution of the algorithm  2100 , a current-overload flag may have been reset by SM  32   
         [0205]    In step  2101 , SM  32  may determine the maximum continuous current (MCC) for the electric motor of compressor  12 . MCC may be predetermined and set during the manufacture of compressor  12 . MCC may be stored in ROM  104  and/or embedded ROM  124 . In addition, MCC may be user configurable. MCC may vary based on the type of refrigerant used. Thus, a user of compressor  12  may modify the default MCC value to conform to actual refrigeration system conditions. 
         [0206]    In step  2102 , SM  32  may determine whether the run state is set to run. When the run state is not set to run, SM  32  ends execution of algorithm  2100  in step  2104 . In step  2102 , when the run state is set to run, SM  32  may proceed to step  2106 . In step  2106 , when run state has not been set to run for a time period greater than a first time threshold (TM Thr1-21 ), SM  32  loops back to step  2102 . In step  2106 , when run state has been set to run for a time period greater than TM Thr1-21 , SM  32  may proceed to step  2108 . 
         [0207]    In step  2108 , SM  32  monitors I. In step  2110 , SM  32  may determine whether I is greater than MCC multiplied by 1.1. In other words, SM  32  may determine whether I is greater than 110% of MCC for a time greater than a second time threshold (TM Thr2-21 ). When SM  32  determines that I is not greater than 110% of MCC for a time greater than TM Thr2-21 , SM  32  may loop back to step  2102 . In this way, algorithm  2100  may execute concurrently with operating algorithm  1300 . When SM  32  determines that I is greater than 110% of MCC for a time greater than TM Thr2-21 , SM  32  may determine that a current-overload condition exists and may set the current-overload flag in step  2112 . SM  32  may end execution of the algorithm  2100  in step  2104 . The current-overload flag may be communicated to, or detected by, CM  30  and/or system controller  34 . CM  30  and/or system controller  34  may adjust compressor and refrigeration system operation accordingly. 
         [0208]    Referring now to  FIG. 22 , a flow chart illustrating an algorithm  2200  for SM  32  to detect a current delay condition, in a two current sensor system, to detect a lag between two electrical currents I 1  and I 2 . Algorithm  2200  may be one of the diagnostic algorithms performed/monitored by SM  32 , as described with reference to step  1308  of  FIG. 13  above. Prior to execution of the algorithm, a current-delay flag may have been reset by SM  32 . 
         [0209]    When SM  32  detects current greater than a current threshold (I min-22 ) from one of the two current sensors, SM  32  may determine whether current indicated by the other current sensor becomes greater than I min-22  within a time period threshold (Tm Thr-22 ). In step  2201 , SM  32  may determine whether I 1  is greater than a current threshold I min-22 . When I 1  is greater than I min-22 , SM  32  may proceed to step  2203  and start a time counter (Tm). SM  32  may proceed to step  2205  to determine whether I 2  is greater than I min-22 . In step  2205 , when I 2  is greater than I min-22 , SM  32  may determine that a current-delay condition does not exist, and end execution of the algorithm in step  2210 . In step  2205 , when I 2  is not greater than I min-22 , SM  32  may proceed to step  2207  and determine whether Tm is greater than Tm Thr-22 . In step  2207 , when TM is not greater than TM Thr-22 , SM  32  may loop back to step  2205  to compare I 2  with I min-22 . In step  2207 , when Tm is greater than Tm Thr-22 , the time period has expired and a current-delay condition exists. SM  32  may proceed to step  2209  to set a current-delay flag. SM  32  may end execution of the algorithm  2200  in step  2210 . The current-delay flag may be communicated to, or detected by, CM  30  and/or system controller  34 . CM  30  and/or system controller  34  may adjust compressor and refrigeration system operation accordingly. 
         [0210]    When I 1  is not greater than I min-22 , SM  32  may proceed to step  2202  and determine whether I 2  is greater than I min-22 . When I 2  is not greater than I min-22 , SM  32  loops back to step  2201 . When I 2  is greater than I min-22 , SM  32  may proceed to step  2204  to start time Tm counter. SM  32  may proceed to step  2206  to determine whether I 1  is greater than I min-22 . In step  2206 , when I 1  is greater than I min-22 , SM  32  may determine that a current-delay condition does not exist, and end execution of the algorithm in step  2210 . In step  2206 , when I 1  is not greater than I min-22 , SM  32  may proceed to step  2208  and determine whether Tm is greater than Tm Thr-22 . In step  2208 , when TM is not greater than TM Thr-22 , SM  32  may loop back to step  2206  to compare I 1  with I min-22 . In step  2208 , when Tm is greater than Tm Thr-22 , the time period has expired and a current-delay condition exists. SM  32  may proceed to step  2209  to set the current-delay flag. SM  32  may end execution of the algorithm  2200  in step  2210 . As noted above, the current-delay flag may be communicated to, or detected by, CM  30  and/or system controller  34 , which may adjust compressor and refrigeration system operation accordingly. 
         [0211]    Referring now to  FIG. 23 , a flow chart illustrating an algorithm  2300  for SM  32  to detect a current delay condition is shown, in a three current sensor system, to detect a lag between three electrical currents I 1 , I 2 , and I 3 . Algorithm  2300  may be one of the diagnostic algorithms performed/monitored by SM  32 , as described with reference to step  1308  of  FIG. 13  above. Prior to execution of the algorithm, a current-delay flag may have been reset by SM  32 . 
         [0212]    When SM  32  detects current greater than a current threshold (I min-22 ) from one of the three current sensors, SM  32  may determine whether current indicated by the other current sensors becomes greater than I min-22  within a predetermined time period (Tm Thr-22 ). In step  2301 , SM  32  may determine whether I 1  is greater than a current threshold I min-22 . When I 1  is greater than I min-22 , SM  32  may proceed to step  2302  and start a time counter (Tm). SM  32  may proceed to step  2303  to determine whether I 2  and I 3  are greater than I min-22 . In step  2303 , when I 2  and I 3  are greater than I min-22 , SM  32  may determine that a current-delay condition does not exist, and end execution of the algorithm in step  2304 . In step  2303 , when I 2  and I 3  are not greater than I min-22 , SM  32  may proceed to step  2305  and determine whether Tm is greater than Tm Thr-22 . In step  2305 , when TM is not greater than TM Thr-22 , SM  32  may loop back to step  2303  to compare I 2  and I 3  with I min-22 . In step  2305 , when Tm is greater than Tm Thr-22 , the time period has expired and a current-delay condition exists. SM  32  may proceed to step  2306  to set a current-delay flag. SM  32  may end execution of the algorithm  2300  in step  2304 . The current-delay flag may be communicated to, or detected by, CM  30  and/or system controller  34 . CM  30  and/or system controller  34  may adjust compressor and refrigeration system operation accordingly. 
         [0213]    In step  2301 , when I 1  is not greater than I min-22 , SM  32  may proceed to step  2307  and determine whether I 2  is greater than I min-22 . When I 2  is greater than I min-22 , SM  32  may proceed to step  2308  to start Tm counter. SM  32  may proceed to step  2309  to determine whether I 1  and I 3  are greater than I min-22 . In step  2309 , when I 1  and I 3  are greater than I min-22 , SM  32  may determine that a current-delay condition does not exist, and end execution of the algorithm in step  2304 . In step  2309 , when I 1  and I 3  are not greater than I min-22 , SM  32  may proceed to step  2310  and determine whether Tm is greater than Tm Thr-22 . In step  2310 , when TM is not greater than TM Thr-22 , SM  32  may loop back to step  2309  to compare I 1  and I 3  with I min-22 . In step  2310 , when Tm is greater than Tm Thr-22 , the time period has expired and a current-delay condition exists. SM  32  may proceed to step  2306  to set the current-delay flag. SM  32  may end execution of the algorithm  2300  in step  2304 . As noted above, the current-delay flag may be communicated to, or detected by, CM  30  and/or system controller  34 , which may adjust compressor and refrigeration system operation accordingly. 
         [0214]    In step  2307 , when I 2  is not greater than I min-22 , SM  32  may proceed to step  2311  and determine whether I 3  is greater than I min-22 . When I 3  is not greater than I min-22 , SM  32  may loop back to step  2301 . When I 3  is greater than I min-22 , SM  32  may proceed to step  2312  to start Tm counter. SM  32  may proceed to step  2313  to determine whether I 1  and I 2  are greater than I min-22 . In step  2313 , when I 1  and I 2  are greater than I min-22 , SM  32  may determine that a current-delay condition does not exist, and end execution of the algorithm in step  2304 . In step  2313 , when I 1  and I 2  are not greater than I min-22 , SM  32  may proceed to step  2314  and determine whether Tm is greater than Tm Thr-22 . In step  2314 , when TM is not greater than TM Thr-22 , SM  32  may loop back to step  2313  to compare I 1  and I 2  with I min-22 . In step  2314 , when Tm is greater than Tm Thr-22 , the time period has expired and a current-delay condition exists. SM  32  may proceed to step  2306  to set the current-delay flag. SM  32  may end execution of the algorithm  2300  in step  2304 . As noted above, the current-delay flag may be communicated to, or detected by, CM  30  and/or system controller  34 , which may adjust compressor and refrigeration system operation accordingly. 
         [0215]    With respect to each of the diagnostic algorithms described above with reference to  FIGS. 14 to 23 , SM  32  may selectively execute the diagnostic algorithms as needed and as data for the diagnostic algorithms is available. When a communication link is not available, or when data from a connected sensor is not available, due to malfunction or otherwise, SM  32  may disable those portions of the diagnostic algorithms that require the missing communication link or data. In this way, SM  32  may execute those portions of the diagnostic algorithms that are executable, based on the data and communication link(s) available to SM  32 . 
         [0216]    In this way, SM  32  may monitor electrical current and voltage measurements, make data calculations based on the electrical current and voltage measurements, and execute diagnostic algorithms based on the measurements and based on the calculations. SM  32  may communicate the measurements, the calculations, and the results of the diagnostic algorithms to CM  30  or system controller  34 . SM  32  may thereby be able to provide efficient and accurate electrical power measurements and calculations to be utilized by other modules and by users to evaluate operating conditions, power consumption, and efficiency.