PWM signal measuring device, motor drive control device, PWM signal measuring method and motor drive control method

The PWM signal measurement device in motor drive control systems addresses the need for frequency-specific designs by combining capture and smoothing methods, enabling efficient duty cycle measurement across a wide frequency range.

CN114245963BActive Publication Date: 2024-12-24MINEBEAMITSUMI INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080056042.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-08-09
Filing Date
2020-06-09
Publication Date
2024-12-24
Estimated Expiration
2040-06-09

AI Technical Summary

Technical Problem

Conventional motor drive control devices require separate circuit designs for different frequency ranges of PWM signals, leading to longer design cycles and increased manufacturing costs due to the need to adjust low-pass filter time constants and limit usable frequency ranges.

Method used

A PWM signal measurement device that combines a first duty ratio measurement unit using the capture method and a second duty ratio measurement unit using the smoothing method, with a measurement method selection unit to choose between these methods based on the frequency and smoothed voltage values, allowing measurement across a wide frequency range.

Benefits of technology

Enables accurate duty cycle measurement across a broad frequency range without the need for separate circuit designs, reducing design time and costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114245963B_ABST
    Figure CN114245963B_ABST
Patent Text Reader

Abstract

The present invention can realize the measurement of PWM signals in a wide frequency range. The PWM signal measuring device (20) comprises: a first duty cycle measuring unit (24) of a capture mode, which measures the frequency (f) and duty cycle of a PWM signal (Sc); a voltage measuring unit (23), which measures a smoothed voltage (Vad) after the PWM signal is smoothed by a smoothing circuit (13); a second duty cycle measuring unit (25) of a smoothing mode, which measures the duty cycle of the PWM signal based on a voltage measurement value (Vadm) of the smoothed voltage; and a measurement mode selecting unit (26), which selects either the capture mode or the smoothing mode based on the measured value of the frequency and the measured value of the smoothed voltage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a PWM signal measuring device, a motor drive control device, a PWM signal measuring method, and a motor drive control method, and in particular to a PWM signal measuring device for measuring a duty ratio of a PWM signal. Background Art

[0002] A motor drive control device is known that controls the rotation speed of a motor according to a speed command signal input from a host device. For example, it is known that in fan motors, a signal having a duty ratio corresponding to a target rotation speed of the motor by pulse width modulation (PWM) (hereinafter referred to as a "PWM signal") is often used as a speed command signal.

[0003] In the motor drive control device, for example, when a PWM signal is input from a host device as a speed command signal, the duty ratio of the PWM signal is measured, and a target rotation speed is calculated based on the measured duty ratio, and the motor is controlled so as to rotate at the target rotation speed.

[0004] Conventionally, as a technique for measuring the duty ratio of a PWM signal, a capture method and a smoothing method are known.

[0005] The capture method is as follows: based on the change in the edge of the PWM signal (pulse) of the measurement object, a clock with a higher frequency than the PWM signal is used to measure the period of the PWM signal, the high-level period when the PWM signal is high, and the low-level period when the PWM signal is low (refer to patent document 1).

[0006] The smoothing method is as follows: the duty ratio of the PWM signal is measured by measuring the voltage after smoothing the PWM signal to be measured using a low-pass filter (smoothing circuit) (see Patent Document 2).

[0007] (Prior art literature)

[0008] (Patent Document)

[0009] Patent document 1: Japanese Patent Application Publication No. 2010-283908;

[0010] Patent document 2: Japanese Patent Application Publication No. 2016-226263. Summary of the invention

[0011] (Problem to be solved by the invention)

[0012] In conventional motor drive control devices, whether to adopt a capture method or a smoothing method is determined based on the frequency (period) of a PWM signal (speed command signal) used when the motor is applied.

[0013] In the past, when the capture method was used, in order to ensure the measurement accuracy of the duty cycle of the PWM signal, it was necessary to limit the usable frequency range of the PWM signal in the specification, or sacrifice the linearity of the motor rotation speed when the duty cycle was close to 0% and close to 100%. In addition, when the smoothing method was used, in order to ensure the measurement accuracy of the duty cycle of the PWM signal, it was necessary to adjust the time constant of the low-pass filter (smoothing circuit) for each frequency corresponding range of the PWM signal used.

[0014] As described above, in previous motor drive control devices, when the frequency range of the speed command signal (PWM signal) varies depending on the motor application, etc., it is necessary to design a suitable circuit for measuring the duty cycle of the speed command signal according to the frequency range of the speed command signal for each application. This results in a longer design cycle for the motor drive control device and increased manufacturing costs.

[0015] The present invention is developed in view of the above problems, and its purpose is to achieve the measurement of PWM signals in a large frequency range.

[0016] (Solutions used to solve problems)

[0017] A PWM signal measurement device according to a representative embodiment of the present invention comprises: a first duty ratio measurement unit of a capture method, which measures a period based on an edge of a PWM signal by means of a measurement clock, and measures the frequency and duty ratio of the PWM signal based on the measured value of the period; a voltage measurement unit, which measures a smoothed voltage obtained by smoothing the PWM signal by a smoothing circuit; a second duty ratio measurement unit of a smoothing method, which measures the duty ratio of the PWM signal based on the measured value of the smoothed voltage; and a measurement method selection unit, which selects either the capture method or the smoothing method as a measurement method for measuring the duty ratio of the PWM signal based on the measured value of the frequency of the PWM signal and the measured value of the smoothed voltage.

[0018] (Effects of the Invention)

[0019] According to the PWM signal measuring device according to the present invention, it is possible to measure a PWM signal in a wide frequency range. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 1 is a block diagram showing the configuration of a motor unit 100 including the motor drive control device according to the first embodiment.

[0021] Figure 2A It is a diagram showing a circuit configuration example of a PWM input circuit and a smoothing circuit.

[0022] Figure 2BFIG. 2 is a diagram showing another circuit configuration example of a PWM input circuit and a smoothing circuit.

[0023] Figure 3A Yes means Figure 2A FIG. 1 is a timing diagram showing an example of signals of the PWM input circuit and the smoothing circuit shown.

[0024] Figure 3B Yes means Figure 2B FIG. 1 is a timing diagram showing an example of signals of the PWM input circuit and the smoothing circuit shown.

[0025] Figure 4 This is a functional block diagram of the control unit of the motor drive control device according to the first embodiment.

[0026] Figure 5A This is a diagram showing an overview of a method for measuring the duty ratio of a PWM signal using a capture method.

[0027] Figure 5B This is a diagram showing an overview of measuring a PWM signal having a duty ratio of approximately 0% using the capture method.

[0028] Fig. 6A This is a diagram showing an overview of a method for measuring the duty ratio of a high-frequency (short-cycle) PWM signal using a smoothing method.

[0029] Figure 6B This is a diagram showing an overview of a method for measuring the duty ratio of a low-frequency (long-cycle) PWM signal using a smoothing method.

[0030] Figure 7 1 is a diagram showing the relationship between the voltage measurement value Vadm of the smoothed voltage Vad of the PWM signal and the duty ratio of the PWM signal.

[0031] Figure 8 This is a diagram for explaining the correspondence relationship information between the voltage measurement value Vadm and the duty ratio of the PWM signal in the motor drive control device according to the first embodiment.

[0032] Fig. 9 This is a diagram for explaining a method of selecting a measurement method of a duty ratio of a PWM signal using the motor drive control device according to the first embodiment.

[0033] Fig.10 This is a flowchart showing the flow of a duty ratio measurement method using the motor drive control device according to the first embodiment.

[0034] Fig.11A This is a flowchart showing the flow of the measurement method selection process (step S8) by the motor drive control device according to the first embodiment.

[0035] Fig. 11BThis is a flowchart showing the flow of the measurement method selection process (step S8) by the motor drive control device according to the first embodiment.

[0036] Fig.12 This is a functional block diagram of a control unit of the motor drive control device according to the second embodiment.

[0037] Fig.13 This is a diagram for explaining the correspondence relationship information between the voltage measurement value Vadm and the duty ratio of the PWM signal in the motor drive control device according to the second embodiment.

[0038] Fig.14 This is a diagram for explaining a method of selecting a measurement method of a duty ratio of a PWM signal using the motor drive control device according to the second embodiment.

[0039] Fig.15A This is a flowchart showing the flow of the measurement method selection process (step S8) by the motor drive control device according to the second embodiment.

[0040] Fig. 15B This is a flowchart showing the flow of the measurement method selection process (step S8) by the motor drive control device according to the second embodiment. DETAILED DESCRIPTION

[0041] 1. Overview of implementation methods

[0042] First, a representative embodiment of the invention disclosed in the present application will be described in outline. In the following description, as an example, reference numerals corresponding to components of the invention on the drawings are shown in parentheses.

[0043] [1] A PWM signal measuring device (20, 20A) according to a representative embodiment of the present invention comprises: a first duty ratio measuring unit (24) of a capture method, which measures a period based on an edge of a PWM signal (PWM signal Sc) by using a measurement clock (Clk), and measures a frequency (f) and a duty ratio of the PWM signal based on a measured value of the period; a voltage measuring unit (23), which measures a smoothed voltage (Vad) obtained by smoothing the PWM signal by a smoothing circuit (13); a second duty ratio measuring unit (25) of a smoothing method, which measures the duty ratio of the PWM signal based on a measured voltage value (Vadm) of the smoothed voltage; and a measurement method selecting unit (26, 26A), which selects either the capture method or the smoothing method as a measurement method for measuring the duty ratio of the PWM signal based on a measured value of the frequency of the PWM signal and a measured value of the smoothed voltage.

[0044] [2] In the PWM signal measuring device (20, 20A) described in [1] above, at least one of the capture method and the smoothing method may be allocated as the measurement method for each of a plurality of divided areas (A, B, C1, C2, D1, D2, E1, E2, F1, F2, G1, G2, I1, I2, H) divided by a threshold value (f_HP, f_AP, f_LP) related to the frequency of the PWM signal and a threshold value (VL_AP, VL_HP, VH_HP, VH_AP, VL_AP2, VL_HP2, VH_HP2, VH_AP2) related to the voltage after smoothing the PWM signal, and the measurement method selecting unit determines at least one of the plurality of divided areas based on the measured value of the smoothed voltage and the measured value of the frequency of the PWM signal, and selects the measurement method allocated to the determined at least one divided area.

[0045] [3] In the PWM signal measurement device (20, 20A) described in [2] above, the threshold value related to the frequency of the PWM signal may include: an upper limit frequency (f_HP), which is used to specify the upper limit of the frequency of the PWM signal whose duty cycle can be measured by the capture method; a lower limit frequency (f_LP), which is used to specify the lower limit of the frequency of the PWM signal whose duty cycle can be measured by the capture method; and a smoothable frequency (f_AP), which is between the upper limit frequency and the lower limit frequency and is used to specify the frequency of the PWM signal whose duty cycle can be measured by the smoothing method. When the measured value of the frequency of the PWM signal is lower than the smoothable frequency, the measurement method selection unit selects the capture method, and when the measured value of the frequency of the PWM signal is higher than the smoothable frequency, the measurement method selection unit selects the capture method or the smoothing method.

[0046] [4] In the PWM signal measuring device (20, 20A) described in [3] above, the threshold value related to the voltage after the PWM signal is smoothed may include: a first low duty side voltage (VH_AP) having a level period corresponding to one cycle of the measurement clock and corresponding to the duty ratio of the pulse having a frequency of the smoothable frequency; and a first high duty side voltage (VL_AP) having another level period corresponding to one cycle of the measurement clock and corresponding to the duty ratio of the pulse having a frequency of the smoothable frequency. The measurement mode selection unit (26, 26A) selects a preset fixed duty cycle when the measured value of the smoothed voltage exists in a divided area (C1) surrounded by the first low duty side voltage (VH_AP), the upper limit frequency (f_HP), and the lower limit frequency (f_LP), or when the measured value of the smoothed voltage exists in a divided area (C2) surrounded by the first high duty side voltage (VL_AP), the upper limit frequency (f_HP), and the lower limit frequency (f_LP).

[0047] [5] In the PWM signal measuring device (20, 20A) described in [4] above, the threshold value related to the voltage after the PWM signal is smoothed may include: a second low duty side voltage (VH_HP), which has a level period corresponding to one cycle of the measurement clock and corresponds to the duty cycle of a pulse with a frequency of the upper limit frequency; and a second high duty side voltage (VL_HP), which has another level period corresponding to one cycle of the measurement clock and corresponds to the duty cycle of a pulse with a frequency of the upper limit frequency; the plurality of divided areas include a first divided area (D1) and a second divided area (D2), the first divided area (D1) being composed of a first boundary line (L1), the first low duty side voltage (VH_AP), and the The upper limit frequency (f_HP) is surrounded by the second divided area (D2), the first high duty side voltage (VL_AP), and the upper limit frequency (f_HP), the first boundary line (L1) connects the first low duty side voltage in the smoothable frequency and the second low duty side voltage in the upper limit frequency, the second boundary line (L2) connects the first high duty side voltage (VL_AP) in the smoothable frequency and the second high duty side voltage in the upper limit frequency, and when a determined point determined by using the measured value of the smoothed voltage and the measured value of the frequency exists in the first divided area, or the determined point exists in the second divided area, the measurement method selection unit selects the smoothing method.

