Motor control device

By introducing the operating state detection and advance angle value change mechanism into the motor control device, the problem of poor operation of the vehicle opening and closing body during automatic opening and closing is solved, and smooth operation in different states is achieved.

CN120684075APending Publication Date: 2025-09-23MITSUBA CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510321446.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2025-02-18
Filing Date
2025-03-18
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

In the prior art, when the vehicle opening and closing body is automatically opened and closed, it cannot be properly controlled according to the operating state, resulting in the opening and closing body not operating smoothly.

Method used

A motor control device is used, which includes a control signal generating unit, an advance angle value setting unit and an operating state detecting unit. The advance angle value is changed by detecting the operating state of the opening and closing body to ensure proper control of the drive motor.

Benefits of technology

The vehicle opening and closing body can be opened and closed smoothly and automatically under various operating conditions, thereby improving the operational stability and efficiency of the opening and closing body.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120684075A_ABST
    Figure CN120684075A_ABST
Patent Text Reader

Abstract

The invention provides a motor control device capable of more appropriately controlling a drive motor so that an opening and closing body of a vehicle can be smoothly and automatically opened and closed regardless of the operating state. The motor control device is provided with: a control signal generation unit (512) for generating a motor control signal for supplying drive power to a drive motor (60); an advance angle value setting unit (514) that sets a control advance angle value ([theta] a) for advancing the phase of the motor control signal; and an operation state detection unit (513) that detects the operation state of the opening / closing body, and the advance angle value setting unit (514) sets the control advance angle value ([theta] a) in accordance with the operation state of the opening / closing body detected by the operation state detection unit (513).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a motor control device for controlling a drive motor for automatically opening and closing an opening and closing body of a vehicle. Background Art

[0002] Conventionally, motor control devices that control a drive motor for automatically opening and closing an opening and closing body included in a vehicle, such as a sliding door, sometimes perform so-called advance angle control, i.e., set an advance angle value for advancing the phase of a motor control signal.

[0003] Patent document 1 states that in a vehicle opening and closing body control device that performs automatic opening and closing operation in which the opening and closing body of the vehicle is automatically opened and closed by driving a motor, and auxiliary opening and closing operation in which the opening and closing body is opened and closed by assisting the manual operating force on the opening and closing body with the driving force of the motor, during the auxiliary opening and closing operation, an advance angle value is set to advance the phase of the motor drive signal compared to the automatic opening and closing operation.

[0004] More specifically, Patent Document 1 describes that during assisted opening and closing operation, when the sliding door's movement speed changes due to a user's manual operating force, the motor's rotational speed is acquired and an advance angle value corresponding to the acquired motor's rotational speed is set. Furthermore, Citation Document 1 describes that during automatic opening operation, no advance angle value is set, or a value is set that is smaller than the advance angle value during assisted opening and closing operation.

[0005] [Prior art literature]

[0006] [Patent Document]

[0007] Patent Document 1: Japanese Patent No. 6939447 Summary of the Invention

[0008] [Problems to be solved by the invention]

[0009] In the invention of Patent Document 1, during assisted opening and closing operation, the lead angle value is set according to the motor rotational speed, which varies with the user's manual operating force. This facilitates more appropriate control of the opening and closing movement of the opening and closing body. On the other hand, when the opening and closing body is automatically opened and closed without the user's manual operating force, it is considered that the lead angle value is not set or is fixed to a fixed value. Therefore, depending on the operating state of the opening and closing body, such as the location or environment in which the vehicle's opening and closing body is automatically opened and closed, or the position of the opening and closing body during automatic opening and closing, smooth operation of the opening and closing body may be impossible.

[0010] An object of the present disclosure is to provide a motor control device that can more appropriately control a drive motor so that an opening and closing body of a vehicle can be opened and closed smoothly and automatically regardless of an operating state.

[0011] [Technical means to solve the problem]

[0012] The motor control device disclosed in the present invention controls a drive motor connected to an opening and closing body of a vehicle and used to automatically open and close the opening and closing body. The motor control device includes: a control signal generating unit, which generates a motor control signal for supplying driving power to the motor; an advance angle value setting unit, which sets an advance angle value for advancing the phase of the motor control signal; and an operating state detecting unit, which detects the operating state of the opening and closing body; and an advance angle value changing unit, which changes the advance angle value set by the advance angle value setting unit in response to the operating state of the opening and closing body detected by the operating state detecting unit.

[0013] [Effects of the Invention]

[0014] According to the motor control device of the present disclosure, the drive motor can be controlled more appropriately so that the opening and closing body of the vehicle can be opened and closed smoothly and automatically regardless of the operating conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a side view showing a schematic configuration example of a vehicle equipped with a motor control device according to an embodiment.

[0016] Figure 2 It is a plan view showing a configuration example of a vehicle opening and closing body control device including a motor control device according to an embodiment.

[0017] Figure 3 It is a front view showing a structural example of a drive unit included in the vehicle opening and closing body control device.

[0018] Figure 4 It is a perspective view showing a structural example of a drum included in the drive unit.

[0019] Figure 5 This is a schematic diagram showing a configuration example of a main part of a motor control device according to an embodiment.

[0020] Figure 6 This is a flowchart showing an example of a flow of setting / changing the control advance angle value.

[0021] Figure 7A This is a diagram showing an example of a table that defines the relationship between the actual operating speed of the sliding door and the additional advance angle value.

[0022] Figure 7B This is a diagram showing an example of a table that defines the relationship between the actual operating speed of the sliding door and the control advance angle value.

[0023] Figure 8This is a diagram showing an example of a map that defines the relationship between the actual operating speed, the output duty, and the correction amount.

[0024] Figure 9 This is a diagram showing an example of the relationship between the door position and the target speed of a sliding door.

[0025] Figure 10 This is a diagram for explaining the transition between the startup setting control and the normal setting control.

[0026] Figure 11 This is a flowchart illustrating an example of the start-time setting control performed by the advance angle value setting unit.

[0027] Explanation of Figure Numbers

[0028] 10: Electric vehicles

[0029] 11: Car body

[0030] 20: Electric sliding door device (vehicle opening and closing body control device)

[0031] 21: Drive unit

[0032] 30: Shell

[0033] 50: Motor control unit (ECU)

[0034] 51: Drive control unit

[0035] 52: Inverter (motor driver)

[0036] 53: Current sensor

[0037] 60: Drive motor

[0038] 61: Rotation angle sensor

[0039] 70: Operation switch

[0040] 511: Speed ​​control unit

[0041] 512: PWM signal generation unit (control signal generation unit)

[0042] 513: Operation status detection unit

[0043] 514: Advance angle value setting unit

[0044] 515: Storage DETAILED DESCRIPTION

