Rotation angle detection device and rotation angle detection method
The rotation angle detection device corrects for continuous ripple detection errors by measuring current, extracting ripples, and calculating estimated periods to accurately determine the DC motor's angle.
Patent Information
- Application Number
- JP2022030834
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-03-01
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-03-01
AI Technical Summary
Conventional rotation angle detection devices fail to correctly detect the rotation angle of a DC motor when there are continuous erroneous or missed detections of ripples in the ripple waveform.
A rotation angle detection device that measures current flowing through a DC motor, extracts ripple components, detects ripples, and calculates an estimated period based on observation periods to correct for measurement errors using equations (1) and (3) to accurately determine the rotation angle.
The device can accurately detect the rotation angle of a DC motor even with continuous erroneous or missed ripple detections, ensuring precise motor angle determination.
Smart Images

Figure 0007772464000007 
Figure 0007772464000008 
Figure 0007772464000009
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a rotation angle detection device and a rotation angle detection method. [Background technology]
[0002] A conventional rotation angle detection device includes a filter unit with a variable cutoff frequency that extracts current ripples contained in the armature current of a DC motor to determine a ripple waveform, a ripple period detection unit that determines a ripple period based on the ripple waveform, and a cutoff frequency control unit that controls the cutoff frequency of the filter unit based on the ripple period. The ripple period detection unit includes a ripple period calculation unit that sequentially calculates the ripple period based on the ripple waveform, an array creation / update unit that creates and sequentially updates a time-series array having a certain number of chronologically consecutive ripple periods as array elements, an array element sorting unit that sorts the ripple periods in the time-series array in order of magnitude to create an ascending-order or descending-order array, and a center selection average calculation unit that calculates an average of the center ripple periods remaining after removing a predetermined number of ripple periods from the front and back of the ascending-order or descending-order array, and sets the average of the center ripple periods as an average ripple period. The cutoff frequency control unit controls the cutoff frequency of the filter unit based on the average ripple period.
[0003] The ripple period detection unit has at least one correction means, namely, a ripple loss correction means and a ripple increase correction means, downstream of the ripple period calculation means, and the ripple loss correction means determines that a ripple loss has occurred in which the current ripple in the ripple waveform cannot be detected when the latest ripple period is larger than a loss determination value obtained by multiplying the average ripple period by a predetermined magnification greater than 1 and less than 2, and passes two loss correction periods obtained by dividing the latest ripple period by 2 to the array creating and updating means. The ripple increase correction means determines that a ripple increase in which noise indistinguishable from the current ripple is superimposed on the ripple waveform has occurred when the latest ripple period is smaller than an increase determination value obtained by multiplying the average ripple period by a predetermined magnification less than 1, and passes an increase correction period obtained by adding the latest ripple period and the next ripple period to be detected to the array creating and updating means (see, for example, Patent Document 1). [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Laid-Open No. 2011-109880 Summary of the Invention [Problem to be solved by the invention]
[0005] In a conventional rotation angle detection device, if a ripple increase (false ripple detection) in which noise that cannot be distinguished from the current ripple is superimposed on the ripple waveform occurs two or more times during one ripple period, the device cannot correctly correct the false ripple detection and cannot correctly detect the rotation angle of the DC motor.Furthermore, if a ripple is not detected in the ripple waveform two or more consecutive times, the device cannot correctly correct the missed ripple detection and cannot correctly detect the rotation angle of the DC motor.
[0006] Therefore, an object of the present invention is to provide a rotation angle detection device and a rotation angle detection method that can correctly detect the rotation angle of a DC motor even if erroneous detection of ripples or failure to detect ripples occurs continuously. [Means for solving the problem]
[0007] A rotation angle detection device according to an embodiment of the present disclosure includes a current measurement unit that measures a current flowing through a DC motor, a filter that extracts ripple components from the current, a ripple detection unit that detects ripples from a signal that has passed through the filter, and a rotation angle detection unit that detects a rotation angle of the DC motor based on the number of ripples detected by the ripple detection unit. The rotation angle detection unit measures an observation period, which is the time interval between successive ripples, based on the ripples detected by the ripple detection unit, and calculates an estimated period, which is the true period of the successive ripples, from the observation period. The rotation angle detection unit determines whether the observation period is within a normal range based on the estimated period and the observation period. If the observation period is within the normal range and the previous observation period is not within the normal range, the rotation angle detection unit calculates a correction ripple number CRN for correcting the ripple number based on the following equation (1).
[0008] CRN=TRN-SN (1) where TRN is the value obtained by dividing the cumulative total of the observation periods during an abnormal period in which the observation period is continuously determined not to be within the normal range by the estimated period, and is the estimated number of ripples during the abnormal period, and SN is the number of ripples detected by the ripple detection unit during a period in which the observation period is continuously determined not to be within the normal range. [Effects of the Invention]
[0009] It is possible to provide a rotation angle detection device and a rotation angle detection method that can correctly detect the rotation angle of a DC motor even if erroneous detection of ripples or failure to detect ripples occurs continuously. [Brief explanation of the drawings]
[0010] [Figure 1] 1 is a diagram illustrating a rotation angle detection device according to an embodiment. [Figure 2] FIG. 10 is a diagram showing the time variations of the voltage, current, and ripple of a DC motor after the DC motor is turned on. [Figure 3A] FIG. 10 is a diagram illustrating an example of a ripple observation period. [Figure 3B] FIG. 3B is a table summarizing the operations of FIG. 3A. [Figure 4A] 10A and 10B are diagrams illustrating specific examples of the number of detected ripples, correction values, and cumulative errors. [Figure 4B] 10A and 10B are diagrams illustrating specific examples of the number of detected ripples, correction values, and cumulative errors. [Figure 5A] 10 is a flowchart illustrating an example of a process executed by a rotation angle detection unit to detect the rotation angle of a DC motor. [Figure 5B] 10 is a flowchart illustrating an example of a process executed by a rotation angle detection unit to detect the rotation angle of a DC motor. [Figure 6] 10 is a flowchart illustrating an example of a ripple period measurement process. [Figure 7] 10 is a flowchart illustrating an example of an estimated period calculation process. [Figure 8] 10 is a flowchart illustrating an example of an accumulation process. [Figure 9] 10 is a flowchart illustrating an example of a process for calculating an estimated number of ripples. [Figure 10] 10 is a flowchart illustrating an example of an abnormality warning process. [Figure 11A] 10 is a flowchart illustrating an example of processing executed by a rotation angle detection unit to detect the rotation angle of a DC motor in a modified example of the embodiment. [Figure 11B] 10 is a flowchart illustrating an example of processing executed by a rotation angle detection unit to detect the rotation angle of a DC motor in a modified example of the embodiment. [Figure 12] 10 is a flowchart illustrating an example of a ripple period measurement process according to a modified example. [Figure 13]10 is a flowchart illustrating an example of an estimated period calculation process according to a modified example. [Figure 14] 10 is a flowchart illustrating an example of an accumulation process according to a modified example. [Figure 15] 10 is a flowchart illustrating an example of a process for calculating an estimated number of ripples in a modified example. [Figure 16] 10 is a flowchart illustrating an example of an abnormality warning process according to a modified example. DETAILED DESCRIPTION OF THE INVENTION
[0011] Hereinafter, an embodiment to which the rotation angle detection device and the rotation angle detection method of the present disclosure are applied will be described.
[0012] <Embodiment> 1 is a diagram showing a rotation angle detection device 100 according to an embodiment. The electric motor whose rotation angle is detected by the rotation angle detection device 100 is not limited to an electric motor that drives a power window of a vehicle, but here, as an example, a form in which the rotation angle detection device 100 according to the embodiment is used as a rotation angle detection device for a power window electric motor will be described.
[0013] 1 shows a rotation angle detection device 100, as well as a DC (Direct Current) motor 10, a resistor 15, a drive circuit 20, a DC power supply 30, a power window 50, and a drive mechanism 51. The DC motor 10 is an example of a DC motor.
[0014] DC motor 10 has terminals 11 and 12, and is driven by a drive circuit 20 connected to terminals 11 and 12. Resistor 15 is connected to terminal 12 of DC motor 10 and is used to detect the current of DC motor 10. Drive circuit 20 drives DC motor 10 with DC power supplied from a DC power supply 30. Drive circuit 20 drives DC motor 10 by being controlled by a drive controller (not shown), but the drive controller is omitted here.
[0015] The power window 50 is a power window for a vehicle, and is opened and closed by a driving force transmitted from the rotor of the DC motor 10 via a driving mechanism 51. The driving mechanism 51 is provided inside the door panel of the vehicle, and is a mechanical mechanism such as a regulator that converts the rotational force of the rotor of the DC motor 10 into a driving force for the power window 50 in the up and down directions.
[0016] The rotation angle detection device 100 includes a filter circuit 110, an IC (Integrated Circuit) chip 120, and a microcomputer .
[0017] The filter circuit 110 has LPFs (Low Pass Filters) 111 and 112. The voltage between terminals 11 and 12 of the DC motor 10 is input to the LPF 111, which removes high-frequency noise and the like contained in the voltage and outputs the voltage to the microcomputer 130. The voltage between both ends of the resistor 15 is input to the LPF 112 as a voltage representing the current of the DC motor 10, which removes high-frequency noise and the like contained in the voltage and outputs the voltage to the microcomputer 130.
[0018] The IC chip 120 has a BPF (Band Pass Filter) 121 and a ripple detection unit 122. The voltage across the resistor 15 is input to the BPF 121 as a voltage representing the current of the DC motor 10, and high-frequency noise and low-frequency noise contained in the voltage are removed before outputting the result to the ripple detection unit 122. The BPF 121 performs filtering to extract ripple components from the voltage representing the current of the DC motor 10. The ripple detection unit 122 performs ripple detection processing to detect ripples contained in the data representing the current input from the BPF 121, converts the ripples into pulses, and outputs the pulses to the microcomputer 130.
[0019] The microcomputer 130 has A / D (Analog to Digital) converters 131 and 132, and a processing unit 133. The microcomputer 130 is realized by a computer including a CPU (Central Processing Unit), RAM (Random Access Memory), ROM (Read Only Memory), an input / output interface, an internal bus, etc. The A / D converters 131 and 132 and the processing unit 133 represent the functions of a program executed by the microcomputer 130 as functional blocks.
[0020] The A / D converter 131 converts the output of the LPF 111 into a digital signal and outputs it to the processing unit 133. Since the output of the LPF 111 represents the voltage of the DC motor 10, the output of the A / D converter 131 is digital data representing the voltage value of the DC motor 10.
[0021] The A / D converter 132 converts the output of the LPF 112 into a digital signal and outputs it to the processing unit 133. Since the output of the LPF 112 is a signal representing the current of the DC motor 10, the output of the A / D converter 132 is digital data representing the current value of the DC motor 10.
[0022] The processing unit 133 has a current measuring unit 133A, a rotation angle detecting unit 133B, and a memory 133C. The current measuring unit 133A and the rotation angle detecting unit 133B are functional blocks that represent the functions of a program executed by the microcomputer 130. The memory 133C is a functional block that represents the memory of the microcomputer 130.
[0023] The current measuring unit 133A performs a current measurement process to measure the current flowing through the DC motor 10 based on the output of the A / D converter 132. The current measuring unit 133A outputs data representing the measured current value to the rotation angle detecting unit 133B.
[0024] The rotation angle detection unit 133B performs a rotation angle detection process to obtain the rotation angle of the DC motor 10 based on the output (voltage value) of the A / D converter 131, the output (current value) of the current measurement unit 133A, and the pulse (ripple) input from the ripple detection unit 122. The rotation angle of the rotor of the DC motor 10 is synonymous with the rotation angle of the DC motor 10.
[0025] Also, during the process of detecting the rotation angle, the rotation angle detection unit 133B obtains the observation period and the estimated period of the ripple based on the pulse (ripple) input from the ripple detection unit 122. The observation period is the period from the time when the ripple one before the ripple (the latest ripple) to be calculated for the observation period is detected to the time when the latest ripple is detected, and is the time interval between consecutive ripples. The estimated period is an estimated value of the true period excluding the influence of measurement errors from the observation period of the ripple. For example, for the DC motor 10 where ripples occur every 60 degrees, it is the time estimated to have rotated 60 degrees. In addition to the above-described processing, the rotation angle detection unit 133B executes the processing shown in the flowcharts of FIGS. 5A to 10. Details of these will be described later.
[0026] The memory 133C stores programs and data used when the current measurement unit 133A and the rotation angle detection unit 133B execute processing, the output (voltage value) of the A / D converter 131, the output (current value) of the current measurement unit 133A, and data of the pulse input from the ripple detection unit 122, etc.
[0027] <The voltage V, current i, and ripple RP of the DC motor 10> FIG. 2 is a diagram showing the time changes of the voltage V, current i, and ripple RP of the DC motor 10 after the DC motor 10 is turned on. In FIG. 2, the horizontal axis is time t (seconds). The vertical axis shows the voltage value of the voltage V, the current value of the current i, and the value (unitless) obtained by normalizing the amplitude of the pulse of the ripple RP.
[0028] Voltage V is the voltage between terminals 11 and 12 of DC motor 10, and is the voltage input to LPF 111. Current i is the current input from DC motor 10 to LPF 112. Ripple RP is a ripple pulse that is generated by ripple detection unit 122 detecting ripples contained in data representing the current input from BPF 121 and converting them into pulses.
[0029] When the DC motor 10 is turned on at time t=0.1 seconds and the rotor begins to rotate, the voltage V rises from 0 V and the current i rises from 0 A. For example, the voltage V is approximately constant at about 10 V. The current i rises sharply immediately after the DC motor 10 is turned on and then attenuates. After time t=approximately 0.17 seconds, a ripple is superimposed on the DC component of approximately 10 A. As described above, a value indicating the magnitude of the current i that has passed through the LPF 112 is input to the processing unit 133. Therefore, the value indicating the magnitude of the current i input to the processing unit 133 is approximately constant at about 10 A, excluding ripple and noise. The ripple RP gradually increases in number of pulses and the intervals between pulses (period) gradually shorten from time t=0.1 seconds when the DC motor 10 is turned on to approximately 0.13 seconds, after which the intervals between pulses become approximately constant.
[0030] When the DC motor 10 is turned off at time t = approximately 0.47 seconds, the voltage V drops to 0 V, and the current i becomes 0 A at time t = approximately 0.52 seconds after a negative current flows due to the back electromotive force. As for the ripple RP, a short pulse occurs after the DC motor 10 is turned off because the DC motor 10 rotates a short distance by inertia.
[0031] When the DC motor 10 is rotating, if the ripple detection unit 122 detects ripples RP normally, ripples RP corresponding to the rotation angle of the rotor of the DC motor 10 are generated, and the rotation angle detection unit 133B accurately detects the rotation angle of the rotor of the DC motor 10. The rotation angle of the rotor is detected by counting the number of ripples RP.
[0032] However, if the ripple detection unit 122 erroneously detects noise or the like as a ripple RP, or if the ripple RP is not correctly detected, a ripple RP corresponding to the rotation angle of the rotor of the DC motor 10 will not be generated, and the rotation angle detection unit 133B will not accurately detect the rotation angle of the rotor of the DC motor 10. The noise erroneously detected as a ripple RP by the ripple detection unit 122 is noise that has passed through the BPF 121.
[0033] The following describes a method for accurately correcting the rotation angle of the rotor of the DC motor 10 and detecting the correct rotation angle when erroneous detection or missed detection of ripples occurs. The rotation angle detection device 100 can correctly detect the rotation angle of the DC motor 10 even if erroneous detection or missed detection of ripples occurs continuously.
[0034] <Method for detecting rotation angle using rotation angle detection device 100> FIG. 3A is a diagram illustrating an example of a ripple observation period. In FIG. 3A, the horizontal axis represents time t. In the upper part of FIG. 3A, the vertical axis represents the length of the observation period and the length of the estimated period. In the upper part of FIG. 3A, pulses of the observation period (diamond marker ◇) and the estimated period (black circle marker ●) are shown at the timing when a ripple is detected. Since the observation period is calculated each time a ripple is detected, the observation period is the period from the detection time of the ripple immediately before the latest ripple to the detection time of the latest ripple. The estimated period is an estimate of the observation period estimated for the latest ripple.
[0035] 3A shows pulses that rise at the time when a ripple is detected. The pulse width of each pulse indicates the period during which the current value of the DC motor 10 is equal to or greater than the threshold at which the ripple is detected by the ripple detection unit 122. The numbers #1 to #12 of each pulse indicate the order in which the ripples are detected.
[0036] In the example shown in Figure 3A, the ripple #3 is a false detection of noise, so the observation period of the ripple #3 is extremely short compared to the others. When a false detection of a ripple occurs like this, the number of detected ripples will be greater than the number of true ripples. Also, because a noise detection miss occurred between the ripples #10 and #11, the observation period of #11 is extremely long compared to the others. When a ripple detection miss occurs like this, the number of detected ripples will be fewer than the number of true ripples.
[0037] Figure 3B is a table summarizing the operation of Figure 3A. Figure 3B shows the observed period T(i), estimated period Te(i), deviation D(i) (%), and estimated number of ripples TRN for ripples detected with ripple numbers #1 to #12. i represents ripple number #1 to #12. Note that (i) represents an arbitrary subscript in the array.
[0038] Here, the deviation D(i) represents the degree of deviation between the observed period T(i) and the estimated period Te(i), and is a value used as an index for determining whether the i-th ripple is a correctly detected ripple. The deviation D(i) is expressed by the following equation (1). The deviation D(i) is calculated by the rotation angle detection unit 133B.
[0039]
number
[0040] The deviation D(i) is calculated by dividing the absolute value of the difference between the observation period T(i) and the estimated period Te(i) by the estimated period Te(i). If the deviation D(i) is equal to or less than the first threshold TH1, the i-th ripple is a correctly detected ripple, and if it is greater than the first threshold TH1, the i-th ripple is not a correctly detected ripple but is treated as a false detection or missed detection. The rotation angle detection unit 133B determines whether the deviation D(i) is equal to or less than the first threshold TH1. The first threshold TH1 is an example of a predetermined threshold.
[0041] If the deviation D(i) is equal to or smaller than the first threshold TH1, the rotation angle detection unit 133B determines that the observation period T is within the normal range, and if the deviation D(i) is greater than the first threshold TH1, the rotation angle detection unit 133B determines that the observation period T is not within the normal range. The first threshold TH1 may be set depending on the operating environment of the DC motor 10, but is generally a value of about 20% to 30%. As an example, a case will be described here in which the first threshold TH1 is 25%. In the following, a period during which the rotation angle detection unit 133B continuously determines that the deviation D(i) is greater than the first threshold TH1 will be referred to as an abnormal period. The abnormal period is a period during which the observation period T is continuously determined not to be within the normal range.
[0042] The estimated ripple number TRN can be calculated according to the following equation (2). The estimated ripple number TRN is calculated by the rotation angle detection unit 133B. The estimated ripple number TRN is an estimate of the true number of ripples in a period that includes times when ripples are falsely detected or missed. For example, in the case of a DC motor 10 in which ripples occur every 60 degrees, the estimated ripple number TRN is 1 when it is estimated that the motor has rotated 60 degrees, and the estimated ripple number TRN is 2 when it is estimated that the motor has rotated 120 degrees.
[0043]
number
[0044] The estimated number of ripples TRN is calculated by dividing the cumulative total of the observation periods T (the numerator in equation (2)) during the abnormal period in which the observation period T is continuously determined not to be within the normal range by the average value of the estimated period Te during the abnormal period (the denominator in equation (2)). SN in equation (2) is the number of ripples detected by the ripple detection unit 122 during the abnormal period in which the rotation angle detection unit 133B continuously determines that the observation period T is not within the normal range.
[0045] The observation period T in which ripples were normally detected after the abnormal period may be added to the numerator ΣT of equation (2). In this case, the estimated period Te in which ripples were normally detected after the abnormal period is added to the denominator ΣTe of equation (2), and 1, the number of ripples normally detected after the abnormal period, is added to SN. In this way, the estimated number of ripples TRN can be calculated for the period that combines the abnormal period and the observation period T in which ripples were normally detected after the abnormal period. In addition, the corrected number of ripples CRN, which will be described later, is calculated by subtracting the number of observed ripples SN from the estimated number of ripples TRN. Therefore, if the period used to calculate the estimated number of ripples TRN and the period used to measure the number of observed ripples SN are matched, the corrected number of ripples CRN can be calculated correctly.
[0046] For example, if the estimated period Te continues to have the same value, the latest estimated period Te(i) may be used instead of the average value of the estimated period Te(i) during the abnormal period in the denominator of equation (2).
[0047] As shown in Figure 3, among the ripples with ripple numbers #1 to #12, the observation periods T of correctly detected ripples #1 to #2, #5 to #10, and #12 are 1400 μs or 1500 μs, while the observation periods T(i) of incorrectly detected ripples #3, #4, and #11 are 800 μs, 600 μs, and 2900 μs, respectively. The estimated period Te(i) is 1400 μs for all ripples #1 to #12.
[0048] The deviation D(i) calculated according to equation (1) is below the first threshold value TH1 (25%) for correctly detected ripples #1 to #2, #5 to #10, and #12, but is 42.9%, 57.1%, and 107%, respectively, for ripples #3, #4, and #11 that are not correctly detected, all of which are greater than the first threshold value TH1 (25%).
[0049] #3 and #4 are abnormal periods, and for this abnormal period, the estimated number of ripples TRN calculated according to equation (2) is 1. Therefore, it can be determined that the observation period T of the ripples in #3 and #4 that are not correctly detected is actually one observation period, and the estimated number of ripples TRN is 1.
[0050] Also, #11 is an abnormal period, and during this abnormal period, the estimated number of ripples TRN calculated according to equation (2) is 2. Therefore, it can be determined that the observation period T of the ripples in #29 that were not correctly detected is actually two observation periods, and the true number of ripples (estimated number of ripples TRN) is 2.
[0051] To obtain the estimated number of ripples TRN during the abnormal period, the number of ripples during the abnormal period can be corrected. The rotation angle detection unit 133B corrects the number of ripples used to detect the rotation angle of the DC motor 10, using the corrected number of ripples CRN expressed by the following equation (3).
[0052]
number
[0053] The corrected ripple number CRN takes a negative value if the number of ripples detected by the ripple detection unit 122 during an abnormal period in which a false detection occurs and the observation period T is continuously determined not to be within the normal range is greater than the true number of ripples (estimated number of ripples TRN).Furthermore, the corrected ripple number CRN takes a positive value if the number of ripples detected by the ripple detection unit 122 during a period in which a detection error occurs and the observation period T(i) is continuously determined not to be within the normal range is less than the true number of ripples (estimated number of ripples TRN).
[0054] <Specific examples of the number of detected ripples, the correction ripple number CRN, and cumulative error> Figures 4A and 4B are diagrams showing specific examples of the number of detected ripples, the correction ripple number CRN, and the cumulative error. In Figures 4A and 4B, the horizontal axis represents time t (seconds). Figure 4B is an enlarged view of the period from 3.01 seconds to 3.07 seconds in Figure 4A. The values shown in Figures 4A and 4B were obtained by simulation.
[0055] 4A shows, from top to bottom, the drive current, the standard ripple, the detected ripple, the correction ripple number CRN, and the accumulated error, which is the same as in FIG. 4B.
[0056] The drive current is the drive current of the DC motor 10. The standard ripple is not the ripple that is actually detected, but a signal that is output when the angle measured by an angle sensor attached to the experimental DC motor 10 is within a specified range. The standard ripple is set to be output at the timing when a ripple is detected under normal conditions. The standard ripple indicates the ripple that is normally detected when the DC motor 10 rotates. Here, the standard ripple is shown for comparison with the detection pulse.
[0057] The detected ripple represents the ripple detected by the ripple detection unit 122. The corrected ripple number CRN indicates the value of the corrected ripple number CRN calculated for the detected ripple. The corrected ripple number CRN shown in FIGS. 4A and 4B is a value calculated by equation (3) using the standard ripple as the estimated ripple number TRN. The cumulative error is an error in the number of ripples that may be cumulatively included in the rotation angle of the DC motor 10 that is finally detected after correcting the rotation of the DC motor 10 with the corrected ripple number CRC.
[0058] As shown in FIG. 4A, the DC motor 10 turns on at approximately 0.7 seconds, and the drive current, standard ripple, detected ripple, correction ripple number CRN, and cumulative error begin to fluctuate. As shown in FIG. 4B, two consecutive ripple detection errors occur between 3.01 and 3.02 seconds, but a correction ripple number CRN that removes the two ripples is generated. Also, two consecutive ripple detection errors occur between 3.02 and 3.03 seconds, but a correction ripple number CRN that adds two ripples is generated. Furthermore, a correction ripple number CRN that removes one ripple is generated between 3.06 and 3.07 seconds. While calculating the correction ripple number CRN in this manner, the rotation angle detection unit 133B detects the rotation angle of the DC motor 10.
[0059] As shown in Figure 4A, at approximately 5 seconds, the DC motor 10 is turned off and stopped. The cumulative error at this point is +4 ripples, which is the maximum cumulative error. Then, after 6 seconds, the DC motor 10 is turned on again, and at approximately 7.5 seconds, it is turned off. When the DC motor 10 is driven in this manner, the final cumulative error is +1 ripple, confirming that the rotation angle of the DC motor 10 can be detected with very high accuracy.
[0060] In this way, even if erroneous detection or missed detection of ripples occurs consecutively, such as when erroneous detection of ripples occurs twice consecutively between 3.01 seconds and 3.02 seconds, or when missed detection of ripples occurs twice consecutively between 3.02 seconds and 3.03 seconds, the rotation angle of the DC motor 10 can be detected correctly.
[0061] <Flowchart> 5A and 5B are flowcharts showing an example of processing executed by the rotation angle detection unit 133B to detect the rotation angle of the DC motor 10. The rotation angle detection unit 133B executes the processing shown in Fig. 5A and 5B once in accordance with one cycle in which a ripple is detected, thereby repeatedly executing the processing shown in Fig. 5A and 5B.
[0062] The rotation angle detection unit 133B measures the period of the ripple (step S1). The period of the ripple measured in step S1 is the observation period T(i). The observation period T(i) is the period from the detection time of the ripple immediately before the latest ripple to the detection time of the latest ripple. Step S1 is a subroutine process, the details of which will be described later using FIG. 6.
[0063] The rotation angle detection unit 133B calculates the estimated period Te(Cur) (step S2). Step S2 is a subroutine process, the details of which will be described later with reference to FIG. 7. Cur is a value representing a generation, and corresponds to the generation of the observation period T measured in step S1 before step S2, and corresponds to the ripple number i in equations (1) and (2). In the following, Cur will be used instead of the ripple number i. Cur is a cyclic value, and as an example, the description will be given assuming that it takes on values from 1 to 9.
[0064] The rotation angle detection unit 133B calculates the deviation D(Cur) based on the formula (1) (step S3). The formula (1) can be expressed as the following formula (4) using Cur.
[0065]
number
[0066] The rotation angle detection unit 133B determines whether the deviation D(Cur) is equal to or smaller than the first threshold value TH1 (D≦TH1) (step S4).
[0067] If the rotation angle detection unit 133B determines that the deviation D(Cur) is equal to or smaller than the first threshold TH1 (S4: Yes), it sets the determination result TR(Cur) as to whether the ripple is correct to True (step S5A). That is, TR(Cur)=True.
[0068] The rotation angle detection unit 133B determines whether Cur is 1 (Cur=1) (step S6).
[0069] If the rotation angle detection unit 133B determines that Cur=1 (S6: Yes), it determines whether TR(PolNum)=False (step S7A). PolNum is the maximum value of Cur, and is 9 here as an example. The processing in step S7A is processing for determining whether the determination result TR of the generation immediately preceding Cur is False. Since Cur is a cyclic value that takes on values from 1 to 9, if Cur=1, the determination result of the generation immediately preceding Cur determined in step S7A will be TR(TR(PolNum)), the determination result of the generation where Cur=PolNum.
[0070] When the rotation angle detection unit 133B determines that TR(PolNum)=False (S7A: Yes), it performs accumulation processing (step S8A). The processing in step S8A is a subroutine processing, and is processing for accumulating the number of ripples SN during an abnormal period in which the observation period T is continuously determined not to be within the normal range, the accumulated value ΣT(i) of the observation period T(i) during the abnormal period, and the accumulated value ΣTe(i) of the estimated period Te(i) during the abnormal period. Details of the subroutine processing in step S8A will be described later with reference to FIG. 8. Furthermore, when the rotation angle detection unit 133B finishes the processing in step S8A, it causes the flow to proceed to step S9.
[0071] If the rotation angle detection unit 133B determines in step S7A that TR(PolNum)=False is not true (S7A: No), the flow proceeds to step S13. If step S4 is Yes and step S7A is False, this means that the observation period T has been within the normal range continuously. Therefore, if step S7A is No, accumulation processing and the like are not performed.
[0072] Furthermore, if the rotation angle detection unit 133B determines in step S6 that Cur is not 1 (S6: No), it determines whether TR(Cur-1)=False (step S7B). Cur-1 represents the generation immediately before the current Cur. The processing in step S7B is processing for determining whether the determination result TR(Cur-1) of the generation immediately before Cur is False.
[0073] If the rotation angle detection unit 133B determines that TR(Cur-1)=False (S7B: Yes), the flow proceeds to step S8A. If the rotation angle detection unit 133B determines that TR(Cur-1)=False is not true (S7B: No), the flow proceeds to step S13. If step S4 is Yes and step S7B is False, this means that the observation period T(Cur) has been within the normal range consecutively. Therefore, if step S7B is No, accumulation processing, etc. is not performed.
[0074] Following the processing of step S8A, the rotation angle detection unit 133B calculates the estimated number of ripples TRN (step S9). If it is determined in step S4 that the deviation D(Cur) is equal to or less than the first threshold TH1 (S4: Yes) after erroneous detection or missed detection of ripples occurred up to the previous generation, this is the first generation in which the ripple observation period has returned to the normal range, and it becomes possible to calculate the estimated number of ripples TRN according to equation (2). Furthermore, before step S9, calculation of Σ in the numerator and denominator of equation (2) is performed in step S8A of the accumulation processing. The processing of step S9 is a subroutine processing, and details will be described later using FIG. 9.
[0075] The rotation angle detection unit 133B uses the estimated ripple number TRN calculated in step S9 and the ripple number SN during the abnormal period to calculate the corrected ripple number CRN according to equation (3) (step S10). Equation (3) is CRC=TRN-SN.
[0076] The rotation angle detection unit 133B resets the values accumulated in the accumulation process of step S8A (step S11). In step S11, the number of ripples SN during the abnormal period, the accumulated value ΣT(i) of the observation period T(i), and the accumulated value ΣTe(i) of the estimated period Te(i), which were accumulated in the accumulation process of step S8A, are reset to zero.
[0077] The rotation angle detection unit 133B corrects the rotation angle R of the DC motor 10 by adding the correction ripple number CRN to the rotation angle R (step S12). R = R + CRN. The rotation angle R is an angle measured in units of ripple generation intervals. For example, in the case of a three-phase, six-slot DC motor, the rotation angle R = 1 corresponds to 60 [deg] or π / 3 [rad]. Furthermore, when used in an electric motor for a power window, the rotation angle R is used as window position data.
[0078] The rotation angle detection unit 133B adds 1 to the rotation angle R (step S13). That is, the rotation angle R = R + 1. Since one ripple is detected while performing the processes shown in Figures 5A and 5B, 1 corresponding to one ripple is added to the rotation angle R.
[0079] The rotation angle detection unit 133B outputs the rotation angle R to an ECU (Electric Control Unit) that controls the power window 50 of the vehicle (step S14).
[0080] The rotation angle detection unit 133B performs an abnormality warning process (step S15). The process of step S15 is a subroutine process, the details of which will be described later with reference to FIG.
[0081] Furthermore, if rotation angle detection unit 133B determines in step S4 that deviation D(Cur) is not equal to or less than first threshold value TH1 (S4: No), it sets the determination result TR(Cur) of whether the ripple is correct to False (step S5B). That is, TR(Cur)=False. After completing the process of step S5B, rotation angle detection unit 133B advances the flow to step S8B.
[0082] The rotation angle detection unit 133B performs accumulation processing (step S8B). The processing of step S8B is a subroutine processing similar to the processing of step S8A, and is processing for accumulating the number of ripples SN during the abnormal period, the accumulated value ΣT(i) of the observation period T(i), and the accumulated value ΣTe(i) of the estimated period Te(i). Details of the subroutine processing of step S8B are similar to the subroutine processing of step S8A and will be described later using FIG. 8. Furthermore, after completing the processing of step S8B, the rotation angle detection unit 133B causes the flow to proceed to step S13. If the deviation D(Cur) is large and erroneous detection or detection failure of ripples occurs, the flow passes through step S5B. In this case, the estimated number of ripples TRN is not immediately calculated, so accumulation processing is performed in step S8B, and the flow then proceeds to step S13.
[0083] Next, a ripple period measurement process, which is a process for measuring the observation period T, will be described with reference to Fig. 6. Fig. 6 is a flowchart showing an example of the ripple period measurement process.
[0084] The rotation angle detection unit 133B determines whether a ripple has been detected by the ripple detection unit 122 (step S101). If the rotation angle detection unit 133B determines that a ripple has not been detected (S101: No), it repeatedly executes the process of step S101 until a ripple is detected.
[0085] When it is determined that a ripple has been detected (S101: Yes), the rotation angle detection unit 133B sets the time CTime (Current Time) at which the latest ripple was detected as the current time (step S102).
[0086] The rotation angle detection unit 133B measures the latest observation period T by subtracting the time PTime (Previous Time) when the previous ripple was detected from the time CTime when the latest ripple was detected (step S103). The latest observation period T is the latest ripple period. That is, T = CTime - PTime.
[0087] The rotation angle detection unit 133B sets the time PTime to the time CTime for use in the next control cycle (step S104). That is, PTime=CTime.
[0088] The rotation angle detection unit 133B increments Pol, which indicates the generation of array A for storing (holding) past measurement periods T for each generation (step S105). That is, Pol = Pol + 1. Array A is configured, for example, as a ring buffer and holds a predetermined number of generations of measurement periods T(i). Therefore, when the latest measurement period T is added, the oldest measurement period T(i) included in array A is deleted. In this way, the generation Pol of array A becomes newer by one by adding the latest measurement period T, so Pol is incremented in step S105. Note that the generation Pol of array A that stores the measurement periods T for each generation is a cyclic value, and its maximum value is PolNum.
[0089] The rotation angle detection unit 133B determines whether the generation Pol of the array A has exceeded PolNum (step S106). That is, the rotation angle detection unit 133B determines whether Pol>PolNum.
[0090] If the rotation angle detection unit 133B determines that the generation Pol of array A has exceeded PolNum (S106: Yes), it sets the generation Pol of array A to 1 (step S107). That is, Pol=1. After completing the process of step S107, the rotation angle detection unit 133B advances the flow to step S108.
[0091] If the rotation angle detection unit 133B determines in step S106 that the generation Pol of array A does not exceed PolNum (S106: No), the flow proceeds to step S108.
[0092] The rotation angle detection unit 133B sets the observation period T(Pol) of the generation Pol to the latest observation period T calculated in step S103 (step S108). That is, T(Pol)=T.
[0093] The rotation angle detection unit 133B determines whether the value of the generation Pol is greater than Wid (step S109), that is, whether Pol>Wid.
[0094] If the rotation angle detection unit 133B determines that the value of the generation Pol is greater than Wid (S109: Yes), it sets Cur to Pol - Wid (step S110A). That is, Cur = Pol - Wid. The measurement period T(i) of a slightly older generation is used. In the estimated period calculation in FIG. 7, which will be described later, values before and after Cur are used. For this reason, for example, if the median value of nine measurement periods T(i) is used as the estimated period, Wid is set to 4 in order to use four values before and four values after.
[0095] If the rotation angle detection unit 133B determines in step S109 that Pol is not greater than Wid (S109: No), it sets Cur to Pol-Wid+PolNum (step S110B). That is, Cur=Pol-Wid+PolNum. The measurement period T of a slightly older generation is used.
[0096] This completes the subroutine processing of the ripple period measurement processing shown in FIG.
[0097] Next, the estimated period calculation process, which is a process for calculating the estimated period Te, will be described with reference to Fig. 7. Fig. 7 is a flowchart illustrating an example of the estimated period calculation process.
[0098] The rotation angle detection unit 133B updates the length-ordered array of Wid values before and after the time series of the observation period T(i) (step S121). For example, if the value of Wid is 4, in an array in which nine observation periods T, each including four values before and four values after the observation period T(Cur), are arranged in order of period length, the latest observation period T(Pol) overwrites the oldest observation period T(i). Then, the periods are sorted in order of longest period.
[0099] The rotation angle detection unit 133B assigns the median value of the observation periods T included in the array updated in step S121 to the estimated period Te(Cur) (step S122). In the process of step S122, the median value of the array of Wid values before and after the time series of the observation period T(Cur), which was updated in the process of step S121 and is arranged in order of length, is assigned to the estimated period Te(Cur). For example, in an array in which nine observation periods T(Cur) are arranged in order of period length as described above, the median value of the fifth longest observation period is assigned to the estimated period Te(Cur).
[0100] This completes the subroutine processing of the estimated period calculation processing shown in FIG.
[0101] Next, the accumulation process will be described with reference to Fig. 8. Fig. 8 is a flowchart showing an example of the accumulation process. The accumulation process shown in Fig. 8 is a subroutine process of steps S8A and S8B.
[0102] The rotation angle detection unit 133B increments SN (step S131). That is, SN=SN+1. SN is the number of ripples detected during the abnormal period.
[0103] The rotation angle detection unit 133B adds the observation period T(Cur) to the cumulative value ΣT of the observation period T (step S132). That is, ΣT = ΣT + T(Cur). Since the latest estimated period Te(Cur) is the estimated period Te(Cur) at a point in time going back Wid periods (for example, four periods), the observation period T(Cur) is also the period going back Wid periods from the latest observation period T(Pol).
[0104] The rotation angle detection unit 133B adds the latest estimated period Te(Cur) to the cumulative value ΣTe of the estimated period Te (step S133). That is, ΣTe=ΣTe+Te(Cur).
[0105] This completes the subroutine processing of the accumulation processing shown in FIG.
[0106] Next, a process for calculating the estimated ripple number TRN will be described with reference to Fig. 9. Fig. 9 is a flowchart showing an example of a process for calculating the estimated ripple number TRN. The process shown in Fig. 9 is a subroutine process of step S9.
[0107] The rotation angle detection unit 133B calculates the value of the estimated ripple number TRN according to equation (2) (step S141).
[0108] The rotation angle detection unit 133B calculates the estimated ripple number TRN by performing a process of rounding the value of the estimated ripple number TRN obtained in step S141 (step S142). The rounding process is, for example, a process of rounding off a value after the decimal point to an integer.
[0109] This completes the process of calculating the estimated ripple number TRN shown in FIG.
[0110] Next, the abnormality warning process will be described with reference to Fig. 10. Fig. 10 is a flowchart showing an example of the abnormality warning process. The process shown in Fig. 10 is a subroutine process of step S15.
[0111] The rotation angle detection unit 133B resets to zero an error number (EN) that indicates the number of times that erroneous detection or missed detection of a ripple occurs during one rotation of the rotor of the DC motor 10 (step S151).
[0112] The rotation angle detection unit 133B performs a loop process from steps S152 to S157 (step S152). In this loop process, a variable i ranging from 1 to CPolNum is used, and the loop process is repeated CPolNum times while varying the variable i from 1 to CPolNum, and the number of times EN that a ripple is falsely detected or not detected is counted. CPolNum is the number of slots in the DC motor 10, and corresponds to the number of ripples obtained in one rotation of the rotor in a normal case. A normal case here means that no ripple is falsely detected or not detected.
[0113] The rotation angle detection unit 133B determines whether Cur is greater than i (step S153), that is, whether Cur>i is satisfied.
[0114] If rotation angle detection unit 133B determines that Cur is greater than i (S153: Yes), it sets the value j to Cur-i (step S154A). That is, j = Cur-i. Here, Cur is not used as is, but is replaced with the value j for processing. After completing the processing of step S154A, rotation angle detection unit 133B advances the flow to step S155.
[0115] If the rotation angle detection unit 133B determines in step S153 that Cur is not greater than i (S153: No), it sets the value j to Cur-i+PolNum (step S154B). That is, j = Cur-i+PolNum. After completing the process of step S154B, the rotation angle detection unit 133B advances the flow to step S155.
[0116] The rotation angle detection unit 133B determines whether the determination result TR(j) is False (step S155), that is, whether TR(j)=False is determined.
[0117] If the rotation angle detection unit 133B determines that TR(j) is False (S155: Yes), it increments EN (step S156). That is, EN=EN+1. After completing the process of step S156, the rotation angle detection unit 133B advances the flow to step S157.
[0118] If the rotation angle detection unit 133B determines in step S155 that TR(j) is not False (S155: No), the flow proceeds to step S157.
[0119] The rotation angle detection unit 133B repeats the loop process of steps S152 to S157 CPolNum times while changing the variable i from 1 to CPolNum, thereby counting the number of times EN that erroneous detection or missed detection of ripples occurs while the rotor of the DC motor 10 is rotating through a predetermined angle.
[0120] The rotation angle detection unit 133B determines whether the number of times EN obtained by the loop processing from steps S152 to S157 is greater than a second threshold value TH2 (step S158). Here, as an example, the second threshold value TH2 is half the value of CPolNum. In other words, the rotation angle detection unit 133B determines whether half or more of the number of ripples obtained in the normal case when the DC motor 10 rotates through a predetermined angle are false detections or missed detections.
[0121] If the rotation angle detection unit 133B determines that the number of times EN is greater than the second threshold value TH2 (S158: Yes), it outputs an abnormality detection signal (step S159). The abnormality detection signal is notified to the ECU that controls the power window 50 of the vehicle.
[0122] After completing the process of step S159, the rotation angle detection unit 133B ends the abnormality warning process (END).
[0123] Furthermore, if the rotation angle detection unit 133B determines in step S158 that the number of times EN is not greater than the second threshold value TH2 (S158: No), it ends the abnormality warning process (END).
[0124] As described above, even if ripples are repeatedly detected incorrectly or not detected, the estimated ripple number TRN can be estimated according to equation (2), the corrected ripple number CRN can be calculated according to equation (3), and the rotation angle of the DC motor 10 can be corrected.
[0125] Therefore, it is possible to provide a rotation angle detection device 100 and a rotation angle detection method that can correctly detect the rotation angle of the DC motor 10 even if erroneous detection of ripples or failure to detect ripples occurs continuously.
[0126] Furthermore, the rotation angle detection unit 133B detects the rotation angle R of the DC motor 10 each time a ripple is detected by the ripple detection unit 122, and therefore, each time a ripple is detected, the rotation angle R of the DC motor 10 can be detected based on the latest ripple detection result.
[0127] The rotation angle detection unit 133B outputs an abnormality signal indicating an abnormality when the number of times EN that a ripple is falsely detected or not detected during one rotation of the DC motor 10 is greater than the second threshold value TH2, and therefore can notify of an abnormality when the number of times EN is greater than the second threshold value TH2.
[0128] Furthermore, the rotation angle detection unit 133B determines that the observation period T is within the normal range if the deviation calculated by dividing the absolute value of the difference between the observation period T(i) and the estimated period Te(i) by the estimated period Te is equal to or less than a predetermined threshold value. Therefore, it is possible to easily determine whether the observation period T is within the normal range based on the deviation.
[0129] Furthermore, since the estimated number of ripples TRN during the abnormal period is the cumulative total of the observation periods T(i) during the abnormal period divided by the average value of the estimated periods Te(i) during the abnormal period, even if erroneous detection of ripples or missed detection of ripples occurs continuously, the estimated number of ripples TRN during the abnormal period can be determined with high accuracy, and a rotation angle detection device 100 and a rotation angle detection method can be provided that can correctly detect the rotation angle of the DC motor 10.
[0130] Furthermore, the rotation angle detection unit 133B creates an array in which a predetermined number of consecutive observation periods T(i) are rearranged in order of length, and regards the median of the array as the estimated period Te(i). Because the median of a predetermined number of past observation periods T(i) is a stable value, the estimated period Te(i) can be stably determined through simple processing.
[0131] <Modification of the flowchart> 11A and 11B are flowcharts illustrating an example of processing executed by the rotation angle detection unit 133B in the modification of the embodiment to detect the rotation angle of the DC motor 10. The rotation angle detection unit 133B executes the processing shown in Fig. 11A and 11B once in accordance with one cycle in which a ripple is detected, thereby repeatedly executing the processing shown in Fig. 11A and 11B.
[0132] 11A and 11B, processes similar to those shown in FIGS. 5A and 5B are assigned the same step numbers, and their descriptions are omitted. The processes shown in FIGS. 11A and 11B do not include step S8A (see FIG. 5A), and include steps S1A, S2A, S8C, S9A, and S15A instead of steps S1, S2, S8B, S9, and S15 shown in FIGS. 5A and 5B. The processes of steps S1A, S2A, S8C, and S15A differ in content from the subroutine processes, and will be described later using FIGS. 12, 13, 14, and 15, respectively. Here, the description of FIGS. 11A and 11B will begin with step S9A in order to focus on the differences from FIGS. 5A and 5B.
[0133] If the rotation angle detection unit 133B determines "Yes" in steps S7A and S7B, it calculates the estimated ripple number TRN (step S9A). In this modified example, after determining "Yes" in steps S7A and S7B, the estimated ripple number TRN is calculated in step S9 without performing the accumulation process in step S8A (see FIG. 5A). In this modified example, correction is performed based only on the observed values in the observation period outside the normal range. Compared to the example in FIG. 5A, both the estimated ripple number and the ripple number SN during the abnormal period are reduced by 1. Therefore, the corrected ripple number CRN is the same as in the example in FIG. 5A. If the period corresponding to the estimated ripple number TRN in the formula is equal to the period corresponding to the ripple number SN during the abnormal period, the corrected corrected ripple number CRN is calculated. In the example in FIG. 5A, accuracy is improved by using not only the abnormal period but also the first observation period within the normal range after the abnormal period.
[0134] In step S9A, the estimated number of ripples TRN is calculated by dividing the cumulative value ΣT of the observation period T(i) during the abnormal period by the estimated period Te(i). The value estimated in step S2A for the current control period is used as the estimated period Te(i). Note that the processing in step S9A is a subroutine processing, and details will be described later using FIG. 15.
[0135] After completing the process of step S9A, rotation angle detection unit 133B causes the flow to proceed to step S10.
[0136] Next, the ripple period measurement process in the modified example will be described with reference to Fig. 12. Fig. 12 is a flowchart showing an example of the ripple period measurement process in the modified example. Steps S101 to S104 shown in Fig. 12 are the same as steps S101 to S104 shown in Fig. 6. The process shown in Fig. 12 differs from the process shown in Fig. 6 in steps S105A to S108A. Here, the description of Fig. 12 will focus on the differences from Fig. 6, and will begin with step S105A.
[0137] After completing the process of step S104, rotation angle detection unit 133B increments Cur (step S105A). That is, Cur=Cur+1.
[0138] Rotation angle detection unit 133B determines whether Cur is greater than PolNum (step S106A), that is, whether Cur>PolNum.
[0139] If it is determined that Cur is greater than PolNum (S106A: Yes), rotation angle detection unit 133B sets Cur to 1 (step S107A). That is, Cur=1.
[0140] The rotation angle detection unit 133B sets the observation period T(Cur) to the latest observation period T (step S108A). That is, T(Cur)=T.
[0141] If rotation angle detection unit 133B determines in step S106A that Cur is not greater than PolNum (S106A: No), it advances the flow to step S108A.
[0142] This completes the ripple period measurement process of the modified example.
[0143] Next, a modified estimated period calculation process will be described with reference to Fig. 13. Fig. 13 is a flowchart showing an example of a modified estimated period calculation process.
[0144] The rotation angle detection unit 133B updates the length-ordered array of observation periods T(1) to T(PolNum) (step S121A). The observation periods T(1) to T(PolNum) are the observation periods for one rotation of the DC motor 10, and are an array including PolNum observation periods T. PolNum is an example of a first predetermined number.
[0145] In step S121A, the rotation angle detection unit 133B overwrites the observation period T(Cur) among the observation periods T(1) through T(PolNum) before updating with the latest value in step S108A. The other observation periods T(i) were rearranged in order of length (magnitude) during the previous processing execution. The order of the latest observation period T(Cur) is changed and the observation periods are rearranged in order of length. Note that in this modified example, it is sufficient to determine whether the eight observation periods T(i) correspond to the four in the middle or the four at either end. Furthermore, except for the first execution, it is known during the previous execution whether the seven observation periods T(i) excluding the latest observation period T(Cur) were the first or second largest, the four in the middle (third to sixth largest), or the seventh or eighth largest. Therefore, the four middle observation periods T(i) may be identified without rearranging them in order of size. The first and second largest observation periods T(i) from the previous execution are taken as the provisional first and second observation periods T(i). Similarly, the seventh and eighth largest observation periods T(i) are taken as the provisional seventh and eighth observation periods T(i). If the oldest observation period T(i) overwritten by the latest observation period T(Cur) was the first or second largest from the previous execution, the largest observation period T(i) from the third to sixth largest from the previous execution is taken as the provisional first or second observation period T(i). Similarly, if the oldest observation period T(i) overwritten by the latest observation period T(Cur) was the seventh or eighth largest from the previous execution, the smallest observation period T(i) from the third to sixth largest from the previous execution is taken as the provisional seventh or eighth observation period T(i). Then, the latest observation period T(Cur) is compared with the tentative first and second observation periods T(i), and the largest first and second observation periods T(i) are determined. If the latest observation period T(Cur) is smaller than the tentative first and second observation periods T(i), the latest observation period T(Cur) is compared with the tentative seventh and eighth observation periods T(i), and the largest seventh and eighth observation periods T(i) are determined.
[0146] The rotation angle detection unit 133B assigns the average value of the four central values in the length-ordered array of observation periods T(1) to T(PolNum) to the estimated period Te(Cur) (step S122A). The four central values are the remaining central values obtained by removing two observation periods T from the shortest and two from the longest of the PolNum (eight, for example) observation periods T. The two of each pair of two is an example of a second predetermined number that is smaller than the first predetermined number, and the remaining four is an example of the remaining, middle, third predetermined number. Note that the number is not limited to four, and may be any number that uses the average value of multiple values around the median of the length-ordered array of eight observation periods T.
[0147] This completes the subroutine processing of the estimated period calculation processing of the modified example shown in FIG.
[0148] Next, the accumulation process of the modified example will be described with reference to Fig. 14. Fig. 14 is a flowchart showing an example of the accumulation process of the modified example. The accumulation process shown in Fig. 14 is a subroutine process of step S8B in Fig. 11A.
[0149] The rotation angle detection unit 133B increments SN (step S131). That is, SN=SN+1. SN is the number of ripples detected during the abnormal period.
[0150] The rotation angle detection unit 133B adds the latest observation period T(Cur) to the cumulative value ΣT of the observation period T(i) (step S132). That is, ΣT = ΣT + T(Cur). In this modification, the cumulative value ΣTe of the estimated period Te(i) detected during the abnormal period is not calculated, and therefore only the same processes as steps S131 and S132 in FIG. 8 are executed as the cumulative process of the modification.
[0151] This completes the subroutine processing of the accumulation processing of the modified example shown in Fig. 14. The subroutine processing of the accumulation processing of the modified example does not include the process of calculating the accumulated value ΣTe of the estimated period Te(i) as in step S133 of Fig. 8. In the example of Fig. 8, the average value of the estimated period is used, so the accumulated value of the estimated period is calculated. In the example of Fig. 14, the process is simplified by using the latest estimated period.
[0152] Next, a process for calculating the estimated ripple number TRN in the modified example will be described with reference to Fig. 15. Fig. 15 is a flowchart showing an example of a process for calculating the estimated ripple number TRN in the modified example. The process shown in Fig. 15 is a subroutine process of step S9 in Fig. 11B, and includes the process of step S141A instead of step S141 in Fig. 9.
[0153] The rotation angle detection unit 133B calculates the estimated number of ripples TRN by dividing the cumulative value ΣT of the observation period T(i) by the latest estimated period Te(i) (step S141A). That is, TRN=ΣT(i) / Te.
[0154] When rotation angle detection unit 133B completes the process of step S141A, the flow proceeds to step S142.
[0155] This completes the process of calculating the estimated ripple number TRN shown in FIG.
[0156] Next, the abnormality warning process in the modified example will be described with reference to Fig. 16. Fig. 16 is a flowchart showing an example of the abnormality warning process in the modified example. The process shown in Fig. 16 is a subroutine process of step S15 in Fig. 11B, and is entirely different from the process shown in Fig. 10.
[0157] The rotation angle detection unit 133B determines whether the latest determination result TR(Cur) is False (step S155A). That is, the rotation angle detection unit 133B determines whether the determination result TR(Cur)=False.
[0158] If the determination result TR(Cur) is False (S155A: Yes), the rotation angle detection unit 133B increments the number of times EN that erroneous detection or missed detection of ripples occurred during one rotation of the rotor of the DC motor 10 (step S156A).
[0159] The rotation angle detection unit 133B determines whether the number of times EN is greater than the second threshold value TH2 (step S157A).
[0160] If rotation angle detection unit 133B determines that the number of times EN is greater than second threshold value TH2 (S157A: Yes), it outputs an abnormality detection signal (step S158A). The abnormality detection signal is notified to the ECU that controls power window 50 of the vehicle. After completing the process of step S158A, rotation angle detection unit 133B advances the flow to step S159A. If rotation angle detection unit 133B determines in step S157A that the number of times EN is not greater than second threshold value TH2 (S157A: No), it advances the flow to step S159A.
[0161] The rotation angle detection unit 133B determines whether or not Cur is equal to PolNum (step S159A). That is, the rotation angle detection unit 133B determines whether or not Cur=PolNum.
[0162] If the rotation angle detection unit 133B determines that Cur is equal to PolNum (S159A: Yes), it determines whether the determination result TR(1) is False (step S160A). That is, the rotation angle detection unit 133B determines whether the determination result TR(1)=False. The determination result TR(1) is the determination result TR(Cur) in which Cur is 1, and is the determination result TR of the oldest generation. If the determination result TR of the oldest generation is False, it is necessary to subtract the count of the determination result TR(=False) in preparation for the next control cycle, and therefore in step S160A it is determined whether the determination result TR(1) is False.
[0163] If rotation angle detection unit 133B determines that the determination result TR(1) is False (S160A: Yes), the flow proceeds to step S161A.
[0164] Furthermore, if the rotation angle detection unit 133B determines in step S159A that Cur is not equal to PolNum (S159A: No), it determines whether the determination result TR(Cur+1) is False (step S160B). That is, the rotation angle detection unit 133B determines whether the determination result TR(Cur+1)=False. Because the generation Cur is the latest, the generation Cur+1 is the oldest generation, and the determination result TR(Cur+1) is the determination result TR of the oldest generation. If the determination result TR of the oldest generation is False, it is necessary to subtract the count of the determination result TR(=False) in preparation for the next control cycle, and therefore in step S160B it is determined whether the determination result TR(Cur+1) is False.
[0165] If rotation angle detection unit 133B determines that the determination result TR(Cur+1) is False (S160B: Yes), the flow proceeds to step S161A.
[0166] The rotation angle detection unit 133B decrements the number of times EN that erroneous detection or missed detection of ripples occurred during one rotation of the rotor of the DC motor 10 (step S161A). That is, EN=EN-1. If the determination result TR of the oldest generation is False, the count of the determination result TR (=False) of the oldest generation is subtracted in preparation for the next control cycle.
[0167] When the process of step S161A is completed, rotation angle detection unit 133B ends the abnormality warning process (END).
[0168] Furthermore, if the rotation angle detection unit 133B determines in step S160A that the determination result TR(1) is not False (S160A: No) or if the rotation angle detection unit 133B determines in step S160B that the determination result TR(Cur+1) is not False (S160B: No), the rotation angle detection unit 133B ends the abnormality warning process (END). This is because the determination result TR of the oldest generation is not False, and therefore there is no need to perform the subtraction process of EN.
[0169] As described above, even if ripples are repeatedly detected incorrectly or not detected, the estimated ripple number TRN can be estimated according to equation (2), the corrected ripple number CRN can be calculated according to equation (3), and the rotation angle of the DC motor 10 can be corrected.
[0170] Therefore, it is possible to provide a modified rotation angle detection device 100 and a modified rotation angle detection method that can correctly detect the rotation angle of the DC motor 10 even if erroneous detection of ripples or failure to detect ripples occurs continuously.
[0171] In the modified embodiment, since the generation Pol (see FIG. 6) is not used in the processing of FIG. 12, the calculation is simplified and processing can be performed more quickly.
[0172] Furthermore, in a modified example of the embodiment, in the process of calculating the estimated period Te(i) shown in FIG. 13, the rotation angle detection unit 133B creates an array in which a first predetermined number of consecutive observation periods T(i) are rearranged in order of length, and then, from the shortest and longest of the predetermined number of observation periods T(i) included in the array, a second predetermined number that is smaller than the first predetermined number is subtracted, and the average of the remaining middle third predetermined number of observation periods T is regarded as the estimated period Te. Therefore, even if the observation period T(i) contains an error, it is possible to calculate an estimated period Te(i) with high accuracy.
[0173] Furthermore, in the modification of the embodiment, the accumulation process shown in FIG. 14 does not include the process of calculating the accumulated value ΣTe of the estimated period Te(i) as in step S133 in FIG. 7, and therefore the calculation is simplified.
[0174] Furthermore, in the modified embodiment, in the process of calculating the estimated ripple number TRN shown in FIG. 15, the latest estimated period Te(i) is used instead of the average value of the estimated period Te(i), thereby simplifying the calculation.
[0175] Furthermore, in the modification of the embodiment, the abnormality warning process shown in FIG. 16 does not include loop processing, and therefore the calculation is simplified.
[0176] The above describes the rotation angle detection device and rotation angle detection method according to exemplary embodiments of the present disclosure. However, the present disclosure is not limited to the specifically disclosed embodiments, and various modifications and changes are possible without departing from the scope of the claims. [Explanation of symbols]
[0177] 10 DC motors Terminals 11 and 12 15 resistor 20 Drive circuit 30 DC power supply 50 Power windows 51 Drive mechanism 100 Rotation angle detection device 110 Filter Circuit 111, 112 LPF 120 IC chips 121 BPF 122 Ripple detector 130 Microcomputer 131, 132 A / D converter 133 Processing section 133A current measurement section 133B Rotation angle detection unit 133C Memory
Claims
1. a current measuring unit for measuring a current flowing through a DC motor; a filter for extracting a ripple component from the current; a ripple detection unit that detects ripples from the signal that has passed through the filter; a rotation angle detection unit that detects a rotation angle of the DC motor based on the number of ripples detected by the ripple detection unit; Including, The rotation angle detection unit measuring an observation period, which is a time interval between successive ripples, based on the ripples detected by the ripple detection unit; Calculating a true period of successive ripples as an estimated period from the observed period; determining whether the observed period is within a normal range based on the estimated period and the observed period; If the observation period is within the normal range and the immediately preceding observation period is not within the normal range, a correction ripple number CRN for correcting the ripple number is calculated based on the following equation (1). [Equation 1] where TRN is the value obtained by dividing the cumulative total of the observation periods during an abnormal period in which the observation period is continuously determined not to be within the normal range by the estimated period, and is the estimated number of ripples during the abnormal period, and SN is the number of ripples detected by the ripple detection unit during a period in which the observation period is continuously determined not to be within the normal range.
2. The rotation angle detection unit 2. The rotation angle detection device according to claim 1, wherein the rotation angle of the DC motor is detected each time the ripple detection unit detects the ripple.
3. 3. The rotation angle detection device according to claim 1, wherein the rotation angle detection unit outputs an abnormality signal indicating an abnormality when the number of times that erroneous detection or missed detection of ripple occurs during one rotation of the DC motor is greater than a predetermined number.
4. 4. The rotation angle detection device according to claim 1, wherein the rotation angle detection unit determines that the observation period is within the normal range if a deviation calculated by dividing an absolute value of a difference between the observation period and the estimated period by the estimated period is equal to or less than a predetermined threshold.
5. 5. The rotation angle detection device according to claim 1, wherein the estimated number of ripples TRN during the abnormal period is a value obtained by dividing the cumulative total of the observation periods during the abnormal period by the average value of the estimated periods during the abnormal period.
6. 6. The rotation angle detection device according to claim 1, wherein the rotation angle detection unit creates an array by rearranging a predetermined number of consecutive observation periods in order of length, and regards the median of the array as the estimated period.
7. 6. The rotation angle detection device according to claim 1, wherein the rotation angle detection unit creates an array in which a first predetermined number of consecutive observation periods are rearranged in order of length, and regards a middle third predetermined number of the remaining observation periods as the estimated period after subtracting a second predetermined number less than the first predetermined number from the shortest and longest of the first predetermined number of observation periods included in the array.
8. a current measurement process for measuring a current flowing through a DC motor; A filtering process for extracting a ripple component from the current; a ripple detection process for detecting ripples from the signal extracted by the filtering process; a rotation angle detection process for detecting a rotation angle of the DC motor based on the number of ripples detected by the ripple detection process; Including, The rotation angle detection process includes: measuring an observation period, which is a time interval between successive ripples, based on the ripples detected by the ripple detection process; Calculating a true period of successive ripples as an estimated period from the observed period; determining whether the observed period is within a normal range based on the estimated period and the observed period; a correction ripple number CRN for correcting the ripple number based on the following equation (2), when the observation period is within the normal range and the immediately preceding observation period is not within the normal range. [Equation 2] where TRN is the value obtained by dividing the cumulative total of the observation periods during an abnormal period in which the observation period is continuously determined not to be within the normal range by the estimated period, and is the estimated number of ripples during the abnormal period, and SN is the number of ripples detected by the ripple detection process during a period in which the observation period is continuously determined not to be within the normal range.
Citation Information
Patent Citations
DC motor ripple detector, method, and program
JP2011109880A
Motor control device and vehicular seat apparatus
JP2012213262A
System and method for determining position or speed of a commutated DC motor with error correction
US20090254300A1