Motor control device and electric power steering system

JP2026142116APending Publication Date: 2026-09-07NSK STEERING & CONTROL CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2025029030
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2026-09-07

Smart Images

  • Figure 2026142116000001_ABST
    Figure 2026142116000001_ABST
Patent Text Reader

Abstract

To provide a motor control device that enables more appropriate control by the slave control unit. [Solution] In each 1ms task, the first microcontroller first generates a first command value and a second command value from a plurality of predetermined pieces of information, and then, before the generation of other predetermined pieces of information begins, starts transmitting the generated second command value A2 (t1 to t3 in Figure 4). The second microcontroller receives the second command value via the CAN bus 21, stores the received second command value in the second receive buffer 40 of the second microcontroller, and drives the second motor drive unit of the second system based on the second command value A2 stored in the second receive buffer 40 (t6 in Figure 4).
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present invention relates to a motor control device and an electric power steering device. BACKGROUND ART

[0002] Conventionally, for example, there has been proposed a motor control device including: a master control unit that performs current control on one winding set of an electric motor having two winding sets; and a slave control unit that performs current control on the other winding set (see, for example, Patent Document 1). In the motor control device described in Patent Document 1, the master control unit calculates command values for both control units, performs current control on the one winding set based on the calculated command values, transmits the command values to the slave control unit, and the slave control unit performs current control on the other winding set based on the transmitted command values. PRIOR ART DOCUMENTS PATENT DOCUMENTS

[0003] Patent Document 1 Japanese Patent No. 7027808 SUMMARY OF THE INVENTION PROBLEM TO BE SOLVED BY THE INVENTION

[0004] Generally, a command value transmitted from the master control unit is normally stored in a reception buffer of a bus controller of the slave control unit via a bus. The command value stored in the reception buffer is transferred to a RAM (Random Access Memory) of the slave control unit and used by the slave control unit via the RAM. Therefore, for example, if the transmission timing of the command value from the master control unit to the slave control unit, the transfer timing of the command value from the reception buffer to the RAM, or the like is inappropriate, there is a possibility that a problem may occur in current control performed by the slave control unit. An object of the present invention is to provide a motor control device and an electric power steering device that allow the slave control unit to perform control more appropriately. [Means for solving the problem]

[0005] To achieve the above objective, a motor control device according to one aspect of the present invention is a motor control device for controlling the drive of an electric motor having a plurality of winding sets, comprising: a plurality of drive circuits that supply power to the winding sets; a plurality of control units that drive the drive circuits based on command values; and a bus that connects the plurality of control units to each other. If a group of components including the winding sets, drive circuits, and control units formed in correspondence with each other is defined as a first system, and another group of components is defined as a second system, then the master control unit, which is the control unit of the first system, calculates a first command value, which is the command value of the master control unit, and a second command value, which is the command value of the slave control unit, which is the control unit of the second system, and drives the drive circuits of the first system based on the calculated first command value and the calculated second command The value is transmitted to the slave control unit via the bus, and the slave control unit drives the second drive circuit based on the second command value transmitted from the master control unit via the bus. Furthermore, the master control unit repeatedly performs a generation process at regular intervals to generate a plurality of predetermined pieces of information, including the first command value and the second command value. In each generation process, the first command value and the second command value among the plurality of predetermined pieces of information are generated first, and then, before the generation of other predetermined pieces of information begins, the generated second command value is transmitted. The slave control unit receives the second command value via the bus, stores the received second command value in a receive buffer of the slave control unit, and drives the second drive circuit based on the second command value stored in the receive buffer.

[0006] Furthermore, another aspect of the present invention is a motor control device for controlling the drive of an electric motor having a plurality of winding sets, comprising: a plurality of drive circuits that supply power to the winding sets; a plurality of control units that drive the drive circuits based on command values; and a bus that connects the plurality of control units to each other. If a group of components including the winding sets, drive circuits, and control units formed in correspondence with each other is defined as the first system, and another group of components is defined as the second system, the master control unit, which is the control unit of the first system, calculates a first command value, which is the command value of the master control unit, and a second command value, which is the command value of the slave control unit, which is the control unit of the second system, drives the drive circuits of the first system based on the calculated first command value, and transmits the calculated second command value to the slave control unit via the bus, and the slave control unit is Based on the second command value transmitted from the master control unit via the bus, the slave control unit drives the second drive circuit. Furthermore, the master control unit repeatedly performs a generation process at regular intervals to generate a plurality of predetermined pieces of information, including the first command value and the second command value. Within the period reserved for the execution of the i-th period generation process (where i is an integer), the slave control unit starts transmitting the second command value generated in the i-th period generation process. The slave control unit receives the second command value via the bus, stores the received second command value in a receive buffer owned by the slave control unit, and within the period reserved for the execution of the (i+1)-th period generation process, first stores the second command value stored in the receive buffer in a memory owned by the slave control unit, and then drives the second drive circuit based on the second command value stored in the memory.

[0007] Furthermore, another aspect of the present invention provides an electric power steering system comprising (a) the motor control device described above, (b) an electric motor controlled by the motor control device, and (c) the electric motor providing steering assistance to the vehicle's steering system. [Effects of the Invention]

[0008] According to one aspect of the present invention, it is possible to provide a motor control device and an electric power steering device that enable more appropriate control by a slave control unit. [Brief explanation of the drawing]