[0045] Hereinafter, one embodiment of the present disclosure will be described in detail with reference to the accompanying drawings.

[0046] <Outline of Power Sliding Door System>

[0047] Figure 1 It is a side view showing a schematic configuration example of a vehicle equipped with the power sliding door device according to one embodiment of the present disclosure. Figure 2 Yes Figure 1 A plan view of a structural example of an electric sliding door device.

[0048] Figure 1 The vehicle 10 shown is, for example, a single-cab vehicle. A sliding door (opening and closing body) 13 is provided on the side of the vehicle body 11 forming the vehicle 10, which opens and closes the opening 12 along a guide rail 14. Figure 2 As shown, a roller assembly 13 a is connected to the sliding door 13 , and the roller assembly 13 a moves along a guide rail 14 fixed to a side portion of the vehicle body 11 together with the sliding door 13 .

[0049] The results, such as Figure 1 and Figure 2 As shown in FIG. 1 , the sliding door 13 moves in the front-rear direction of the vehicle 10 between a “fully closed position” and a “fully open position” to open and close the opening 12. Figure 2 As shown, the guide rail 14 has a retractable portion 14a curved toward the interior (upper side in the figure) of the vehicle compartment on the front side of the vehicle. The roller assembly 13a is guided by the retractable portion 14a, allowing the sliding door 13 to close the opening 12 and converge with the side surfaces of the vehicle body 11. Specifically, in addition to the guide rail 14 provided in the center of the vehicle body 11, guide rails (not shown) are also provided at the upper and lower portions of the vehicle body 11.

[0050] like Figure 2 As shown, the vehicle 10 is equipped with an electric sliding door device (vehicle opening and closing body control device) 20 that automatically opens and closes the sliding door 13. The electric sliding door device 20 is a cable-type opening and closing device in this example, including a drive unit 21 having a drive motor 60, an opening side cable 22a, a closing side cable 22b, and an electronic control unit (ECU) 50 as a motor control device. The drive unit 21 is, for example, arranged in the vehicle body 11 and approximately in the center of the extension direction of the guide rail 14, and uses the drive motor 60 to open and close the driving sliding door 13. The ECU 50 controls the rotation of the drive motor 60. In addition, the ECU (motor control device) 50 will be described in detail later.

[0051] Both the opening cable 22a and the closing cable 22b are connected to the sliding door 13 via the roller assembly 13a, and they transmit power from the drive unit 21 to the sliding door 13. Specifically, the opening cable 22a is guided into the drive unit 21 via a first reversing pulley 23a located at the rear of the vehicle 10, while the closing cable 22b is guided into the drive unit 21 via a second reversing pulley 23b located at the front of the vehicle 10. Thus, the drive unit 21 drives the sliding door 13 in the opening direction by winding the opening cable 22a, and drives the sliding door 13 in the closing direction by winding the closing cable 22b.

[0052] Figure 3 Yes Figure 2 A front view of a structural example of a drive unit in FIG. Figure 4 Yes Figure 3 A three-dimensional diagram of an example of the structure of a drum. Figure 3 The drive unit 21 shown includes a housing 30 made of a resin material such as plastic. The housing 30 also functions as a frame that supports the various components or mechanisms that constitute the drive unit 21. The drive unit 21 is fixed to the vehicle body 11 (see FIG. 1 ) via fixing portions FP provided at four locations of the housing 30 using bolts or the like (not shown). Figure 1 、 Figure 2 ).

[0053] In the housing 30, a drive motor 60 is provided as a power source for the drive unit 21. The drive motor 60 is, for example, a flat brushless motor that can rotate forward and reverse. By using a brushless motor as the drive motor 60, the increase in the thickness of the drive unit 21 can be suppressed. Inside the housing 30 and near the drive motor 60, a reduction mechanism (not shown) including a planetary gear reducer is provided. The reduction mechanism increases the torque by reducing the rotation of the drive motor 60 at a predetermined ratio, and utilizes this high-torque driving force to rotate the output shaft 32. In addition, in the approximately central portion of the housing 30, a drum accommodating chamber 30a formed in a roughly cylindrical shape is provided. The drum accommodating chamber 30a is coaxially arranged with respect to the drive motor 60, and a drum 33 is rotatably accommodated in its interior.

[0054] like Figure 4As shown, the drum 33 is formed into a generally cylindrical shape with a spiral guide groove 33a on its outer circumference. Its axis is fixed to the output shaft 32 that protrudes into the drum housing chamber 30a. One end of the open-side cable 22a (the same applies to the closed-side cable 22b) is fixed to the drum 33 by a locking block 34. When the drum 33 rotates counterclockwise (CCW), the open-side cable 22a is wound along the guide groove 33a from one axial side. When the drum 33 rotates clockwise (CW), the closed-side cable 22b is wound along the guide groove 33a from the other axial side.

[0055] Figure 3 In the drum storage chamber 30a, a substrate storage chamber (not shown) is provided at the back side of the drum storage chamber 30a and close to the open side tensioner mechanism 40a and the closed side tensioner mechanism 40b (lower part in the figure). The substrate storage chamber houses a control substrate that controls the rotation of the drive motor 60 and is equivalent to Figure 2 The control board is electrically connected to a battery (power source) mounted in the vehicle 10 or an operation switch in the vehicle cabin via the connector connection portion 35a and the connector connection portion 35b.

[0056] Here, the control board (ECU 50) responds to the "ON" operation of the operating switch by driving the drive motor 60 in a counterclockwise (CCW) direction. This causes the output shaft 32 and drum 33 to rotate counterclockwise at high torque, causing the opening cable 22a to wind around the drum 33 while pulling the sliding door 13. As a result, the sliding door 13 is automatically controlled to open. At this time, the closing cable 22b is fed from the drum 33 to the exterior of the housing 30.

[0057] Similarly, the control board (ECU 50) drives the drive motor 60 to rotate clockwise (CW) in response to the "closing operation" of the operating switch. As a result, the output shaft 32 and the drum 33 rotate clockwise with high torque, and the closing side cable 22b is wound around the drum 33 while pulling the sliding door 13. As a result, the sliding door 13 is automatically controlled in the closing direction. At this time, the opening side cable 22a is sent out from the drum 33 to the outside of the housing 30. In addition, each cable 22a, 22b is connected to the reversing pulley 23a, reversing pulley 23b (see Figure 2 ) is covered by a flexible outer tube TU so as to move inside it.