[0048] [6] In the PWM signal measuring device (20) described in [5] above, the plurality of divided areas may also include a specified divided area (E1+E2+B), which is surrounded by a first boundary line (L1), a second boundary line (L2), the smoothable frequency (f_AP), and the upper limit frequency (f_HP), the first boundary line (L1) connecting the first low duty side voltage in the smoothable frequency and the second low duty side voltage in the upper limit frequency, the second boundary line (L2) connecting the first high duty side voltage in the smoothable frequency and the second high duty side voltage in the upper limit frequency, and when the determined point exists in the specified divided area, the measurement method selection unit selects the capture method.

[0049] [7] In the PWM signal measurement device (20) described in [5] above, the plurality of divided areas may further include: a third divided area (E1) surrounded by the first boundary line (L1), the second low duty side voltage (VH_HP), and the smoothable frequency (f_AP); and a fourth divided area (E2) surrounded by the second boundary line (L2), the second high duty side voltage (VL_HP), and the smoothable frequency (f_AP); when the determination point exists in the third divided area or the determination point exists in the fourth divided area, a difference (|DR1-DR2|) between the duty cycle measurement value (DR1) of the first duty cycle measurement unit and the duty cycle measurement value (DR2) of the second duty cycle measurement unit is calculated, and when the difference is less than a specified threshold value, the measurement mode selection unit selects the capture mode, and when the difference is greater than the specified threshold value, the measurement mode selection unit selects the smoothing mode.

[0050] [8] In the PWM signal measuring device (20A) described in [5] or [6] above, it may also include a third low duty side voltage (VH_HP2) and a third high duty side voltage (VL_HP2), wherein the third low duty side voltage (VH_HP2) has a level period corresponding to two cycles of the measurement clock and corresponds to the duty ratio of the pulse whose frequency is the upper limit frequency, and the third high duty side voltage (VL_HP2) has another level period corresponding to two cycles of the measurement clock and corresponds to the duty ratio of the pulse whose frequency is the upper limit frequency, and the plurality of divided areas include a third divided area (F1+I1) and a fourth divided area (F1+I2), wherein the third divided area (F1+I1) is composed of the third low duty side voltage (VH_HP2) and the third high duty side voltage (VL_HP2). The first boundary line (L1), the smoothable frequency (f_AP), and the upper limit frequency (f_HP) are surrounded, and the fourth divided area (F1+I2) is surrounded by the third high duty side voltage (VL_HP2), the second boundary line (L2), the smoothable frequency (f_AP), and the upper limit frequency (f_HP). When the determined point exists in the third divided area or the fourth divided area, the difference (|DR1-DR2|) between the duty cycle measurement value (DR1) of the first duty cycle measurement unit and the duty cycle measurement value (DR2) of the second duty cycle measurement unit is calculated. When the difference is less than a specified threshold value, the measurement method selection unit selects the capture method, and when the difference is greater than the specified threshold value, the measurement method selection unit selects the smoothing method.

[0051] [9] In the PWM signal measuring device (20A) described in [8] above, the threshold value associated with the voltage after the PWM signal is smoothed may include: a fourth low duty side voltage (VH_AP2) having a level period equivalent to two cycles of the measurement clock and corresponding to the duty ratio of the pulse having the frequency of the smoothable frequency; and a fourth high duty side voltage (VL_AP2) having another level period equivalent to two cycles of the measurement clock and corresponding to the duty ratio of the pulse having the frequency of the smoothable frequency, and the plurality of divided areas may further include: a fifth divided area (G1), It is surrounded by the first low duty side voltage (VH_AP), the fourth low duty side voltage (VH_AP2), the smoothable frequency (f_AP), and the lower limit frequency (f_LP); and the sixth divided area (G2), which is surrounded by the first high duty side voltage (VL_AP), the fourth high duty side voltage (VL_AP2), the smoothable frequency (f_AP), and the lower limit frequency (f_LP), when the determination point exists in the fifth divided area, or the determination point exists in the sixth divided area, the measurement method selection unit selects a pre-set fixed duty cycle.

[0052]

[10] In the PWM signal measuring device (20, 20A) described in any one of [2] to [9] above, when the first duty cycle measuring unit has not measured the duty cycle for a certain period of time, the measurement method selection unit (26, 26A) may select the smoothing method.

[0053]

[11] A motor drive control device (1, 1A) according to a representative embodiment of the present invention comprises: a PWM input circuit (12) to which a PWM signal (Sc) is input; a smoothing circuit (13) to smooth the PWM signal; a control unit (10) comprising a PWM signal measuring device (20, 20A) as described in any one of [1] to

[10] above, wherein the PWM signal measuring device (20, 20A) receives the PWM signal input to the PWM input circuit, receives a voltage (Vad) obtained by smoothing the PWM signal by the smoothing circuit as the smoothed voltage, and generates a control signal; and a motor drive unit (11) to drive the motor (2) based on the control signal.

[0054]

[12] A representative embodiment of the present invention relates to a PWM signal measurement method comprising: a first duty cycle measurement step (S3, S4) of a capture method, wherein a period based on an edge of an input PWM signal is measured by a measuring clock, and the frequency and duty cycle of the PWM signal are measured based on the measured value of the period; a voltage measurement step (S6), wherein a smoothed voltage after the PWM signal is smoothed by a smoothing circuit is measured; a second duty cycle measurement step (S7) of a smoothing method, wherein the duty cycle of the PWM signal is measured based on the measured value of the smoothed voltage; and a measurement method selection step (S8), wherein, based on the measured value of the frequency of the PWM signal and the measured value of the smoothed voltage, either the capture method or the smoothing method is selected as the measurement method for measuring the duty cycle of the PWM signal.

[0055]

[13] A motor drive control method according to a representative embodiment of the present invention comprises: a PWM input step, in which a PWM signal is input; a smoothing step, in which the PWM signal is smoothed; a first duty ratio measurement step (S3, S4) of a capture method, in which a period based on an edge of the PWM signal is measured by a measurement clock, and a frequency and a duty ratio of the PWM signal are measured based on a measured value of the period; a voltage measurement step (S6), in which a smoothed voltage after the PWM signal is smoothed by a smoothing circuit is measured; a second duty ratio measurement step (S7) of a smoothing method, in which the duty ratio of the PWM signal is measured based on a measured value of the smoothed voltage; a measurement method selection step (S8), in which, based on a measured value of the frequency of the PWM signal and a measured value of the smoothed voltage, either the capture method or the smoothing method is selected as a measurement method for measuring the duty ratio of the PWM signal; a control step (S10), in which a control signal is generated based on the measurement method selected in the measurement method selection step; and a motor driving step, in which a motor is driven based on the control signal.

[0056] 2. Specific examples of implementation methods

[0057] Hereinafter, specific examples of the embodiments of the present invention will be described with reference to the accompanying drawings. In the following description, components common to each embodiment are denoted by the same reference numerals, and repeated descriptions are omitted.

[0058] Implementation Method 1

[0059] Figure 1 1 is a block diagram showing the configuration of a motor unit 100 including the motor drive control device according to the first embodiment.

[0060] The motor unit 100 is applied to, for example, a fan (fan motor) that generates wind by rotating an impeller. Figure 1 As shown, the motor unit 100 includes a motor 2 and a motor drive control device 1 .

[0061] The motor 2 is, for example, a three-phase brushless motor. The motor drive control device 1 is a device for controlling the rotation of the motor 2. The motor drive control device 1 controls the rotation and stop of the motor 2 by controlling the energization state of the three-phase coils of the motor 2 based on a drive instruction from the host device 3, for example.

[0062] like Figure 1 As shown, the motor drive control device 1 includes a control unit 10, a motor drive unit 11, a PWM input circuit 12, and a smoothing circuit 13. Figure 1 The components of the motor drive control device 1 shown are part of the whole. Figure 1 In addition to the parts shown, there may also be other components.

[0063] The motor drive unit 11 is a functional unit that drives the motor 2 by energizing each phase coil of the motor 2. The motor drive unit 11 inputs a drive signal to the motor 2 to drive the motor 2 based on a control signal Sd output from the control unit 10 described later. The motor drive unit 11 includes, for example: an inverter circuit (not shown), which is formed by a plurality of switching elements (such as transistors) connected to each phase coil of the motor 2; and a pre-drive circuit (not shown), which drives each switching element of the inverter circuit based on the control signal Sd. The motor drive unit 11 opens or closes the plurality of switching elements constituting the inverter circuit through the pre-drive circuit, for example, converts the DC power supplied by the DC power supply into a three-phase AC, and causes the driving current of the three-phase AC to flow through the motor 2, thereby rotating the rotor of the motor 2.

[0064] The control unit 10 generates a control signal Sd for controlling the driving of the motor 2 based on the speed command signal Sc as a driving command of the host device 3 input via the PWM input circuit 12 and the smoothing circuit 13 .

[0065] The control unit 10 is a program processing device (e.g., a microcontroller: MCU) having hardware parts such as a processor 101 such as a CPU, ROM 102, RAM 103, a timer (counter) 104, an A / D conversion circuit 105, an input / output I / F circuit 107, and a clock generation circuit 108, and each component is interconnected by a bus or a dedicated line.

[0066] In the present embodiment, the control unit 10 is packaged as one semiconductor device (IC: Integrated Circuit), but the present invention is not limited to this.

[0067] Here, the speed command signal Sc is a signal indicating the target rotation speed of the motor 2. For example, the speed command signal Sc is a pulse signal indicating the target rotation speed of the motor 2 by a duty ratio. In other words, the speed command signal Sc is a PWM signal having a duty ratio corresponding to the target rotation speed. Hereinafter, the speed command signal Sc is also referred to as a "PWM signal Sc".

[0068] The PWM input circuit 12 is a circuit to which the PWM signal Sc is input as a speed command signal. The smoothing circuit 13 is a circuit for smoothing the PWM signal Sc.

[0069] Figure 2A 1 is a diagram showing a circuit configuration example of the PWM input circuit 12 and the smoothing circuit 13 .

[0070] The PWM input circuit 12 is a level shift circuit that converts the PWM signal Sc of a predetermined voltage level input from the host device 3 into a voltage level (0-Vdd) that can be input to the MCU as the control unit 10. For example, when the speed command signal Sc is a signal that determines the duty ratio (rotation speed) by the length of the high-level period, the PWM input circuit 12 outputs the PWM signal Sca obtained by converting the voltage level of the PWM signal Sc, and outputs the PWM signal Scb obtained by converting the voltage level of the PWM signal Sc and inverting the logic level. The PWM signal Sca is input to the control unit 10.

[0071] The smoothing circuit 13 is a low-pass filter. For example, the smoothing circuit 13 is a CR low-pass filter having a capacitor C14 and a resistor R14. The smoothing circuit 13 smoothes and outputs the PWM signal Scb whose voltage level is converted and whose logic level is inverted by the PWM input circuit 12. The smoothed voltage Vad smoothed by the smoothing circuit 13 is input to the control unit 10.

[0072] Figure 3A Yes means Figure 2A FIG. 1 is a timing chart showing an example of signals of the PWM input circuit 12 and the smoothing circuit 13 shown. Figure 3A The PWM signal Sca etc. when the PWM signal Sc with a duty ratio of 50% or more is input is shown in FIG. Figure 3A In the case of , a PWM signal Sca having the same logic level as the PWM signal Sc is generated, and a smooth voltage Vad (pulsating voltage) having an average value Vave corresponding to the duty ratio of the PWM signal Sc is generated.

[0073] In addition, when the speed command signal Sc is a signal whose duty cycle (rotation speed) is determined by the length of the low-level period, Figure 2BThe circuit shown constitutes the PWM input circuit 12. In addition, the logic level can also be inverted by the MCU.

[0074] Figure 2B 1 is a diagram showing another circuit configuration example of the PWM input circuit 12 and the smoothing circuit 13 .

[0075] Figure 2B The PWM input circuit 12 shown outputs a PWM signal Sca obtained by converting the voltage level of the PWM signal Sc and inverting the logic level, and outputs a PWM signal Scb obtained by converting the voltage level of the PWM signal Sc. The smoothing circuit 13 smoothes the PWM signal Scb obtained by converting the voltage level of the PWM input circuit 12 and outputs the smoothed signal.

[0076] Figure 3B Yes means Figure 2B FIG. 1 is a timing chart showing an example of signals in the PWM input circuit 12 and the smoothing circuit 13 . Figure 3B The PWM signal Sca etc. when the PWM signal Sc with a duty ratio of 50% or more is input is shown in FIG. Figure 3B In the case of , a PWM signal Sca is generated in which the logic level of the PWM signal Sc is inverted, and a smooth voltage Vad (pulsating voltage) having an average value Vave corresponding to the duty ratio of the PWM signal Sc is generated.

