Abstract:
A device for controlling an electric motor is provided. The device includes: an inverter supplying a current to an electric motor; a current sensor sensing a current supplied from the inverter to the electric motor; and a control unit enabling the current to be supplied from the inverter to the electric motor, obtaining first and second offset values sensed from the current sensor at a plurality of times, comparing the plurality of offset values obtained, and updating the first offset value to the second offset value according to a result of comparing the offset values.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    Pursuant to 35 U.S.C. §119(a), this application claims the benefit of earlier filing date and right of priority to Korean Patent Application No. 10-2014-0008994, filed on Jan. 24, 2014, the contents of which are hereby incorporated by reference herein in its entirety. 
       BACKGROUND 
       [0002]    The present disclosure relates to a device and method for controlling an electric motor. 
         [0003]    In general, a hydraulic power steering apparatus using the oil pressure of a hydraulic pump or an electronic power steering apparatus (EPS) using an electric motor is being used in the car. 
         [0004]    The hydraulic power steering apparatus always consumes energy irrespective of the rotation of a steering wheel because the hydraulic pump being a power source assisting in power is driven by an engine. 
         [0005]    However, in the case of the EPS, the electric motor driven with electrical energy provides steering assisting power when the steering wheel rotates and thus torque occurs. 
         [0006]    Thus, when the EPS is used, it is possible to enhance energy efficiency in comparison to the hydraulic power steering apparatus. 
         [0007]    The EPS uses generated torque, a vehicle speed, or a steering angle to recognize the steering intention of a driver and the operating station of a vehicle, generates steering assisting power by considering them, and then transmits the power to a steering column, rack bar, rack and pinion so that the driver may drive more safely. 
         [0008]    The EPS may be controlled by an electronic control unit (ECU). 
         [0009]    The ECU checks a current flowing in the electric motor in order to precisely control the electric motor driven by a steering apparatus and calculates a torque generated at the electric motor and a ripple due to the torque, namely, torque ripple. The torque ripple is generated by an error in path through which a current detected by a current sensor flows, an error in voltage applied to the current sensor, or the DC offset of the current sensor itself and due to this, there is a limitation in that the control performance of the electric motor decreases. 
         [0010]    The DC offset is a small amount of DC current for operating the current sensor. In order for the current sensor to measure a current flowing in the electric motor, a small amount of current for operating the current sensor is needed. A current output by the current sensor is a sum of a current flowing in the electric motor to be actually found and a small amount of current needed for operating the current sensor. In this case, the value of a current flowing actually in the electric motor to be measured is distorted due to the small amount of current. 
         [0011]      FIG. 1  is a flowchart showing how a typical electric motor control device applies a DC offset. 
         [0012]    Referring to  FIG. 1 , the ECU for operating the electric motor is initialized in step S 10  and the current sensor measures a current offset value flowing in each phase in step S 20 . 
         [0013]    When the measuring of the current offset value is completed, the current offset value is applied so that the operation mode of the ECU for operating the electric motor is executed in step S 30 . The application of PWM, namely, the operation state of the electric motor is consistently is checked during the operation of the ECU and when the electric motor is not in the operation state, a pre-measured offset value is re-measured. Also, the electric motor continues to operate according to the driving mode of the ECU irrespective of the change of the offset value in step S 50 . 
         [0014]    Thus, it is difficult for the ECU to measure a new offset value while the electric motor continues to operate, and even after an offset value changes, the ECU does not perform a compensation operation with a new offset value. Thus, while the ECU controls the electric motor, it continues to operate the electric motor without compensating for an offset. 
       SUMMARY 
       [0015]    Embodiments provide a device and method for controlling an electric motor that sense an offset of a current applied to an electric motor and perform corresponding compensation. 
         [0016]    In one embodiment, a device for controlling an electric motor includes: an inverter supplying a current to an electric motor; a current sensor sensing a current supplied from the inverter to the electric motor; and a control unit enabling the current to be supplied from the inverter to the electric motor, obtaining first and second offset values sensed from the current sensor at a plurality of times, comparing the plurality of offset values obtained, and updating the first offset value to the second offset value according to a result of comparing the offset values. 
         [0017]    The details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features will be apparent from the description and drawings, and from the claims. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0018]      FIG. 1  is an operation flowchart of a typical electric motor control device. 
           [0019]      FIG. 2  is a block diagram of an electric motor control device to which an embodiment is applied. 
           [0020]      FIG. 3  is a flowchart of an operation of controlling an electric motor according to an embodiment. 
       
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
       [0021]    Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings. 
         [0022]      FIG. 2  is a block diagram of an electric motor control device to which an embodiment is applied. 
         [0023]    Referring to  FIG. 2 , an electric motor control device  100  according to an embodiment includes an inverter  110 , a current sensor  120 , a sensing unit  130 , and a control unit  140 . 
         [0024]    The control unit  140  is connected to a torque sensor (not shown), receives an electrical signal from the torque sensor to check a generated torque and calculates a control current according to the generated torque to control the inverter  110  so that a supply current corresponding to the control current is supplied to an electric motor M by the inverter  110 . 
         [0025]    The control unit  140  according to an embodiment may store an algorithm that compensates in real time for the DC offsets of an a-phase current sensor  121  and a b-phase current sensor  122  that are attached to a wiring between the inverter  110  and the electric motor M. 
         [0026]    Also, while the current control of the electric motor M is not performed, the control unit  140  may use each current sensor  120  to measure an a-phase current value and a b-phase current value, calculate and store the DC offset of each phase based on the current value of each phase, and then update an offset when the current control of the electric motor M is performed. The offset is a voltage obtained by subtracting a reference voltage from a voltage that is obtained by multiplying the current value of each phase by the equivalent resistance of the current sensor of each phase. 
         [0027]    In particular, the control unit  140  according to an embodiment may include a memory for storing a reference offset value, a measured offset value and an updated offset value. The memory (not shown) may be integrated into or separated from the control unit  140 . 
         [0028]    The inverter  110  is a power supply device that changes a direct current to an alternating current to supply power to the electric motor M. It is possible to supply a current to the electric motor M based on the control of the control unit  140 . That is, when a control current is received from the control unit  140 , the inverter  110  switches a switching element according to a control current to change a current supplied to the electric motor M to control the operation of the electric motor M. 
         [0029]    The current sensor  120  may be attached to at least two of wirings of the inverter. The current sensor  120  according to an embodiment includes the a-phase current sensor  121  and the b-phase current sensor  122 , for example. The current sensor  120  may sense the current value of each phase. 
         [0030]    The sensing unit  130  may sense sensing current values obtained from at least two of a to c phases and output them to the control unit  140 . 
         [0031]    In the following, the operation of the electric motor control device is described in detail based on the configuration of  FIG. 1 . 
         [0032]      FIG. 3  is a flowchart of an operation of controlling an electric motor according to an embodiment. 
         [0033]    Referring to  FIG. 3 , the control unit  140  of the electric motor control device  100  according to an embodiment may perform an initialization operation mode for operating the electric motor in step S 302 . The initialization operation mode may be an initialization state for operating the electric motor or a previous state. 
         [0034]    In this case, the sensing unit  130  may obtain offset values from the a-phase current sensor  121  and the b-phase current sensor  122  without performing the current control of the electric motor M in order to measure the current value of each phase based on the control of the control unit  140 . 
         [0035]    That is, a current value sensed in a stop state in which the electric motor M does not operate is ‘zero’, in which case a current sensed at the current sensors  121  and  122  may be an offset value. 
         [0036]    The control unit  140  may determine whether a measured offset value (a first offset value) is within a range of normal offset values (hereinafter, referred to as reference offset values) in step S 306 . That is, the control unit  140  may fix (a range of) reference offset values for the measured offset value and consider as an offset error when the measured offset value is not within the range of reference offset values in step S 308 . When the measured offset value is within the range of reference offset values, the control unit  140  may compensate for the measured offset value and perform the control of the electric motor that controls a current applied to the electric motor M in step S 310 . 
         [0037]    The measured offset value may be stored in the memory (not shown). 
         [0038]    The control unit  140  may consistently check (wait for) the operation state of the electric motor during the operation of the electric motor M and determine whether the electric motor M is in a stop state (a non-operation mode) in step S 312 . 
         [0039]    The control unit  140  may re-measure an offset value when the electric motor M is in the non-operation mode in step S 314 . The control unit  140  re-measures the offset while the electric motor m is in the non-operation mode, namely, while an applied current is zero. 
         [0040]    The control unit  140  may determine whether a re-measured current value, namely, an offset value (a second offset value) is within a preset range of reference offset values in step S 316 . 
         [0041]    When the re-measured offset value is within the range of reference offset values, the control unit  140  may compare it with a previously measured offset value (the current offset value) based on Equation 1 below: 
         [0000]      | Sn−S|≧V,    &lt;Equation 1&gt;
 
         [0000]    where Sn is the re-measured offset value, Sc is the previously measured offset value (the current offset value), and V is a reference value of the effectiveness of an offset value. 
         [0042]    The control unit  140  may calculate a difference between the re-measured offset value Sn and the current offset value Sc and determine whether a calculation result is equal to or greater than the reference value of the effectiveness of the offset value in step S 316 . That is, the control unit  140  may determine that the re-measured offset value Sn is not effective when the re-measured offset value Sn and the current offset value Sc are not within a range of the reference value of the effectiveness. In this case, the current offset value Sc is not updated to the re-measured offset value. 
         [0043]    The control unit  140  may use the current offset value Sc for the control of the electric motor, re-measure offset values a certain number of times and determine the effectiveness when the electric motor is in the non-operation mode. In this case, when it is confirmed a certain number of times or more that the offset values are not effective, it is possible to stop the control of the electric motor (turn off the electric motor) and sound the alarm related to an offset value error. 
         [0044]    On the contrary, when the re-measured offset value Sn and the current offset value Sc are within a range of reference values V of effectiveness, it is possible to update the current offset value to the re-measured offset value Sn and compensate for a current needed for the control of the electric motor in step S 320 . 
         [0045]    The above descriptions are only examples of the technical spirit of the present invention, so a person skilled in the art may implement various modifications and variations without departing from the spirit and scope of the present invention. 
         [0046]    Thus, embodiments disclosed herein are intended not to limit but to describe the technical spirit of the present invention and the scope of the technical spirit of the present invention is not limited to such embodiments. 
         [0047]    The scope of the present invention is defined by the appended claims, and all technical spirits within the equivalent scope are construed as being included in the scope of the right of the present invention. 
         [0048]    Any reference in this specification to “one embodiment,” “an embodiment,” “example embodiment,” etc., means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with any embodiment, it is submitted that it is within the purview of one skilled in the art to effect such feature, structure, or characteristic in connection with other ones of the embodiments. 
         [0049]    Although embodiments have been described with reference to a number of illustrative embodiments thereof, it should be understood that numerous other modifications and embodiments can be devised by those skilled in the art that will fall within the spirit and scope of the principles of this disclosure. More particularly, various variations and modifications are possible in the component parts and/or arrangements of the subject combination arrangement within the scope of the disclosure, the drawings and the appended claims. In addition to variations and modifications in the component parts and/or arrangements, alternative uses will also be apparent to those skilled in the art.