[0058] Within the housing 30, adjacent to the drum housing chamber 30a, are located an open-side tensioner housing chamber 30b and a closed-side tensioner housing chamber 30c. The open-side tensioner housing chamber 30b and the closed-side tensioner housing chamber 30c house the open-side tensioner mechanism 40a and the closed-side tensioner mechanism 40b, respectively, which apply a predetermined tension to the open-side cable 22a and the closed-side cable 22b. Each of the open-side tensioner mechanism 40a and the closed-side tensioner mechanism 40b includes a pulley 46 that rotates about a pulley shaft 45 and a coil spring (elastic member) 44 that presses against the pulley 46.

[0059] The opening-side cable 22a is wound around the pulley 46 of the opening-side tensioner mechanism 40a and then wound onto the drum 33. Similarly, the closing-side cable 22b is wound around the pulley 46 of the closing-side tensioner mechanism 40b and then wound onto the drum 33. At this time, the opening-side tensioner mechanism 40a and the closing-side tensioner mechanism 40b, respectively, press the pulley 46 using the coil spring 44, thereby removing slack from the opening-side cable 22a and the closing-side cable 22b. For example, the cables 22a and 22b may stretch due to repeated pulling on the heavy sliding door 13. The tensioners 40a and 40b remove the slack caused by this cable extension.

[0060] <General structure of the ECU and its surroundings>

[0061] Figure 5 Yes Figure 2 A schematic diagram showing an example of the structure of the main parts around the ECU. Figure 5 As shown, ECU 50 as a motor control device includes a drive control unit 51, an inverter (motor driver) 52, and a current sensor 53. ECU 50 is connected to an operation switch 70 such as a switch around the driver's seat of vehicle 10 or a remote control switch.

[0062] The drive control unit 51 generates a pulse width modulation (PWM) signal for the inverter 52 in response to an operation command from the operating switch 70, thereby controlling the rotation of the drive motor 60. As an example, the drive control unit 51 controls the rotation of the drive motor 60 using so-called sine wave drive. However, the drive control unit 51 may also control the rotation of the drive motor 60 using so-called rectangular wave control. The drive control unit 51 will be described in detail later.

[0063] The operation switch 70 issues various commands corresponding to user operations, including an automatic opening command for automatically moving the sliding door 13 toward the fully open position or an automatic closing command for automatically moving the sliding door 13 toward the fully closed position.

[0064] Although not shown in the figure, the inverter 52 includes six switching elements, such as metal oxide semiconductor field effect transistors (MOSFETs) and freewheeling diodes. These six switching elements generate three-phase drive voltages Vu, Vv, and Vw by switching in accordance with PWM signals PWMu, PWMv, and PWMw from the drive control unit 51. The drive motor 60, which is a brushless motor MT, is driven by the three-phase drive voltages Vu, Vv, and Vw generated by the inverter 52.

[0065] The current sensor 53 is provided at the output terminal of the inverter 52 , in other words, the input terminal of the drive motor 60 , and detects the operating current (also called phase current, actual current value, or load current value) actually flowing to the drive motor 60 .

[0066] The following describes the drive control unit 51 in further detail. The drive control unit 51, for example, includes a microcontroller including a central processing unit (CPU), and is mounted on the control substrate (wiring board) that constitutes the ECU 50 along with the inverter 52. However, the drive control unit 51 is not limited to a microcontroller and may also partially or entirely include a field programmable gate array (FPGA) or dedicated hardware. The drive control unit 51 may include program processing by the CPU, hardware processing by dedicated hardware, or a combination thereof.

[0067] Typically, the drive motor 60 controlled by the drive control unit 51 is a three-phase brushless DC (brushless direct current) motor having a rotor composed of permanent magnets and a stator that generates magnetic force to rotate the rotor. The motor also includes a rotation angle sensor 61 that detects the rotor's rotational position (rotation angle). Typically, the rotation angle sensor 61 is a Hall effect integrated circuit (IC) that generates a three-phase position detection signal corresponding to the rotor's rotational position. The rotation angle sensor 61 is not limited to a Hall effect IC; for example, a rotary encoder or resolver may also be used.

[0068] The drive control unit 51 includes a speed control unit 511 , a PWM signal generation unit 512 , an operation state detection unit 513 , an advance angle value setting unit 514 , and a storage unit 515 .

[0069] The speed control unit 511 obtains the door position based on the detection results of the operating state detection unit 513. For example, it obtains the door target speed by referring to a speed control map that defines the relationship between the door position and the door target speed of the sliding door 13. In other words, the speed control unit 511 obtains the target rotational speed of the drive motor 60 that drives the sliding door 13 by referring to the speed control map. In this example, the speed control map is pre-stored in the storage unit 515. Furthermore, the speed control unit 511 obtains the control advance angle value θa set by the advance angle value setting unit 514.

[0070] Speed ​​control unit 511 calculates a target current by performing, for example, proportional-integral (PI) control based on the error between the acquired door target speed and the door movement speed (actual movement speed) detected by operating state detection unit 513, as well as control advance angle value θa. More specifically, speed control unit 511 calculates a duty cycle command value DT for the PWM signal by performing, for example, PI control based on the error between the target current and the phase currents (coil currents) Iu, Iv, and Iw from current sensor 53, as well as control advance angle value θa.

[0071] The PWM signal generator (control signal generator) 512 generates a motor control signal for supplying drive power to the drive motor 60. Specifically, the PWM signal generator 512 receives the duty cycle command value DT and the like sent from the speed controller 511 and generates PWM signals PWMu, PWMv, and PWMw reflecting the duty cycle.

[0072] The operating state detection unit 513 detects the operating state of the sliding door (opening and closing body) 13 based on the number of cycles, frequency, phase difference, etc. of the position detection signal Pu, the position detection signal Pv, and the position detection signal Pw from the rotation angle sensor 61. The so-called operating state of the sliding door 13 includes, for example, the door position, door movement speed, and door opening and closing direction of the sliding door 13. In addition, the operating state of the sliding door 13 also includes the state where the sliding door 13 has stopped. In the present embodiment, the operating state detection unit 513 detects the operating state of the sliding door 13 based on information such as the rotation position, rotation speed, and rotation direction of the drive motor 60 obtained based on the measurement results of the rotation angle sensor 61. At this time, the door position is output as a count value of the number of rotations of the drive motor 60.

[0073] The method for detecting the operating state of the sliding door 13 is not particularly limited. If the motor control device 50 includes sensors capable of detecting the door position of the sliding door 13, such as a distance sensor for measuring the distance to the sliding door 13, the operating state detection unit 513 may detect the operating state of the sliding door 13 based on the measurement results of the distance sensor or other sensors.