[0077] The control unit 10 measures the duty cycle of the speed command signal (PWM signal) Sc based on the PWM signal Sca input from the PWM input circuit 12 and the smooth voltage Vad input from the smoothing circuit 13, and generates a control signal Sd in such a way that the motor 2 rotates at a rotation speed corresponding to the measured duty cycle.

[0078] Figure 4 It is a functional block diagram of the control unit 10 .

[0079] like Figure 4 As shown, the control unit 10 has: a duty cycle measuring unit 20 (an example of a PWM signal measuring device), which measures the frequency and the duty cycle based on the edge of the PWM signal Sca as the PWM signal, and measures the duty cycle based on the smoothed voltage Vad of the PWM signal; a duty cycle output unit 27, which adjusts the duty cycle measured by the duty cycle measuring unit 20 in accordance with the driving state of the motor and outputs it; and a control signal generating unit 21, which generates a control signal Sd based on the output duty cycle.

[0080] The control signal generating unit 21 generates a control signal Sd for controlling the driving of the motor 2 based on the duty ratio output from the duty ratio output unit 27. The control signal generating unit 21 outputs a PWM signal having a PWM cycle of 20 kHz as the control signal Sd, for example.

[0081] The control signal generating unit 21 is implemented, for example, in the following manner: in the MCU of the above-mentioned control unit 10, the processor 101 performs various operations according to the program stored in the storage device such as RAM103 and ROM102, and controls peripheral circuits such as the timer (counter) 104, the A / D conversion circuit 105, and the input / output I / F circuit 107.

[0082] The duty ratio measurement unit 20 uses both the capture method and the smoothing method as the duty ratio measurement methods for measuring the duty ratio, and measures the duty ratio of the PWM signal Sc. Specifically, the duty ratio measurement unit 20 selects one of the capture method and the smoothing method based on the measured value of the smoothed voltage Vad obtained by smoothing the PWM signal Sc by the smoothing circuit 13 and the measured value of the frequency f (or period T) of the PWM signal Sc, and sets the duty ratio calculated by the selected measurement method as the measured value of the duty ratio of the PWM signal Sc.

[0083] More specifically, the duty ratio measurement unit 20 sets a plurality of divided areas divided by a threshold value related to the frequency of the PWM signal Sc and a threshold value related to the voltage obtained by smoothing the PWM signal Sc, and allocates at least one duty ratio measurement method of the capture method and the smoothing method to each divided area. The duty ratio measurement unit 20 determines the divided areas based on the measured value of the smoothed voltage Vad and the measured value of the frequency f (or period T) of the PWM signal Sc, selects the duty ratio measurement method allocated to the determined divided areas, and sets the duty ratio calculated by the selected measurement method as the measured value of the duty ratio of the PWM signal Sc.

[0084] Before describing in detail the duty ratio measurement method of the duty ratio measurement unit 20 , the capture method and the smoothing method will be described in detail.

[0085] First, the capturing method is described.

[0086] Figure 5A This is a diagram showing an overview of a method for measuring the duty ratio of a PWM signal using a capture method.

[0087] like Figure 5A As shown in FIG. 1 , in the capture method, the PWM signal is measured using a measurement clock Clk having a higher frequency than the PWM signal to be measured. Specifically, the time between edges (rising edge and falling edge) of the PWM signal is measured by the measurement clock Clk. Thus, the high-level period th during which the PWM signal is high-level, the low-level period tl during which the PWM signal is low-level, and the cycle T of the PWM signal can be measured respectively, and the duty ratio can be calculated using these measured values ​​and set as the measured value of the duty ratio.

[0088] For example, when using an MCU with a timer and measuring the duty cycle of a PWM signal in a capture mode, it is impossible to simultaneously measure the period T, high level period th, and low level period tl of the PWM signal. Figure 5A As shown, the edges of three pulses (PWM signals) are used to measure the period T, the high level period th, and the low level period tl in sequence. Since the edges of the PWM signal and the measurement clock are not easy to synchronize, the sum of the measured high level period th and the measured low level period tl is sometimes not consistent with the measured period T, resulting in a deviation in the measured value of the calculated duty ratio. In addition, when the duty ratio of the PWM signal as the measurement object is about 50%, in the method of using only the smaller side (larger side) of the high level period th and the low level period tl, the measured value of the calculated duty ratio may sometimes be deviated. In addition, when the duty ratio of the PWM signal as the measurement object is about 0% or about 100%, in the method of using only either the high level period th or the low level period tl, the measured value of the calculated duty ratio may sometimes be deviated.

[0089] Figure 5B This is a diagram that briefly shows the measurement of a PWM signal with a duty cycle of approximately 0% in the capture mode. Figure 5B As shown, in the capture mode, when the high-level period th of the PWM signal is shorter than one cycle (1CLK) of the measurement clock Clk (th<1CLK), the duty cycle of the PWM signal cannot be measured. In addition, depending on the performance of the MCU, when the high-level period th of the PWM signal is more than one cycle (1CLK) and less than two cycles (2CLK) of the measurement clock Clk, the edge change may be ignored, resulting in a deviation in the measured value of the duty cycle. In addition, when n×CLK≦th<(n+1)×CLK (n is an integer greater than 2), the number of clocks measured is rounded off to th=n×CLK.

[0090] The maximum value of the frequency of the PWM signal whose duty cycle can be measured by the capture method (the minimum value of the cycle) is limited by the minimum resolution of the duty cycle of the PWM signal. For example, when the frequency of the measurement clock Clk is 8192kHz (1CLK=122ns), if the minimum resolution is set to 1 / 64 (=1.5625%), the resolution cannot be satisfied at a frequency higher than 128kHz (=8192000 / 64). In addition, PWM signals with a duty cycle less than 1.5625% or exceeding 98.4375% cannot be measured at this time.

[0091] On the other hand, the minimum value of the frequency of the PWM signal whose duty cycle can be measured by capture (the maximum value of the cycle) is limited by the count upper limit value of the MCU's timer (counter) 104. For example, when the timer (counter) 104 is a 16-bit counter, it is impossible to measure a PWM signal with a frequency below 125 Hz (= 8192000 / 65536).

[0092] As described above, in the capture method, as the frequency of the PWM signal increases, the resolution based on the measurement clock Clk becomes coarser, and when the duty cycle of the PWM signal is approximately 0%, 50%, or 100%, the duty cycle of the PWM signal cannot be accurately measured.

[0093] Next, the smoothing method will be described.

[0094] Fig. 6A and Figure 6B This is a diagram showing an overview of a method for measuring the duty ratio of the PWM signal Scb using a smoothing method. Fig. 6A FIG. 1 is a diagram showing an overview of a method for measuring the duty ratio of a high-frequency (short-period) PWM signal using a smoothing method. Figure 6B This is a diagram showing an overview of a method for measuring the duty ratio of a low-frequency (long-period) PWM signal using a smoothing method.

[0095] like Fig. 6A and Figure 6B As shown in FIG. 1 , in the smoothing method, the duty ratio of the PWM signal Scb is measured based on the smoothed voltage Vad obtained by smoothing the PWM signal Scb of the measurement object through a low-pass filter (smoothing circuit 13). Specifically, A / D conversion is performed at a certain period of the smoothed voltage Vad, and the average value (e.g., moving average value) after the A / D conversion is calculated, and the value is set as the measured value of the smoothed voltage Vad. Then, based on the correspondence relationship information between the measured value of the smoothed voltage Vad and the duty ratio set in advance, the duty ratio can be calculated from the measured value of the smoothed voltage Vad and set as the measured value of the duty ratio.

[0096] Figure 7 2 is a diagram showing the relationship between the measured value of the smoothed voltage Vad of the PWM signal Scb and the duty ratio of the PWM signal Scb.

[0097] exist Figure 7 In the figure, the horizontal axis represents the duty cycle of the PWM signal Scb, and the vertical axis represents the measured value of the smoothed voltage Vad obtained by smoothing the PWM signal Scb (hereinafter also referred to as "voltage measurement value Vadm"). Figure 7 The corresponding relationship information between the voltage measurement value Vadm and the duty ratio is shown, and the duty ratio is calculated based on the corresponding relationship information and the actual voltage measurement value.

[0098] In the case of the smoothing mode, when the frequency f of the PWM signal Sc is sufficiently higher than the cut-off frequency fc (f>>fc) based on the time constant (τ=C14×R14) of the low-pass filter (smoothing circuit 13), as shown in FIG. Fig. 6A As shown in FIG. 1 , the change of the smoothing voltage Vad with respect to time becomes smaller. On the other hand, when the frequency f of the PWM signal Sc approaches the cut-off frequency fc (f>fc), as shown in FIG. Figure 6B As shown, the change in the smoothed voltage Vad with respect to time becomes larger.

[0099] Generally speaking, in the smoothing method, the time constant τ of the low-pass filter (smoothing circuit 13), the A / D conversion cycle, and the moving average period depend on the system configuration. Fig. 6A and Figure 6B As shown, if the smooth voltage Vad fluctuates more as the frequency of the PWM signal decreases, the deviation of the measured value (moving average value) of the smooth voltage Vad increases, and the deviation of the measured value of the duty ratio of the PWM signal increases.

[0100] In addition, if Figure 7 As shown in the figure, the duty cycle of the PWM signal is basically proportional to the voltage measurement value. However, the higher the frequency of the PWM signal, the worse the linearity of the duty cycle with respect to the voltage measurement value. In particular, when the duty cycle is about 50%, the deviation from the linearity is the largest, and the deviation of the duty cycle measurement value calculated based on the voltage measurement value Vadm becomes larger.

[0101] To summarize the above, the various measurement methods can be shown as follows.

[0102] That is, in the capture method, the higher the frequency of the PWM signal to be measured, the lower the measurement accuracy of the duty cycle. In the smoothing method, the duty cycle of a PWM signal whose frequency is lower than the cutoff frequency fc of the low-pass filter cannot be measured, and the lower the frequency of the PWM signal (the closer to the cutoff frequency fc), the lower the measurement accuracy of the duty cycle. Furthermore, in the smoothing method, the higher the frequency of the PWM signal, the greater the deviation of the measured value of the duty cycle calculated when the duty cycle is about 50%.

[0103] Therefore, in order to compensate for the above-mentioned defects of the capture method and the smoothing method, the duty ratio measurement unit 20 (PWM signal measurement device) switches between the capture method and the smoothing method appropriately to measure the duty ratio of the PWM signal Sc as the speed command signal. The duty ratio measurement unit 20 will be described in detail below.

[0104] like Figure 4 As shown, the duty ratio measuring unit 20 includes a voltage measuring unit 23, a first duty ratio measuring unit 24, a second duty ratio measuring unit 25, and a measurement method selecting unit 26 as functional units for measuring the duty ratio of the PWM signal Sca.

[0105] The voltage measuring unit 23 is a functional unit that measures the smoothed voltage Vad output from the smoothing circuit 13. The voltage measuring unit 23 is implemented by, for example, the A / D conversion circuit 105 and program processing of the processor 101.

[0106] The voltage measuring unit 23 performs A / D conversion on the smooth voltage Vad at a predetermined period and converts it into a digital value. The voltage measuring unit 23 calculates an average value (e.g., a moving average value) of the A / D conversion value of the smooth voltage Vad at regular intervals. The voltage measuring unit 23 outputs the calculated average value of the A / D conversion value as a measured value (voltage measurement value) Vadm of the smooth voltage of the PWM signal Sc.

[0107] The first duty ratio measuring unit 24 is a functional unit that measures the duty ratio of the PWM signal Sc by the above-mentioned capture method. The first duty ratio measuring unit 24 is implemented, for example, by the timer (counter) 104 and the program processing of the processor 101. The first duty ratio measuring unit 24 measures the period based on the edge of the PWM signal Sc (PWM signal Sca) using the measurement clock Clk, and measures the frequency f and the duty ratio DR1 of the PWM signal Sc based on the measured value of the above period.

[0108] Here, the measurement clock Clk is generated by, for example, a clock generation circuit 108 of an MCU constituting the control unit 10 .

[0109] The first duty cycle measurement unit 24 uses the measurement clock Clk to measure the period T, high level period th, and low level period tl of the PWM signal Sca output from the PWM input circuit 12 using the above-mentioned capture measurement method, and calculates the duty cycle DR1 of the PWM signal Sc based on these measurement values ​​(refer to Figure 5).

[0110] The second duty ratio measurement unit 25 is a functional unit that measures the duty ratio of the PWM signal Sc in the above-mentioned smoothing method. The second duty ratio measurement unit 25 is implemented by program processing of the processor 101, for example.

[0111] The second duty ratio measuring unit 25 measures the duty ratio of the PWM signal Sc based on the measured value (voltage measurement value Vadm) of the smoothed voltage Vad measured by the voltage measuring unit 23. Specifically, the second duty ratio measuring unit 25 calculates the duty ratio DR2 of the PWM signal Sc based on the correspondence relationship information 250 between the voltage measurement value Vadm and the duty ratio of the PWM signal pre-stored in a storage device such as the ROM 102 of the MCU.

[0112] Figure 8 This is a diagram for explaining correspondence information 250 between voltage measurement value Vadm and duty ratio of a PWM signal in the motor drive control device according to the first embodiment.