[0009] [Figure 1] This figure shows the overall configuration of the electric power steering system according to the first embodiment. [Figure 2] This diagram shows the internal configuration of the electronic control unit. [Figure 3] This diagram shows the internal configurations of the first and second microcontrollers. [Figure 4] This diagram shows the operation of the first and second microcontrollers. [Figure 5] This diagram shows the operation of the first and second microcontrollers in the comparative example. [Figure 6] This diagram shows the operation of the first and second microcontrollers of another comparative example. [Figure 7] This diagram shows the operation of the first and second microcontrollers in a modified example. [Figure 8] This diagram shows the operation of the first microcontroller and the second microcontroller in the second embodiment. [Figure 9] This diagram shows the operation of the first and second microcontrollers in the comparative example. [Figure 10] This diagram shows the internal structure of the second receive buffer. [Modes for carrying out the invention]

[0010] The present inventors have discovered the following problems with the motor control device described in Patent Document 1. Problem 1: For example, if data synchronization of the processing results (data) of calculations performed by the master control unit cannot be achieved between the master control unit and the slave control unit, data inconsistencies may occur between the master control unit and the slave control unit, potentially causing fluctuations in steering assist force, etc. Problem 2: For example, if the master control unit transmits data earlier than expected, the slave control unit may receive data for the next cycle before the received data is used, overwriting the receive buffer and potentially making it impossible to use the data from the previous cycle (the correct data). • Problem 3: A mechanism is required that enables preferential data synchronization for data with high hard real-time requirements (e.g., current command values) over data with low hard real-time requirements. • Problem 4: A mechanism is required that enables data synchronization for data with low hard real-time requirements without interfering with the data synchronization of data with high hard real-time requirements.

[0011] Hereinafter, an example of a motor control device and an electric power steering device according to an embodiment of the present invention will be described with reference to the drawings. The embodiments described below are examples of apparatuses and methods for embodying the technical idea of the present invention, and the technical idea of the present invention is not limited to the following configuration, arrangement, etc. of constituent components. Various modifications can be made to the technical idea of the present invention within the technical scope defined by the claims set forth in the claims. In the following description, a case where the present invention is applied to an electric power steering device is described. However, the present invention is not limited to application to electric power steering devices, and can be applied to various uses. For example, the present invention may be applied to an electric brake device, or may be applied to a drive device for an actuator that drives a joint of a robot.

[0012] Embodiments of the present invention will be described in the following order. 1. First Embodiment 1-1. Overall Configuration of Electric Power Steering Device 1-2. Operations of First Microcomputer and Second Microcomputer 1-3. Effects of First Embodiment 1-4. Modification 2. Second Embodiment 2-1. Operations of First Microcomputer and Second Microcomputer 2-2. Effects of Second Embodiment 2-3. Modification

[0013] [1. First Embodiment] [1-1. Overall Configuration of Electric Power Steering Device] Figure 1 shows the overall configuration of the electric power steering device 100 according to the first embodiment. The steering system (the mechanism from the steering wheel 1 to the steering wheels 8L and 8R) to which the electric power steering device 100 in Figure 1 provides steering assistance is a rack and pinion type steering system. As shown in Figure 1, the steering shaft 2 of the steering wheel 1 is connected to the steering wheels 8L and 8R via hub units 7a and 7b, through a reduction gear 3, universal joints 4a and 4b, a pinion rack mechanism 5, and tie rods 6a and 6b that constitute a reduction mechanism. The pinion rack mechanism 5 has a pinion 5a to which steering force is transmitted from the universal joint 4b, and a rack 5b that meshes with the pinion 5a. The pinion rack mechanism 5 converts the steering force transmitted to the pinion 5a into straight-line motion in the vehicle width direction using the rack 5b. Furthermore, the steering shaft 2 is equipped with a first torque sensor 9 and a second torque sensor 10 for detecting the driver's steering torque Th, and a steering angle sensor 11 for detecting the steering angle θh of the steering wheel 1. However, the steering torque Th detected by the first torque sensor 9 and the second torque sensor 10 will be slightly different due to individual differences in the sensors. Furthermore, the electric power steering system 100 includes an electric motor 12 that provides steering assistance to the vehicle's steering system. The electric motor 12 is connected to the steering shaft 2 via a reduction gear 3. As the electric motor 12, for example, a multiphase motor with multiple winding sets can be used. In the first embodiment, the electric motor 12 is exemplified as a three-phase motor having two winding sets in which a first system coil 13 and a second system coil 14 (see Figure 2) are wound within the same motor housing, and the two systems of coils rotate a common rotor. That is, the electric motor 12 is a double-winding motor having two sets of three-phase winding sets with equivalent electrical characteristics.

[0014] Furthermore, the electric power steering system 100 is equipped with an electronic control unit 200 (broadly speaking, a "motor control device") that controls the electric motor 12. The electronic control unit 200 is connected to the vehicle CAN (Controller Area Network) 15 and receives various vehicle information (for example, information on the vehicle speed Vh detected by the vehicle speed sensor) from the vehicle CAN 15. Based on the steering torque Th detected by the first torque sensor 9 and the second torque sensor 10, the steering angle θh detected by the steering angle sensor 11, and the vehicle speed Vh received from the vehicle CAN 15, the electronic control unit 200 performs PWM (Pulse Width Modulation) control on the electric motor 12 via an inverter (first motor drive unit 17, second motor drive unit 33 in Figure 2).