[0074] The advance angle setting unit 514 sets a control advance angle value θa for advancing the phase of the PWM signal (motor control signal). The advance angle setting unit 514 appropriately sets the control advance angle value θa based on, for example, the operating state of the sliding door 13 detected by the operating state detection unit 513. More specifically, the advance angle setting unit 514 sets the control advance angle value θa based on, for example, the actual operating speed of the sliding door 13 or the load of the sliding door 13, such as the output duty cycle or operating current of the drive motor 60 (in other words, the load of the drive motor 60).

[0075] The speed control unit 511 controls the rotation of the drive motor 60 based on the control advance angle value θa set by the advance angle value setting unit 514. Specifically, the speed control unit 511 performs so-called advance angle control based on the control advance angle value θa set by the advance angle value setting unit 514. Advance angle control refers to control that intentionally shifts the timing of applying the voltage (operating voltage) output by the inverter 52 to the drive motor 60 from the reference position, using the position at which an edge of the output signal of the rotation angle sensor 61 is generated as the reference position.

[0076] Hereinafter, setting examples 1 to 4 will be described as an example of a setting flow of the control advance angle value θa by the advance angle value setting unit 514 .

[0077] (Setting Example 1)

[0078] In setting example 1, the advance angle value setting unit 514 appropriately sets the control advance angle value θa according to the actual operating speed Va of the sliding door 13 detected by the operating state detection unit 513. Specifically, the advance angle value setting unit 514 calculates the control advance angle value θa based on the basic advance angle value θb [deg] and the additional advance angle value θc [deg] according to the following equation (1).

[0079] θa=θb+θc (1)

[0080] The so-called basic advance angle value θb is a fixed value pre-set based on the characteristics of the drive motor 60, etc., and does not change during the operation of the sliding door 13. The basic advance angle value θb is appropriately set for the rotation direction (CW, CCW) of the drive motor 60, and its value is not particularly limited. As an example, in Setting Example 1, the basic advance angle value θb is set to approximately 110 [deg] when the rotation direction of the drive motor 60 is clockwise (CW), and the basic advance angle value θb is set to approximately 230 [deg] when the rotation direction of the drive motor 60 is counterclockwise (CCW). In other words, the basic advance angle value θb is set to different values ​​when the sliding door 13 moves in the opening direction and when it moves in the closing direction.

[0081] As an example, the additional advance angle value θc can be set to a value that varies according to the actual operating speed Va of the sliding door 13. In Setting Example 1, the additional advance angle value θc is set to the speed advance angle value θd calculated using the following equation (2) represented by the actual operating speed Va of the sliding door 13, the speed advance angle ratio (first speed advance angle ratio) Ra [deg / (mm / s)] corresponding to the speed of the sliding door 13, and the coefficient k1. The first speed advance angle ratio Ra is set in advance through experiments, etc. The coefficient k1 is a value unique to each drive motor 60 and is determined based on the various characteristics of each drive motor 60.

[0082] θd=Va×(Ra×k1) (2)

[0083] Therefore, in Setting Example 1, the additional advance angle value θc (=θd) varies linearly with the actual operating speed Va of the sliding door 13 during the opening and closing operation of the sliding door 13, that is, while the actual operating speed Va of the sliding door 13 varies. Consequently, the control advance angle value θa also varies linearly with the actual operating speed Va of the sliding door 13.

[0084] Alternatively, the speed advance angle value θd can be calculated using the following equation (3), which is represented by the period (pulse period) Ta [s] of detecting the edge of the output signal (pulse) of the rotation angle sensor 61, the speed advance angle ratio (second speed advance angle ratio) Rb [Deg / (s)] based on the pulse period, and the coefficient k2. The second speed advance angle ratio Rb, like the first speed advance angle ratio Ra, is set in advance through experiments, etc. The coefficient k2 is a value unique to each drive motor 60 and is determined based on the various characteristics of each drive motor 60.

[0085] θd=Ta×(Rb×k2) (3)

[0086] Figure 61 is a flow chart showing an example of a setting / changing process of the control advance angle value in setting example 1. When the operating switch 70 is operated and the movement of the sliding door 13 toward the opening direction or the closing direction begins, as shown in FIG. Figure 6 As shown, first, in step S01, the advance angle value setting unit 514 sets the control advance angle value θa to the basic advance angle value θb. In the case of setting example 1, when the sliding door 13 is stopped, the additional advance angle value θc calculated using equation (2) is 0. Therefore, the control advance angle value θa calculated using equation (1) becomes the basic advance angle value θb.

[0087] Next, in step S02 , the operation of the drive motor 60 is started based on the control advance angle value θa (=θb), and in steps S03 and thereafter, the speed control unit 511 controls the drive motor 60 for operating the sliding door 13 .

[0088] In step S03, the actual operating speed Va of the sliding door 13 is calculated. As an example, the operating state detection unit 513 calculates the actual operating speed Va of the sliding door 13 based on the rotation speed of the drive motor 60 measured by the rotation angle sensor 61. Next, in step S04, the advance angle value setting unit 514 calculates the additional advance angle value θc based on the actual operating speed Va of the sliding door 13 or the pulse period Ta. As an example, the advance angle value setting unit 514 calculates the speed advance angle value θd based on the above formula (2) according to the actual operating speed Va of the sliding door 13, and sets the calculated speed advance angle value θd as the additional advance angle value θc. The additional advance angle value θc is calculated at fixed intervals during the operation of the sliding door 13. However, the additional advance angle value θc can be calculated as needed, and the timing of calculation may not be fixed intervals.

[0089] Next, the advance angle value setting unit 514 determines whether the additional advance angle value θc is greater than or equal to the preset upper limit value θm (step S05). If the additional advance angle value θc is less than the upper limit value θm (step S05: No), the process proceeds to step S06, where the advance angle value setting unit 514 calculates the control advance angle value θa based on the additional advance angle value θc. That is, according to equation (1), the control advance angle value θa is set to (θb + θc). Subsequently, in step S07, the speed control unit 511 changes the rotation control of the drive motor 60 based on the control advance angle value θa (=θb + θc) set by the advance angle value setting unit 514 (step S07).

[0090] On the other hand, in step S05, if the additional advance angle value θc is greater than the upper limit value θm (step S05: Yes), the process proceeds to step S08, where the additional advance angle value θc is set to the upper limit value θm, and then the process proceeds to step S06. Therefore, the control advance angle value θa at this time is set to (θb + θm). In step S07, the rotation of the drive motor 60 is controlled based on the set control advance angle value θa (= θb + θm).

[0091] As described above, by detecting the operating state of the sliding door 13 and appropriately setting the control advance angle value θa based on the detection result, the sliding door (opening and closing body) 13 can be smoothly opened and closed. Furthermore, in setting example 1, the advance angle value setting unit 514 calculates the control advance angle value θa based on equation (1) and equation (2) or equation (3). Thus, the control advance angle value θa changes linearly in accordance with the operating state of the sliding door 13. Consequently, the opening and closing of the sliding door (opening and closing body) 13 is facilitated to become smoother.