[0113] As described above, the voltage after smoothing the PWM signal is substantially proportional to the duty cycle. Therefore, based on the measured value of the smoothed voltage Vad (voltage measurement value Vadm) when the PWM signal is actually smoothed using the smoothing circuit 13 (low-pass filter) and the measured value of the duty cycle, a linear interpolation function 800 that represents the relationship between the voltage measurement value Vadm and the duty cycle as a linear function is calculated in advance, and is stored in advance as the corresponding relationship information 250 in a storage device such as the ROM 102 of the MCU.

[0114] On the other hand, Figure 8 As shown in the figure, the higher the frequency of the PWM signal, the greater the deviation between the corresponding relationship and linearity of the voltage measurement value Vadm and the duty cycle. Figure 8 When the range DL on the low duty side, that is, the voltage measurement value Vadm is within the range of the second low duty side voltage VH_HP to the first low duty side voltage VH_AP described later, a linear interpolation function 801_L is calculated outside the linear interpolation function 800 to represent the relationship between the voltage measurement value Vadm and the duty cycle as a linear function, and it is pre-stored in a storage device such as the ROM102 of the MCU as the corresponding relationship information 250.

[0115] Similarly, in Figure 8 When the range DH on the high duty side, that is, the voltage measurement value Vadm is within the range from the first high duty side voltage VL_AP to the second high duty side voltage VL_HP, a linear interpolation function 801_H is calculated outside the linear interpolation function 800 to represent the relationship between the voltage measurement value Vadm and the duty cycle as a linear function, and it is pre-stored as the corresponding relationship information 250 in a storage device such as the ROM102 of the MCU.

[0116] The second duty ratio measurement unit 25 uses the linear interpolation functions 800, 801_H, and 801_L stored in a storage device such as the ROM 102 to calculate the duty ratio DR2 corresponding to the voltage measurement value Vadm acquired by the voltage measurement unit 23. That is, the second duty ratio measurement unit 25 uses the linear interpolation function 801_H in the range of VL_AP≦Vadm<VL_HP, the linear interpolation function 801_L in the range of VH_HP<Vadm≦VH_AP, and the linear interpolation function 800 in the range of VL_HP≦Vadm≦VH_HP to calculate the duty ratio DR2 corresponding to the voltage measurement value Vadm.

[0117] In addition, the first low duty side voltage VH_AP, the first high duty side voltage VL_AP, the second low duty side voltage VH_HP, and the second high duty side voltage VL_HP will be described later.

[0118] The duty ratio output unit 27 is a functional unit that adjusts and outputs the measured value of the duty ratio corresponding to the measurement method selected by the duty ratio measurement unit 20 (measurement method selection unit 26) or the fixed duty ratio according to the driving state of the motor. The duty ratio output unit 27 is implemented by program processing of the processor 101, for example.

[0119] For example, based on the output of the duty ratio measurement unit 20 , the duty ratio output unit 27 outputs the duty ratio measurement value ( DR1 ) of the first duty ratio measurement unit 24 , the duty ratio measurement value ( DR2 ) of the second duty ratio measurement unit 25 , or a fixed duty ratio.

[0120] Duty output unit 27 temporarily outputs a high duty ratio when motor unit 100 is started, for example. When the duty ratio measurement value changes greatly instantaneously, duty output unit 27 does not suddenly change the duty ratio to be output, but gradually changes and outputs the duty ratio.

[0121] Furthermore, when the control unit 10 detects an abnormal state such as undervoltage or overvoltage of the motor unit 100 or locking of the motor 2 , for example, the duty ratio output unit 27 stops outputting the duty ratio.

[0122] The measurement method selection unit 26 is a functional unit that selects one of the capture method and the smoothing method as a measurement method for measuring the duty ratio of the PWM signal Sc. The measurement method selection unit 26 is implemented by program processing of the processor 101, for example.

[0123] The measurement method selection unit 26 selects a duty ratio measurement method assigned to each of a plurality of divided areas divided by a threshold value related to the frequency of the PWM signal Sc and a threshold value related to the voltage smoothed by the PWM signal Sc, based on the voltage measurement value Vadm and the measurement value of the frequency f (or period T) of the PWM signal Sc.

[0124] Fig. 9 This is a diagram for explaining a method of selecting a measurement method of a duty ratio of a PWM signal using the motor drive control device according to the first embodiment.

[0125] exist Fig. 9 In FIG. 1 , the vertical axis represents the frequency f of the PWM signal Sc (Sca), and the horizontal axis represents the duty cycle of the PWM signal Sc. Figure 8 The relationship between the voltage measurement value Vadm and the duty cycle shown in the figure can be replaced by the voltage measurement value Vadm. Fig. 9 On the horizontal axis, the voltage measurement value Vadm is displayed in parallel with the duty ratio, and the value of the voltage measurement value Vadm corresponding to the duty ratio is recorded.

[0126] exist Fig. 9, a plurality of divided areas A, B, C1, C2, D1, D2, E1, and E2 divided by a threshold value related to the frequency of the PWM signal Sc and a threshold value related to a voltage for smoothing the PWM signal Sc are shown.

[0127] Here, the thresholds related to the frequency of the PWM signal Sc include an upper limit frequency f_HP, a smoothing frequency f_AP, and a lower limit frequency f_LP.

[0128] The upper frequency limit f_HP is a threshold value that specifies the upper limit of the frequency f of the PWM signal whose duty ratio can be measured by the capture method. The lower frequency limit f_LP is a threshold value that specifies the lower limit of the frequency f of the PWM signal whose duty ratio can be measured by the capture method.

[0129] As described above, the maximum value of the frequency f (the minimum value of the period T) of the PWM signal Sc whose duty cycle can be measured by the capture method is limited by the minimum resolution of the duty cycle of the PWM signal Sc, and the minimum value of the frequency f (the maximum value of the period T) of the PWM signal Sc whose duty cycle can be measured by the capture method is limited by the counting upper limit value of the MCU's timer (counter) 104.

[0130] Therefore, the upper limit frequency f_HP and the lower limit frequency f_LP are determined, for example, by taking into consideration the resolution of the first duty cycle measurement unit 24 that measures the duty cycle in a capture manner, the degree of deviation from the measured values ​​when the first duty cycle measurement unit 24 actually measures the period T, the high level period th, and the low level period tl, and are pre-stored in a storage device such as the ROM102 of the MCU.

[0131] In this embodiment, as an example, the upper limit frequency f_HP is set to 128 kHz and the lower limit frequency is set to 250 Hz.

[0132] The smoothable frequency f_AP is a threshold value between the upper limit frequency f_HP and the lower limit frequency f_LP that specifies the frequency f of the PWM signal whose duty ratio can be measured in a smoothed manner, and is a threshold value that serves as a criterion for determining whether the PWM signal to be measured can be smoothed.

[0133] As described above, the smoothing circuit 13 is composed of a low-pass filter, and therefore cannot smooth a PWM signal having a frequency lower than the cutoff frequency fc of the low-pass filter. Therefore, the smoothing frequency f_AP is determined based on the time constant τ (= R14 × C14) of the smoothing circuit 13 and the deviation of the measured value of the smoothed voltage Vad by the voltage measuring unit 23. The smoothing frequency f_AP is pre-stored in a storage device such as the ROM 102 of the MCU.

[0134] In this embodiment, as an example, the smoothable frequency f_AP is set to 2 kHz.

[0135] The threshold value related to the voltage for smoothing the PWM signal Sc includes the first low duty side voltage VH_AP, the first high duty side voltage VL_AP, the second low duty side voltage VH_HP, and the second high duty side voltage VL_HP.

[0136] like Figure 8 As shown, the first low duty voltage VH_AP, the first high duty voltage VL_AP, the second low duty voltage VH_HP, and the second high duty voltage VL_HP are voltages corresponding to the duty ratios DL_AP, DH_AP, DL_HP, and DH_HP, respectively. As described above, the correspondence between the duty ratio and the smoothed voltage is based on the measured value.

[0137] The first low duty side voltage VH_AP is a voltage corresponding to the minimum duty ratio DL_AP of the pulse of the smoothable frequency f_AP. The first low duty side voltage VH_AP has a high level period corresponding to one cycle (1CLK) of the measurement clock Clk, and represents the smoothed voltage Vad (voltage measurement value Vadm) corresponding to the minimum duty ratio (DL_AP) of the PWM signal Sca having a frequency of the smoothable frequency f_AP (2kHz) (reference Figure 5B ). For example, when the smoothable frequency f_AP is set to 2 kHz and the frequency of the measurement clock is set to 8192 kHz, the minimum duty ratio DL_AP is 0.024%.

[0138] The first high duty side voltage VL_AP is a voltage corresponding to the maximum duty ratio DH_AP of the pulse of the smoothable frequency f_AP. The first high duty side voltage VL_AP has a low level period equivalent to one cycle (1CLK) of the measurement clock Clk, and represents the smoothed voltage Vad (voltage measurement value Vadm) corresponding to the maximum duty ratio (DH_AP) of the PWM signal Sca having a frequency of the smoothable frequency f_AP (2kHz). For example, when the smoothable frequency f_AP is set to 2kHz and the frequency of the measurement clock is set to 8192kHz, the maximum duty ratio DH_AP is 99.976%.

[0139] The second low duty side voltage VH_HP is a voltage corresponding to the minimum duty ratio DL_HP of the pulse of the upper limit frequency f_HP. Figure 5B In the example of FIG. 1 , the second low duty side voltage VH_HP has a high level period corresponding to one cycle (1CLK) of the measurement clock Clk and is a voltage corresponding to the minimum duty ratio (DL_HP) of a pulse having a frequency equal to the upper limit frequency f_HP (128kHz) (reference Figure 5B). For example, when the upper limit frequency f_HP=128 kHz and the frequency of the measurement clock=8192 kHz, the minimum duty ratio DL_HP is 1.5625%.

[0140] The second high duty side voltage VL_HP is a voltage corresponding to the maximum duty ratio DH_HP of the pulses of the smoothable frequency f_AP. Figure 5B In the example, the second high duty side voltage VL_HP has a low level period corresponding to one cycle (1CLK) of the measurement clock Clk, and is a voltage corresponding to the maximum duty ratio (DH_HP) of the pulse whose frequency is the upper limit frequency f_HP (128kHz). For example, when the upper limit frequency f_HP = 128kHz and the frequency of the measurement clock = 8192kHz, the maximum duty ratio DH_HP is 98.4375%.

[0141] like Fig. 9 As shown, each divided area A, B, C1, C2, D1, D2, E1, and E2 is defined by the threshold values ​​(f_HP, f_AP, and f_LP) related to the frequency of the PWM signal Sc and the threshold values ​​(VL_AP, VH_AP, VL_HP, and VH_HP) related to the voltage smoothed by the PWM signal Sc. The following describes each divided area.

[0142] The divided area A is an area where the frequency of the PWM signal Sc is less than the smoothing frequency f_AP (2 kHz). More specifically, the divided area A is an area surrounded by the smoothing frequency f_AP, the first low duty voltage VH_AP, the first high duty voltage VL_AP, and the lower limit frequency f_LP.

[0143] The divided area B is an area surrounded by the smoothable frequency f_AP, the second low duty side voltage VH_HP, the second high duty side voltage VL_HP, and the upper limit frequency f_HP.

[0144] The divided area C1 is an area surrounded by the lower limit frequency f_LP, the upper limit frequency f_HP, and the first low duty side voltage VH_AP. The divided area C2 is an area surrounded by the lower limit frequency f_LP, the upper limit frequency f_HP, and the first high duty side voltage VL_AP. In addition, the divided area C1 and the divided area C2 are sometimes collectively referred to as "divided area C".

[0145] The divided area D1 is an area surrounded by the first boundary line L1, the first low duty side voltage VH_AP, and the upper limit frequency f_HP. Here, the first boundary line L1 is a line connecting the point (coordinate) Q1 determined by the smoothable frequency f_AP and the first low duty side voltage VH_AP and the point (coordinate) P1 determined by the upper limit frequency f_HP and the second low duty side voltage VH_HP. The first boundary line L1 is a characteristic line when the high level period of the PWM signal Sca is equivalent to one cycle (1CLK) of the measurement clock Clk.

[0146] The divided area D2 is an area surrounded by the second boundary line L2, the first high duty side voltage VL_AP, and the upper limit frequency f_HP. Here, the second boundary line L2 is a line connecting the point (coordinate) Q2 determined by the smoothable frequency f_AP and the first high duty side voltage VL_AP, and the point (coordinate) P2 determined by the upper limit frequency f_HP and the second high duty side voltage VL_HP. The second boundary line L2 represents a characteristic line when the low level period of the PWM signal Sca is equivalent to one cycle (1CLK) of the measurement clock Clk. In addition, the divided area D1 and the divided area D2 are sometimes collectively referred to as "divided area D".

[0147] The divided area E1 is an area surrounded by the first boundary line L1, the second low duty side voltage VH_HP, and the smoothable frequency f_AP. The divided area E2 is an area surrounded by the second boundary line L2, the second high duty side voltage VL_HP, and the smoothable frequency f_AP. In addition, the divided area E1 and the divided area E2 are sometimes collectively referred to as "divided area E".