[0015] Figure 2 shows the internal configuration of the electronic control unit 200. As shown in Figure 2, the electronic control unit 200 includes a first microcontroller 16 (broadly referred to as a "control unit" or "master control unit"), a first motor drive unit 17 (broadly referred to as a "drive circuit"), a first voltage detection unit 18, a first current detection unit 19, and a first rotation angle detection unit 20. The first microcontroller 16 to the first rotation angle detection unit 20, together with the first torque sensor 9 and the first system coil 13, constitute a group of components (hereinafter also referred to as "first system 1000") that control the drive of the electric motor 12. That is, the first system 1000 is a group of components including the first system coil 13, the first motor drive unit 17, and the first microcontroller 16, which are formed in correspondence with each other. Furthermore, the electronic control unit 200 has a CAN bus 21 (broadly defined as a "bus") that connects the first microcontroller 16 and the second microcontroller 32 of the second system 2000 (broadly defined as "multiple control units") to each other. Figure 3 shows the internal configurations of the first microcontroller 16 and the second microcontroller 32. As shown in Figure 3, the first microcontroller 16 includes a first clock generation unit 22, a synchronization signal transmission unit 23, a first CAN controller 26 having a first transmit buffer 24 and a first receive buffer 25, and a first arithmetic unit 29 having a first CPU 27 and a first RAM 28. The first clock generation unit 22 generates a clock signal for the entire first microcontroller 16. The clock signal is output to each unit, such as the first CPU 27 and the synchronization signal transmission unit 23. The synchronization signal transmission unit 23 generates a synchronization signal based on the clock signal generated by the first clock generation unit 22 to synchronize the clock signal of the first CPU 27 with the clock signal of the second CPU 42, and transmits the generated synchronization signal to the second microcontroller 32 via a signal line separate from the CAN bus 21. The first CAN controller 26 controls communication with the second microcontroller 32 according to the CAN protocol. Furthermore, the first calculation unit 29 executes a program stored in a memory unit (not shown) to realize the first command value generation unit 30 and the first current control unit 31, as shown in Figure 2.

[0016] Furthermore, the electronic control unit 200 includes a second microcontroller 32 (broadly referred to as a "control unit" or "slave control unit"), a second motor drive unit 33 (broadly referred to as a "drive circuit"), a second voltage detection unit 34, a second current detection unit 35, and a second rotation angle detection unit 36. The second microcontroller 32 to the second rotation angle detection unit 36, together with the second torque sensor 10 and the second system coil 14, constitute a group of components (hereinafter also referred to as "second system 2000") that control the drive of the electric motor 12. That is, the second system 2000 is a group of components including the second system coil 14, the second motor drive unit 33, and the second microcontroller 32, which are formed in correspondence with each other. As shown in Figure 3, the second microcontroller 32 includes a second clock generation unit 37, a synchronization signal receiving unit 38, a second CAN controller 41 having a second transmit buffer 39 and a second receive buffer 40, and a second arithmetic unit 44 having a second CPU 42 and a second RAM 43 (broadly speaking, "memory"). The second clock generation unit 37 generates a clock signal for the entire second microcontroller 32. The clock signal is output to each part, such as the second CPU 42. The synchronization signal receiving unit 38 synchronizes the clock signal generated by the second clock generation unit 37 with the clock signal generated by the first clock generation unit 22 based on the synchronization signal transmitted from the synchronization signal transmission unit 23. The second CAN controller 41 controls communication with the first microcontroller 16 according to the CAN protocol. The second arithmetic unit 44 executes a program stored in a memory unit (not shown) to realize a second command value generation unit 45 and a second current control unit 46, as shown in Figure 2.

[0017] The first command value generation unit 30 calculates a target steering torque based on the steering torque Th output from the first torque sensor 9, the vehicle speed Vh received from the vehicle CAN 15, the steering angle θh output from the steering angle sensor 11, and the steering angular velocity ωh calculated from the steering angle θh. The target steering torque is the total amount of steering assist force that assists the driver's steering of the steering wheel 1. The first command value generation unit 30 also converts the calculated target steering torque into a current command value Ir0. For example, the q-axis current command value and the d-axis current command value can be used as the current command value Ir0. Furthermore, the first command value generation unit 30 distributes the converted current command value Ir0 to the first system 1000 and the second system 2000, and sets the current command value used in the first system 1000 (hereinafter also referred to as "first command value A1") and the current command value used in the second system 2000 (hereinafter also referred to as "second command value A2"). Figure 2 illustrates the case where the first command value A1 and the second command value A2 are each set to half the value of the current command value Ir0. The first command value A1 is output to the first current control unit 31, and the second command value A2 is transmitted to the second microcontroller 32 via the CAN bus 21. In other words, the first command value generation unit 30 calculates the command values ​​(first command value A1, second command value A2) for all microcontrollers (first microcontroller 16, second microcontroller 32).

[0018] The first current control unit 31 generates a voltage control command value Vref by feedback control such as PI (proportional-integral) control, based on the deviation between the current value Im of the first coil system 13 that has been fed back and the first command value A1 (target current command value Ir0 / 2) output from the first command value generation unit 30. As the current value Im, for example, the q-axis current iq and d-axis current id obtained by converting the phase currents of each phase A, B, and C of the first coil system 13 can be used. Also, as the voltage control command value Vref, for example, the voltage command values ​​of each phase A, B, and C can be used. Furthermore, the first current control unit 31 generates a gate signal (PWM signal) for driving the first motor drive unit 17 based on the generated voltage control command value Vref. That is, the first current control unit 31 generates a PWM signal to drive the first motor drive unit 17 based on the first command value A1 (target current command value).