[0092] In this example, the speed advance angle value θd calculated based on the actual operating speed Va of the sliding door 13 is used as the additional advance angle value θc. However, the method for calculating the additional advance angle value θc is not limited to this. The additional advance angle value θc does not necessarily need to be the speed advance angle value θd. For example, it can be set to a load advance angle value θe based on the load of the sliding door 13 (or the load of the drive motor 60). For example, the additional advance angle value θc can be set to a load advance angle value (first load advance angle value) θe calculated using the following equation (4) represented by the output duty cycle Sa [%] of the drive power, the load advance angle ratio (first load advance angle ratio) Rc [deg / (%)] corresponding to the output duty cycle of the drive power, and the coefficient k3.

[0093] θe=Sa×(Rc×k3) (4)

[0094] Alternatively, the additional advance angle value θc may be set to a load advance angle value (second load advance angle value) θf calculated from the following equation (5), which is represented by the operating current Ia [A] flowing through the drive motor 60, the load advance angle ratio (second load advance angle ratio) Rd [deg / (A)] corresponding to the operating current of the drive motor 60, and the coefficient k4. The first load advance angle ratio Rc and the second load advance angle ratio Rd are previously determined through experiments, etc. Furthermore, the coefficients k3 and k4 are values ​​unique to each drive motor 60 and are determined based on the various characteristics of each drive motor 60.

[0095] θf=Ia×(Rd×k4) (5)

[0096] Furthermore, the additional advance angle value θc can also be calculated by combining the speed advance angle value θd with the first load advance angle value θe or the second load advance angle value θf and performing addition, subtraction, multiplication, and division. As an example, the additional advance angle value θc can be a value obtained by adding the speed advance angle value θd to the first load advance angle value θe, as shown in the following equation (6), or a value obtained by adding the speed advance angle value θd to the second load advance angle value θf, as shown in the following equation (7).

[0097] θc=θd+θe (6)

[0098] θc=θd+θf (7)

[0099] Furthermore, the additional advance angle value θc may be a value obtained by dividing the first load advance angle value θe by the speed advance angle value θd as shown in the following equation (8), or a value obtained by dividing the second load advance angle value θf by the speed advance angle value θd as shown in the following equation (9).

[0100] θc=θe / θd (8)

[0101] θc=θf / θd (9)

[0102] By calculating the additional advance angle value θc using the speed advance angle value θd and the first load advance angle value θe or the second load advance angle value θf, it is easier to more appropriately set the control advance angle value θa. Specifically, regardless of the movement range of the sliding door 13, the actual operating speed of the sliding door 13 (the speed of the drive motor 60) is more likely to approach the preset target speed. In other words, regardless of the movement range of the sliding door 13, the control advance angle value θa is more likely to be set so that the actual operating speed of the sliding door 13 approaches the target speed. As a result, the sliding door (opening and closing body) 13 can be opened and closed smoothly.

[0103] In particular, by setting the additional advance angle value θc to a value obtained by dividing the first load advance angle value θe or the second load advance angle value θf by the speed advance angle value θd, it is easier to further appropriately set the control advance angle value θa. For example, even when the electric vehicle 10 including the sliding door 13 is in a tilted state, the actual operating speed of the sliding door 13 is more likely to approach the target speed regardless of the movement range of the sliding door 13.

[0104] The so-called tilted state refers to a state where the electric vehicle 10 is stopped on a slope or the like, with the front of the electric vehicle 10 tilted high or low. As described above, by setting the additional advance angle value θc as the value obtained by dividing the first load advance angle value θe or the second load advance angle value θf by the speed advance angle value θd, the actual operating speed of the sliding door 13 is easily close to the target speed regardless of whether the electric vehicle 10 is in the front-high or front-low state, and regardless of the movement range of the sliding door 13.

[0105] Furthermore, the method for setting the advance angle control value θa is not limited to the method using equations (1) to (9). For example, a table or a map defining the relationship between the actual operating speed Va of the sliding door 13 and the additional advance angle value θc may be pre-stored in the storage unit 515. The advance angle value setting unit 514 may refer to the table or the like to obtain the additional advance angle value θc and calculate the control advance angle value θa according to equation (1).

[0106] Figure 7A 1 is a diagram showing an example of a table defining the relationship between the actual operating speed Va of the sliding door and the additional advance angle value θc when the drive motor rotates clockwise (CW). Figure 7A In the illustrated example, it is stipulated that the additional advance angle value θc is increased in stages as the actual operating speed Va of the sliding door 13 increases.

[0107] Specifically, when the actual operating speed Va of the sliding door 13 is within the range of 0 [mm / s] to 50 [mm / s], the additional advance angle value θc is set to 0 [degrees]. Therefore, when the actual operating speed Va is within the range of 0 [mm / s] to 50 [mm / s], the control advance angle value θa is set to the basic advance angle value θb. Furthermore, when the actual operating speed Va is within the range of 50 [mm / s] to 100 [mm / s], the additional advance angle value θc is set to 5 [degrees]. Therefore, when the actual operating speed Va is within the range of 50 [mm / s] to 100 [mm / s], the control advance angle value θa is (θb + 5).

[0108] That is, in this example, the additional advance angle value θc is set to increase by 5 degrees for every 50 mm / s increase in the actual operating speed Va of the sliding door 13. As a result, the control advance angle value θa increases by 5 degrees for every 50 mm / s increase in the actual operating speed Va of the sliding door 13.

[0109] Furthermore, for example, a table or a map defining the relationship between the actual operating speed Va of the sliding door 13 and the control advance angle value θa may be stored in advance in the storage unit 515 , and the advance angle value setting unit 514 may set the control advance angle value θa by referring to the table or the like.

[0110] Figure 7B 1 is a diagram showing an example of a table defining the relationship between the actual operating speed Va of the sliding door and the control advance angle value θa when the drive motor rotates clockwise (CW). Figure 7B In the illustrated example, it is stipulated that the control advance angle value θa is increased in stages as the actual operating speed Va of the sliding door 13 increases.

[0111] In this example, the control advance angle value θa is set to 10 degrees when the actual operating speed Va of the sliding door 13 is within the range of 0 [mm / s] to 50 [mm / s]. Furthermore, the control advance angle value θa is set to 15 degrees when the actual operating speed Va is within the range of 50 [mm / s] to 100 [mm / s]. That is, in this example, the control advance angle value θa is set to increase by 5 degrees for every 50 [mm / s] increase in the actual operating speed Va of the sliding door 13. Furthermore, the advance angle value setting unit 514 does not perform calculations based on the above-mentioned equations (1) to (9), but refers to Figure 7B The control advance angle value θa is set according to the actual operating speed Va of the sliding door 13, according to a table such as FIG.