[0148] When the determination point X determined by the measurement value of the smoothed voltage Vad measured by the voltage measuring unit 23 (voltage measurement value Vadm) and the measurement value of the frequency f measured by the first duty ratio measuring unit 24 exists in the divided area A, the measurement method selection unit 26 selects the capture method as the measurement method.

[0149] As described above, when the frequency f of the PWM signal Sc is lower than the smoothable frequency f_AP, the PWM signal Sc cannot be smoothed by the smoothing circuit 13, and therefore the duty ratio of the PWM signal Sc cannot be measured by the smoothing method. Therefore, when it is determined that the point X exists in the divided area A, the measurement method selection unit 26 selects the capture method and sets the duty ratio DR1 calculated by the capture method as the measured value of the duty ratio.

[0150] When it is determined that the point X exists in the divided area B, the measurement method selection section 26 selects the capture method as the measurement method.

[0151] As described above, even when the frequency f of the PWM signal Sc is higher than the smoothable frequency f_AP, the closer the duty ratio is to 50%, the larger the deviation of the smoothed voltage Vad is, so the duty ratio of the PWM signal Sc cannot be measured with high accuracy by the smoothing method. Therefore, when it is determined that the point X exists in the divided area B, the measurement method selection unit 26 selects the capture method and sets the duty ratio DR1 calculated by the capture method as the measured value of the duty ratio.

[0152] When it is determined that the point X exists in the divided area C, the measurement mode selection section 26 sets a preset fixed duty ratio as the measured value of the duty ratio.

[0153] As described above, the minimum duty cycle DL_AP and the maximum duty cycle DH_AP are limited by the frequency of the measurement clock Clk. Therefore, the capture method cannot accurately measure the PWM signal Sc with a duty cycle less than the minimum duty cycle DL_AP and the PWM signal Sc with a duty cycle greater than the maximum duty cycle DH_AP. In addition, the deviation of the smoothed voltage Vad of such a PWM signal Sc becomes larger when smoothed.

[0154] Therefore, when it is determined that the point X exists in the divided area C, the measurement mode selection unit 26 selects neither the capture mode nor the smoothing mode, but sets the preset fixed duty cycle as the measured value of the duty cycle. For example, when it is determined that the point X exists in the divided area C1, the measurement mode selection unit 26 sets the duty cycle of 0% as the measured value of the duty cycle, and when it is determined that the point X exists in the divided area C2, the measurement mode selection unit 26 sets the duty cycle of 100% as the measured value of the duty cycle.

[0155] When the determination point X does not exist in the divided area C and the capture method cannot measure the duty ratio, it is considered that the determination point X exists in the divided area D. Therefore, when the determination point X exists in the divided area D, the measurement method selection unit 26 selects the smoothing method as the measurement method.

[0156] As described above, the first boundary line L1 is a characteristic line when the high level period of the PWM signal Sca corresponds to one cycle (1CLK) of the measurement clock Clk. Fig. 9 When the PWM signal Sca is on the left side of the first boundary line L1, it indicates that the high level period of the PWM signal Sca is shorter than one cycle (1CLK) of the measurement clock Clk, and therefore the duty ratio of the PWM signal Sca cannot be measured by the capture method.

[0157] Therefore, when the determination point X exists in the divided area D1, the measurement method selection unit 26 selects the smoothing method and sets the duty ratio DR2 calculated by the smoothing method as the measured value of the duty ratio. The same is true when the determination point X exists in the divided area D2.

[0158] When it is determined that the point X exists in the divided area E, the measurement mode selection section 26 compares the duty ratio DR1 of the first duty ratio measurement section 24 with the duty ratio DR2 of the second duty ratio measurement section 25 and selects the capture mode or the smoothing mode based on the comparison result.

[0159] Specifically, when it is determined that the point X exists in the divided area E, the measurement method selection unit 26 calculates the difference (|DR1-DR2|) between the duty ratio DR1 of the first duty ratio measurement unit 24 and the duty ratio DR2 of the second duty ratio measurement unit 25. When the calculated difference is less than the predetermined threshold value, the measurement method selection unit 26 determines that the capture method can accurately measure the duty ratio, and thus selects the capture method, and sets the duty ratio DR1 calculated by the capture method as the measured value of the duty ratio of the PWM signal Sc. On the other hand, when the difference is greater than the predetermined threshold value, the measurement method selection unit 26 determines that the capture method cannot accurately measure the duty ratio, and thus selects the smoothing method, and sets the duty ratio DR2 calculated by the smoothing method as the measured value of the duty ratio of the PWM signal Sc.

[0160] As described above, the first boundary line L1 is a characteristic line when the high level period of the PWM signal Sca corresponds to one cycle (1CLK) of the measurement clock Clk. Fig. 9 When the PWM signal Sca is on the right side of the first boundary line L1 (divided area E1), the high level period of the PWM signal Sca is longer than one cycle (1CLK) of the measurement clock Clk, so the duty cycle of the PWM signal Sca can be measured by capture. However, as described above, depending on the performance of the MCU, when the high level period or low level period of the PWM signal Sca is more than one cycle (1CLK) and less than two cycles (2CLK) of the measurement clock Clk, the measured value of the duty cycle may sometimes have a large deviation.

[0161] Therefore, when it is determined that the point X exists in the divided area E1, the measurement method selection unit 26 calculates the difference (|DR1-DR2|) between the duty ratio DR1 of the first duty ratio measurement unit 24 and the duty ratio DR2 of the second duty ratio measurement unit 25. When the difference is smaller than the predetermined threshold value, the measurement method selection unit 26 determines that the capture method can accurately measure the duty ratio, and thus selects the capture method, and sets the duty ratio DR1 calculated by the capture method as the measured value of the duty ratio.

[0162] On the other hand, when the difference is greater than the predetermined threshold, the measurement method selection unit 26 determines that the capture method cannot accurately measure the duty cycle, and thus selects the smoothing method, and sets the duty cycle DR2 calculated by the smoothing method as the measured value of the duty cycle. In addition, when it is determined that the point X exists in the divided area E2, the measurement method selection unit 26 performs a similar determination process as when the point X exists in the divided area E1, thereby selecting the measurement method.

[0163] When the first duty ratio measurement unit 24 of the capture method does not measure the PWM signal Sca for a certain period of time, the measurement method selection unit 26 selects the smoothing method as the measurement method.

[0164] Specifically, the measurement method selection unit 26 monitors the update of the measurement value (DR1) of the first duty cycle measurement unit 24. When the duty cycle DR1 is not updated for a certain period of time, it is determined that the capture method cannot measure the PWM signal, so the smoothing method is selected, and the duty cycle DR2 calculated by the smoothing method is set as the measured value of the duty cycle of the PWM signal Sc.

[0165] Next, the measurement flow of the duty ratio by the motor drive control device 1 will be described.

[0166] Fig.10 This is a flowchart showing the flow of a method for measuring a duty ratio using the motor drive control device 1 .

[0167] First, when the motor drive control device 1 is started, the motor drive control device 1 performs initial setting of various parameters required for the duty cycle measurement process (step S1). For example, the motor drive control device 1 clears the value of the timer (counter) 104, and reads out the corresponding relationship information 250 stored in the ROM 102 of the MCU, the threshold value (f_HP, f_AP, f_LP) related to the frequency of the PWM signal Sc, and the threshold value (VL_AP, VL_HP, VH_HP, VH_AP) related to the voltage smoothed by the PWM signal Sc, and sets them to the RAM 103, various registers, etc. Furthermore, the motor drive control device 1 clears the measurement completion flag and update flag of the capture mode and the measurement completion flag and update flag of the smoothing mode in the RAM 103. Then, the motor drive control device 1 starts to measure the duty cycle of the PWM signal Sc (PWM signal Sca) as the speed command signal input from the upper device 3 by the capture mode, and at the same time, starts to measure the smoothed voltage Vad of the PWM signal Sc by the smoothing mode using the voltage measurement unit 23.

[0168] Next, in step S2, the motor drive control device 1 determines whether the capture mode measurement is completed based on the capture mode measurement completion flag. When the capture mode measurement is in progress (step S2: No), first, the first duty ratio measurement unit 24 measures the frequency f (period T), high level period th, and low level period tl of the PWM signal Sc by the above method, and sets the capture mode measurement completion flag (step S3). When the capture mode measurement is completed (step S2: Yes), the first duty ratio measurement unit 24 calculates the duty ratio DR1 of the PWM signal Sc by the capture mode based on the frequency f (period T), high level period th, and low level period tl measured in step S3, clears the capture mode measurement completion flag, sets the capture mode update flag, and then starts the next capture mode measurement (step S4).

[0169] Next, in step S5, the motor drive control device 1 determines whether the smoothing method measurement has been completed based on the smoothing method measurement completion flag. When the smoothing method measurement is in progress (step S5: No), the voltage measuring unit 23 measures the smoothed voltage Vad of the PWM signal Sc and sets the smoothing method measurement completion flag (step S6). When the smoothing method measurement has been completed (step S5: Yes), the second duty ratio measurement unit 25 calculates the duty ratio DR2 of the PWM signal Sc by the above method based on the measured value (voltage measurement value Vadm) of the smoothed voltage Vad measured in step S6 and the correspondence information 250, clears the smoothing method measurement completion flag, sets the smoothing method update flag, and then starts the next smoothing method measurement (step S7).

[0170] Next, the motor drive control device 1 executes a process for selecting a duty ratio measurement method of the PWM signal Sc (measurement method selection process) (step S8 ).

[0171] Fig.11A and Fig. 11B This is a flowchart showing the flow of the measurement method selection process (step S8 ) performed by the motor drive control device 1 according to the first embodiment.

[0172] First, in step S80, the measurement mode selection unit 26 determines whether the duty ratio DR2 is updated based on the update flag of the smoothing mode. If the duty ratio DR2 is not updated (step S80: No), the measurement mode selection unit 26 does not select the measurement mode and ends step S8.

[0173] On the other hand, when the duty ratio DR2 is updated (step S80 : Yes), in step S81 , the measurement mode selection unit 26 determines whether the voltage measurement value Vadm of the voltage measurement unit 23 is larger than the first low duty side voltage VH_AP.

[0174] When the voltage measurement value Vadm is greater than the first low duty side voltage VH_AP (step S81: yes), the measurement mode selection unit 26 determines that the determined point X determined by the voltage measurement value Vadm and the measured value of the frequency f exists in the divided area C1, and sets the preset fixed duty cycle (for example, 0%) as the measured value of the duty cycle (step S82).

[0175] On the other hand, when the voltage measurement value Vadm is equal to or less than the first low duty voltage VH_AP (step S81 : No), in step S83 , the measurement mode selection unit 26 determines whether the voltage measurement value Vadm is lower than the first high duty voltage VL_AP.

[0176] When the voltage measurement value Vadm is less than the first high duty side voltage VL_AP (step S83: Yes), the measurement mode selection unit 26 determines that the determination point X exists in the divided area C2, and sets a preset fixed duty ratio (for example, 100%) as the measured value of the duty ratio (step S84).

[0177] On the other hand, when the voltage measurement value Vadm is equal to or greater than the first high duty side voltage VL_AP (step S83: No), the measurement mode selection unit 26 determines whether the first duty ratio measurement unit 24 of the capture mode has updated the duty ratio DR1 based on the capture mode update flag (step S85).

[0178] In step S85, when duty cycle DR1 is not updated (step S85: No), measurement mode selection unit 26 measures (updates) duty cycle DR1 non-updated period (non-measured period) Tx (step S86). Next, in step S87, measurement mode selection unit 26 determines whether non-measured period Tx is greater than a certain period threshold Tth.

[0179] When the unmeasured period Tx is less than the certain period threshold value Tth (step S87: No), the measurement mode selection unit 26 does not select the measurement mode and ends step S8. On the other hand, when the unmeasured period Tx during which the duty ratio DR1 is not updated is greater than the certain period threshold value Tth (step S87: Yes), the measurement mode selection unit 26 clears the measurement of the unmeasured period Tx, determines that it is impossible to measure by the capture mode, and determines that the point X exists in the division area D1 or the division area D2, so the smoothing mode is selected (step S88), and the duty ratio DR2 calculated by the smoothing mode is set as the measured value of the duty ratio.

[0180] On the other hand, when the duty ratio DR1 is updated (step S85: Yes), the unmeasured period Tx is cleared, and in step S89, the measurement mode selection unit 26 determines whether the frequency f of the PWM signal Sc measured by the first duty ratio measurement unit 24 is greater than or equal to the lower limit frequency f_LP and less than or equal to the upper limit frequency f_HP.

[0181] When the frequency f of the PWM signal Sc is lower than the lower limit frequency f_LP or higher than the upper limit frequency f_HP (step S89: No), since the frequency of the PWM signal exceeds the measurement range, the measurement method selection unit 26 determines that the duty cycle cannot be measured (step S90), does not select the measurement method and ends step S8.