[0019] The first motor drive unit 17 is a drive circuit that supplies power to the first coil 13. The first motor drive unit 17 is driven by a PWM signal output from the first microcontroller 16 and supplies a current (power) to the first coil 13 of the electric motor 12 that makes the deviation between the current value Im of the first coil 13 of the electric motor 12 and the first command value A1 "0". In other words, the first motor drive unit 17 is driven based on the PWM signal (a signal based on the first command value A1). For example, an inverter can be used as the first motor drive unit 17. The first microcontroller 16 stops driving the first motor drive unit 17 if it is unable to drive the first motor drive unit 17 properly, such as when an abnormality occurs in the first drive system 1000. The first voltage detection unit 18 detects the voltage of the first motor drive unit 17. The first current detection unit 19 detects the phase current of each phase of the first system coil 13. The first rotation angle detection unit 20 detects the rotation angle θm of the electric motor 12. The detected voltage, phase current, and rotation angle θm are output to the first microcontroller 16.

[0020] The second command value generation unit 45 calculates an alternative value (hereinafter also referred to as "third command value A3") for the second command value A2 transmitted from the first microcontroller 16 (first command value generation unit 30). Specifically, the second command value generation unit 45 calculates a target steering torque based on the steering torque Th output from the second torque sensor 10, the vehicle speed Vh received from the vehicle CAN 15, the steering angle θh output from the steering angle sensor 11, and the steering angular velocity ωh calculated from the steering angle θh. The second command value generation unit 45 also converts the calculated target steering torque into a current command value Ir0. Furthermore, the second command value generation unit 45 distributes the converted current command value Ir0 to the first system 1000 and the second system 2000, and sets the current command value used in the first system 1000 (first command value A1) and the current command value used in the second system 2000 (third command value A3). Figure 2 illustrates the case where the first command value A1 and the third command value A3 are each half the value of the current command value Ir0. The third command value A3 (Ir0 / 2) is output to the second current control unit 46.

[0021] The second current control unit 46 generates a voltage control command value Vref by feedback control such as PI (proportional-integral) control, based on the deviation between the current value Im of the second coil system 14 that has been fed back and the second command value A2 (target current command value Ir0 / 2) transmitted from the first microcontroller 16 via the CAN bus 21. As the current value Im, for example, the q-axis current iq and d-axis current id obtained by converting the phase currents of each phase A, B, and C of the second coil system 14 can be used. Also, as the voltage control command value Vref, for example, the voltage command values ​​of each phase A, B, and C can be used. Furthermore, the second current control unit 46 generates a gate signal (PWM signal) for driving the second motor drive unit 33 (for example, an inverter) based on the generated voltage control command value Vref. That is, the second current control unit 46 generates a PWM signal to drive the second motor drive unit 33 based on the second command value A2 (target current command value). If the second command value A2 cannot be received from the first microcontroller 16 (i.e., if there is an abnormality related to the transmission or reception of the second command value A2), the voltage control command value Vref is generated using the third command value A3 generated by the second command value generation unit 45 instead of the second command value A2. As a result, if there is no abnormality related to the transmission or reception of the second command value A2, the second microcontroller 32 drives the second motor drive unit 33 of the second system 2000 based on the second command value A2 transmitted from the first microcontroller 16 via the CAN bus 21. On the other hand, if there is an abnormality related to the transmission or reception of the second command value A2, the second microcontroller 32 drives the second motor drive unit 33 based on the third command value A3 (alternative value).

[0022] The second motor drive unit 33 is a drive circuit that supplies power to the second coil 14. The second motor drive unit 33 is driven by a PWM signal output from the second microcontroller 32 and supplies a current (power) to the second coil 14 of the electric motor 12 that makes the deviation between the current value Im of the second coil 14 of the electric motor 12 and the second command value A2 (or third command value A3) "0". In other words, the second motor drive unit 33 is driven based on the PWM signal (a signal based on the second command value A2, or a signal based on the third command value A3). For example, an inverter can be used as the second motor drive unit 33. The second microcontroller 32 stops driving the second motor drive unit 33 if it is unable to drive the second motor drive unit 33 properly, such as when an abnormality occurs in the second drive system 2000. Furthermore, the second microcontroller 32 may switch between stopping and continuing the drive of the second motor drive unit 33 in response to a command transmitted from the first microcontroller 16. The second voltage detection unit 34 detects the voltage of the second motor drive unit 33. The second current detection unit 35 detects the phase current of each phase of the second system coil 14. The second rotation angle detection unit 36 ​​detects the rotation angle θm of the electric motor 12. The detected voltage, phase current, and rotation angle θm are output to the second microcontroller 32.

[0023] [1-2. Operation of the first and second microcontrollers] Next, the operation of the first microcontroller 16 and the second microcontroller 32 will be explained with reference to Figures 2 to 4. Figure 4 is a diagram showing the operation of the first microcontroller 16 and the second microcontroller 32. In the first microcontroller 16 and the second microcontroller 32, the first arithmetic unit 29 and the second arithmetic unit 44, respectively, execute a main process (hereinafter also referred to as the "1ms task") that is repeatedly performed at a fixed period (for example, 1ms), as shown in Figure 4. An example of a 1ms task executed by the first arithmetic unit 29 is a generation process that generates a plurality of predetermined pieces of information, including a first command value A1 and a second command value A2. The generation of the first command value A1 and the second command value A2 is performed by the first command value generation unit 30 shown in Figure 2. Examples of predetermined information other than the first command value A1 and the second command value A2 (hereinafter also referred to as "other predetermined information") include the status of the system (stopped, standby, operating), battery voltage, normal / abnormal determination result, temperature, command value limiting gain, steering torque, and current detection value. In other words, the other predetermined information is information with a lower priority than the first command value A1 and the second command value A2. Furthermore, an example of a 1ms task executed by the second arithmetic unit 44 is a generation process that generates multiple predetermined pieces of information, including the third command value A3. The generation of the third command value A3 is performed by the second command value generation unit 45 shown in Figure 2.