[0112] In this way, even if the advance angle value setting unit 514 sets the control advance angle value θa corresponding to the actual operating speed Va of the sliding door 13 based on the table stored in the storage unit 515, the opening and closing action of the sliding door (opening and closing body) 13 can be made smoother.

[0113] (Setting Example 2)

[0114] Example 2 illustrates an example in which the advance angle value setting unit 514 appropriately modifies the additional advance angle value θc. As in Example 1, the advance angle value setting unit 514 in Example 2 calculates the control advance angle value θa based on equation (1). However, in this case, the additional advance angle value θc is modified based on the actual operating speed Va and the output duty (load) Sa. Furthermore, the output duty Sa can also be referred to as the duty ratio of the voltage applied to the drive motor 60.

[0115] Specifically, in setting example 2, for example, when the actual operating speed Va of the sliding door 13 is greater than V1 (50 [mm / s] in this example), a mapping diagram that specifies the relationship between the actual operating speed Va [mm / s] and the output duty cycle Sa [%] and the correction amount θk is pre-stored.

[0116] The advance angle value setting unit 514 refers to a map stored in the storage unit 515 , etc., to obtain a correction amount θk corresponding to the actual operating speed Va and the output duty Sa, and calculates an additional advance angle value θc based on the correction amount θk.

[0117] Figure 8This figure shows an example of a mapping diagram that defines the relationship between the actual operating speed Va [mm / s] and the output duty cycle Sa [%] and the correction amount θk. In this example, correction amounts θk11 to θk55 are set for each of the regions A11 to A55, which are determined by the actual operating speed Va and the output duty cycle Sa. The correction amount θk (θk11 to θk55) in each region A11 to A55 is not particularly limited and can be set appropriately. For example, the correction amount θk for each region A11 to A55 can be calculated based on the correction amounts of adjacent regions. More specifically, the correction amount θk for each region A11 to A55 can be calculated by adding, subtracting, multiplying, and dividing the correction amounts of adjacent regions—that is, by combining addition, subtraction, multiplication, and division.

[0118] In this example, for Figure 8 The correction amount θk for regions A22 to A55, enclosed by a dotted chain line, is the value obtained by adding the correction amount for the regions below and to the left in the figure. For example, the correction amount θk22 for region A22 is the value obtained by adding the correction amount θk12 for region A12 and the correction amount θk21 for region A21 (θk12 + θk22). Furthermore, the correction amounts θk22 to θk55 for each region A22 to A55 can also be multiplied by the correction amount for the regions below and to the left in the figure.

[0119] As described above, in setting example 2, a map or the like defining the relationship between the actual operating speed Va and the output duty cycle Sa [%] and the correction amount θk is stored in storage unit 515. Advance angle value setting unit 514 refers to this map or the like and calculates control advance angle value θa based on equation (1). Even with this setting example 2, the sliding door (opening / closing body) 13 can be smoothly opened and closed.

[0120] (Setting Example 3)

[0121] Setting example 3 is an example in which the advance angle value setting unit 514 sets the control advance angle value θa according to the door position of the sliding door 13 .

[0122] Figure 9 This is a diagram showing an example of the relationship between the door position and the target speed of a sliding door. Figure 9In the example shown, the movement range of the sliding door 13, that is, the movement range from the fully closed position to the fully open position of the sliding door 13, is divided into eight control areas A0 to A7. As an example, each control area A0 to A7 has a different target speed slope, and the target speed slope is approximately constant within each control area A0 to A7. In other words, the boundaries of each control area A0 to A7 are set as the points where the target speed slope changes. Furthermore, the advance angle value setting unit 514 of setting example 3 sets the control advance angle value θa based on which of the control areas A0 to A7 the sliding door 13 is located.

[0123] In this example, the door position of the sliding door 13 is determined based on the detection result of the operating state detection unit 513, that is, the measurement result of the rotation angle sensor 61. In addition, the control advance angle value θa in each control area (operating area) A0 to control area A7 is predetermined. As an example, the storage unit 515 stores a table or a map that specifies the relationship between the control area (operating area) A0 to control area A7 of the sliding door 13 and the control advance angle value θa. The advance angle value setting unit 514 appropriately sets the control advance angle value θa corresponding to the control area A0 to control area A7 with reference to the table stored in the storage unit 515. The control advance angle value θa in each control area A0 to control area A7 can also be changed when the sliding door 13 moves in the opening direction or the closing direction.

[0124] By setting the control advance angle value θa in accordance with the control areas A0 to A7 of the sliding door 13 in this manner, it is also easy to smoothly open and close the sliding door (opening and closing body) 13 .

[0125] In this example, the case where the movement area of ​​the sliding door 13 is divided into eight control areas is described. However, the number of control areas is not particularly limited and may be seven or less or nine or more.

[0126] Furthermore, in this example, the control advance angle value θa is changed according to the control areas A0 to A7, but the control advance angle value θa may also be changed according to the position of the sliding door 13. For example, Figure 2 As shown, the guide rail 14 that guides the sliding door 13 may sometimes include a curved retracted portion (R portion) 14a. In this case, it is preferable to increase (change) the control advance angle value θa when the sliding door 13 moves in the area corresponding to the retracted portion 14a compared to when the sliding door 13 moves in other areas. This facilitates smoother opening and closing of the sliding door (opening and closing body) 13.

[0127] (Setting Example 4)

[0128] Setting Example 4 is an example of changing the setting control of the advance angle value θa between a predetermined period (starting period) after the operation of the sliding door 13 starts (after the start of the drive motor 60) and a normal operation period other than the start of the start. The advance angle value setting unit 514 performs the setting control of the advance angle value θa according to the above-mentioned process during the normal operation of the sliding door 13 (hereinafter also referred to as the normal setting control). On the other hand, during the starting period, a control different from the normal setting control is performed (hereinafter also referred to as the starting setting control). The starting period refers to a predetermined period after the operation of the sliding door 13 starts until the drive of the drive motor 60 is stabilized. As an example, it refers to the period until the following transition condition 2 is met.

[0129] In the startup setting control, the control advance angle value can be set to a fixed value, but it can also be appropriately changed according to the driving state of the drive motor 60, etc. In this example, in the startup setting control, similar to the normal setting control, the control advance angle value θa is calculated based on the basic advance angle value θb and the additional advance angle value θc. The additional advance angle value θc is set to gradually increase according to the elapsed time from the start of operation of the sliding door 13, regardless of the operating state of the sliding door 13.