[0182] On the other hand, when the frequency f of the PWM signal Sc is greater than or equal to the lower limit frequency f_LP and less than or equal to the upper limit frequency f_HP (step S89 : Yes), in step S91 , the measurement method selection unit 26 determines whether the frequency f is greater than the smoothable frequency f_AP.

[0183] When the frequency f is lower than the smoothable frequency f_AP (step S91: No), the measurement mode selection unit 26 determines that the determination point X exists in the divided area A, selects the capture mode (step S92), and sets the duty ratio DR1 calculated by the capture mode as the measured value of the duty ratio.

[0184] On the other hand, when the frequency f is higher than the smoothable frequency f_AP (step S91 : YES), the measurement method selection unit 26 determines whether the voltage measurement value Vadm is greater than or equal to the second high duty voltage VL_HP and less than or equal to the second low duty voltage VH_HP (step S93 ).

[0185] In step S93, when the voltage measurement value Vadm is greater than the second high duty side voltage VL_HP and less than the second low duty side voltage VH_HP (step S93: yes), the measurement method selection unit 26 determines that the determination point X exists in the divided area B, selects the capture method (step S94), and sets the duty cycle DR1 calculated by the capture method as the measured value of the duty cycle.

[0186] On the other hand, when the voltage measurement value Vadm is smaller than the second high duty voltage VL_HP or larger than the second low duty voltage VH_HP (step S93 : No), the measurement mode selection unit 26 determines whether the determination point X exists in the divided area E1 or the divided area E2 .

[0187] Next, the measurement method selection unit 26 calculates the difference (|DR1−DR2|) between the duty ratio DR1 of the first duty ratio measurement unit 24 and the duty ratio DR2 of the second duty ratio measurement unit 25 (step S95). In step S96, the measurement method selection unit 26 determines whether the difference calculated in step S95 is equal to or greater than a predetermined threshold.

[0188] When the difference is less than the predetermined threshold value (step S96: No), the measurement mode selection unit 26 selects the capture mode (step S97), and sets the duty ratio DR1 calculated by the capture mode as the measured value of the duty ratio. On the other hand, when the difference is greater than the predetermined threshold value (step S96: Yes), the measurement mode selection unit 26 selects the smoothing mode (step S98), and sets the duty ratio DR2 calculated by the smoothing mode as the measured value of the duty ratio.

[0189] By executing the processing of the above step S8, the measurement method of the duty cycle of the PWM signal Sc is determined. In step S9, the duty cycle output unit 27 determines whether the measurement method is selected. When the measurement method is selected (step S9: Yes), the duty cycle output unit 27 adjusts the duty cycle of the PWM signal Sc measured by the measurement method determined in step S8 in accordance with the motor drive state and outputs it (step S10), and clears the set update flag. On the other hand, when the measurement of the capture method is temporarily not updated (step S87: No), the frequency of the PWM signal exceeds the measurement range (step S90), and the measurement method is not selected (step S9: No), the output value of the duty cycle is maintained at the previous state.

[0190] Then, the control signal generating unit 21 generates the control signal Sd based on the duty ratio outputted in step S10, thereby controlling the motor 2 to rotate at the rotation speed specified by the PWM signal Sc as the speed command signal. After that, the program processing returns to step S2, and the duty ratio of the PWM signal Sc as the speed command signal from the host device 3 is restarted.

[0191] As described above, the motor drive control device 1 involved in embodiment 1 selects either the capture method or the smoothing method based on the measured value of the smoothed voltage Vad (relative to the duty cycle of the PWM signal) which is the smoothed PWM signal Sc as the speed command signal, and the measured value of the frequency f (or period T) of the PWM signal Sc, and sets the duty cycle calculated by the selected measurement method as the measured value of the duty cycle of the PWM signal Sc.

[0192] As described above, the range of the duty cycle that can be accurately measured by each measurement method is determined according to the frequency of the PWM signal of the measurement object and the duty cycle of the PWM signal (smoothed voltage Vad). Therefore, according to the motor drive control device involved in embodiment 1, compared with the case where the duty cycle cannot be measured by only one measurement method, the duty cycle of the PWM signal in a large frequency range can be measured with high accuracy. In addition, when the frequency of the speed command signal varies depending on the motor application, etc., there is no need to design a circuit suitable for measuring the duty cycle of the PWM signal for each application, so compared with the past, the design period of the motor drive control device can be shortened and the manufacturing cost can be reduced.

[0193] In addition, the motor drive control device 1 involved in the first embodiment pre-assigns appropriate measurement methods to each of the multiple divided areas A, B, C, D, and E divided by the threshold value of the frequency of the PWM signal Sc and the threshold value related to the voltage of the smoothed PWM signal Sc. In addition, the motor drive control device 1 measures the smoothed voltage Vad and frequency f of the input PWM signal Sc, and determines the above-mentioned divided areas based on these measured values, and selects the measurement method assigned to the determined divided areas. As a result, it is easy to dynamically select the best measurement method according to the input PWM signal. In addition, since no complex calculations are performed, the appropriate measurement method can be selected as long as the divided areas are determined, so the processing burden of the processor can be suppressed.

[0194] Implementation Method 2

[0195] Fig.12 This is a functional block diagram of a control unit 10A of a motor drive control device 1A according to the second embodiment.

[0196] The motor drive control device 1A involved in embodiment 2 is different from the motor drive control device 1 involved in embodiment 1 in that the multiple divided areas divided by the threshold value related to the frequency of the PWM signal Sc and the threshold value related to the voltage for smoothing the PWM signal Sc are further divided, and other aspects are the same as the motor drive control device 1 involved in embodiment 1.

[0197] As mentioned above, depending on the performance of the MCU, in the capture mode, when the high level period th of the PWM signal of the measured object is greater than 1CLK and less than 2CLK, the measured value of the duty cycle may sometimes have a large deviation (refer to Figure 5B ).

[0198] Therefore, in the motor drive control device 1A according to the second embodiment, the divisional regions are provided in consideration of the fact that the high level period th of the PWM signal to be measured is in the range of not less than 1 CLK and less than 2 CLK.

[0199] Specifically, if Fig.12 As shown, the control unit 10A of the motor drive control device 1A further includes a third low duty voltage VH_HP2 , a third high duty voltage VL_HP2 , a fourth low duty voltage VH_AP2 , and a fourth high duty voltage VL_AP2 as voltage thresholds.

[0200] In addition, Fig.12 1A shows a control unit 10A of a motor drive control device 1A according to the second embodiment, and other components are not shown in the figure.

[0201] Fig.13This is a diagram for explaining correspondence relationship information 250A between voltage measurement value Vadm and duty ratio of a PWM signal in a motor drive control device 1A according to the second embodiment.

[0202] like Fig.13 As shown, the third low duty side voltage VH_HP2, the third high duty side voltage VL_HP2, the fourth low duty side voltage VH_AP2 (not shown), and the fourth high duty side voltage VL_AP2 (not shown) are voltages corresponding to duty ratios DL_HP2, DH_HP2, DL_AP2 (not shown), and DH_AP2 (not shown), respectively.

[0203] The third low duty voltage VH_HP2 is a voltage corresponding to the minimum duty ratio DL_HP2 of the pulse of the upper limit frequency f_HP. The third low duty voltage VH_HP2 has a high level period corresponding to two cycles (2CLK) of the measurement clock Clk, and represents the smoothed voltage Vad (voltage measurement value Vadm) corresponding to the minimum duty ratio (DL_HP2) of the PWM signal Sca having a frequency of the upper limit frequency f_HP (128kHz) (reference Figure 5B ). For example, when the upper limit frequency f_HP is set to 128 kHz and the frequency of the measurement clock is set to 8192 kHz, the minimum duty ratio DL_HP2 is 3.125%.

[0204] The third high duty side voltage VL_HP2 is a voltage corresponding to the maximum duty ratio DH_HP2 of the pulse of the upper limit frequency f_HP. The third high duty side voltage VL_HP2 has a low level period equivalent to two cycles (2CLK) of the measurement clock Clk, and represents the smooth voltage Vad (voltage measurement value Vadm) corresponding to the maximum duty ratio (DH_HP2) of the PWM signal Sca with a frequency of the upper limit frequency f_HP (128kHz). For example, when the upper limit frequency f_HP is set to 128kHz and the frequency of the measurement clock is set to 8192kHz, the maximum duty ratio DH_HP2 is 96.875%.

[0205] The fourth low duty voltage VH_AP2 is a voltage corresponding to the minimum duty ratio DL_AP2 of the pulse of the smoothable frequency f_AP. The fourth low duty voltage VH_AP2 has a high level period corresponding to two cycles (2CLK) of the measurement clock Clk, and represents the smoothed voltage Vad (voltage measurement value Vadm) corresponding to the minimum duty ratio (DL_AP2) of the PWM signal Sca having a frequency of the smoothable frequency f_AP (2kHz) (reference Figure 5B ). For example, when the smoothable frequency f_AP is set to 2 kHz and the frequency of the measurement clock is set to 8192 kHz, the minimum duty ratio DL_AP2 is 0.049%.

[0206] The fourth high duty side voltage VL_AP2 is a voltage corresponding to the maximum duty ratio DH_AP2 of the pulse of the smoothable frequency f_AP. The fourth high duty side voltage VL_AP2 has a low level period equivalent to two cycles (2CLK) of the measurement clock Clk, and represents the smoothed voltage Vad (voltage measurement value Vadm) corresponding to the maximum duty ratio (DH_AP2) of the PWM signal Sca having a frequency of the smoothable frequency f_AP (2kHz). For example, when the smoothable frequency f_AP is set to 2kHz and the frequency of the measurement clock is set to 8192kHz, the maximum duty ratio DH_AP2 is 99.951%.

[0207] Duty ratio measurement unit 20A of motor drive control device 1A according to Embodiment 2 uses linear interpolation functions 802_H and 802_L instead of linear interpolation functions 801_H and 801_L used in Embodiment 1, and calculates duty ratio DR2 by a smoothing method.

[0208] Specifically, in Fig.13 The low duty side range DL2, that is, the voltage measurement value Vadm is within the range of the third low duty side voltage VH_HP2 to the first low duty side voltage VH_AP. In addition to the linear interpolation function 800, a linear interpolation function 802_L is calculated that represents the relationship between the voltage measurement value Vadm and the duty cycle as a linear function, and is pre-stored in a storage device such as the ROM102 of the MCU as the corresponding relationship information 250A.

[0209] Similarly, in Fig.13 When the high duty side range DH2, that is, the voltage measurement value Vadm is within the range of the first high duty side voltage VL_AP to the third high duty side voltage VL_HP2, in addition to the linear interpolation function 800, a linear interpolation function 802_H is calculated that represents the relationship between the voltage measurement value Vadm and the duty cycle as a linear function, and is pre-stored in a storage device such as the ROM102 of the MCU as the corresponding relationship information 250A.

[0210] The second duty ratio measurement unit 25 uses the linear interpolation functions 800, 802_H, and 802_L stored in the storage device such as the ROM 102 to calculate the duty ratio DR2 corresponding to the voltage measurement value Vadm obtained from the voltage measurement unit 23. That is, the second duty ratio measurement unit 25 uses the linear interpolation function 802_H in the range of VL_AP≦Vadm<VL_HP2, the linear interpolation function 802_L in the range of VH_HP2<Vadm≦VH_AP, and the linear interpolation function 800 in the range of VL_HP2≦Vadm≦VH_HP2 to calculate the duty ratio DR2 corresponding to the voltage measurement value Vadm.

[0211] Fig.14 This is a diagram for explaining a method of selecting a measurement method of the duty ratio of the PWM signal Sc by the motor drive control device 1A according to the second embodiment.

[0212] exist Fig.14 In FIG. 1 , the vertical axis represents the frequency f of the PWM signal Sc (Sca), and the horizontal axis represents the duty cycle of the PWM signal Sc. Fig. 9 Similarly, in Fig.14 On the horizontal axis, the voltage measurement value Vadm is represented in parallel with the duty ratio, and the value of the voltage measurement value Vadm corresponding to the duty ratio is recorded.

[0213] exist Fig.14 : shows a plurality of divided areas A, H, C1, C2, D1, D2, F1, F2, G1, G2, I1, and I2 divided by a threshold value related to the frequency of the PWM signal Sc and a threshold value related to the voltage for smoothing the PWM signal Sc.

[0214] like Fig.14 As shown, each divided area A, H, C1, C2, D1, D2, F1, F2, G1, G2, I1, I2 is defined by a threshold value (f_HP, f_AP, and f_LP) related to the frequency of the PWM signal Sc and a threshold value (VL_AP, VH_AP, VL_HP, VH_HP, VL_AP2, VH_AP2, VL_HP2, and VH_HP2) related to the voltage smoothed by the PWM signal Sc. The following describes each divided area.

[0215] The divisional areas A, C1, C2, D1, and D2 are the same as those of the motor drive control device 1 according to the first embodiment, and thus their description is omitted.

[0216] The divided region H is a region surrounded by the upper limit frequency f_HP, the smoothing frequency f_AP, the third low duty side voltage VH_HP2 , and the third high duty side voltage VL_HP2 .