[0024] Furthermore, the first arithmetic unit 29 and the second arithmetic unit 44 each execute interrupt processing (hereinafter also referred to as the "250μs task") which is performed by periodic interrupts at predetermined intervals (e.g., 250μs) during the execution of the 1ms task. Figure 4 illustrates a case where the 250μs task is executed four times during the period reserved for the execution of the 1ms task (hereinafter also referred to as the "execution period," e.g., 1ms). Figure 4 also illustrates a case where the first of the four 250μs tasks is executed at the start of the execution period of the 1ms task. An example of a 250μs task executed by the first arithmetic unit 29 is a PWM generation process that generates a PWM signal for driving the first motor drive unit 17 based on a first command value A1. The generation of the PWM signal for the first motor drive unit 17 is performed by the first current control unit 31 shown in Figure 2. Furthermore, an example of a 250μs task executed by the second arithmetic unit 44 is a PWM generation process that generates a PWM signal for driving the second motor drive unit 33 based on the second command value A2 or the third command value A3. The generation of the PWM signal for the second motor drive unit 33 is performed by the second current control unit 46 shown in Figure 2. In Figure 4, from the second 250μs task (PWM generation process) of the four 250μs tasks performed during the execution of the 1ms task, the execution of the PWM generation process based on the first command value A1 and the second command value A2 (or third command value A3) generated (updated) in that 1ms task begins. From the third 250μs task (PWM generation process), the fourth 250μs task (PWM generation process), and the first 250μs task (PWM generation process) of the next 1ms task, the PWM generation process based on the same command value as the second 250μs task (PWM generation process) is executed.

[0025] In a situation where 1ms tasks and 250μs tasks are executed periodically, we will proceed with the explanation focusing on the execution period of the 1ms task in the i-th period (where i is an integer). At that time, the first transmit buffer 24 stores predetermined information to be transmitted to the second microcontroller 32 from among the other predetermined information generated in the i-1th period 1ms task (hereinafter also referred to as "transmit information"). In the i-th period 1ms task, the first arithmetic unit 29 first generates the first command value A1 and the second command value A2, and stores the generated first command value A1 and second command value A2 in the first RAM 28 (t1 in Figure 4). That is, in each 1ms task, the first microcontroller 16 first generates the first command value A1 and the second command value A2 from among a plurality of predetermined information.

[0026] Next, in a 1ms task, the first arithmetic unit 29 transfers the second command value A2 stored in the first RAM 28 to the first transmit buffer 24 (t2 in Figure 4). Subsequently, the first arithmetic unit 29 controls the first CAN controller 26 to frame the message containing the second command value A2 stored in the first transmit buffer 24, and transmits the framed message to the CAN bus 21 via a CAN transceiver (not shown) (t3 in Figure 4). As a result, the second CAN controller 41 receives the frame from the CAN bus 21 via a CAN transceiver (not shown), extracts the message, and stores the extracted message in the second receive buffer 40 (t4 in Figure 4). That is, after generating the second command value A2, the first microcontroller 16 starts transmitting the generated second command value A2 (transmission to the second microcontroller 32 via the CAN bus 21) before the generation of other predetermined information begins. When transmission to the second microcontroller 32 begins, the second microcontroller 32 receives the second command value A2 via the CAN bus 21 and stores the received second command value A2 in the second receive buffer 40 of the second microcontroller 32.

[0027] Next, the second arithmetic unit 44 transfers the second command value A2, which is contained in the message stored in the first transmit buffer 24, to the second RAM 43 during the second 250μs task executed during the execution period of the 1ms task (t6 in Figure 4). Subsequently, based on the second command value A2 transferred to the second RAM 43, it generates a PWM signal to drive the second motor drive unit 33 (t6 in Figure 4). That is, the second microcontroller 32 drives the second motor drive unit 33 of the second system 2000 based on the second command value A2 stored in the second receive buffer 40. At the same time, the first arithmetic unit 29 generates a PWM signal to drive the first motor drive unit 17 based on the first command value A1 stored in the first RAM 28 (t6 in Figure 4).

[0028] Furthermore, after the transmission of the second command value A2 to the CAN bus 21 (t3 in Figure 4) is completed, the first arithmetic unit 29 controls the first CAN controller 26 in a 1ms task to frame the message containing the transmission information (transmission information generated in the generation process of the (i-1)th cycle) stored in the first transmission buffer 24, and transmits the framed message to the CAN bus 21 via a CAN transceiver (not shown) (t4 in Figure 4). As a result, the second CAN controller 41 receives the frame from the CAN bus 21 via a CAN transceiver (not shown), extracts the message (the message containing the transmission information), and stores the extracted message in the second reception buffer 40 (t5 in Figure 4). In other words, after the transmission of the second command value A2 generated in the generation process of the i-th cycle is completed, the first microcontroller 16 starts transmitting the transmission information, which is one of the other predetermined pieces of information generated in the generation process of the (i-1)th cycle. Next, the second arithmetic unit 44 transfers the transmission information contained in the message stored in the first transmission buffer 24 to the second RAM 43 during the third 250μs task executed during the execution period of the 1ms task (t7 in Figure 4). Subsequently, it performs predetermined processing based on the transmission information transferred to the second RAM 43 (t7 in Figure 4). At the same time, the first arithmetic unit 29 performs the above predetermined processing based on the transmission information stored in the first RAM 28 (t7 in Figure 4).

