Rotational frequency calculation method
Patent Information
- Application Number
- JP2023139159
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2025-03-13
AI Technical Summary
【0008】 本発明によれば、モータの回転数を算出する手段に冗長性を持たせつつ、モータ制御装置のコスト上昇を抑制できる。
Smart Images

Figure 2025033439000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a rotation speed calculation method. [Background technology]
[0002] Conventionally, a technique for calculating the rotation speed of a motor using an R / D converter is known (see, for example, Patent Document 1). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2008-259347 A Summary of the Invention [Problem to be solved by the invention]
[0004] In order to ensure the safety of the motor control in the motor control device, the means for calculating the motor rotation speed needs to be redundant. However, since R / D converters are expensive, providing two R / D converters would result in an increase in the cost of the motor control device. [Means for solving the problem]
[0005] A rotation speed calculation method that achieves the above-mentioned object is provided in a motor control device including a battery that outputs DC power, an inverter that receives the DC power output from the battery, a motor that is supplied with AC power output from the inverter, a resolver that outputs an analog signal related to a rotation angle of a rotor of the motor, an A / D conversion circuit that converts the analog signal into a digital signal, and a control unit that controls operation of the inverter based on the digital signals converted by the A / D conversion circuit, which are a sine wave signal and a cosine wave signal related to the rotation angle of the rotor. The method of calculating the rotation speed of the motor executed by the control unit includes detecting a first event in which the sine wave signal crosses a threshold value, detecting a second event in which the cosine wave signal crosses a threshold value, detecting a third event in which the magnitude relationship between a sine rectified wave signal obtained by rectifying the sine wave signal and a cosine rectified wave signal obtained by rectifying the cosine wave signal is swapped, and calculating the rotation speed of the motor based on the number of times the first event, the second event, and the third event are detected within a predetermined time.
[0006] According to this configuration, it is possible to provide redundancy to the means for calculating the rotation speed of the motor, while suppressing an increase in the cost of the motor control device. In a rotation speed calculation method that achieves the above object, the thresholds may include a first threshold, a second threshold, and a third threshold, the first threshold being a median value of a resolution of the A / D conversion circuit, the second threshold being a maximum value of the sine wave signal or a value between the maximum value of the cosine wave signal and the first threshold, the third threshold being a minimum value of the sine wave signal or a value between the minimum value of the cosine wave signal and the first threshold, the first event being that the sine wave signal crosses any one of the first threshold, the second threshold, and the third threshold, and the second event being that the cosine wave signal crosses any one of the first threshold, the second threshold, and the third threshold. With this configuration, the rotation speed of a motor can be calculated with high accuracy.
[0007] In the rotation speed calculation method for achieving the above object, the motor control device further includes an R / D converter that calculates the rotation speed of the motor based on the analog signal, and when the rotation speed of the motor calculated based on the number of times differs from the rotation speed of the motor calculated by the R / D converter, the motor control device stops the motor. With this configuration, it is possible to improve safety related to the control of the motor. Effect of the Invention
[0008] According to the present invention, it is possible to suppress an increase in the cost of a motor control device while providing redundancy to the means for calculating the rotation speed of a motor. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a diagram used to explain the motor control device 1. [Diagram 2] FIG. 2 is a diagram used to explain various signals. [Diagram 3] FIG. 3 is a flowchart used to explain the process of second rotation speed calculation section 413. [Figure 4] FIG. 4 is a flowchart used to explain the sine wave threshold determination process. [Diagram 5] FIG. 5 is a flowchart used to explain the rectified wave inversion determination process. [Figure 6] FIG. 6 is a flowchart used to explain the rotation direction determination process. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] <Embodiment> Hereinafter, one embodiment of a rotation speed calculation method will be described with reference to FIGS. [Overall configuration] As shown in FIG. 1, a motor control device 1 that realizes a rotation speed calculation method includes a motor 10, an inverter 12, a battery 14, a resolver 22, an R / D converter 24, and a control device 40, for example.
[0011] The battery 14 supplies power to the inverter 12. The inverter 12 operates based on the control of the control device 40, thereby outputting three-phase AC power to the motor 10. The motor 10 rotates by the power supplied from the inverter 12.
[0012] The motor 10 is, for example, a permanent magnet type synchronous motor including a rotor and a stator. A resolver 22 is attached to the motor 10. The resolver 22 outputs a sine wave signal (hereinafter, Sin signal) 27 and a cosine wave signal (hereinafter, Cos signal) 28 corresponding to the rotation of the rotor of the motor 10. The Sin signal 27 and the Cos signal 28 are analog signals. The Sin signal 27 and the Cos signal 28 are input to an R / D converter 24 and a control device 40. In the motor 10 of this embodiment, the mechanical angle and the electrical angle are the same.
[0013] The R / D converter 24 calculates a rotation angle θ of the rotor of the motor 10 based on the sine signal 27 and the cosine signal 28. The R / D converter 24 outputs a signal indicating the calculated rotation angle θ to the control device 40.
[0014] The control device 40 is a device that controls the operation of the motor 10 while controlling the power supplied from the inverter 12 to the motor 10 by controlling the operation of the inverter 12. The control device 40 includes, for example, a control unit 41 and an A / D conversion circuit 42. The A / D conversion circuit 42 converts the analog sine signal 27 and cosine signal 28 output by the resolver 22 into digital sine signals 43 and cosine signals 44. Specifically, the A / D conversion circuit 42 converts the sine signal 27 and cosine signal 28 into sine signals 43 and cosine signals 44 by expressing them by values ranging from 0 to a predetermined magnitude. The value up to the predetermined magnitude is a value according to the resolution of the A / D conversion circuit 42. Hereinafter, it is assumed that the resolution of the A / D conversion circuit 42 is 12 [bit], and the sine signal 43 and cosine signal 44 are expressed by values ranging from 0 to 4096.
[0015] The control unit 41 is realized by, for example, a hardware processor such as a CPU (Central Processing Unit) executing a program (software). Some or all of these components may be realized by hardware (including circuitry) such as an LSI (Large Scale Integration), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a GPU (Graphics Processing Unit), or may be realized by a combination of software and hardware. The program may be stored in advance in a storage device (not shown) equipped with a non-transitory storage medium such as an HDD (Hard Disk Drive) or a flash memory equipped in the control device 40.
[0016] The control unit 41 includes, for example, an angle calculation unit 410, a first rotation speed calculation unit 411, a rectified wave generation unit 412, a second rotation speed calculation unit 413, and an inverter drive control unit 414. The angle calculation unit 410 calculates the angle of the rotor of the motor 10 based on the signal indicating the rotation angle θ output by the R / D converter 24. The angle calculation unit 410 outputs information indicating the calculated angle of the rotor of the motor 10 to the inverter drive control unit 414.
[0017] The first rotation speed calculation unit 411 calculates the rotation speed of the rotor of the motor 10 per unit time based on a signal indicating the rotation angle θ output by the R / D converter 24. The first rotation speed calculation unit 411 outputs information indicating the calculated rotation speed of the rotor of the motor 10 to the inverter drive control unit 414.
[0018] The rectified wave generating unit 412 generates a sine rectified wave signal 45 by converting the sine signal 43 into a rectified wave. The rectified wave generating unit 412 generates a cosine rectified wave signal 46 by converting the cosine signal 44 into a rectified wave. For example, the rectified wave generating unit 412 generates a sine rectified wave signal 45 from the sine signal 43 by identifying a median of values that the sine wave of the sine signal 43 can take based on one cycle of the sine signal 43 and subtracting the value of the sine signal 43 from a value obtained by doubling the identified median. The rectified wave generating unit 412 generates a cosine rectified wave signal 46 from the cosine signal 44 by identifying a median of values that the cosine wave of the cosine signal 44 can take based on one cycle of the cosine signal 44 and subtracting the value of the cosine signal 44 from a value obtained by doubling the identified median. As described above, the sine signal 43 and the cosine signal 44 are represented by values ranging from 0 to 4096. Therefore, the sine rectified wave signal 45 and the cosine rectified wave signal 46 can take values ranging from 2048 to 4096.
[0019] The second rotation speed calculation unit 413 calculates the rotation speed of the rotor of the motor 10 per unit time based on the sine signal 43 and the cosine signal 44 acquired from the A / D conversion circuit 42 and the sine rectified wave signal 45 and the cosine rectified wave signal 46 acquired from the rectified wave generation unit 412. Details of the processing by the second rotation speed calculation unit 413 will be described later. The second rotation speed calculation unit 413 outputs information indicating the calculated rotation speed of the rotor of the motor 10 to the inverter drive control unit 414.
[0020] The inverter drive control unit 414 appropriately controls the inverter 12 based on information indicating the rotation angle θ obtained from the angle calculation unit 410 and information indicating the rotation speed of the motor 10 per unit time obtained from the first rotation speed calculation unit 411 and the second rotation speed calculation unit 413.
[0021] [Examples of various signals] Prior to a detailed description of the processing by the second rotation speed calculation unit 413, the sine signal 43, the cosine signal 44, the rectified sine wave signal 45, and the rectified cosine wave signal 46 will be described below in detail.
[0022] 2 shows waveforms W1 to W4 representing changes over time of the sine signal 43, the cosine signal 44, the sine rectified wave signal 45, and the cosine rectified wave signal 46. Specifically, the waveform W1 represents the sine signal 43, the waveform W2 represents the sine rectified wave signal 45, the waveform W3 represents the cosine signal 44, and the waveform W4 represents the cosine rectified wave signal 46. As described above, the sine signal 43 and the cosine signal 44 are represented by values ranging from 0 to 4096, and the sine rectified wave signal 45 and the cosine rectified wave signal 46 can take values ranging from 2048 to 4096.
[0023] In the following description, 2048, which is the median value of 0 to 4096, is referred to as a first threshold TH1. The median value between the maximum value of the Sin signal 43 or the maximum value of the Cos signal 44 and the first threshold TH1 is referred to as a second threshold TH2. The median value between the minimum value of the Sin signal 43 or the minimum value of the Cos signal 44 and the first threshold TH1 is referred to as a third threshold TH3.
[0024] In the following description, the range from 0 to 4096 that is equal to or greater than the second threshold TH2 and up to 4096 will be referred to as the first range A1. The range that is less than the second threshold TH2 and equal to or greater than the first threshold TH1 will be referred to as the second range A2. The range that is less than the first threshold TH1 and equal to or greater than the third threshold TH3 will be referred to as the third range A3. The range that is less than the third threshold TH3 and up to 0 will be referred to as the fourth range A4.
[0025] In the following description, the first event Ps refers to the sine signal 43 indicated by the waveform W1 crossing any one of the first threshold TH1 to the third threshold TH3 as the waveform W1 changes over time. Specifically, the first event Ps-1 refers to the sine signal 43 crossing the first threshold TH1. The first event Ps-2 refers to the sine signal 43 crossing the second threshold TH2. The first event Ps-3 refers to the sine signal 43 crossing the third threshold TH3. In the example shown in FIG. 2, during one period TM of the sine wave from about 0.045 [sec] to about 0.075 [sec], the first event Ps occurs six times in the order of the first event Ps-2, the first event Ps-2, the first event Ps-1, the first event Ps-3, the first event Ps-3, and the first event Ps-1.
[0026] In the following description, the Cos signal 44 indicated by the waveform W3 crossing any one of the first threshold TH1 to the third threshold TH3 as the Cos signal 44 changes over time is referred to as the second event Pc. Specifically, the Cos signal 44 crossing the first threshold TH1 is referred to as the second event Pc-1. The Cos signal 44 crossing the second threshold TH2 is referred to as the second event Pc-2. The Cos signal 44 crossing the third threshold TH3 is referred to as the second event Pc-3. In the example shown in FIG. 2, during one period TM of the sine wave from about 0.045 [sec] to about 0.075 [sec], the second event Pc occurs six times in the order of the second event Pc-2, the second event Pc-1, the second event Pc-3, the second event Pc-3, the second event Pc-1, the second event Pc-2, ....
[0027] In the following description, the change in magnitude relationship between the sine rectified wave signal 45 indicated by the waveform W2 and the cosine rectified wave signal 46 indicated by the waveform W4 over time is referred to as a third event Pr. In the following description, when the first event Ps, the second event Pc, and the third event Pr are not to be distinguished from one another, they are simply referred to as events.
[0028] As shown in FIG. 3, during one period TM, the first event Ps occurs six times, the second event Pc occurs six times, and the third event Pr occurs four times, making a total of 16 events. As described above, the mechanical angle and the electrical angle of the motor 10 match. Therefore, the rotor of the motor 10 rotates once during one period TM of the sine wave indicated by the sine signal 43. In other words, the rotor of the motor 10 rotates once every 16 events. The second rotation speed calculation unit 413 calculates the rotation speed of the rotor of the motor 10 based on this mechanism.
[0029] [Processing of second rotation speed calculation unit 413] Hereinafter, the details of the process of the second rotation number calculation unit 413 will be described with reference to Fig. 3. The process shown in Fig. 3 is executed at predetermined time intervals. The predetermined time is, for example, the time that elapses from when the A / D conversion circuit 42 converts the sine signal 27 and the cosine signal 28 to the next conversion. In other words, the second rotation number calculation unit 413 executes the series of processes shown in Fig. 2 every time the A / D conversion circuit 42 converts the sine signal 27 and the cosine signal 28.
[0030] First, the second rotation speed calculation unit 413 acquires the sine signal 43 from the A / D conversion circuit 42 (step S100). The second rotation speed calculation unit 413 stores information indicating the value of the acquired sine signal 43 in the storage unit in the order of acquisition. Next, the second rotation speed calculation unit 413 acquires the cosine signal 44 from the A / D conversion circuit 42 (step S102). The second rotation speed calculation unit 413 stores information indicating the value of the acquired cosine signal 44 in the storage unit in the order of acquisition. The sine signal 43 acquired by the second rotation speed calculation unit 413 in step S100 and the cosine signal 44 acquired in step S102 are based on the sine signal 27 and the cosine signal 28 output by the resolver 22 at the same time.
[0031] Next, the second rotation number calculation unit 413 acquires the sine rectified wave signal 45 from the rectified wave generation unit 412 (step S104). The second rotation number calculation unit 413 stores information indicating the value of the acquired sine rectified wave signal 45 in the storage unit in the order of acquisition. Next, the second rotation number calculation unit 413 acquires the cosine rectified wave signal 46 from the rectified wave generation unit 412 (step S106). The second rotation number calculation unit 413 stores information indicating the value of the acquired cosine rectified wave signal 46 in the storage unit in the order of acquisition. The sine rectified wave signal 45 acquired by the second rotation number calculation unit 413 in step S104 is based on the sine signal 27 acquired in step S100. Moreover, the cosine rectified wave signal 46 acquired by the second rotation number calculation unit 413 in step S106 is based on the cosine signal 28 acquired in step S102.
[0032] [Sine wave threshold judgment processing] The sine wave threshold determination process will be described in detail below. Fig. 4 is a flowchart showing the details of the sine wave threshold determination process (step S108).
[0033] As shown in FIG. 4, the second rotation speed calculation unit 413 determines in which range the sine signal 43 is located among the first range A1 to the fourth range A4 based on the value of the sine signal 43 acquired in step S100 (step S200). Specifically, when the value indicated by the sine signal 43 is equal to or greater than the second threshold TH2, the second rotation speed calculation unit 413 determines that the sine signal 43 is located in the first range A1. When the value indicated by the sine signal 43 is less than the second threshold TH2 and equal to or greater than the first threshold TH1, the second rotation speed calculation unit 413 determines that the sine signal 43 is located in the second range A2. When the value indicated by the sine signal 43 is less than the first threshold TH1 and equal to or greater than the third threshold TH3, the second rotation speed calculation unit 413 determines that the sine signal 43 is located in the third range A3. When the value indicated by the sine signal 43 is less than the third threshold TH3, the second rotation speed calculation unit 413 determines that the sine signal 43 is located in the fourth range A4. The second rotation speed calculation unit 413 stores information indicating the identified ranges of the Sin signal 43 in the storage unit in the order in which they were identified.
[0034] Next, the second rotation speed calculation unit 413 calculates a sine signal noise flag based on the specified range of the sine signal 43 and the threshold area (step S202). The threshold area is information indicating the range of the sine signal 43 specified in step S200 in the previous series of processes. Hereinafter, the arrays indicating the threshold area and each of the first range A1 to the fourth range A4 are represented by 1-byte arrays. Also, each range can take a predetermined value. Specifically, the first range A1 takes the value of "0x03", the second range A2 takes the value of "0x06", the third range A3 takes the value of "0x0C", and the fourth range A4 takes the value of "0x18". The sine signal noise flag indicates the logical product of the array indicating the threshold area and the array indicating the range of the sine signal 43 among the first range A1 to the fourth range A4.
[0035] Here, the Sin signal 43 can be in the following three states, state (Z1) to state (Z3), as it changes over time. (Z1) Crosses multiple thresholds.
[0036] (Z2) The threshold is not crossed. (Z3) Cross one threshold. Of the three states (Z1) to (Z3) described above, the two states (Z2) to (Z3) are not affected by noise and show normal changes over time in the Sin signal 43. On the other hand, the state (Z1) is affected by noise and does not show normal changes over time in the Sin signal 43.
[0037] First, the possible values of the Sin signal noise flag in state (Z2) will be described. As described above, the threshold area is information indicating the range of the Sin signal 43 specified in step S200 in the previous series of processes. If the range of the current Sin signal 43 is the first range A1 and the state is (Z2), the Sin signal noise flag can take the logical product of the first range A1 "0x03" as the threshold area and the first range A1 "0x03" as the range of the Sin signal 43. Therefore, the Sin signal noise flag is "0x03". In other words, in the state (Z2), the threshold area and the range of the Sin signal 43 match, so the Sin signal noise flag, which is the logical product, matches the value indicating the threshold area and the value indicating the range of the Sin signal 43. Therefore, when in state (Z2), the Sin signal noise flag can take any of the following values: "0x03" indicating the first range A1, "0x06" indicating the second range A2, "0x0C" indicating the third range A3, and "0x18" indicating the fourth range A4.
[0038] Next, the possible values of the Sin signal noise flag in the state (Z3) will be described. As described above, the threshold area is information indicating the range of the Sin signal 43 specified in step S200 in the previous series of processes. If the range of the current Sin signal 43 is the first range A1 and the state (Z3) is one step over the first threshold TH1, the threshold area is the second range A2. In this case, the Sin signal noise flag can take the logical product of the second range A2 "0x06" as the threshold area and the first range A1 "0x03" as the range of the Sin signal 43. Therefore, the Sin signal noise flag is "0x02". If the range of the current Sin signal 43 is the second range A2 and the state (Z3) is one step over the first threshold TH1, the threshold area is the first range A1. In this case, the Sin signal noise flag can be a logical product of the first range A1 "0x03" as the threshold area and the second range A2 "0x06" as the range of the Sin signal 43. Therefore, the Sin signal noise flag is "0x02." That is, in state (Z3), in a state where the first threshold TH1 is crossed, the Sin signal noise flag takes the value of "0x02."
[0039] Similarly, in state (Z3), the possible value of the Sin signal noise flag when the second threshold TH2 is crossed by one is "0x04". Also, in state (Z3), the possible value of the Sin signal noise flag when the third threshold TH3 is crossed by one is "0x08".
[0040] Based on the above description, in the case of state (Z2), the Sin signal noise flag can take any one of values "0x03", "0x06", "0x0C", and "0x18". In addition, in the case of state (Z3), the Sin signal noise flag can take any one of values "0x02", "0x04", and "0x08".
[0041] On the other hand, in the state (Z1), all of the sine signal noise flags can take the value of "0x00". This is because the threshold area and the range of the sine signal 43 do not have adjacent ranges due to crossing multiple thresholds. Specifically, if the range of the current sine signal 43 is the first range A1 and the state is (Z1), the threshold area is a range other than the second range A2 that is not adjacent to the first range A1, for example, the third range A3. Therefore, the sine signal noise flag is the logical product of the third range A3 "0x0C" as the threshold area and the first range A1 "0x03" as the range of the sine signal 43, and is "0x00". Even if the sine signal 43 and the threshold area are different, in the state (Z1), all of the sine signal noise flags can take the value of "0x00".
[0042] In the following description, the values that the Sin signal noise flag can take, and which are the values in state (Z2) and state (Z3), "0x03", "0x06", "0x0C", "0x18", "0x02", "0x04", and "0x08", are also referred to as predetermined values. Also, the value that the Sin signal noise flag can take, and which is the value in state (Z1), "0x00" is also referred to as a value other than the predetermined value. Therefore, the Sin signal noise flag takes a predetermined value when no noise occurs in the Sin signal 43, and can take a value other than the predetermined value when noise occurs.
[0043] Next, the second rotation number calculation unit 413 determines whether the value of the Sin signal noise flag indicates that the Sin signal 43 is in the state (Z3) based on the Sin signal noise flag calculated in step S202 (step S204). That is, the second rotation number calculation unit 413 determines whether the Sin signal 43 is in a state where only one threshold is crossed. If the value of the Sin signal noise flag is a value that can be taken in the state (Z3), the second rotation number calculation unit 413 determines that no noise occurs and only one threshold is crossed, and proceeds to step S208. If the value of the Sin signal noise flag is not a value that can be taken in the state (Z3), the second rotation number calculation unit 413 determines that noise occurs in the Sin signal 43 or the threshold is not crossed, and does not execute the process of counting the first event Ps (step S206), ends the series of processes, and proceeds to step S110.
[0044] When the second rotation number calculation unit 413 determines that the value of the Sin signal noise flag indicates that the Sin signal 43 is in the state (Z3), it determines whether the threshold value crossed by the Sin signal 43 is different from the threshold value crossed last time (step S208). Here, depending on the type of noise, the Sin signal 43 may cross the same threshold value consecutively. In such a case, although the Sin signal 43 is in the state (Z3), it is not preferable to count the first event Ps. The second rotation number calculation unit 413 reads out information indicating the Sin signal noise flag identified in step S202 of the previous series of processing from the storage unit. In the following description, the Sin signal noise flag identified in step S202 of the previous series of processing will also be referred to as the previous Sin signal noise flag, and the Sin signal noise flag identified in step S202 of the current series of processing will also be referred to as the current Sin signal noise flag. The second rotation speed calculation unit 413 determines whether the value of the previous Sin signal noise flag that has been read out differs from the value of the current Sin signal noise flag.
[0045] As described above, when the Sin signal 43 is in the state (Z3), the Sin signal noise flag can take the values "0x02", "0x04", and "0x08" corresponding to the first threshold value TH1 to the third threshold value TH3. When the current Sin signal noise flag and the previous Sin signal noise flag match, the second rotation speed calculation unit 413 determines that the first event Ps has not been detected because the same threshold value has been crossed consecutively, and does not execute the process of counting the first event Ps (step S206), ends the series of processes, and proceeds to step S110.
[0046] If the current Sin signal noise flag and the previous Sin signal noise flag are different, the second rotation speed calculation unit 413 executes a process of counting the first event Ps by determining that the first event Ps has been detected (step S210). Specifically, the second rotation speed calculation unit 413 detects the first event Ps when any of the following situations (A1) to (A6) occurs.
[0047] (A1) When the range of the Sin signal 43 is the first range A1 and the current Sin signal noise flag is "0x02" indicating that the second threshold TH2 has been crossed, a first event Ps-2 of crossing the second threshold TH2 is detected.
[0048] (A2) When the range of the Sin signal 43 is the second range A2 and the current Sin signal noise flag is "0x02" indicating that the second threshold TH2 has been crossed, a first event Ps-2 of crossing the second threshold TH2 is detected.
[0049] (A3) When the range of the Sin signal 43 is the third range A3 and the current Sin signal noise flag is "0x04" indicating that the first threshold value TH1 has been crossed, a first event Ps-1 that crosses the first threshold value TH1 is detected.
[0050] (A4) When the range of the Sin signal 43 is the second range A2 and the current Sin signal noise flag is "0x04" indicating that the first threshold value TH1 has been crossed, a first event Ps-1 of crossing the first threshold value TH1 is detected.
[0051] (A5) When the range of the Sin signal 43 is the fourth range A4 and the current Sin signal noise flag is "0x08" indicating that the third threshold TH3 has been crossed, a first event Ps-3 that crossed the third threshold TH3 is detected.
[0052] (A6) When the range of the Sin signal 43 is the third range A3 and the current Sin signal noise flag is "0x08" indicating that the third threshold TH3 has been crossed, a first event Ps-3 that crossed the third threshold TH3 is detected.
[0053] Next, the second rotation speed calculation unit 413 updates the information indicating the previous Sin signal noise flag by storing the information indicating the current Sin signal noise flag identified in step S202 in the storage unit as information indicating the previous Sin signal noise flag (step S212). The second rotation speed calculation unit 413 ends the series of processes and proceeds to step S110 shown in FIG.
[0054] [Cos wave threshold judgment processing] Next, the second rotation speed calculation unit 413 executes a Cos wave threshold judgment process (step S110). The Cos wave threshold judgment process is the same as the Sin wave threshold judgment process. Therefore, for the Cos wave threshold judgment process of the second rotation speed calculation unit 413, in the description of the above-mentioned Sin wave threshold judgment process, the description of the Sin signal 43 should be replaced with the Cos signal 44, the description of the Sin signal noise flag should be replaced with the Cos signal noise flag, the description of the first event Ps should be replaced with the second event Pc, and the description of the first Sin signal should be replaced with the first Cos signal.
[0055] [Rectified wave inversion determination process] Next, the second rotation speed calculation unit 413 executes a rectified wave inversion determination process (step S112). Fig. 5 is a flowchart showing details of the rectified wave inversion determination process (step S112).
[0056] 5, the second rotation speed calculation unit 413 compares the sine rectified wave signal 45 with the cosine rectified wave signal 46 to determine whether the sine rectified wave signal 45 is greater than the cosine rectified wave signal 46 (step S300). The signals compared by the second rotation speed calculation unit 413 in step S300 are the sine rectified wave signal 45 acquired in step S104 and the cosine rectified wave signal 46 acquired in step S106.
[0057] When the second rotation speed calculation unit 413 determines that the value of the rectified sine wave signal 45 is greater than the value of the rectified cosine wave signal 46, it determines whether the rectified wave high sine flag is OFF (step S302). The rectified wave high sine flag is a flag that can take two values, ON or OFF. Specifically, the rectified wave high sine flag takes a value of "1" when it is ON, and takes a value of "0" when it is OFF. The rectified wave high sine flag is ON when the rectified sine wave signal 45 is greater than the cosine rectified wave signal 46 out of the rectified sine wave signal 45 and the cosine rectified wave signal 46, and is OFF when the rectified sine wave signal 45 is smaller than the cosine rectified wave signal 46. The second rotation speed calculation unit 413 reads out the rectified wave high sine flag from the storage unit and performs a determination process based on the value of the read rectified wave high sine flag.
[0058] When the second rotation speed calculation unit 413 determines that the rectified wave Sin high flag is ON (step S302; NO), it determines that the magnitude relationship between the Sin rectified wave signal 45 and the Cos rectified wave signal 46 has not been inverted and the third event Pr has not been detected, so it does not execute the process of counting the third event Pr (step S304), ends the series of processes, and proceeds to step S114.
[0059] When the second rotation speed calculation unit 413 determines that the rectified wave sine high flag is OFF (step S302; YES), it determines whether the rectified wave noise flag is OFF (step S306). The rectified wave noise flag is a flag that can take two values, ON or OFF. Specifically, the rectified wave noise flag takes a value of "1" when ON, and takes a value of "0" when OFF. The rectified wave noise flag is ON in step S312 of the previous series of processing, and is OFF when the sine signal 43 or the cosine signal 44 becomes the state (Z3) before step S300 of the current series of processing is executed. The second rotation speed calculation unit 413 reads the rectified wave noise flag from the storage unit and performs a determination process based on the value of the read rectified wave noise flag.
[0060] When the second rotation speed calculation unit 413 determines that the rectified wave noise flag is ON (step S306; NO), it determines that noise is occurring in at least one of the Sin signal 43 and the Cos signal 44, does not execute the process of counting the third event Pr (step S304), ends the series of processes, and proceeds to step S114.
[0061] When the second rotation speed calculation unit 413 determines that the rectified wave noise flag is OFF (step S306; YES), the third event Pr is detected by a reversal of the magnitude relationship between the sine rectified wave signal 45 and the cosine rectified wave signal 46, but since this is not influenced by noise, the second rotation speed calculation unit 413 executes a process of counting the third event Pr (step S310).
[0062] Next, the second rotation speed calculation unit 413 updates the rectified wave high sine flag to ON and stores it in the storage unit (step S310) in order to set the rectified wave high sine flag to a value appropriate to the current situation. Next, the second rotation speed calculation unit 413 updates the rectified wave noise flag to ON and stores it in the storage unit (step S312) in order to initialize the rectified wave noise flag. The second rotation speed calculation unit 413 ends the series of processes and proceeds to step S114 shown in FIG. 3.
[0063] When the second rotation speed calculation unit 413 determines that the value of the sine rectified wave signal 45 is smaller than the value of the cosine rectified wave signal 46, it determines whether the rectified wave sine high flag is ON (step S314). When the second rotation speed calculation unit 413 determines that the rectified wave sine high flag is OFF (step S314; NO), it determines that the magnitude relationship between the sine rectified wave signal 45 and the cosine rectified wave signal 46 is not inverted and the third event Pr has not been detected, and does not execute the process of counting the third event Pr (step S304), ends the series of processes, and proceeds to step S114.
[0064] When it is determined that the rectified wave Sin high flag is ON (step S314; YES), the second rotation speed calculation unit 413 determines whether or not the rectified wave noise flag is OFF (step S306).
[0065] When the second rotation speed calculation unit 413 determines that the rectified wave noise flag is ON (step S316; NO), it determines that noise is occurring in at least one of the Sin signal 43 and the Cos signal 44, does not execute the process of counting the third event Pr (step S304), ends the series of processes, and proceeds to step S114.
[0066] When the second rotation speed calculation unit 413 determines that the rectified wave noise flag is OFF (step S316; YES), the third event Pr is detected by the inversion of the magnitude relationship between the sine rectified wave signal 45 and the cosine rectified wave signal 46, but the third event Pr is not affected by noise, and the second rotation speed calculation unit 413 executes a process of counting the third event Pr (step S318). In order to set the rectified wave sine high flag to a value corresponding to the current situation, the second rotation speed calculation unit 413 updates the rectified wave sine high flag to OFF and stores it in the storage unit (step S320), and proceeds to the process of step S312.
[0067] [Rotation direction determination process] Next, the second rotation speed calculation unit 413 executes a rotation direction determination process (step S114). Prior to a detailed description of the rotation direction determination process, a method for determining the rotation method will be described. In general, the motor 10 rotates in the forward direction under the following conditions (B1) and (B2). Moreover, the motor 10 rotates in the reverse direction under the following conditions (C1) and (C2).
[0068] (B1) When the sine signal 43 changes from less than the first threshold TH1 to equal to or greater than the first threshold TH1, the cosine signal 44 is equal to or greater than the first threshold TH1. (B2) When the sine signal 43 changes from equal to or greater than the first threshold TH1 to less than the first threshold TH1, the cosine signal 44 is less than the first threshold TH1.
[0069] (C1) When the sine signal 43 changes from less than the first threshold TH1 to equal to or greater than the first threshold TH1, the cosine signal 44 is less than the first threshold TH1. (C2) When the sine signal 43 changes from equal to or greater than the first threshold TH1 to less than the first threshold TH1, the cosine signal 44 is equal to or greater than the first threshold TH1.
[0070] The second rotation speed calculation unit 413 determines the rotation method of the motor 10 based on the conditions (B1) to (B2) and the conditions (C1) to (C2). Fig. 6 is a flowchart showing details of the rotation direction determination process (step S114) As shown in Fig. 6, second rotation number calculation unit 413 determines whether or not conditions (D1) to (D3) are satisfied (step S400).
[0071] (D1) The value of the Sin signal 43 is equal to or greater than the first threshold value TH1. (D2) The value of the first Sin signal is equal to or greater than the first threshold TH1. (D3) The value of the second Sin signal is equal to or greater than the first threshold TH1.
[0072] The second Sin signal is the Sin signal 43 acquired in step S100 when the series of processes before last was executed. That is, the Sin signal 43 is acquired in the order of the second Sin signal, the first Sin signal, and the Sin signal 43.
[0073] The second rotation speed calculation unit 413 reads out information indicating the first sine signal and information indicating the second sine signal from the storage unit. The second rotation speed calculation unit 413 determines whether or not the conditions (D1) to (D3) are satisfied based on the sine signal 43 acquired in step S102 and the read out first sine signal and second sine signal.
[0074] When it is determined that the conditions (D1) to (D3) are satisfied (step S400; YES), the second rotation speed calculation unit 413 assumes that no noise has occurred in the sine signal 43 in the current, previous, and previous-previous processing, and determines whether the sine wave height flag is OFF or not (step S402). The sine wave height flag is a flag that can take two values, ON or OFF. Specifically, the sine wave height flag takes a value of "1" when it is ON, and takes a value of "0" when it is OFF. The sine wave height flag is ON when the sine signal 43 is equal to or greater than the first threshold value TH1, and is OFF when the sine signal 43 is less than the first threshold value TH1. The second rotation speed calculation unit 413 reads out the sine wave height flag from the storage unit and performs a determination process based on the value of the read sine wave height flag.
[0075] If the second rotation speed calculation unit 413 determines that the conditions (D1) to (D3) are satisfied (step S400; YES) and that the Sin wave height flag is OFF (step S402; YES), it assumes that the Sin signal 43 has changed from less than the first threshold value TH1 to greater than or equal to the first threshold value TH1, and proceeds to step S404.
[0076] Next, the second rotation speed calculation unit 413 updates the sine wave height flag to ON and stores it in the storage unit (step S404) in order to set the sine wave height flag to a value that corresponds to the current situation. Specifically, since the current and the two most recent sine signals 43 are both equal to or greater than the first threshold value TH1 in step S400, the second rotation speed calculation unit 413 determines that the sine signal 43 is not influenced by noise and has a value equal to or greater than the first threshold value TH1, and updates the sine wave height flag to ON.
[0077] Next, the second rotation speed calculation unit 413 judges whether the Cos wave height flag is ON or not (step S406). The Cos wave height flag is a flag that can take two values, ON or OFF. Specifically, the Cos wave height flag takes a value of "1" when it is ON, and takes a value of "0" when it is OFF. The Cos wave height flag is ON when the Cos signal 44 is equal to or greater than the first threshold value TH1, and is OFF when the Cos signal 44 is less than the first threshold value TH1. The second rotation speed calculation unit 413 reads out the Cos wave height flag from the storage unit and performs a judgment process based on the value of the read out Cos wave height flag.
[0078] When the second rotation speed calculation unit 413 determines that the Cosine wave height flag is ON, it determines that the condition (B1) is satisfied and that the motor 10 is rotating in the forward direction (step S408). When the second rotation speed calculation unit 413 determines that the Cosine wave height flag is OFF, it determines that the condition (C1) is satisfied and that the motor 10 is rotating in the reverse direction (step S410).
[0079] When it is determined that the conditions (D1) to (D3) are not satisfied (step S400; NO), second rotation speed calculation unit 413 determines whether or not the conditions (E1) to (E3) are satisfied (step S412).
[0080] (E1) The value of the Sin signal 43 is less than the first threshold TH1. (E2) The value of the first Sin signal is less than the first threshold TH1. (E3) The value of the second Sin signal is less than the first threshold TH1.
[0081] The second rotation speed calculation unit 413 determines whether or not the conditions (E1) to (E3) are satisfied based on the acquired Sin signal 43 and the read first Sin signal and second Sin signal. When it is determined that the conditions (E1) to (E3) are satisfied (step S412; YES), the second rotation speed calculation unit 413 assumes that no noise has occurred in the sine signal 43 in the current, previous, and previous-previous processing, and determines whether the sine wave height flag is ON or not (step S414). The second rotation speed calculation unit 413 reads out the sine wave height flag from the storage unit and performs a determination process based on the value of the read out sine wave height flag.
[0082] If the second rotation speed calculation unit 413 determines that the conditions (E1) to (E3) are satisfied (step S412; YES) and that the Sin wave height flag is ON (step S414; YES), it assumes that the Sin signal 43 has changed from greater than or equal to the first threshold value TH1 to less than the first threshold value TH1, and proceeds to step S416.
[0083] Next, the second rotation speed calculation unit 413 updates the sine wave height flag to OFF and stores it in the storage unit (step S416) in order to set the sine wave height flag to a value corresponding to the current situation. Specifically, since the current and the two most recent sine signals 43 are both less than the first threshold value TH1 in step S412, the second rotation speed calculation unit 413 determines that the sine signal 43 is not influenced by noise and has a value less than the first threshold value TH1, and updates the sine wave height flag to OFF.
[0084] Next, second rotation number calculation unit 413 determines whether or not the Cos wave height flag is ON (step S418). Second rotation number calculation unit 413 reads the Cos wave height flag from the storage unit and performs a determination process based on the value of the read Cos wave height flag.
[0085] When the second rotation speed calculation unit 413 determines that the Cosine wave height flag is ON, it determines that the condition (C2) is satisfied and determines that the motor 10 is rotating in the reverse direction (step S420). When the second rotation speed calculation unit 413 determines that the Cosine wave height flag is OFF, it determines that the condition (B2) is satisfied and determines that the motor 10 is rotating in the forward direction (step S422).
[0086] If the second rotation speed calculation unit 413 does not satisfy the conditions (D1) to (D3) (step S400; NO) and does not satisfy the conditions (E1) to (E3) (step S412; NO), noise occurs in the sine signal 43, the first sine signal, or the second sine signal, and the rotation direction of the motor 10 cannot be determined based on this information, and the process proceeds to step S424. If the second rotation speed calculation unit 413 satisfies the conditions (D1) to (D3) (step S400; YES) and the sine wave height flag is ON (step S402; NO), the second rotation speed calculation unit 413 determines that the rotation direction of the motor 10 has not changed from the previously determined rotation direction or that the rotation direction of the motor 10 cannot be determined based on this information, and the process proceeds to step S424. Furthermore, if the conditions (E1) to (E3) are satisfied (step S412; YES) and the Sin wave height flag is OFF (step S414; NO), the second rotation speed calculation unit 413 proceeds to step S424, assuming that the rotation direction of the motor 10 has not changed from the previously determined rotation direction or that the rotation direction of the motor 10 cannot be determined based on this information.
[0087] The second rotation speed calculation unit 413 determines whether or not the conditions (F1) to (F3) are satisfied (step S424). (F1) The value of the Cos signal 44 is equal to or greater than the first threshold value TH1.
[0088] (F2) The value of the first Cos signal is equal to or greater than the first threshold TH1. (F3) The value of the second Cos signal is equal to or greater than the first threshold value TH1. The second Cos signal is the Cos signal 44 acquired in step S102 when a series of processes was executed two times before last. That is, the Cos signal 44 is acquired in the order of the second Cos signal, the first Cos signal, and the Cos signal 44.
[0089] The second rotation number calculation unit 413 reads out information indicating the first Cos signal and information indicating the second Cos signal from the storage unit. The second rotation number calculation unit 413 judges whether or not the conditions (F1) to (F3) are satisfied based on the Cos signal 44 acquired in step S102 and the first and second Cos signals that have been read out. When the second rotation number calculation unit 413 judges that the conditions (F1) to (F3) are satisfied (step S424; YES), it considers that no noise has occurred in the Cos signal 44 in the current, previous, and previous-previous processing. Next, the second rotation number calculation unit 413 turns on the Cos wave height flag and stores it in the storage unit (step S426) in order to set the Cos signal noise flag to a value that corresponds to the current situation.
[0090] When it is determined that the conditions (F1) to (F3) are not satisfied (step S424; NO), the second rotation speed calculation unit 413 determines whether or not the conditions (E1) to (E3) are satisfied (step S428).
[0091] (E1) The value of the Cos signal 44 is less than the first threshold TH1. (E2) The value of the first Cos signal is less than the first threshold TH1. (E3) The value of the second Cos signal is less than the first threshold TH1.
[0092] When the second rotation number calculation unit 413 determines that the conditions (E1) to (E3) are satisfied (step S428; YES), it considers that no noise has occurred in the Cos signal 44 in the current, previous, and previous-previous processing. Next, the second rotation number calculation unit 413 turns off the Cos wave height flag and stores it in the storage unit (step S430) in order to set the Cos signal noise flag to a value that corresponds to the current situation. On the other hand, when the second rotation number calculation unit 413 determines that neither the conditions (F1) to (F3) nor the conditions (E1) to (E3) are satisfied, it determines that noise has occurred in the Cos signal 44, the first Cos signal, or the second Cos signal, and based on this information, it determines that the Cos wave height flag cannot be updated, and proceeds to the process of step S432.
[0093] Next, the second rotation speed calculation unit 413 updates the first sine signal, the second sine signal, the first Cos signal, and the second Cos signal (step S432). Specifically, the second rotation speed calculation unit 413 updates the first sine signal and the second sine signal by storing the value of the sine signal 43 acquired in step S100 as the value of the first sine signal in the storage unit while storing the value of the first Cos signal in the storage unit as the value of the second Cos signal. The second rotation speed calculation unit 413 also updates the first Cos signal and the second Cos signal by storing the value of the Cos signal 44 acquired in step S102 as the first Cos signal in the storage unit while storing the value of the first Cos signal in the storage unit as the value of the second Cos signal. Then, the second rotation speed calculation unit 413 ends the series of processes and proceeds to step S116.
[0094] [Rotation speed calculation process] Next, the second rotation number calculation unit 413 executes a rotation number calculation process (step S116). The second rotation number calculation unit 413 calculates the rotation number of the motor 10 by substituting the number of identified events into the following formula (1).
[0095] Revolutions per minute (rpm) = (number of counted events / predetermined time) x 60 / number of events per revolution (1) The number of counted events in formula (1) is the number of events counted in steps S210, S308, and S310 within a predetermined time from when step S116 was executed in the previous process until when step S116 is executed in the current process. The predetermined time in formula (1) is the time from when step S116 was executed in the previous process until when step S116 is executed in the current process. As described above, in this example, the number of events per rotation is 16 in total, including 6 first events Ps, 6 second events Pc, and 4 third events Pr. The second rotation speed calculation unit 413 outputs information indicating the calculated rotation speed of the motor 10 per unit time to the inverter drive control unit 414, and ends the series of processes.
[0096] [Effects of the embodiment] According to the above embodiment, the following effects can be obtained. (1) The second rotation speed calculation unit 413 executes the following: detecting a first event Ps in which the sine signal 43 crosses a threshold value; detecting a second event Pc in which the cosine signal 44 crosses a threshold value; detecting a third event Pr in which the magnitude relationship between the sine rectified wave signal 45 obtained by rectifying the sine signal 43 and the cosine rectified wave signal 46 obtained by rectifying the cosine signal 44 is switched; and calculating the rotation speed of the motor 10 based on the number of times the first event Ps, the second event Pc, and the third event Pr are detected within a predetermined time. With this configuration, the rotation speed calculation method can provide redundancy to the means for calculating the rotation speed of the motor 10 without providing a new R / D converter 24. In addition, since the rotation speed calculation method does not provide a new R / D converter 24, it is possible to suppress an increase in the cost of the motor control device 1.
[0097] Furthermore, in order to accurately calculate the rotation speed of the motor 10, it is preferable to set a large number of events per rotation. In the rotation speed calculation method of this embodiment, by detecting the third event Pr, it is possible to set more events using the Sin signal 43 and the Cos signal 44 without making structural changes such as introducing a new signal from the outside. Therefore, with this configuration, the rotation speed calculation method can accurately calculate the rotation speed of the motor 10.
[0098] Furthermore, noise may occur in the sine signal 43 or the cosine signal 44, and depending on the type of noise, it may temporarily cross the first threshold value TH1 to the third threshold value TH3 and be counted as the first event Ps or the second event Pc. In the rotation speed calculation method of this embodiment, the sine signal noise flag, the cosine signal noise flag, and the rectified wave noise flag are used to determine whether noise occurs in the sine signal 43 or the cosine signal 44. Then, in the rotation speed calculation method, if it is determined that noise occurs in the sine signal 43, the cosine signal 44, the rectified sin wave signal 45, and the cosine rectified wave signal 46, a process is executed not to count the event. As a result, the rotation speed calculation method is not affected by noise and can calculate the rotation speed of the motor 10 with higher accuracy.
[0099] Furthermore, noise may occur in the sine signal 43 and the cosine signal 44, and depending on the type of noise, conditions (D1) to (D3) or conditions (E1) to (E3) may not be satisfied. In the rotation speed calculation method of this embodiment, only when conditions (D1) to (D3) or conditions (E1) to (E3) are satisfied, a process for determining the rotation direction of the motor 10 is executed. This allows the rotation speed calculation method to be unaffected by noise and to more accurately determine the rotation direction of the motor 10.
[0100] (2) The thresholds include a first threshold TH1, a second threshold TH2, and a third threshold TH3. The first threshold TH1 is the median of the resolution of the A / D conversion circuit 42. The second threshold TH2 is a value between the maximum value of the Sin signal 43 or the Cos signal 44 and the first threshold TH1. The third threshold TH3 is a value between the minimum value of the Sin signal 43 or the Cos signal 44 and the first threshold TH1. The first event Ps is when the Sin signal 43 crosses any one of the first threshold TH1, the second threshold TH2, and the third threshold TH3. The second event Pc is when the Cos signal 44 crosses any one of the first threshold TH1, the second threshold TH2, and the third threshold TH3.
[0101] Here, in order to calculate the rotation speed of the motor 10 with high accuracy, it is preferable to set a large number of events per rotation. In the rotation speed calculation method configured as above, three thresholds, a first threshold TH1 to a third threshold TH3, are used to detect the first event Ps and the second event Pc. This allows the number of first events Ps and second events Pc per rotation to be increased three times as compared to the case where one threshold is used. Therefore, the rotation speed calculation method can calculate the rotation speed of the motor 10 with high accuracy compared to the case where two or less thresholds are used.
[0102] The above-described embodiments may be modified as follows: The above-described embodiments and the following examples may be combined with each other as long as they are not technically inconsistent. Although the second rotation number calculation unit 413 counts an event when it crosses any of the three thresholds of the first threshold TH1 to the third threshold TH3, the present invention is not limited to this. The second rotation number calculation unit 413 may count an event using only one of the first threshold TH1 to the third threshold TH3. The second rotation number calculation unit 413 may count an event using any two of the first threshold TH1 to the third threshold TH3. The second rotation number calculation unit 413 may count an event based on a number of thresholds that is greater than three. The number of ranges is the number of thresholds + 1. The number of first events Ps and second events Pc per rotation included in the formula (1) corresponds to the number of thresholds.
[0103] Although the second threshold TH2 is the median between the maximum value of the Sin signal 43 or the Cos signal 44 and the first threshold TH1 in the above description, the present invention is not limited to this. The second threshold TH2 may be any value between the maximum value of the Sin signal 43 or the Cos signal 44 and the first threshold TH1.
[0104] Although the third threshold TH3 is the median between the minimum value of the Sin signal 43 or the Cos signal 44 and the first threshold TH1, the present invention is not limited to this. The third threshold TH3 may be any value between the minimum value of the Sin signal 43 or the Cos signal 44 and the first threshold TH1.
[0105] If the rotation speed of the motor 10 is slow, the time it takes to execute the processes of steps S100 to S114 once may not be enough to count events. In this case, the second rotation number calculation unit 413 may execute the process of step S116 after repeatedly executing the processes of steps S100 to S114 multiple times. With this configuration, the second rotation number calculation unit 413 can count the rotation number of the motor 10 with high accuracy.
[0106] If there is no noise in the sine signal 43 or the cosine signal 44, or if there is noise in the sine signal 27 and the cosine signal 28 but the A / D conversion circuit 42 can generate the sine signal 43 and the cosine signal 44 from which the influence has been removed, the second rotation speed calculation unit 413 does not need to execute processing that takes into account the influence of noise. Specifically, the second rotation speed calculation unit 413 does not need to execute some or all of the processes of steps S202 to S204, steps S306, S316, and S312, and steps S400, S412, S424, and S426.
[0107] Although the case where the inverter drive control unit 414 appropriately controls the inverter 12 based on the information indicating the rotation speed of the motor 10 acquired from the first rotation speed calculation unit 411 and the second rotation speed calculation unit 413 has been described, the present invention is not limited to this. The inverter drive control unit 414 stops the motor 10 when the information indicating the rotation speed of the motor 10 acquired from the first rotation speed calculation unit 411 and the information indicating the rotation speed of the motor 10 acquired from the second rotation speed calculation unit 413 differ. Here, when the information indicating the rotation speed of the motor 10 acquired from the first rotation speed calculation unit 411 and the information indicating the rotation speed of the motor 10 acquired from the second rotation speed calculation unit 413 differ, there is a high possibility that a problem has occurred in either the R / D converter 24 or the processing of the second rotation speed calculation unit 413. With this configuration, the rotation speed calculation method can improve safety related to the control of the motor 10.
[0108] The technical ideas that can be understood from the above-described embodiment and modified examples will be described. [Aspect 1] In a motor control device including a battery that outputs DC power, an inverter that receives the DC power output from the battery, a motor that is supplied with AC power output from the inverter, a resolver that outputs an analog signal related to a rotation angle of a rotor of the motor, an A / D conversion circuit that converts the analog signal into a digital signal, and a control unit that controls operation of the inverter based on the digital signals converted by the A / D conversion circuit, which are a sine wave signal and a cosine wave signal related to the rotation angle of the rotor, a method of calculating a rotation speed of the motor executed by the control unit includes detecting a first event in which the sine wave signal crosses a threshold, detecting a second event in which the cosine wave signal crosses a threshold, detecting a third event in which the magnitude relationship between a rectified sine wave signal obtained by rectifying the sine wave signal and a rectified cosine wave signal obtained by rectifying the cosine wave signal is swapped, and calculating the rotation speed of the motor based on the number of times the first event, the second event, and the third event are detected within a predetermined time.
[0109] [Aspect 2] The rotation speed calculation method according to [Aspect 1], wherein the thresholds include a first threshold, a second threshold, and a third threshold, the first threshold being a median of the resolution of the A / D conversion circuit, the second threshold being a maximum value of the sine wave signal, or a value between the maximum value of the cosine wave signal and the first threshold, the third threshold being a minimum value of the sine wave signal, or a value between the minimum value of the cosine wave signal and the first threshold, the first event being the sine wave signal crossing any of the first threshold, the second threshold, and the third threshold, and the second event being the cosine wave signal crossing any of the first threshold, the second threshold, and the third threshold.
[0110] [Aspect 3] The motor control device further includes an R / D converter that calculates the rotation speed of the motor based on the analog signal, and if the rotation speed of the motor calculated based on the number of times differs from the rotation speed of the motor calculated by the R / D converter, the motor is stopped; and the rotation speed calculation method described in [Aspect 1] or [Aspect 2]. [Explanation of symbols]
[0111] θ...rotation angle, A1...first range, A2...second range, A3...third range, A4...fourth range, Ps, Ps-1, Ps-2, Ps-3...first event, Pc, Pc-1, Pc-2, Pc-3...second event, Pr...third event, TH1...first threshold, TH2...second threshold, TH3...third threshold, W1, W2, W3, W4...waveform, 1...motor control device, 10...motor, 12...inverter, 14...battery, 22...resolver, 24...R / D converter, 27...sine signal, 27...sine wave signal, 28...cosine signal, 28...cosine wave signal, 40...control device, 41...control unit, 42...A / D conversion circuit, 43...sine signal, 44...cosine signal, 45...sine rectified wave signal, 46...cosine rectified wave signal, 410...angle calculation unit, 411...first rotation speed calculation unit, 412...rectified wave generation unit, 413...second rotation speed calculation unit, 414...inverter drive control unit.
Claims
1. A motor control device including a battery that outputs DC power, an inverter that receives the DC power output from the battery, a motor that receives the AC power output from the inverter, a resolver that outputs an analog signal related to a rotation angle of a rotor of the motor, an A / D conversion circuit that converts the analog signal into a digital signal, and a control unit that controls operation of the inverter based on digital signals converted by the A / D conversion circuit, which are sine wave signals and cosine wave signals related to the rotation angle of the rotor, comprising: Detecting a first event where the sinusoidal signal crosses a threshold; detecting a second event where the cosine signal crosses a threshold; and detecting a third event in which a magnitude relationship between a rectified sine wave signal obtained by rectifying the sine wave signal and a rectified cosine wave signal obtained by rectifying the cosine wave signal is swapped; calculating a rotation speed of the motor based on the number of times the first event, the second event, and the third event are detected within a predetermined time; A method for calculating rotation speed, comprising:
2. the threshold values include a first threshold value, a second threshold value, and a third threshold value; the first threshold is a median of the resolution of the A / D conversion circuit, the second threshold value is a value between a maximum value of the sine wave signal or a maximum value of the cosine wave signal and the first threshold value, the third threshold value is a value between a minimum value of the sine wave signal or a minimum value of the cosine wave signal and the first threshold value, the first event is the sine wave signal crossing any one of the first threshold, the second threshold, and the third threshold; the second event is the cosine wave signal crossing any one of the first threshold, the second threshold, and the third threshold; The method for calculating the rotation speed according to claim 1 .
3. the motor control device further includes an R / D converter that calculates a rotation speed of the motor based on the analog signal, When the rotation speed of the motor calculated based on the number of times differs from the rotation speed of the motor calculated by the R / D converter, the control unit stops the motor; The method for calculating the rotation speed according to claim 1 , further comprising:
Citation Information
Patent Citations
Motor control device
JP2008259347A