[0217] The divided region G1 is a region surrounded by the lower limit frequency f_LP, the smoothing frequency f_AP, the first low duty side voltage VH_AP, and the fourth low duty side voltage VH_AP2.

[0218] The divided region G2 is a region surrounded by the lower limit frequency f_LP, the smoothable frequency f_AP, the first high duty side voltage VL_AP, and the fourth high duty side voltage VL_AP2. The divided region G1 and the divided region G2 may be collectively referred to as "divided region G".

[0219] The divided region F1 is a region surrounded by the third boundary line L3 , the third low duty-side voltage VH_HP2 , and the smoothable frequency f_AP.

[0220] Here, the third boundary line L3 is a line connecting a point (coordinate) Q3 determined by the smoothable frequency f_AP and the fourth low duty side voltage VH_AP2 and a point (coordinate) P3 determined by the upper limit frequency f_HP and the third low duty side voltage VH_HP2. In other words, the third boundary line L3 is a characteristic line when the high level period of the PWM signal Sca is relative to two cycles (2CLK) of the measurement clock Clk.

[0221] The divided region F2 is a region surrounded by the fourth boundary line L4 , the third high duty side voltage VL_HP2 , and the smoothable frequency f_AP.

[0222] Here, the fourth boundary line L4 is a line connecting a point (coordinate) Q4 determined by the smoothable frequency f_AP and the fourth high duty side voltage VL_AP2 and a point (coordinate) P4 determined by the upper limit frequency f_HP and the third high duty side voltage VL_HP2. In other words, the fourth boundary line L4 is a characteristic line when the low level period of the PWM signal Sca corresponds to two cycles (2CLK) of the measurement clock Clk.

[0223] In addition, the divided area F1 and the divided area F2 are sometimes collectively referred to as "divided area F".

[0224] The divided area I1 is an area surrounded by the first boundary line L1, the third boundary line L3, the smoothable frequency f_AP, and the upper limit frequency f_HP. The divided area I2 is an area surrounded by the second boundary line L2, the fourth boundary line L4, the smoothable frequency f_AP, and the upper limit frequency f_HP. In addition, the divided area I1 and the divided area I2 are sometimes collectively referred to as "divided area I".

[0225] When the determination point X determined by the measurement value of the smoothed voltage Vad measured by the voltage measuring unit 23 (voltage measurement value Vadm) and the measurement value of the frequency f measured by the first duty ratio measuring unit 24 exists in the divided area H, the measurement method selection unit 26A selects the capture method as the measurement method.

[0226] As described above, when the frequency f of the PWM signal Sc is higher than the smoothable frequency f_AP, the closer the duty ratio is to 50%, the larger the deviation of the smoothed voltage Vad is, and therefore the duty ratio of the PWM signal Sc cannot be measured with high accuracy by the smoothing method. Therefore, when it is determined that the point X exists in the divided area H, the measurement method selection unit 26A selects the capture method and sets the duty ratio DR1 calculated by the capture method as the measured value of the duty ratio.

[0227] When it is determined that the point X exists in the divided area G, the measurement mode selection section 26A sets a preset fixed duty ratio as the measured value of the duty ratio.

[0228] As described above, when the frequency f of the PWM signal to be measured is less than the smoothable frequency f_AP, the duty cycle cannot be measured by the smoothing method. On the other hand, in the capture method, as described above, depending on the performance of the MCU, when the duty cycle of the PWM signal is more than one cycle (1CLK) and less than two cycles (2CLK) of the measurement clock Clk, the measured value of the duty cycle will have a large deviation.

[0229] Therefore, when it is determined that the point X exists in the divided area G, the measurement mode selection section 26A selects neither the capture mode nor the smoothing mode, but sets the preset fixed duty ratio as the measured value of the duty ratio. For example, when it is determined that the point X exists in the divided area G1, the measurement mode selection section 26A sets the duty ratio of 0% as the measured value of the duty ratio, and when it is determined that the point X exists in the divided area G2, the measurement mode selection section 26A sets the duty ratio of 100% as the measured value of the duty ratio.

[0230] When it is determined that the point X exists in the divided area I, the measurement mode selection section 26A compares the duty ratio DR1 of the first duty ratio measurement section 24 with the duty ratio DR2 of the second duty ratio measurement section 25 and selects the capture mode or the smoothing mode based on the comparison result.

[0231] Specifically, when it is determined that point X exists in the divided area I, the measurement method selection unit 26A calculates the difference (|DR1-DR2|) between the duty cycle DR1 of the first duty cycle measurement unit 24 and the duty cycle DR2 of the second duty cycle measurement unit 25. When the difference is less than the specified threshold, the capture method is selected; when the difference is greater than the specified threshold, the smoothing method is selected.

[0232] As described above, the first boundary line L1 represents the characteristic line when the high level period of the PWM signal Sca corresponds to one cycle (1CLK) of the measurement clock Clk, and the third boundary line L3 represents the characteristic line when the high level period of the PWM signal Sca corresponds to two cycles (2CLK) of the measurement clock Clk. Fig.14 When the PWM signal Sca is between the first boundary line L1 and the third boundary line (dividing area I1), it can be said that the high level period of the PWM signal Sca is greater than one cycle (1CLK) and less than two cycles (2CLK) of the measurement clock Clk.

[0233] In addition, as described above, depending on the different performance of the MCU, when the high level period or low level period of the PWM signal Sca is greater than one cycle (1CLK) and less than two cycles (2CLK) of the measurement clock Clk, the measured value of the duty cycle measured by the capture method will have a large deviation.

[0234] Therefore, when it is determined that the point X exists in the divided area I1, the measurement method selection unit 26A calculates the difference (|DR1-DR2|) between the duty ratio DR1 of the first duty ratio measurement unit 24 and the duty ratio DR2 of the second duty ratio measurement unit 25. When the difference is less than the predetermined threshold value, the measurement method selection unit 26A determines that the capture method can accurately measure the duty ratio, and thus selects the capture method, and sets the duty ratio DR1 calculated by the capture method as the measured value of the duty ratio. On the other hand, when the difference is greater than the predetermined threshold value, the measurement method selection unit 26A determines that the capture method cannot accurately measure the duty ratio, and thus selects the smoothing method, and sets the duty ratio DR2 calculated by the smoothing method as the measured value of the duty ratio. In addition, when it is determined that the point X exists in the divided area I2, the measurement method selection unit 26A also performs a similar judgment process as when the point X exists in the divided area I1 to select the measurement method.

[0235] When it is determined that point X exists in divided area F, similar to the case of divided area I, the measurement mode selection unit 26A compares the duty cycle DR1 of the first duty cycle measurement unit 24 with the duty cycle DR2 of the second duty cycle measurement unit 25, and selects the capture mode or the smoothing mode based on the comparison result.

[0236] Fig.15A and Fig. 15B This is a flowchart showing the flow of the measurement method selection process (step S8 ) performed by the motor drive control device 1A according to the second embodiment.

[0237] exist Fig.15A and Fig. 15B In the flowchart shown, the processing of steps S80 to S90 is the same as Fig.11A and Fig. 11B The processing in the flowchart shown is the same, so the description is omitted.

[0238] In step S91 , when the frequency f is equal to or lower than the smoothable frequency f_AP (step S91 : No), in step S100 , the measurement method selection unit 26A determines whether the voltage measurement value Vadm is greater than the fourth low duty side voltage VH_AP2 .

[0239] When the voltage measurement value Vadm is greater than the fourth low duty side voltage VH_AP2 (step S100: Yes), the measurement mode selection unit 26A determines that the determination point X exists in the division area G1, and sets a fixed duty ratio (eg, 0%) as the measured value of the duty ratio (step S101).

[0240] On the other hand, when the voltage measurement value Vadm is equal to or less than the fourth low duty voltage VH_AP2 (step S100 : No), in step S102 , the measurement mode selection unit 26A determines whether the voltage measurement value Vadm is lower than the fourth high duty voltage VL_AP2 .

[0241] When the voltage measurement value Vadm is smaller than the fourth high duty side voltage VL_AP2 (step S102: Yes), the measurement mode selection unit 26A determines that the determination point X exists in the divided area G2, and sets a fixed duty ratio (eg, 100%) as the measured value of the duty ratio (step S103).

[0242] On the other hand, when the voltage measurement value Vadm is greater than the fourth high duty side voltage VL_AP2 (step S102: No), the measurement method selection unit 26A determines that the determination point X exists in the divided area A, and therefore selects the capture method (step S92), and sets the duty ratio DR1 calculated by the capture method as the measured value of the duty ratio.

[0243] Furthermore, in step S91 , when the frequency f is higher than the smoothable frequency f_AP (step S91 : YES), in step S104 , the measurement mode selection unit 26A determines whether the voltage measurement value Vadm is greater than or equal to the third high duty voltage VL_HP2 and less than or equal to the third low duty voltage VH_HP2 .

[0244] When the voltage measurement value Vadm is greater than the third high duty side voltage VL_HP2 and less than the third low duty side voltage VH_HP2 (step S104: yes), the measurement method selection unit 26A determines that the determination point X exists in the divided area H, and therefore selects the capture method (step S105), and sets the duty cycle DR1 calculated by the capture method as the measured value of the duty cycle.

[0245] On the other hand, when the voltage measurement value Vadm is less than the third high duty side voltage VL_HP2, or greater than the third low duty side voltage VH_HP2 (step S104: No), the measurement method selection unit 26A determines whether the determination point X exists in the division area F1, the division area F2, the division area I1, or the division area I2 (step S106).

[0246] In step S106, when it is determined that point X exists in divided area F1, divided area F2, divided area I1, or divided area I2, similar to the motor drive control device 1 involved in embodiment 1, the measurement method selection unit 26A selects the capture method and sets the duty cycle DR1 to the measured value of the duty cycle, or selects the smoothing method and sets the duty cycle DR2 to the measured value of the duty cycle based on the difference (|DR1-DR2|) between the duty cycle DR1 of the first duty cycle measurement unit 24 and the duty cycle DR2 of the second duty cycle measurement unit 25 (steps S96 to S98).

[0247] By executing each process in the above order, the motor drive control device 1A determines the measurement method of the duty cycle of the PWM signal Sc. In step S9, the duty cycle output unit 27 determines whether the measurement method is selected. When the measurement method is selected (step S9: Yes), the duty cycle output unit 27 adjusts the duty cycle measured by the measurement method determined in step S8 in accordance with the motor drive state and outputs it (step S10), and clears the set update flag. On the other hand, when the measurement of the capture method is not updated temporarily (step S87: No), or the frequency of the PWM signal exceeds the measurement range (step S90) and the measurement method is not selected (step S9: No), the output value of the duty cycle is maintained at the previous state.

[0248] Then, the control signal generating unit 21 generates the control signal Sd based on the duty ratio output in step S10, thereby controlling the motor 2 to rotate at the rotation speed specified by the PWM signal Sc as the speed command signal. After that, the program processing returns to step S2, and the duty ratio of the PWM signal Sc as the speed command signal from the host device 3 is restarted.

[0249] As described above, the motor drive control device 1A involved in embodiment 2 further provides divided areas F1, F2, I1, and I2 in which the high-level period or the low-level period of the PWM signal Sca is greater than one cycle (1CLK) and less than two cycles (2CLK) of the measurement clock Clk. When it is determined that the point X exists in the divided area F1, F2, I1, or I2, based on the difference (|DR1-DR2|) between the duty cycle DR1 of the first duty cycle measurement unit 24 and the duty cycle DR2 of the second duty cycle measurement unit 25, either the capture method or the smoothing method is selected, and the duty cycle calculated by the selected measurement method is set as the duty cycle measurement value of the PWM signal Sc.

[0250] Therefore, when the duty cycle cannot be accurately measured by the capture method depending on the performance of the MCU, the measured value of the duty cycle measured by the smoothing method can be output, thereby achieving more accurate duty cycle measurement.

[0251] 《Expansion of implementation methods》

[0252] As mentioned above, although the invention of the present inventors has been specifically described based on the embodiment, the present invention is not limited to this, and various changes can be made without departing from the scope of the invention.

[0253] For example, in the above-mentioned embodiment, the configuration for measuring the duty ratio of the PWM signal as the speed command signal is applied to the motor drive control device 1, 1A, but the present invention is not limited thereto. For example, the duty ratio measuring unit 20, 20A of the motor drive control device 1, 1A can also be applied as a PWM signal measuring device to a purpose (equipment) other than the motor drive control device.

[0254] Furthermore, in the above embodiment, as a capture method of PWM signal measurement, the measurement of three parameters, namely, period, high level period, and low level period, is exemplified, but two parameters may be measured and the values ​​of the other parameters may be supplemented by calculation.

[0255] Alternatively, the duty ratio may be calculated by accumulating the measured values ​​of two-level periods of a plurality of PWM signals within a certain period.

[0256] In addition, in the above-mentioned embodiment, the voltage measurement value Vadm reaches the maximum value when the duty cycle of the PWM signal is 0%, and the voltage measurement value Vadm reaches the minimum value when the duty cycle of the PWM signal is 100%. However, even if the voltage measurement value Vadm reaches the maximum value when the duty cycle of the PWM signal is 100%, and the voltage measurement value Vadm reaches the minimum value when the duty cycle of the PWM signal is 0%, it can also be applied through calculation of the MCU.