[0029] [1-3. Effects of the First Embodiment] (1) As a comparative example, consider the case where, for example, as shown in Figure 5, the first microcontroller 16 starts transmitting the second command value A2 after the completion of the 1ms task (generation process). In such a configuration, for example, the current control by the second microcontroller 32 based on the second command value A2 generated in the i-th period's 1ms task is not performed during the execution period of the i-th period's 1ms task, but during the execution period of the (i+1)th period's 1ms task. Therefore, there is a delay before the second command value A2 is reflected in the current control, which may cause noise, vibration, etc. Figure 5 shows the operation of the first microcontroller 16 and the second microcontroller 32 in the comparative example. In contrast, in the first embodiment, the first microcontroller 16 first generates a first command value A1 and a second command value A2 from a plurality of predetermined pieces of information in each 1ms task, and then starts transmitting the generated second command value A2 before the generation of other predetermined pieces of information begins. The second microcontroller 32 receives the second command value A2 via the CAN bus 21, stores the received second command value A2 in the second receive buffer 40 of the second microcontroller 32, and drives the second motor drive unit 33 of the second system 2000 based on the second command value A2 stored in the second receive buffer 40. As a result, for example, as shown in Figure 4, the second command value A2 generated in the i-th period can be stored in the second receive buffer 40 within the execution period of the 1ms task of the i-th period. Therefore, the driving of the second motor drive unit 33 based on the second command value A2 generated in the i-th period can be performed within the execution period of the 1ms task of the i-th period. Therefore, delays before the second command value A2 is reflected in the current control can be suppressed, thereby reducing the generation of noise and vibration. As a result, the current control by the second microcontroller 32 can be performed more appropriately.

[0030] (2) As another comparative example, consider the case where, for example, as shown in Figure 6, the first microcontroller 16 transmits the second command value A2 generated in the i-th period 1ms task after transmitting the transmission information generated in the i-1 period 1ms task. In such a configuration, for example, if the generation of the second command value A2 in the i-th period is completed before the transmission of the transmission information in the i-1 period is completed (while the CAN bus 21 is occupied by the transmission information), the transmission of the second command value A2 will start only after waiting for the transmission of the transmission information to be completed. Therefore, the timing of the transmission of the second command value A2 will be delayed, causing a delay before the second command value A2 is reflected in the current control, which may cause noise, vibration, etc. Situations in which the timing of the transmission of the second command value A2 may be delayed include, for example, when the amount of calculation in the 1ms task is large and the completion of the calculation is delayed, or when the amount of data in the transmission information is large and it takes time to transmit the transmission information. Figure 6 is a diagram showing the operation of the first microcontroller 16 and the second microcontroller 32 in another comparative example. In contrast, in the first embodiment, the first microcontroller 16 starts transmitting transmission information, which is predetermined information to be transmitted to the second microcontroller 32 from among the other predetermined information generated in the i-1 period 1 ms task, after it has completed transmitting the second command value A2 generated in the i-1 period 1 ms task. That is, the transmission process of low-priority information (transmission information) is performed after the transmission process of high-priority information (second command value A2) so as not to interfere with the transmission process of high-priority information. As a result, as shown in Figure 4, even if it takes a long time to transmit the transmission information in the i period, the delay in current control by the second microcontroller 32 can be suppressed, and the generation of noise and vibration can be suppressed.

[0031] (3) Furthermore, in the first embodiment, all of the above-mentioned problems 1 to 4 can be solved. Specifically, (1) the first microcontroller 16 and the second microcontroller 32 can synchronize the data of the processing result (second command value A2) of the 1ms task performed by the first microcontroller 16, and inconsistencies in the second command value A2 between the first microcontroller 16 and the second microcontroller 32 can be suppressed. (2) Also, even if the transmission timing of the second command value A2 by the first microcontroller 16 is advanced, the second microcontroller 32 can use the correct second command value A2. (3) Also, the second command value A2 with high hard real-time performance can be preferentially synchronized. (4) Also, data synchronization can be performed in such a way that data with low hard real-time performance does not interfere with the second command value A2 with high hard real-time performance.

[0032] [1-4. Variations] In the first embodiment, an example was shown in which the first microcontroller 16 starts transmitting the transmission information generated in the i-1 period 1ms task after the transmission of the second command value A2 generated in the i period 1ms task is completed. However, other configurations can also be adopted. For example, as shown in Figure 7, the transmission of the transmission information generated in the i-1 period 1ms task may be started within the execution period of the i-1 period 1ms task. Figure 7 illustrates a case in which the transfer of transmission information from the second receive buffer 40 to the second RAM 43 starts after current control is performed by the second command value A2 generated in the i period 1ms task.