[0130] Figure 10 This is a diagram explaining the transition between the startup setting control and the normal setting control. Figure 10 As shown, during the operation stop phase when the drive motor 60 is stopped, if transition condition 1 (operation start condition) is satisfied, the control for setting the advance angle value θa is switched to the start-up setting control during the start-up period of the sliding door 13. Specifically, when transition condition 1 is satisfied, the drive motor 60 is operated, and the start-up setting control is executed by the advance angle value setting unit 514. Transition condition 1 can be appropriately determined, and an example thereof includes user operation of the operating switch 70.

[0131] Furthermore, during the execution of the startup setting control, if transition condition 2 is satisfied, the advance angle value setting unit 514 transitions the setting control of the advance angle value θa from the startup setting control to the normal setting control. Transition condition 2 can also be appropriately determined, but examples thereof include the elapsed time from the start of operation of the sliding door 13, the operating speed of the sliding door 13, the door position of the sliding door 13, and the target speed of the sliding door 13.

[0132] Furthermore, during the execution of the normal setting control, if transition condition 3 (operation stop condition) is satisfied, the sliding door 13 is stopped. That is, the control of setting the control advance angle value θa by the advance angle value setting unit 514 ends. Transition condition 3 can also be appropriately determined, but an example thereof includes the sliding door 13 reaching the fully open position or the fully closed position.

[0133] Next, refer to Figure 11 An example of a flow for setting the control advance angle value θa performed by the start-time setting control will be described. Figure 11 This is a flowchart illustrating an example of the start-time setting control performed by the advance angle value setting unit.

[0134] like Figure 11 As shown, when the operation switch 70 is operated and the sliding door 13 starts to move in the opening direction or the closing direction, as shown in FIG. Figure 11 As shown, first, in step S011, the control advance angle value θa is set to the basic advance angle value θb. Next, in step S012, the operation of the drive motor 60 is started based on the control advance angle value θa (=θb). Steps S011 and S012 are similar to steps S01 and S02 in setting example 1.