[0257] Furthermore, the smoothable frequency (f_AP) defining the frequency of the PWM signal that can measure the duty cycle in a smoothed manner is not limited to one frequency, and may be switched according to a smoothing voltage, for example.

[0258] In addition, in the above embodiment, the case where the measurement mode selection unit 26 selects either the capture mode or the smoothing mode based on the difference (|DR1-DR2|) when the determination point exists in the divided areas E1 and E2 is illustrated, but the present invention is not limited thereto. For example, when the determination point X exists in the divided areas E1 and E2, the measurement mode selection unit 26 may select the capture mode similarly to the case of the divided area B. That is, the measurement mode selection unit 26 may determine whether the determination point X exists in the specified divided area (E1+E2+B) surrounded by the first boundary line L1, the second boundary line L2, the smoothable frequency f_AP, and the upper limit frequency f_HP, and select the capture mode when the determination point X exists in the above-mentioned specified divided area.

[0259] In addition, the above flowchart is a diagram showing an example for explaining the operation, and is not limited to this. That is, the steps shown in each figure of the flowchart are specific examples, and are not limited to this process. For example, the order of some processes can be changed, other processes can be inserted between each process, and some processes can be performed simultaneously.

[0260] Description of Reference Numerals

[0261] 100 motor unit; 1, 1A motor drive control device; 2 motor; 3 host device; 10, 10A control unit; 11 motor drive unit; 12 PWM input circuit; 13 smoothing circuit; 101 processor; 102 ROM; 103 RAM; 104 timer (counter); 105 A / D conversion circuit; 107 input and output I / F circuit; 108 clock generation circuit; 20, 20A duty ratio measurement unit (PWM signal measurement device); 21 control signal generation unit; 23 voltage measurement unit; 24 first duty ratio measurement unit; 25 second duty ratio measurement unit; 26, 26A measurement mode selection unit; 27 duty ratio output unit; 250, 250A corresponding relationship information; Clk measurement clock; A, B, C, C1, C2, D, D1, D2, E, E 1. E2, F, F1, F2, G, G1, G2, H, I, I1, I2 divided areas; DR1, DR2 duty cycle measurement values; f_AP smoothable frequency; f_HP upper limit frequency; f_LP lower limit frequency; L1 1st boundary line; L2 2nd boundary line; L3 3rd boundary line; L4 4th boundary line; Sc speed command signal (PWM signal); Sd control signal; Vad smoothing voltage; Vadm voltage measurement value; VH_AP 1st low duty side voltage; VH_AP2 4th low duty side voltage; VH_HP 2nd low duty side voltage; VH_HP2 3rd low duty side voltage; VL_AP 1st high duty side voltage; VL_AP2 4th high duty side voltage; VL_HP 2nd high duty side voltage; VL_HP2 3rd high duty side voltage.

Claims

1. A PWM signal measuring device, characterized in that: have: a first duty ratio measuring unit of a capture method, which measures a period based on an edge of an input PWM signal using a measurement clock, and measures a frequency and a duty ratio of the PWM signal based on a measured value of the period; a voltage measuring unit for measuring a smoothed voltage after the PWM signal is smoothed by a smoothing circuit; a second duty ratio measuring unit of a smoothing method, which measures the duty ratio of the PWM signal based on the voltage measurement value of the smoothed voltage; as well as a measurement method selection unit that selects one of the capture method and the smoothing method as a measurement method for measuring the duty cycle of the PWM signal based on the measured value of the frequency of the PWM signal and the measured value of the smoothed voltage, A threshold value related to the frequency of the PWM signal and a threshold value related to the voltage after the PWM signal is smoothed are used to divide the PWM signal into a plurality of divided areas, and at least one of the capture mode and the smoothing mode is allocated as the measurement mode according to the plurality of divided areas. The measurement method selection unit determines at least one division area among the plurality of division areas based on the measured value of the smoothed voltage and the measured value of the frequency of the PWM signal, and selects the measurement method assigned to the determined at least one division area.

2. The PWM signal measuring device according to claim 1, wherein: The thresholds related to the frequency of the PWM signal include: an upper limit frequency, which is used to specify the upper limit of the frequency of the PWM signal whose duty cycle can be measured by the capture method; a lower limit frequency, which is used to specify the lower limit of the frequency of the PWM signal whose duty cycle can be measured by the capture method; and a smoothing frequency, which is between the upper limit frequency and the lower limit frequency and is used to specify the frequency of the PWM signal whose duty cycle can be measured by the smoothing method. When the measured value of the frequency of the PWM signal is lower than the smoothable frequency, the measurement mode selection unit selects the capture mode, and when the measured value of the frequency of the PWM signal is higher than the smoothable frequency, the measurement mode selection unit selects the capture mode or the smoothing mode.

3. The PWM signal measuring device according to claim 2, wherein: The threshold value related to the voltage after the PWM signal is smoothed includes: a first low duty side voltage having a level period corresponding to one cycle of the measurement clock and corresponding to the duty ratio of the pulse having the frequency of the smoothable frequency; and a first high duty side voltage having another level period corresponding to one cycle of the measurement clock and corresponding to the duty ratio of the pulse having the frequency of the smoothable frequency; When the measured value of the smooth voltage exists in a divided area surrounded by the first low duty side voltage, the upper limit frequency, and the lower limit frequency, or when the measured value of the smooth voltage exists in a divided area surrounded by the first high duty side voltage, the upper limit frequency, and the lower limit frequency, the measurement method selection unit selects a pre-set fixed duty cycle.

4. The PWM signal measuring device according to claim 3, wherein: The thresholds related to the voltage after smoothing the PWM signal include: a second low duty side voltage having a level period corresponding to one cycle of the measurement clock and corresponding to the duty ratio of the pulse having the frequency of the upper limit frequency; and a second high duty side voltage having another level period corresponding to one cycle of the measurement clock and corresponding to the duty ratio of the pulse having the frequency of the upper limit frequency, The plurality of divided areas include a first divided area and a second divided area, the first divided area is surrounded by a first boundary line, the first low duty side voltage, and the upper limit frequency, and the second divided area is surrounded by a second boundary line, the first high duty side voltage, and the upper limit frequency, wherein the first boundary line connects the first low duty side voltage in the smoothable frequency and the second low duty side voltage in the upper limit frequency, and the second boundary line connects the first high duty side voltage in the smoothable frequency and the second high duty side voltage in the upper limit frequency, The measurement method selection unit selects the smoothing method when a certain point determined by the measured value of the smoothed voltage and the measured value of the frequency exists within the first divided area or when the certain point exists within the second divided area.

5. The PWM signal measuring device according to claim 4, wherein: The plurality of divided areas also include a divided area defined as follows, which is surrounded by a first boundary line, a second boundary line, the smoothable frequency, and the upper limit frequency, the first boundary line connecting the first low duty side voltage in the smoothable frequency and the second low duty side voltage in the upper limit frequency, the second boundary line connecting the first high duty side voltage in the smoothable frequency and the second high duty side voltage in the upper limit frequency, When the determination point exists within the prescribed divided area, the measurement method selection unit selects the capture method.

6. The PWM signal measuring device according to claim 4, wherein: The plurality of divided areas further include a third divided area and a fourth divided area, the third divided area being surrounded by the first boundary line, the second low duty side voltage, and the smoothable frequency, and the fourth divided area being surrounded by the second boundary line, the second high duty side voltage, and the smoothable frequency, The measurement mode selection unit calculates the difference between the duty cycle measurement value obtained by the first duty cycle measurement unit and the duty cycle measurement value obtained by the second duty cycle measurement unit when the determination point exists within the third divided area or the determination point exists within the fourth divided area, and selects the capture mode when the difference is less than a specified threshold value, and selects the smoothing mode when the difference is greater than the specified threshold value.

7. The PWM signal measuring device according to claim 4 or 5, wherein: comprising a third low duty side voltage and a third high duty side voltage, wherein the third low duty side voltage has a level period corresponding to two cycles of the measurement clock and corresponds to a duty ratio of a pulse having a frequency of the upper limit frequency, and the third high duty side voltage has another level period corresponding to two cycles of the measurement clock and corresponds to a duty ratio of a pulse having a frequency of the upper limit frequency, The plurality of divided areas include a third divided area and a fourth divided area, the third divided area is surrounded by the third low duty side voltage, the first boundary line, the smoothable frequency, and the upper limit frequency, and the fourth divided area is surrounded by the third high duty side voltage, the second boundary line, the smoothable frequency, and the upper limit frequency, The measurement mode selection unit calculates the difference between the duty cycle measurement value obtained by the first duty cycle measurement unit and the duty cycle measurement value obtained by the second duty cycle measurement unit when the determined point exists within the third divided area or within the fourth divided area, and selects the capture mode when the difference is less than a specified threshold value, and selects the smoothing mode when the difference is greater than the specified threshold value.

8. The PWM signal measuring device according to claim 7, wherein The thresholds related to the voltage after smoothing the PWM signal include: a fourth low duty side voltage having a level period corresponding to two cycles of the measurement clock and corresponding to a duty ratio of a pulse having a frequency equal to the smoothable frequency; and a fourth high duty side voltage having another level period corresponding to two cycles of the measurement clock and corresponding to the duty ratio of the pulse having the frequency of the smoothable frequency, The plurality of divided regions further include: a fifth divided region surrounded by the first low duty side voltage, the fourth low duty side voltage, the smoothable frequency, and the lower limit frequency; and a sixth divided region surrounded by the first high duty side voltage, the fourth high duty side voltage, the smoothable frequency, and the lower limit frequency, When the determination point exists within the fifth divided area, or when the determination point exists within the sixth divided area, the measurement mode selection unit selects a preset fixed duty ratio.

9. The PWM signal measuring device according to claim 1, wherein: The measurement method selection unit selects the smoothing method when the first duty ratio measurement unit does not measure the duty ratio for a certain period of time.

10. A motor drive control device, characterized in that: include: a PWM input circuit to which a PWM signal is input; A smoothing circuit, used for smoothing the PWM signal; A control unit comprising the PWM signal measuring device according to any one of claims 1 to 9, and generating a control signal, wherein the PWM signal measuring device is input with the PWM signal input to the PWM input circuit, and a voltage obtained by smoothing the PWM signal by the smoothing circuit is input as the smoothed voltage; and A motor driving unit drives the motor based on the control signal.

11. A PWM signal measurement method, characterized in that: include: a first duty ratio measurement step of the capture method, wherein a period based on an edge of an input PWM signal is measured by a measurement clock, and a frequency and a duty ratio of the PWM signal are measured based on a measured value of the period; A voltage measurement step, wherein a smoothed voltage after the PWM signal is smoothed by a smoothing circuit is measured; a second duty cycle measuring step in a smoothing manner, wherein the duty cycle of the PWM signal is measured based on the measured value of the smoothed voltage; and a measurement mode selection step, wherein, based on the measured value of the frequency of the PWM signal and the measured value of the smoothed voltage, either the capture mode or the smoothing mode is selected as the measurement mode for measuring the duty cycle of the PWM signal, A threshold value related to the frequency of the PWM signal and a threshold value related to the voltage after the PWM signal is smoothed are used to divide the PWM signal into a plurality of divided areas, and at least one of the capture mode and the smoothing mode is allocated as the measurement mode according to the plurality of divided areas. The measurement method selection step includes determining at least one of the plurality of divided areas based on the measured value of the smoothed voltage and the measured value of the frequency of the PWM signal, and selecting the measurement method assigned to the determined at least one divided area.

12. A motor drive control method, characterized in that: include: PWM input step, wherein a PWM signal is input; a smoothing step, wherein the PWM signal is smoothed; a first duty cycle measurement step in a capture method, wherein a period based on an edge of the PWM signal is measured by a measurement clock, and a frequency and a duty cycle of the PWM signal are measured based on a measured value of the period; A voltage measurement step, wherein a smoothed voltage of the PWM signal after being smoothed by a smoothing circuit is measured; a second duty cycle measurement step in a smoothing manner, wherein the duty cycle of the PWM signal is measured based on the measured value of the smoothed voltage; a measurement mode selection step, wherein, based on the measured value of the frequency of the PWM signal and the measured value of the smoothed voltage, any one of the capture mode and the smoothing mode is selected as the measurement mode for measuring the duty cycle of the PWM signal; a control step, wherein a control signal is generated based on the measurement method selected in the measurement method selection step; and a motor driving step, wherein the motor is driven based on the control signal, A threshold value related to the frequency of the PWM signal and a threshold value related to the voltage after the PWM signal is smoothed are used to divide the PWM signal into a plurality of divided areas, and at least one of the capture mode and the smoothing mode is allocated as the measurement mode according to the plurality of divided areas. The measurement method selection step includes determining at least one of the plurality of divided areas based on the measured value of the smoothed voltage and the measured value of the frequency of the PWM signal, and selecting the measurement method assigned to the determined at least one divided area.