[0033] [2. Second Embodiment] [2-1. Operation of the first and second microcontrollers] Next, an electric power steering device 100 according to a second embodiment of the present invention will be described. The overall configuration of the electric power steering device 100 of the second embodiment is the same as in Figure 1, so it is not shown. Figure 8 is a diagram showing the operation of the first microcontroller 16 and the second microcontroller 32. In Figure 8, the same reference numerals are used for parts corresponding to those in Figure 4, and redundant explanations are omitted. The electric power steering device 100 of the second embodiment differs from the electric power steering device 100 of the first embodiment in that, as shown in Figure 8, the transfer timing of the second command value A2 from the second receive buffer 40 to the second RAM 43 is at the beginning of the execution period of the 1ms task. The second embodiment, like the first embodiment, will be described focusing on the execution period of the i-th period's 1ms task, under the situation where 1ms tasks and 250μs tasks are executed periodically. In the i-th period's 1ms task, the first arithmetic unit 29 generates predetermined information including a first command value A1, a second command value A2, and transmission information, and stores the generated predetermined information in the first RAM 28 (t1 in Figure 8). Subsequently, in the 1ms task, the first arithmetic unit 29 transfers the second command value A2 and transmission information stored in the first RAM 28 to the first transmission buffer 24 (t2 in Figure 8). Subsequently, the first arithmetic unit 29 controls the first CAN controller 26 to frame the message including the second command value A2 and transmission information stored in the first transmission buffer 24, and transmits the framed message to the CAN bus 21 via a CAN transceiver (not shown) (t3 in Figure 8). As a result, the second CAN controller 41 receives a frame from the CAN bus 21 via a CAN transceiver (not shown), extracts a message, and stores the extracted message in the second receive buffer 40 (t4 in Figure 8). That is, the first microcontroller 16 starts transmitting the second command value A2 and transmission information generated in the i-th period 1ms task within the execution period of the i-th period 1ms task. The second microcontroller 32 also receives the second command value A2 and transmission information via the CAN bus 21 and stores the received second command value A2 and transmission information in the second receive buffer 40 of the second microcontroller 32.

[0034] Next, the second arithmetic unit 44 transfers the second command value A2 and transmission information contained in the message stored in the second receive buffer 40 to the second RAM 43 during the first 250μs task executed during the execution period of the i+1th period 1ms task (t5 in Figure 8). Subsequently, the second arithmetic unit 44 generates a PWM signal for driving the second motor drive unit 33 based on the second command value A2 and transmission information transferred to the second RAM 43 during the third 250μs task executed during the execution period of the i+1th period 1ms task (t6 in Figure 8). Specifically, during the execution period of the 1ms task in the (i+1)th cycle, the second microcontroller 32 first stores the second command value A2 stored in the second receive buffer 40 into the second RAM 43 of the second microcontroller 32, and then drives the second motor drive unit 33 of the second system 2000 based on the second command value A2 stored in the second RAM 43 (t5, t6 in Figure 8). At the same time, the first arithmetic unit 29 generates a PWM signal to drive the first motor drive unit 17 based on the first command value A1 stored in the first RAM 28 (t6 in Figure 8).

[0035] [2-2. Effects of the Second Embodiment] Here, as a comparative example, consider a configuration in which, for example, the second microcontroller 32 transfers the second command value A2 from the second receive buffer 40 to the second RAM 43 when it starts generating a PWM signal, as shown in Figure 9. Figure 9 is a diagram showing the operation of the first microcontroller 16 and the second microcontroller 32 in the comparative example. In such a configuration, for example, if the 1ms task of the (i+1)th period is completed early by the first microcontroller 16, there was a possibility that the second command value A2 generated in the 1ms task of the (i)th period would be overwritten in the second receive buffer 40 before the second command value A2 generated in the 1ms task of the i-th period was transferred from the second receive buffer 40 to the second RAM 43. Here, as shown in Figure 10, the second receive buffer 40 has a plurality of registers 47 to which an identification code (hereinafter also called "CANID") representing the type of message, etc., is attached. Figure 10 is a diagram showing the internal configuration of the second receive buffer 40. Then, when the second CAN controller 41 receives a message, it stores the message in the register 47 corresponding to the CANID assigned to the received message. Therefore, as described above, when a message containing a new second command value A2 is received (in Figure 10, a message with CANID: eeeee), the message containing the old second command value A2 is overwritten by the received message. For example, when the process of generating a PWM signal based on the second command value A2 of the i-th period is started, the second microcontroller 32 may transfer the second command value A2 of the (i+1)th period from the second receive buffer 40 to the second RAM 43. As a result, this may cause a malfunction in the current control by the second microcontroller 32.

[0036] In contrast, in the second embodiment, the first microcontroller 16 starts transmitting the second command value A2 generated in the i-th period's 1ms task within the period (execution period) reserved for the execution of the i-th period's 1ms task. The second microcontroller 32 receives the second command value A2 via the CAN bus 21 and stores the received second command value A2 in the second receive buffer 40 of the second microcontroller 32. Furthermore, during the period (execution period) reserved for the execution of the (i+1)th period's 1ms task, the second microcontroller 32 first stores the second command value A2 stored in the second receive buffer 40 in the second RAM 43 of the second microcontroller 32, and then drives the second motor drive unit 33 of the second system 2000 based on the second command value A2 stored in the second RAM 43. That is, at the first timing of the (i+1)th period, the second command value A2 stored in the second receive buffer 40 is pre-stored in the second RAM 43. As a result, as shown in Figure 8, the transfer of the second command value A2 generated in the i-th period from the second receive buffer 40 to the second RAM 43 can be completed before the 1ms task of the (i+1)th period ends. Therefore, for example, even if the 1ms task of the (i+1)th period finishes early, the current control by the second microcontroller 32 can be performed more appropriately.

[0037] [2-3. Variations] (1) In the first and second embodiments, an example was shown in which the distribution ratio of the current command value Ir0 to the first command value A1 and the second command value A2 by the first command value generation unit 30 is 50:50, but this is not limited to this. For example, other ratios such as 60:40 may be used. (2) In addition, while the first and second embodiments show examples in which current command values ​​are used as the first command value A1, second command value A2, and third command value A3, the system is not limited to these. For example, other command values ​​such as torque command values ​​and voltage command values ​​may be used.