[0135] When the drive motor 60 is started in step S012 and the operation of the sliding door 13 is started, that is, when the transition condition 1 (operation start condition) is satisfied as described above, the setting control of the control advance angle value θa is switched to the start-up setting control (see Figure 10 Although not shown in the figure, the motor control device 50 includes a timer (increase advance angle timer) as a timing member. When the start-up setting control is started, the increase advance angle timer is reset and the increase advance angle timer starts timing.

[0136] Next, in step S013, a determination is made as to whether the actual operating speed Va of the sliding door 13 is less than a predetermined first speed Vth1. The first speed Vth1 can be set as appropriate, for example, to approximately 20 mm / s. If it is determined that the actual operating speed Va of the sliding door 13 is less than the first speed Vth1 (step S013: Yes), the process proceeds to step S014 to determine whether the additional advance angle value θc has reached a first upper limit value θm1, that is, whether it is greater than the first upper limit value θm1. The first upper limit value θm1 can be set as appropriate, but as an example, it is set to a value of approximately 10 degrees. Since the additional advance angle value θc is set to 0 at the start of the drive motor 60, it is determined that the additional advance angle value θc is less than the first upper limit value θm1.

[0137] If it is determined that the additional advance angle value θc is less than the first upper limit value θm1 (step S014: No), the process proceeds to step S015, where it is determined whether the additional advance angle timer has timed out. Specifically, it is determined whether the measurement time of the additional advance angle timer has reached a set time. The set time can be set to any value, but as an example, it is set to approximately 10 ms.

[0138] If it is determined in step S015 that the additional advance angle timer has not yet expired (step S015: No), the process returns to step S013. On the other hand, if it is determined in step S015 that the additional advance angle timer has expired (step S015: Yes), the process proceeds to step S016, where a predetermined additional advance angle value θf [degrees] is added to the previous value of the additional advance angle value θc. As an example, the additional advance angle value θf is set to approximately 2 degrees. Subsequently, in step S017, the additional advance angle timer is reset, and the process returns to step S013. Furthermore, if the increment of the additional advance angle value θc in step S16 is repeated multiple times and it is determined that the additional advance angle value θc has reached the first upper limit value θm1 (step S014: Yes), the process returns to step S013 without proceeding to step S015.

[0139] Next, in step S013, if the actual operating speed Va of the sliding door 13 is greater than or equal to the first speed Vth1 (step S013: No), the process proceeds to step S018. In step S018, it is determined whether the actual operating speed Va of the sliding door 13 is greater than or equal to the first speed Vth1 and less than the second speed Vth2. The second speed Vth2 can be set appropriately as long as it is greater than the first speed Vth1, but is set to approximately 40 [mm / s] as an example.

[0140] Here, if it is determined that the actual operating speed Va of the sliding door 13 is greater than or equal to the first speed Vth1 and less than or equal to the second speed Vth2 (step S018: Yes), the process proceeds to step S019, where it is determined whether the additional advance angle value θc has reached the second upper limit value θm2, that is, whether it is greater than or equal to the second upper limit value θm2. The second upper limit value θm2 can be set to a value greater than the first upper limit value θm1, and is set to approximately 20 degrees, for example. If it is determined that the additional advance angle value θc is less than the second upper limit value θm2 (step S019: No), the process proceeds to step S020, where it is determined whether the additional advance angle timer has expired. Specifically, it is determined whether the measured time of the additional advance angle timer has reached the set time.

[0141] If it is determined in step S020 that the additional advance angle timer has not yet expired (step S020: No), the process returns to step S018. On the other hand, if it is determined in step S020 that the additional advance angle timer has expired (step S020: Yes), the process proceeds to step S021, where a predetermined additional advance angle value θf [deg] is added to the previous value of the additional advance angle value θc. Subsequently, in step S022, the additional advance angle timer is reset, and the process returns to step S018. Furthermore, if the increment of the additional advance angle value θc in step S21 is repeated multiple times and it is determined that the additional advance angle value θc has reached the second upper limit value θm2 (step S019: Yes), the process returns to step S018 without proceeding to step S020.

[0142] Furthermore, in step S018, if the actual operating speed Va of the sliding door 13 is greater than or equal to the second speed Vth2, that is, if it is determined that the actual operating speed Va of the sliding door 13 is not greater than or equal to the first speed Vth1 and less than or equal to the second speed Vth2 (step S018: No), the process proceeds to step S023. In step S023, it is determined whether the actual operating speed Va of the sliding door 13 is greater than or equal to the second speed Vth2 and less than or equal to the third speed Vth3. The third speed Vth3 can be set appropriately as long as it is greater than the second speed Vth2, but is set to approximately 60 [mm / s] as an example.

[0143] Here, if it is determined that the actual operating speed Va of the sliding door 13 is greater than or equal to the second speed Vth2 and less than or equal to the third speed Vth3 (step S023: Yes), the process proceeds to step S024, where it is determined whether the additional advance angle value θc has reached the third upper limit value θm3, that is, whether it is greater than or equal to the third upper limit value θm3. The third upper limit value θm3 can be set to a value greater than the second upper limit value θm2, and is set to approximately 30 degrees, for example. If it is determined that the additional advance angle value θc is less than the third upper limit value θm3 (step S024: No), the process proceeds to step S025, where it is determined whether the additional advance angle timer has expired. Specifically, it is determined whether the measured time of the additional advance angle timer has reached the set time.

[0144] If it is determined in step S025 that the additional advance angle timer has not yet expired (step S025: No), the process returns to step S023. On the other hand, if it is determined in step S025 that the additional advance angle timer has expired (step S025: Yes), the process proceeds to step S026, where a predetermined additional advance angle value θf [deg] is added to the previous value of the additional advance angle value θc. Subsequently, in step S027, the additional advance angle timer is reset, and the process returns to step S023. Furthermore, if the increment of the additional advance angle value θc in step S26 is repeated multiple times and it is determined that the additional advance angle value θc has reached the third upper limit value θm3 (step S024: Yes), the process returns to step S023 without proceeding to step S025.

[0145] Subsequently, in step S023, if the actual operating speed Va of the sliding door 13 is greater than or equal to the third speed Vth3 (step S023: No), that is, if it is determined that it is not greater than or equal to the second speed Vth2 and less than or equal to the third speed Vth3 (step S023: No), the process proceeds to step S028. In step S028, it is determined whether the setting control for controlling the advance angle value θa is to be shifted (transitioned) from the start-up setting control to the normal setting control. As an example, it is determined whether the transition condition 2 is satisfied. If it is determined that the transition condition 2 is satisfied (step S028: Yes), the start-up setting control is terminated and the setting control is shifted to the normal setting control. On the other hand, if it is determined that the transition condition 2 is not satisfied (step S028: No), the process returns to step S013 and the start-up setting control is continued.

[0146] By executing the startup setting control that differs from the normal setting control during the startup of the sliding door 13, the sliding door 13 can be operated more appropriately even during the startup of the sliding door 13. As a result, the sliding door 13 can be operated more smoothly throughout the entire range from the fully closed position to the fully opened position of the sliding door 13.

[0147] While one embodiment of the disclosed technology has been described above, the disclosed technology is not limited to the described embodiment and can, of course, be modified in various ways without departing from the spirit of the present invention. Furthermore, the materials, shapes, dimensions, quantities, and locations of the components of the described embodiment are arbitrary and are not particularly limited, as long as they achieve the disclosed technology.

[0148] For example, in the above embodiment, a sliding door is illustrated as an example of an opening and closing body, but the opening and closing body may also be, for example, a tailgate or a sunroof, etc. The motor control device of the present disclosure can be applied to control a drive motor that drives various opening and closing bodies.

Claims

1. A motor control device for controlling a drive motor connected to an opening and closing body of a vehicle and for automatically opening and closing the opening and closing body, the motor control device comprising: a control signal generating unit for generating a motor control signal for supplying drive power to the drive motor; an advance angle value setting unit for setting a control advance angle value for advancing the phase of the motor control signal; as well as An operating state detection unit detects the operating state of the opening and closing body, The advance angle value setting unit sets the control advance angle value according to the operating state of the opening and closing body detected by the operating state detection unit.

2. The motor control device according to claim 1, wherein The operating state detection unit detects the actual operating speed of the opening and closing body. The advance angle value setting unit sets the control advance angle value according to the actual operating speed of the opening and closing body detected by the operating state detection unit.

3. The motor control device according to claim 2, wherein The operating state detection unit detects the load of the opening and closing body. The advance angle value setting unit sets the control advance angle value according to the load of the opening and closing body detected by the operation state detection unit.

4. The motor control device according to claim 1, wherein The control advance angle value is calculated by adding the additional advance angle value to the basic advance angle value which is a preset fixed value. The advance angle value setting unit sets the additional advance angle value according to the operating state of the opening and closing body detected by the operating state detection unit.

5. The motor control device according to claim 4, wherein The advance angle value setting unit calculates the additional advance angle value using a speed advance angle value based on an actual operating speed of the opening and closing body.

6. The motor control device according to claim 5, wherein The advance angle value setting unit calculates the speed advance angle value by multiplying the actual operating speed of the opening and closing body by a speed advance angle ratio that is preset according to the actual operating speed of the opening and closing body.

7. The motor control device according to claim 5, comprising: A rotation angle sensor detects the rotation angle of the drive motor, The advance angle value setting unit calculates the speed advance angle value by multiplying a period of the output signal of the rotation angle sensor by a first speed advance angle ratio that is preset according to the period of the output signal of the rotation angle sensor.

8. The motor control device according to claim 4, wherein The advance angle value setting unit calculates the additional advance angle value using a first load advance angle value obtained by multiplying the output duty of the drive power by a first load advance angle ratio preset according to the output duty of the drive power.

9. The motor control device according to claim 4, wherein The advance angle value setting unit calculates the additional advance angle value using a second load advance angle value obtained by multiplying the operating current of the drive motor by a second load advance angle ratio preset according to the operating current of the drive motor.

10. The motor control device according to claim 8, wherein The advance angle value setting unit calculates the additional advance angle value by adding the first load advance angle value to a speed advance angle value based on the actual operating speed of the opening and closing body.

11. The motor control device according to claim 9, wherein The advance angle value setting unit calculates the additional advance angle value by adding the second load advance angle value to a speed advance angle value based on the actual operating speed of the opening and closing body.

12. The motor control device according to claim 8, wherein The advance angle value setting unit calculates the additional advance angle value by dividing the first load advance angle value by a speed advance angle value based on an actual operating speed of the opening and closing body.

13. The motor control device according to claim 9, wherein The advance angle value setting unit calculates the additional advance angle value by dividing the second load advance angle value by a speed advance angle value based on an actual operating speed of the opening and closing body.

14. The motor control device according to claim 1, wherein The operation state detection unit detects in which area the opening and closing body is located among a plurality of control areas set for the operation area of ​​the opening and closing body. The advance angle value setting unit sets the control advance angle value corresponding to the control region where the opening and closing body is located.

15. The motor control device according to claim 1, wherein The advance angle value setting unit performs, during startup of the drive motor, a startup setting control different from a normal setting control for setting the control advance angle value according to an operating state of the opening and closing body.

16. The motor control device according to claim 15, wherein The advance angle value setting unit gradually increases the control advance angle value during the start-up period of the drive motor through the start-up setting control.