MOTOR CONTROL DEVICE, MOTOR CONTROL METHOD, AND MOTOR CONTROL PROGRAM
Patent Information
- Application Number
- JP2021049016
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-03-23
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2041-03-23
AI Technical Summary
【0009】 本発明のモータ制御装置、モータ制御方法およびモータ制御プログラムによれば、より高い精度でモータの静止位置を制御することが可能となる。
Smart Images

Figure 0007634396000001 
Figure 0007634396000002 
Figure 0007634396000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a motor control device, a motor control method, and a motor control program. [Background technology]
[0002] Stepping motors are often used for actuators such as electric sliders and cylinders due to their ease of use and cost. In a stepping motor, the drive amount for each step is predetermined. The drive device determines the number of steps according to the target drive position and drives the stepping motor with open loop control.
[0003] As a driving technique for a stepping motor, for example, a control method in a motor driving device shown in Patent Document 1 is known. In the motor driving device of Patent Document 1, a constant current chopper circuit generates a control pulse that is pulse-modulated so that the current flowing through a coil approaches a target current, and inputs the control pulse to a logic circuit. The logic circuit generates a drive pulse by logically synthesizing the generated control pulse and the input pulse, thereby controlling the stepping motor in synchronization with the input pulse. The constant current chopper circuit is configured to be able to adjust the target current according to the input pulse, thereby improving current control performance, etc. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2017-60334 A Summary of the Invention [Problem to be solved by the invention]
[0005] Since a stepping motor generates vibrations for each drive step, it may not be possible to obtain accurate information on the stop position. For example, if a stepping motor is used in a device in which an actuator, such as a chip mounter for electronic circuit boards, repeatedly stops and drives in a short period of time, the next drive sequence will start before the vibrations have sufficiently damped, resulting in a large discrepancy between the actual stop position and the position when the position information is read.
[0006] One way to avoid this is to suppress the vibration by gradually switching the excitation state using micro-step drive. However, when switching gradually using micro-step drive, although the vibration is suppressed, the rotor's moment of inertia becomes smaller, so that the rotor stops before reaching the intended rest position, and the rotor does not reach the intended rest position.
[0007] The present invention has been made in consideration of the above-mentioned problems in the conventional art, and an object of the present invention is to provide a motor control device, a motor control method, and a motor control program that are capable of controlling the stationary position of a motor with greater accuracy. [Means for solving the problem]
[0008] In order to solve the above problem, a motor control device described in one embodiment includes a drive signal generation unit that outputs a drive signal specifying a target drive current value indicating a drive current to be provided to the stepping motor to rotate the stepping motor to a target drive position, a target voltage value generation unit that generates a target voltage value based on the drive signal, a comparator that outputs a comparison result between the target voltage value and a voltage value equivalent to the drive current provided to the stepping motor, and a control signal generation unit that generates a control signal to control the drive current to be provided to the stepping motor based on the comparison result, wherein the drive signal generation unit has a first adjustment unit that adjusts the drive signal so that the drive current provided to the stepping motor changes from the initial value to the target drive current value in a time longer than a motor drive reference time, which is the time it takes for the stepping motor to reach the target drive position when the drive current provided to the stepping motor is instantaneously switched from the initial value to the target drive current value, and a second adjustment unit that adjusts the drive signal so that the drive current provided to the stepping motor overshoots a maximum current value greater than the target drive current value for a predetermined time and then returns to the target drive current value. Effect of the Invention
[0009] According to the motor control device, the motor control method, and the motor control program of the present invention, it is possible to control the stationary position of the motor with higher accuracy. [Brief description of the drawings]
[0010] [Figure 1] 1 is a schematic configuration diagram illustrating an example of a motor control system incorporating a motor control device according to an embodiment. [Diagram 2] FIG. 2 is a diagram illustrating an example of the configuration of functional blocks of an FPGA in the motor drive device. [Diagram 3] FIG. 4 is a diagram for explaining a motor drive reference time. [Figure 4] 11 is a diagram showing the transition of the voltage value at the DAC output and the drive current applied to the coil. FIG. [Diagram 5]11A and 11B are diagrams illustrating an example of a manner in which a drive current value changes over time. [Figure 6] 11A and 11B are diagrams illustrating an example of a manner in which a drive current value changes over time. [Figure 7] 11A and 11B are diagrams illustrating an example of a manner in which a drive current value changes over time. [Figure 8] 1 is a flowchart showing the operation of an FPGA. [Figure 9] FIG. 13 is a diagram showing fluctuations in the stop position due to a drive current control method. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] 1. Overview of the embodiment First, a typical embodiment of the invention disclosed in this application will be outlined. In the following description, for example, reference numerals in the drawings corresponding to components of the invention are enclosed in parentheses.
[0012] [1] A motor control device (2) according to a representative embodiment of the present invention includes a drive signal generating unit (22) that outputs a drive signal specifying a target drive current value indicating a drive current to be applied to a stepping motor so as to rotate the stepping motor to a target drive position, a target voltage value generating unit (23a, 23b) that generates a target voltage value based on the drive signal, a comparator (27a, 27b) that outputs a comparison result between the target voltage value and a voltage value corresponding to the drive current applied to the stepping motor, and a control signal generating unit (24a, 24b) that generates a control signal for controlling the drive current applied to the stepping motor based on the comparison result. The drive signal generating unit (22) has a first adjustment unit that adjusts the drive signal so that the drive current given to the stepping motor changes from the initial value to the target drive current value in a time longer than a motor drive reference time, which is the time it takes for the stepping motor to reach the target drive position when the drive current given to the stepping motor is instantaneously switched from the initial value to a target drive current value, and a second adjustment unit that adjusts the drive signal so that the drive current given to the stepping motor returns to the target drive current value after overshooting to a maximum current value greater than the target drive current value for a predetermined time.
[0013] [2] In the motor control device described in [1] above, the first adjustment unit and the second adjustment unit may adjust the drive signal so that the time it takes for the drive current applied to the stepping motor to overshoot from the initial value to a maximum current value greater than the target drive current value and then return to the target drive current value does not exceed a single drive time.
[0014] [3] In the motor control device described in [1] or [2] above, the first adjustment unit and the second adjustment unit may adjust the drive signal so that the drive current applied to the stepping motor includes a portion that shows an S-curve or a step-like shape from the initial value to a maximum current value greater than the target drive current value.
[0015] [4] In the motor control device described in any one of [1] to [3] above, the second adjustment unit may adjust the drive signal so that the drive current applied to the stepping motor includes a portion that shows an S-curve or a step-like shape from a maximum current value greater than the target drive current value back to the target drive current value.
[0016] [5] A motor control method according to a representative embodiment of the present invention includes a drive signal generating step of outputting a drive signal specifying a target drive current value indicating a drive current to be given to a stepping motor so as to rotate the stepping motor to a target drive position, a target voltage value generating step of generating a target voltage value based on the drive signal, a comparison result output step of outputting a comparison result between the target voltage value and a voltage value corresponding to the drive current given to the stepping motor, and a control signal generating step of generating a control signal for controlling the drive current given to the stepping motor based on the comparison result, wherein the drive signal generating step includes a first adjustment substep of adjusting the drive signal so that the drive current given to the stepping motor changes from the initial value to the target drive current value in a time longer than a motor drive reference time, which is the time it takes for the stepping motor to reach the target drive position when the drive current given to the stepping motor is instantaneously switched from the initial value to the target drive current value, and a second adjustment substep of adjusting the drive signal so that the drive current given to the stepping motor overshoots a maximum current value greater than the target drive current value for a predetermined time and then returns to the target drive current value.
[0017] [6] A motor control program according to a representative embodiment of the present invention is a motor control program for a motor control device having a drive signal generating unit that outputs a drive signal specifying a target drive current value indicating a drive current to be given to a stepping motor to rotate the stepping motor to a target drive position, a target voltage value generating unit that generates a target voltage value based on the drive signal, a comparator that outputs a comparison result between the target voltage value and a voltage value corresponding to the drive current given to the stepping motor, and a control signal generating unit that generates a control signal to control the drive current given to the stepping motor based on the comparison result. The motor control program causes a computer to execute a first adjustment step of adjusting the drive signal so that the drive current given to the stepping motor changes from an initial value to the target drive current value in a time longer than a motor drive reference time, which is the time it takes for the stepping motor to reach the target drive position when the drive current given to the stepping motor is instantaneously switched from an initial value to the target drive current value, and a second adjustment step of adjusting the drive signal so that the drive current given to the stepping motor overshoots a maximum current value greater than the target drive current value for a predetermined time and then returns to the target drive current value.
[0018] 2. Specific Examples of Embodiments DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, specific examples of embodiments of the present invention will be described with reference to the drawings. In the following description, components common to the respective embodiments are designated by the same reference numerals, and repeated description will be omitted.
[0019] A motor control device, a motor control method, and a motor control program according to an embodiment will be described with reference to the drawings.
[0020] Fig. 1 is a schematic diagram showing an example of a motor control system incorporating a motor control device according to an embodiment. As shown in Fig. 1, the motor control system 100 includes a stepping motor 1 and a motor control device 2. As the stepping motor 1, a two-phase stepping motor may be used, which is a motor configured so that the rotor of the motor rotates by a predetermined angle by applying a predetermined drive current to two-phase coils. Note that in this specification, the rotation of the rotor of the motor is also simply referred to as the motor rotating.
[0021] As shown in FIG. 1, the motor control device 2 includes a flash memory 21, a field programmable gate array (FPGA) 22, digital to analog converters (DACs) 23a and 23b, pulse width modulation (PWM) control units 24a and 24b, H-bridge circuits 25a and 25b, current detection resistors 26a and 26b, and comparators 27a and 27b. The FPGA 22 is an example of a drive signal generating unit. The DACs 23a and 23b are an example of a target voltage value generating unit. The PWM control units 24a and 24b are an example of a control signal generating unit. The parameters required for control include a maximum current value greater than the target drive current value, a predetermined time required to reach a determined current value, a manner of change in the drive current value over time, a drive time for one cycle, and a resistance value (resistance value of the voltage detection resistor 26) for calculating the target voltage value. Details of these parameters will be described later. Any storage device such as a ROM (Read Only Memory) may be used together with or instead of the flash memory 21. The various parameters stored in the flash memory 21 may be set by a manufacturer before shipping from a factory. The various parameters stored in the flash memory 21 may be set by an engineer (delivery person) after delivery to a user. The various parameters stored in the flash memory 21 may be set by a user after delivery.
[0022] The FPGA 22 is a circuit programmed to execute processes for realizing various functions based on parameters stored in the flash memory 21. The FPGA 22 outputs a drive signal that specifies a target drive current, which is a drive current to be applied to the coil of the stepping motor 1 so as to rotate the stepping motor 1 to a target drive position.
[0023] The DAC 23 generates a target voltage value based on the drive signal output from the FPGA 22. The DAC 23 outputs the target voltage value to the input terminal of the comparator 27. The target voltage value is an output voltage value of the DAC 23 adjusted so that the value of the drive current applied from the H-bridge circuit 25 to the coil of the stepping motor 1 becomes a desired value. The target voltage value can be adjusted to a value obtained by multiplying the desired value of the drive current and the resistance value of the voltage detection resistor 26.
[0024] The H-bridge circuit 25 switches the drive current applied to the coils of the stepping motor 1, and inputs a voltage equivalent to the current flowing through the coils of the stepping motor 1 to the comparator 27. The H-bridge circuit 25a switches the drive current applied to the A-phase coil in response to the PWM signal input from the PWM control unit 24a. Similarly, the H-bridge circuit 25b switches the drive current applied to the B-phase coil in response to the PWM signal input from the PWM control unit 24b.
[0025] The H-bridge circuit 25 is grounded via a current detection resistor 26. An input terminal of a comparator 27 is connected between the H-bridge circuit 25 and the current detection resistor 26.
[0026] The current detection resistor 26 may be configured, for example, by a shunt resistor provided in parallel with an ammeter. Of the voltage values input to the comparator 27, the voltage value input from the H-bridge circuit 25 is equal to a voltage value corresponding to the current flowing through the coil of the stepping motor 1. The voltage value corresponding to the current flowing through the coil of the stepping motor 1 is a value represented by the product of the resistance value of the shunt resistor provided as the current detection resistor 26 and the value of the drive current flowing through the H-bridge circuit 25.
[0027] The comparator 27 compares the target voltage value input from the DAC 23 with the voltage value input from the H-bridge circuit 25, and outputs a binary output value according to the comparison result. The binary output values are High (1) and Low (0).
[0028] Specifically, the waveform of the coil voltage value, which is a voltage value corresponding to the current flowing through the coil of the stepping motor 1, is input to the inverting terminal of the comparator 27. The waveform of the target voltage value output from the DAC is input to the non-inverting terminal of the comparator 27. When the coil voltage value is smaller than the target voltage value, the comparator 27 outputs an output value of High (1). When the coil voltage value is larger than the target voltage value, the comparator 27 outputs an output value of Low (0). When the coil voltage value is equal to the target voltage value, the comparator 27 does not output an output value. When necessary, the comparator 27 outputs a square wave of "1" or "0" depending on the relationship between the coil voltage value and the target voltage value.
[0029] The PWM control unit 24 adjusts the duty ratio of the drive pulse from the FPGA 22 according to the binary output value input from the comparator 27 to generate a PWM signal. When the comparator 27 outputs "1", the drive current is small, so the PWM control unit 24 generates a PWM signal with an increased duty ratio to increase the drive current provided to the coil of the stepping motor 1. When the comparator 27 outputs "0", the drive current is large, so the PWM control unit 24 generates a PWM signal with a decreased duty ratio to decrease the drive current provided to the coil of the stepping motor 1.
[0030] In this way, the motor control device 2 can control the drive current applied to the coil of the stepping motor 1 based on the drive signal output from the FPGA 22. Here, the FPGA 22 that inputs the drive signal to the DAC 23 will be further described.
[0031] FIG. 2 is a diagram illustrating an example of the configuration of functional blocks of an FPGA in a motor drive device.
[0032] As shown in FIG. 2, the FPGA 22 is programmed to include a drive signal generation timing unit 221, a target drive current acquisition unit 222, and a drive signal adjustment and generation unit 223 as functional units.
[0033] The drive signal generation timing unit 221 determines the generation timing of the drive signal, and notifies the target drive current acquisition unit 222 that it is the generation timing of the drive signal. The drive signal generation timing unit 221 outputs a drive pulse to the PWM control unit 24 as necessary.
[0034] When the target drive current acquisition unit 222 is notified that it is time to generate a drive signal, it acquires parameters necessary for control, such as a target drive current value, from the flash memory 21 and passes them to the drive signal adjustment and generation unit 223. The target drive current value is a value indicating the magnitude of the drive current given to the stepping motor 1 so as to rotate the stepping motor 1 to the target drive position. In other words, the current value flowing through the coil of the stepping motor 1 when the stepping motor 1 is driven and finally moves to the target position is the target drive current value.
[0035] The drive signal adjustment generation unit 223 generates a drive signal when it receives parameters necessary for control such as a target drive current value. The drive signal adjustment generation unit 223 generates a drive signal adjusted so that the drive current given to the coil of the stepping motor 1 changes as desired. The desired change is that the drive current given to the coil of the stepping motor 1 changes according to parameters such as a target drive current value and elapsed time. The manner in which the drive current value changes as time elapses will be described later. The drive signal adjustment generation unit 223 has a first adjustment unit 224 and a second adjustment unit 225.
[0036] The first adjustment unit 224 adjusts the drive signal so that the drive current applied to the coil of the stepping motor 1 changes from an initial value to a target drive current value in a time longer than the motor drive reference time. The motor drive reference time is the time it takes for the stepping motor 1 to reach the target drive position when the drive current applied to the coil is instantaneously switched to the target drive current.
[0037] Here, the motor drive reference time will be described.
[0038] Fig. 3 is a diagram for explaining the motor drive reference time. Fig. 3(a) shows the rotational position over time when the drive current given to the coil of the stepping motor 1 is instantaneously switched from the initial value to the target drive current. Fig. 3(b) shows the change over time of the drive current given to the coil of the stepping motor 1 according to the drive signal generated by the drive signal adjustment generation unit 223.
[0039] When the drive current applied to the coil is instantly switched from the initial value to the target drive current at time 0, the stepping motor 1 reaches the target drive position P1 at time t1, as shown in FIG. 3(a). The target drive position P1 is a target position to which the stepping motor 1 is driven and finally moved by passing the target drive current through the coil of the stepping motor 1. However, the stepping motor 1 rotates beyond the target drive position P1. After passing the target drive position P1, the stepping motor 1 rotates in the reverse direction, thereby further exceeding the target drive position P1. In this manner, the stepping motor 1 stops after repeating vibrations that pass the target drive position P1. In this specification, the time T1 defined by the time t1 from the time 0 when the drive current applied to the coil is switched to the target drive current to the time when the target drive position P1 is first reached is called the motor drive reference time.
[0040] The first adjustment unit 224 adjusts the drive signal so that the drive current given to the coil of the stepping motor 1 changes gradually to the target drive current value a1 over a long time T2 from time 0 to time t2 after time t1 when the motor drive reference time T1 is reached. With this configuration, it is possible to suppress vibrations that occur when the stepping motor 1 stops.
[0041] The second adjustment unit 225 adjusts the drive signal so that the drive current given to the coil of the stepping motor 1 overshoots to a maximum current value greater than the target drive current value, is held for a predetermined time, and then returns to the target drive current value. The predetermined time for holding the overshoot current value is determined using a value stored in the flash memory 21 as the "predetermined time required to reach a determined current value."
[0042] The first adjustment unit 224 and the second adjustment unit 225 adjust the time taken for the drive current to overshoot from the initial value and return to the target drive current value so as not to exceed one drive time. One drive time is a time set as a time for driving based on one target drive current. For example, a value stored in the flash memory 21 as the initial value of the stepping motor 1 is used as the one drive time.
[0043] In the drive signal adjusting and generating unit 223, the first adjusting unit 224 and the second adjusting unit can adjust the drive signal input to the DAC 23 so that the output of the DAC 23 becomes a desired voltage value. The first adjusting unit 224 and the second adjusting unit 225 vary the drive current given to the coil of the stepping motor 1 by adjusting the drive signal. The time for varying the drive current given to the coil of the stepping motor 1 is preset as a "predetermined time required to reach a determined current value." As the "predetermined time required to reach a determined current value," for example, four times are set: (1) the time required to reach the target drive current value from the initial value, (2) the time required to reach the maximum current value greater than the target drive current value after reaching the target drive current value, (3) the time required to elapse a predetermined time of overshoot after reaching the maximum current value greater than the target drive current value, and (4) the time required to reach the target current value after the predetermined time of overshoot has elapsed.
[0044] Of the "predetermined time required to reach a determined current value," (1) the time required to reach the target drive current value from the initial value must be set to a time longer than the motor drive reference time. Also, of the "predetermined time required to reach a determined current value," the total time of (1) through (5) must be set so as not to exceed the time required for one drive.
[0045] The "predetermined time required to reach a determined current value" is stored as a parameter necessary for control in the flash memory 21. Here, the relationship between the DAC output based on the drive signal generated by the drive signal adjustment generation unit 223 and the drive current will be described.
[0046] 4 shows the transition of the voltage value at the DAC output based on the adjusted drive signal and the drive current applied to the coil. Fig. 4(a) shows the transition of the voltage value at the DAC output over time. Fig. 4(b) shows the transition of the drive current over time.
[0047] In FIG. 4(a), the upper part shows the transition of the output voltage value of the DAC 23a. In FIG. 4(a), the lower part shows the transition of the output voltage value of the DAC 23b. a , d b indicates the voltage values of DACs 23a, 23b corresponding to the target drive current. In FIG. 4(b), the upper part shows the transition of the drive current given to the A-phase coil. In FIG. 4(b), the lower part shows the transition of the drive current given to the B-phase coil. In FIG. 4(b), a1 and a2 indicate the target drive current for A-phase. In FIG. 4(b), a3 and a4 indicate the target drive current for B-phase. Also, a2 and a4 are negative values.
[0048] (First section: t 11 From 12 ) Based on the drive signal input from the FPGA 22, the output voltage value of the DAC 23a is first 11 The output voltage value of the DAC23a decreases from time t 12 In this process, the target voltage value output from the DAC 23a becomes lower than the coil voltage value, so the comparator 27a outputs "0". As a result, the PWM control unit 24a controls the drive current applied to the A-phase coil of the stepping motor 1 to decrease. In response to the control of the PWM control unit 24a, the absolute value of the A-phase drive current of the stepping motor 1 decreases to 0.
[0049] (Second interval: t 12 From 13 ) Based on the drive signal input from the FPGA 22, the output voltage value of the DAC 23a is set to a value at time t 12After becoming "0" at DAC 23a, the comparator 27a increases. During this process, the target voltage value output from DAC 23a is considered to be greater than the coil voltage value, so the comparator 27a outputs "1". As a result, the PWM control unit 24a controls the drive current applied to the A-phase coil of the stepping motor 1 to increase. In response to the control of the PWM control unit 24a, the A-phase drive current of the stepping motor 1 increases.
[0050] (Third section: t 13 From 14 ) Based on the drive signal input from the FPGA 22, the output voltage value of the DAC 23a is set to a value at time t 13 The voltage continues to rise even after it reaches a voltage value indicating the target drive current in DAC 23a. Even during this process, the target voltage value output from DAC 23a is considered to be smaller than the coil voltage value, so comparator 27a outputs "1". As a result, PWM control unit 24a controls to increase the drive current applied to the A-phase coil of stepping motor 1. In response to the control of PWM control unit 24a, the A-phase drive current of stepping motor 1 increases.
[0051] (The fourth section: t 14 From 15 ) Based on the drive signal input from the FPGA 22, the output voltage value of the DAC 23a is set to a maximum current value at time t 14 The output voltage value of the DAC23a rises to t 14 From time t 15 The output voltage value is held for a predetermined time until the target voltage value output from the DAC 23a is equal to the coil voltage value. In this process, the comparator 27a does not output because it is considered that the target voltage value output from the DAC 23a and the coil voltage value become equal. As a result, the PWM control unit 24a controls to maintain the drive current applied to the A-phase coil of the stepping motor 1. The A-phase drive current of the stepping motor 1 is maintained according to the control of the PWM control unit 24a.
[0052] (End of the fourth section:t 15 ) Based on the drive signal input from the FPGA 22, the output voltage value of the DAC 23a is 15 When the voltage value reaches the target voltage, it returns to the voltage value indicating the target drive current. In this process, it is considered that the target voltage value output from the DAC 23a becomes smaller than the coil voltage value, so the comparator 27a outputs "0". As a result, the PWM control unit 24a controls the drive current applied to the A-phase coil of the stepping motor 1 to decrease until it becomes the target drive current. In response to the control of the PWM control unit 24a, the A-phase drive current of the stepping motor 1 decreases to the target drive current.
[0053] The drive signal adjustment generation unit 223 of the FPGA 22 generates a drive signal adjusted so that the output voltage value of the DAC 23a shows the fluctuation of the first to fourth intervals during one drive time. The time from the start of the first interval to the end of the second interval corresponds to (1) the time required to reach the target drive current value from the initial value. The third interval corresponds to (2) the time required to reach the maximum current value greater than the target drive current value after reaching the target drive current value. The fourth interval corresponds to (3) the time required to reach the maximum current value greater than the target drive current value until a predetermined time of overshoot has elapsed after reaching the maximum current value greater than the target drive current value. These predetermined times are determined using values stored in the flash memory 21 as "predetermined times required to reach a determined current value". The drive signal adjustment generation unit 223 determines the start time and end time of each interval, such as the first to fourth intervals, using values stored in the flash memory 21 as "predetermined times required to reach a determined current value".
[0054] In the next driving time, as shown in FIG. 4(a), the output voltage value of the DAC 23b is changed to the next t 21 From 25 At the timing of t 11 From 154(b) . In response to the fluctuation in the output voltage value of DAC 23b, PWM control unit 24b controls the drive current applied to the B-phase coil of stepping motor 1 so as to change as desired. In response to the control of PWM control unit 24b, the B-phase drive current of stepping motor 1 fluctuates as shown in FIG. 4(b).
[0055] Furthermore, in the next driving time, as shown in FIG. 4(a), the output voltage value of the DAC 23a is changed to the next t 31 From 35 At the timing of t 11 From 15 4(a) in the same manner as the output voltage value of the DAC 23a in FIG. 4(a). In response to the fluctuation of the output of the DAC 23a, the PWM control unit 24a controls the drive current applied to the A-phase coil of the stepping motor 1 so as to change as desired. In response to the control of the PWM control unit 24a, the A-phase drive current of the stepping motor 1 changes 31 From 35 At this time, the t in Fig. 4(a) fluctuates as shown in 31 From 35 As shown in FIG. 1, the PWM control unit 24a controls the PWM 11 From 15 During this period, the drive current of the A phase of the stepping motor 1 is changed in the opposite phase to that during this period.
[0056] In the example of Fig. 4, the driving current changes linearly, but the change pattern is not limited to this. The change in the driving current value over time will be described with reference to Figs. 5 to 7. The change in the driving current value over time is stored in the flash memory 21 as one of the parameters required for control.
[0057] 5 to 7 are diagrams showing the manner in which the drive current value applied to the coil of the motor changes over time. As shown in FIGS. 5 to 7, the drive current applied to the coil of the motor may change in an inclined, S-shaped, or step-like manner. FIG. 5 shows the manner in which the drive current value applied to the coil of the motor changes over time in the first to third sections. In FIG. 5(a), the drive current changes in an S-shaped manner from the start time t11 of the first section to the end time t14 of the third section. In FIG. 5(b), the drive current changes in a step-like manner from the start time t11 of the first section to the end time t14 of the third section.
[0058] Figure 6 shows an example of the change in the drive current value applied to the motor coil over time in the fifth section after the fourth section. Figure 6(a) shows a ramp-like change in the fifth section (from time t15 to time t16). Figure 6(b) shows an S-shaped change in the fifth section (from time t15 to time t16). Figure 6(c) shows a step-like change in the fifth section (from time t15 to time t16).
[0059] The fifth section can be determined using the value stored in flash memory 21 as the time required to reach the target current value after the specified time of overshoot has elapsed (4) among the "specified time required to reach the determined current value."
[0060] Fig. 7 shows the change in the drive current value applied to the motor coil over time from the start time t11 of the first interval to the end time t14 of the third interval and in the fifth interval (time t15 to time t16). In Fig. 7(a), the drive current is changed stepwise from the start time t11 of the first interval to the end time t14 of the third interval, and also changed stepwise in the fifth interval (time t15 to time t16). In Fig. 7(b), the drive current is changed in an S-shape from the start time t11 of the first interval to the end time t14 of the third interval, and also changed stepwise in the fifth interval (time t15 to time t16).
[0061] The drive signal adjusting and generating unit 223 of the FPGA 22 can generate a drive signal that changes the output voltage value of the DAC 23a so that the drive current given to the coil of the motor has the above-mentioned drive current form.
[0062] Next, the operation of the FPGA that generates the drive signals that change the output voltage values of the DACs 23a and 23b as described above will be described.
[0063] FIG. 8 is a flowchart showing the operation of the FPGA.
[0064] The drive signal generation timing unit 221 determines whether to start outputting a drive pulse (step S101). If it is determined to start outputting a drive pulse (step S101: YES), the target drive current acquisition unit 222 acquires parameters such as a target drive current (step S102). The target drive current acquisition unit 222 passes the acquired parameters such as the target drive current to the drive signal adjustment generation unit 223.
[0065] When the drive signal adjustment generation unit 223 receives parameters such as the target drive current, the first adjustment unit 224 generates a drive signal in which the time required to reach the target drive current value is adjusted to be longer than the motor drive reference time (step S103). 11 From 13 The fluctuations are as shown in the figures.
[0066] After generating a drive signal that reaches the target drive current value, the drive signal adjustment generation unit 223 generates a drive signal adjusted in the second adjustment unit so as to reach a maximum current value greater than the target drive current value (step S104). 13 From 14 The fluctuations are as shown in the figures.
[0067] After the drive signal adjustment generation unit 223 generates a drive signal that reaches a maximum current value greater than the target drive current value, the second adjustment unit judges whether a predetermined time has passed since the maximum current value greater than the target drive current value was reached (step S105). If the second adjustment unit cannot judge that the predetermined time has passed (step S105: NO), it periodically repeats the judgment of step S105, and generates a drive signal adjusted to maintain a maximum current value greater than the target drive current value until it judges that the predetermined time has passed. With this drive signal, the output voltage value of DAC23a is adjusted to t in FIG. 14 From 15 maintain a constant value as shown in
[0068] When the second adjustment unit determines that the predetermined time has elapsed (step S105: YES), it adjusts the drive current value back to the target drive current value (step S106). 15 It fluctuates as shown in
[0069] Fig. 9 is a diagram showing position fluctuations from drive to stop in each drive current control method. In Fig. 9, the target drive position is a position of 1.8 (deg). Curve A shows the fluctuations when the drive current is controlled by full-step drive. Curve B shows the fluctuations when the drive current is controlled by micro-step drive. Curve C shows the fluctuations when the drive current is controlled by the drive method of this embodiment.
[0070] In the example shown in FIG. 9, the stopping position of curve A is at 1.91 (deg). The error between the read position of curve A and the target stopping position is +0.11 (deg). The stopping position of curve B is at 1.75 (deg). The error between the read position of curve B and the target stopping position is -0.05 (deg). The stopping position of curve C is at 1.80 (deg). The error between the read position of curve C and the target stopping position is 0.00 (deg).
[0071] As shown in Fig. 9, curve A, which indicates full-step driving, vibrates greatly, takes time to stop, and does not stop completely by the time the position information is read. On the other hand, curve B, which indicates micro-step driving, stops completely when the position information is read, but stops before reaching the target driving position due to insufficient torque. In contrast, curve C, which indicates the driving method of this embodiment, stops completely when the position information is read, and stops at the target driving position.
[0072] In this way, the motor control device, motor control system, and motor control method of this embodiment make it possible to suppress the effects of both the vibrations that occur at each step and the moment of inertia of the rotor, making it possible to stop the rotor with high accuracy.
[0073] (Modification of the embodiment) In the above embodiment, a specific example has been described using the motor control system having the configuration in Fig. 1, but the present invention is not limited to the configuration in Fig. 1. Similarly, the configurations of the stepping motor 1 and the motor control device 2 are not particularly limited to the example described.
[0074] For example, instead of the FPGA 22, a program processing device (e.g., a microcontroller: MCU) may be configured having hardware elements such as a processor such as a CPU, various memories such as a ROM and a RAM, a timer (counter), an A / D conversion circuit, an input / output I / F circuit, and a clock generation circuit, with each component connected to each other via a bus or a dedicated line. In this case, the processor of the program processing device performs various calculations according to a program stored in a flash memory 21 such as a memory, and controls peripheral circuits such as the A / D conversion circuit and the input / output I / F circuit, thereby realizing the configuration of each functional unit shown in FIG. 2.
[0075] In the above embodiment, the transitions of the voltage value and the drive current in the DAC output shown in FIG. 4 are specific examples, and the manner of transition is not limited to these.
[0076] In the above embodiment, the process flow of the FPGA shown in FIG. 8 is a specific example, and the process flow is not limited to this. [Explanation of symbols]
[0077] 1... stepping motor, 2... motor control device, 21... flash memory, 22... FPGA, 23a, 23b... DAC, 24a, 24b... PWM control unit, 25a, 25b... H-bridge circuit, 26a, 26b... current detection resistor, 27a, 27b... comparator, 221... drive signal generation timing unit, 222... target drive current acquisition unit, 223... drive signal adjustment generation unit, 224... first adjustment unit, 225... second adjustment unit, 100... motor control system
Claims
1. a drive signal generating unit that outputs a drive signal that designates a target drive current value indicating a drive current to be applied to the stepping motor so as to rotate the stepping motor to a target drive position; a target voltage value generating unit that generates a target voltage value based on the drive signal; a comparator that outputs a comparison result between the target voltage value and a voltage value corresponding to a drive current applied to the stepping motor; a control signal generating unit that generates a control signal for controlling a drive current applied to the stepping motor based on a result of the comparison, The drive signal generating unit a first adjustment unit that adjusts the drive signal so that the drive current applied to the stepping motor changes from an initial value to the target drive current value in a time longer than a motor drive reference time, which is a time required for the stepping motor to reach the target drive position when the drive current applied to the stepping motor is instantaneously switched from the initial value to the target drive current value; a second adjustment unit that adjusts the drive signal so that the drive current applied to the stepping motor returns to the target drive current value after overshooting a maximum current value greater than the target drive current value for a predetermined period of time. Motor control device.
2. 2. The motor control device according to claim 1, the first adjustment unit and the second adjustment unit adjust the drive signal so that a time period during which the drive current applied to the stepping motor overshoots from the initial value to a maximum current value greater than the target drive current value and then returns to the target drive current value does not exceed a single drive time. Motor control device.
3. 3. The motor control device according to claim 1, the first adjustment unit and the second adjustment unit adjust the drive signal so that the drive current applied to the stepping motor includes a portion that exhibits an S-curve or a step-like shape from the initial value to a maximum current value that is greater than the target drive current value. Motor control device.
4. 4. The motor control device according to claim 1, the second adjustment unit adjusts the drive signal so that the drive current applied to the stepping motor includes a portion that exhibits an S-curve or a step-like shape from a maximum current value that is greater than the target drive current value back to the target drive current value. Motor control device.
5. a drive signal generating step of outputting a drive signal designating a target drive current value indicating a drive current to be applied to the stepping motor so as to rotate the stepping motor to a target drive position; a target voltage value generating step of generating a target voltage value based on the drive signal; a comparison result output step of outputting a comparison result between the target voltage value and a voltage value corresponding to a drive current applied to the stepping motor; and generating a control signal for controlling a drive current applied to the stepping motor based on a result of the comparison, The drive signal generating step includes: a first adjustment sub-step of adjusting the drive signal so that the drive current applied to the stepping motor changes from an initial value to the target drive current value in a time longer than a motor drive reference time, which is a time required for the stepping motor to reach the target drive position when the drive current applied to the stepping motor is instantaneously switched from the initial value to the target drive current value; and a second adjusting sub-step of adjusting the drive signal so that the drive current applied to the stepping motor returns to the target drive current value after overshooting a maximum current value greater than the target drive current value for a predetermined period of time. Motor control methods.
6. a drive signal generating unit that outputs a drive signal that designates a target drive current value indicating a drive current to be applied to the stepping motor so as to rotate the stepping motor to a target drive position; a target voltage value generating unit that generates a target voltage value based on the drive signal; a comparator that outputs a comparison result between the target voltage value and a voltage value corresponding to a drive current applied to the stepping motor; a control signal generating unit that generates a control signal for controlling a drive current applied to the stepping motor based on a result of the comparison, a first adjustment step of adjusting the drive signal so that the drive current applied to the stepping motor changes from an initial value to the target drive current value in a time longer than a motor drive reference time, which is a time required for the stepping motor to reach the target drive position when the drive current applied to the stepping motor is instantaneously switched from the initial value to the target drive current value; a second adjustment step of adjusting the drive signal so that the drive current applied to the stepping motor returns to the target drive current value after overshooting the maximum current value greater than the target drive current value for a predetermined period of time. Motor control program.
Citation Information
Patent Citations
Method for gently starting, stopping or changing speed of stepping motor
JP1997103094A
Motor driver
JP2002078385A
Drive device for three-phase stepping motor
JP2008167579A
Motor control device, lens device, camera system, motor control method, program and storage medium
JP2015023695A
Motor driving circuit, driving method for the same and electronic equipment using the same
JP2017060334A