[0038] (3) In addition, the first and second embodiments show examples in which there is one CAN bus 21, but the system is not limited to this. For example, a configuration with multiple CAN buses 21 is also possible. When a configuration with multiple CAN buses 21 is used, the more data communication (number of variables) from the first microcontroller 16 to the second microcontroller 32 is, the more CAN buses 21 should be used. (4) In addition, the first and second embodiments show an example in which a motor control device consists of two systems (first system 1000, second system 2000) that drive a three-phase motor having two winding sets (first system coil 13, second system coil 14), but it is not limited to this. For example, a motor control device consisting of three or more systems may be used. In the case of a motor control device consisting of three or more systems, a motor control device may have one master control unit and at least one slave control unit, each with corresponding winding sets and drive circuits. [Explanation of symbols]

[0039] 1...Steering wheel, 2...Steering shaft, 3...Reduction gear, 4a, 4b...Universal joint, 5...Pinion rack mechanism, 5a...Pinion, 5b...Rack, 6a, 6b...Tie rod, 7a, 7b...Hub unit, 8L, 8R...Steering wheel, 9...First torque sensor, 10...Second torque sensor, 11...Steering angle sensor, 12...Electric motor, 13...First system coil, 14...Second system coil, 15...Vehicle CAN, 16...First microcontroller, 17...First motor drive unit, 18...First voltage detection unit, 19...First current detection unit, 20...First rotation angle detection unit, 21...CAN bus, 22...First clock generation unit, 23...Synchronization signal transmission unit, 24...First transmission buffer, 25...First reception buffer 26...First CAN controller, 27...First CPU, 28...First RAM, 29...First calculation unit, 30...First command value generation unit, 31...First current control unit, 32...Second microcontroller, 33...Second motor drive unit, 34...Second voltage detection unit, 35...Second current detection unit, 36...Second rotation angle detection unit, 37...Second clock generation unit, 38...Synchronization signal reception unit, 39...Second transmission buffer, 40...Second reception buffer, 41...Second CAN controller, 42...Second CPU, 43...Second RAM, 44...Second calculation unit, 45...Second command value generation unit, 46...Second current control unit, 47...Register, 100...Electric power steering device, 200...Electronic control unit, 1000...First system, 2000...Second system

Claims

1. A motor control device for controlling the drive of an electric motor having multiple winding sets, Multiple drive circuits that supply power to the winding assembly, A plurality of control units that drive the drive circuit based on the command value, A bus connecting a plurality of the control units to each other, If we define a group of components including the winding assemblies, the drive circuit, and the control unit, which are formed in correspondence with each other, as the first system, and define another group of components as the second system, The master control unit, which is the control unit of the first system, calculates a first command value, which is the command value of the master control unit, and a second command value, which is the command value of the slave control unit, which is the control unit of the second system, drives the drive circuit of the first system based on the calculated first command value, and transmits the calculated second command value to the slave control unit via the bus. The slave control unit drives the second drive circuit based on the second command value transmitted from the master control unit via the bus. moreover, The master control unit repeatedly performs a generation process at regular intervals to generate a plurality of predetermined pieces of information, including the first command value and the second command value. In each generation process, it first generates the first command value and the second command value from the plurality of predetermined pieces of information, and then, before the generation of the other predetermined pieces of information begins, it starts transmitting the generated second command value. The slave control unit receives the second command value via the bus, stores the received second command value in a receiving buffer of the slave control unit, and executes the operation of the second drive circuit based on the second command value stored in the receiving buffer. Motor control device.

2. After the master control unit has completed transmitting the second command value generated in the i-th cycle (where i is an integer), it begins transmitting the transmission information, which is the predetermined information to be transmitted to the slave control unit from among the other predetermined information generated in the i-1 cycle. The motor control device according to claim 1.

3. A motor control device for controlling the drive of an electric motor having multiple winding sets, Multiple drive circuits that supply power to the winding assembly, A plurality of control units that drive the drive circuit based on the command value, A bus connecting a plurality of the control units to each other, If we define a group of components including the winding assemblies, the drive circuit, and the control unit, which are formed in correspondence with each other, as the first system, and define another group of components as the second system, The master control unit, which is the control unit of the first system, calculates a first command value, which is the command value of the master control unit, and a second command value, which is the command value of the slave control unit, which is the control unit of the second system, drives the drive circuit of the first system based on the calculated first command value, and transmits the calculated second command value to the slave control unit via the bus. The slave control unit drives the second drive circuit based on the second command value transmitted from the master control unit via the bus. moreover, The master control unit repeatedly performs a generation process at regular intervals to generate a plurality of predetermined pieces of information including the first command value and the second command value, and within the period reserved for the execution of the generation process in the ith cycle (where i is an integer), it starts transmitting the second command value generated in the generation process of the ith cycle. The slave control unit receives the second command value via the bus, stores the received second command value in a receive buffer of the slave control unit, and during the period reserved for the execution of the generation process in the (i+1)th cycle, first stores the second command value stored in the receive buffer in a memory of the slave control unit, and then executes the driving of the second drive circuit based on the second command value stored in the memory. Motor control device.

4. A motor control device according to any one of claims 1 to 3, The system comprises an electric motor controlled by the motor control device, The electric motor provides steering assistance to the vehicle's steering system. Electric power steering system.

Citation Information

Patent Citations

  • Rotating electric machine control device and electric power steering device using the same

    JP7027808B2