Control system for motor and control device for motor

By configuring insulated stator coils and processing circuits in the motor, the command circuit and correction process are used to solve the problem of limited controllability of steering angles, and precise control of steering angles and system stability monitoring are achieved.

CN111824248BActive Publication Date: 2024-12-13JTEKT CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010299690.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-04-19
Filing Date
2020-04-16
Publication Date
2024-12-13
Estimated Expiration
2040-04-16

AI Technical Summary

Technical Problem

In the existing motor control system, the controllability of the steering angle is affected by the difference in the detection value of the rotation angle sensor, which makes it difficult to achieve precise control of the steering angle.

Method used

A control system is designed to perform the correction process by providing first and second stator coils insulated from each other in the motor, and respectively configuring the first and second processing circuits and driving circuits, using the command circuit detection process and the notification process, and performing the correction process to Accurate control of steering angle. The system includes a detection process, a correction process and a manipulation variable calculation process to ensure precise control of the steering angle, and can be independently set and corrected even if there are differences between the angle sensor detection values.

Benefits of technology

Accurate control of steering angle is achieved, ensuring that the controllability of steering angle is not affected by the difference in the detection value of the angle sensor, and can be monitored and adjusted in time when control abnormalities are controlled to avoid control errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111824248B_ABST
    Figure CN111824248B_ABST
Patent Text Reader

Abstract

A control system for a motor includes: a first processing circuit (301) configured to operate a first drive circuit (221); a second processing circuit (302) configured to operate a second drive circuit (222); and a command circuit (60) configured to output a signal related to a command value for a steering angle of a steering wheel to the first processing circuit (301) and the second processing circuit (302). The command circuit (60) is configured to perform a detection process, a first notification process, and a second notification process. The first processing circuit (301) is configured to perform a first correction process based on a first result signal to control the steering angle to the command value. The second processing circuit (302) is configured to perform a second correction process based on a second result signal to control the steering angle to the command value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a control system for a motor and a control device for a motor.

[0002] Description of Related Technology

[0003] For example, unexamined Japanese Patent Application Publication No. 2018-24335 (JP 2018-24335 A) describes a motor that steers a steering wheel and includes two stator coils that are independent of each other. JP 2018-24335 A describes a redundant control device including a separate microcomputer for each stator coil as a control device for a motor that operates a drive circuit connected to the stator coil. Each of the microcomputer pairs controls the d-axis and q-axis currents of the motor by calculating the d-axis and q-axis currents based on the detection values ​​of the separate rotation angle sensors. JP 2018-24335 A also describes that a command value for the current of the first microcomputer is used by the second microcomputer (FIG. 10). Summary of the invention

[0004] The inventors have studied detecting the steering angle of the steering wheel by a rotation angle sensor and performing feedback control to feed back the detected value to the target value in the redundant control device as described above. However, in this case, the controllability of the steering angle may be reduced due to the difference between the detection values ​​of the rotation angle sensor.

[0005] A first aspect of the present invention is a control system for a motor. The motor is configured to steer a steering wheel and includes a first stator coil and a second stator coil insulated from each other. The control system includes: a first processing circuit configured to operate a first drive circuit connected to the first stator coil; a second processing circuit configured to operate a second drive circuit connected to the second stator coil; and a command circuit configured to output a signal related to a command value of a steering angle for the steering wheel to the first processing circuit and the second processing circuit. The command circuit is configured to perform a detection process, a first notification process, and a second notification process. The detection process is configured to detect when the steering angle becomes a reference angle based on the driving state of the vehicle. The first notification process is configured to output a first result signal to the first processing circuit, the first result signal being a signal based on the detection result of the detection process. The second notification process is configured to output a second result signal to the second processing circuit, the second result signal being a signal based on the detection result of the detection process. The first processing circuit is configured to perform a first correction process based on the first result signal to control the steering angle to the command value. The first correction process is a process of correcting the relative angle between the first convertible angle and the convertible angle according to the command value, and operating the first drive circuit by inputting the corrected relative angle, wherein the first convertible angle is a convertible angle convertible to the steering angle of the steering wheel. The first convertible angle is an angle based on the detection value of the first angle sensor. The second processing circuit is configured to perform a second correction process based on the second result signal to control the steering angle to the command value. The second correction process is a process of correcting the relative angle between the second convertible angle and the convertible angle according to the command value, and operating the second drive circuit by inputting the corrected relative angle. The second convertible angle is an angle based on the detection value of the second angle sensor.

[0006] With the above configuration, the command circuit outputs the first result signal to the first processing circuit. Therefore, the first processing circuit obtains the first convertible angle corresponding to the reference angle. Therefore, the first convertible angle can be corrected to control the relative angle between the first convertible angle corresponding to the reference angle and the actual first convertible angle according to the relative angle between the reference angle and the command value. In the above configuration, the second result signal is output to the second processing circuit. Therefore, the second processing circuit obtains the second convertible angle corresponding to the reference angle. Therefore, the second convertible angle can be corrected to control the relative angle between the second convertible angle corresponding to the reference angle and the actual second convertible angle according to the relative angle between the reference angle and the command value. Therefore, the correction amount for the first convertible angle and the correction amount for the second convertible angle can be set independently. Therefore, even when there is a difference between the detection value of the first angle sensor and the detection value of the second angle sensor, the first convertible angle and the second convertible angle are accurately corrected. The steering angle is also accurately controlled as a result.

[0007] In the above control system, the first processing circuit may be configured to perform a first output process and a first comparison output process, the first output process being a process of outputting a first convertible angle to a command circuit, the first comparison output process being a process of outputting a reference first angle to the command circuit, and the reference first angle being a value when the first convertible angle outputted based on the first result signal through the first output process indicates the reference angle. The second processing circuit may be configured to perform a second output process and a second comparison output process, the second output process being a process of outputting a second convertible angle to the command circuit, the second comparison output process being a process of outputting a reference second angle to the command circuit, and the reference second angle being a value when the second convertible angle outputted based on the second result signal through the second output process indicates the reference angle. The command circuit may be configured to perform a first comparison process and a second comparison process, the first comparison process being a process of checking whether a value when the first convertible angle outputted based on the detection process indicates the reference angle matches the reference first angle outputted through the first comparison output process, and the second comparison process being a process of checking whether a value when the second convertible angle outputted based on the detection process indicates the reference angle matches the reference second angle outputted through the second comparison output process.

[0008] With the above configuration, the command circuit can obtain the first convertible angle corresponding to the reference angle by using the first output process and the detection process, and can obtain the second convertible angle corresponding to the reference angle by using the second output process and the detection process. When the first processing circuit performs the first comparison output process, the command circuit can check whether the reference first angle obtained by the first processing circuit matches the first convertible angle corresponding to the reference angle obtained by the command circuit. When the second processing circuit performs the second comparison output process, the command circuit can check whether the reference second angle obtained by the second processing circuit matches the second convertible angle corresponding to the reference angle obtained by the command circuit.

[0009] In the above control system, the first notification process may include the following process: when the detection process detects that the steering angle becomes the reference angle based on the first convertible angle output by the first output process, a signal related to the first convertible angle is output as a first result signal to the first processing circuit. The first comparison output process may include the following process: the first convertible angle notified by the first notification process is output as a reference first angle. The second notification process may include the following process: when the detection process detects that the steering angle becomes the reference angle based on the second convertible angle output by the second output process, a signal related to the second convertible angle is output as a second result signal to the second processing circuit. The second comparison output process may include the following process: the second convertible angle notified by the second notification process is output as a reference second angle.

[0010] With the above configuration, the first processing circuit is notified of the first convertible angle, which corresponds to the reference angle obtained by the command circuit. Therefore, the first processing circuit can easily obtain the reference first angle. In addition, the second processing circuit is notified of the second convertible angle, which corresponds to the reference angle obtained by the command circuit. Therefore, the second processing circuit can easily obtain the reference second angle.

[0011] In the above control system, the first processing circuit can be configured to perform the following processes: a first manipulated variable calculation process, the first manipulated variable calculation process calculates the first manipulated variable according to the output value of the integral element based on the difference between the first convertible angle and the target angle based on the command value; a process of operating the first drive circuit based on the first manipulated variable; and a manipulated variable output process of outputting the first manipulated variable to the second processing circuit. The second processing circuit can be configured to perform the following processes: a second manipulated variable calculation process, the second manipulated variable calculation process calculates the second manipulated variable without using the integral element based on the difference between the second convertible angle and the target angle; a first use and operation process of operating the second drive circuit based on the first manipulated variable; and a determination process, the determination process determines whether the first processing circuit is abnormal based on the deviation between the first manipulated variable and the second manipulated variable calculated by the second manipulated variable calculation process during the first use and operation process.

[0012] With the above configuration, both the first processing circuit and the second processing circuit can accurately obtain the reference angle, and control the steering angle to the command value through the correction process. However, due to deformation of the rotor, etc., the relative angle between any rotation angle of the motor and the reference angle obtained by the first processing circuit and the relative angle between any rotation angle of the motor and the reference angle obtained by the second processing circuit may not always be the same. When the angle obtained by the first processing circuit is different from the angle obtained by the second processing circuit, the difference between the target angle and the first convertible angle corrected by the first correction process is different from the difference between the target angle and the second convertible angle corrected by the second correction process. In this case, when the second processing circuit controls the steering angle based on the manipulated variable independently calculated by the second processing circuit, the control performed by the first processing circuit may not match the control performed by the second processing circuit. However, in the above configuration, the second processing circuit controls the steering angle based on the first manipulated variable. Therefore, the control performed by the first processing circuit matches the control performed by the second processing circuit control.

[0013] In the case where the second manipulated variable is calculated based on the output of the integral element according to the difference between the second convertible angle corrected by the second correction process and the target angle, the error between the first manipulated variable and the second manipulated variable may increase. However, in the above configuration, the second manipulated variable is calculated without using the integral element. Therefore, when the control is performed normally, the difference between the first manipulated variable and the second manipulated variable is unlikely to increase, and whether the control is performed normally can be monitored by the determination process.

[0014] In the above control system, when the first processing circuit is determined to be abnormal in the determination process, the second processing circuit may be configured to stop the first use and operation process and perform a second use and operation process of operating the second drive circuit based on the second manipulated variable.

[0015] With the above configuration, when the control is abnormal, the second processing circuit operates the second drive circuit based on the second manipulated variable. The controllability of the steering angle is less likely to decrease.

[0016] A second aspect of the present invention is a control device for a motor. The motor is configured to steer a steering wheel and includes a first stator coil and a second stator coil insulated from each other. The control device includes: a first processing circuit configured to operate a first drive circuit connected to the first stator coil; and a second processing circuit configured to operate a second drive circuit connected to the second stator coil. The first processing circuit is configured to perform a first correction process based on a first result signal received from a command circuit to control a steering angle to a command value. The first result signal is a signal according to a detection result that a steering angle becomes a reference angle performed based on a driving state of a vehicle. The first correction process is a process of correcting a relative angle between a first convertible angle and a convertible angle according to a command value to operate the first drive circuit by outputting a corrected relative angle, wherein the first convertible angle is a convertible angle convertible to a steering angle of a steering wheel. The first convertible angle is an angle based on a detection value of a first angle sensor. The second processing circuit is configured to perform a second correction process based on a second result signal received from the command circuit to control the steering angle to a command value. The second result signal is a signal according to a detection result that a steering angle becomes a reference angle performed based on a driving state of a vehicle. The second correction process is a process of correcting a relative angle between a second switchable angle and a switchable angle according to a command value to input the corrected relative angle to operate the second drive circuit. The second switchable angle is an angle based on a detection value of the second angle sensor. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Features, advantages, and technical and industrial significance of exemplary embodiments of the present invention will be described below with reference to the accompanying drawings, in which like symbols represent like elements, and in which:

[0018] Figure 1 shows a control system and a motor according to an embodiment;

[0019] Figure 2 shows a portion of a process performed by a control device according to an embodiment;

[0020] Figure 3 is a flowchart showing a process performed by a control device; and

[0021] Figure 4 is a flow chart illustrating a process performed by the control system. DETAILED DESCRIPTION

[0022] Embodiments of a control system for a motor will be described with reference to the accompanying drawings. Figure 1The motor 10 shown is a power source in a steering actuator for steering a steering wheel. In the present embodiment, a surface mounted permanent magnet synchronous motor (SPMSM) is shown as the motor 10. The motor 10 includes a rotor 12 and a pair of stator coils, namely a first stator coil 141 and a second stator coil 142. The control device 20 is a control device that takes the motor 10 as a controlled object, and controls the torque of the motor 10 as a controlled variable. The control device 20 includes separate circuits for the first stator coil 141 and the second stator coil 142. Specifically, the control device 20 includes a circuit for the first system and a circuit for the second system corresponding to the first stator coil 141 and the second stator coil 142, respectively.

[0023] More specifically, the control device 20 includes a first inverter 221 and a first microcomputer 301 as a circuit for a first system. The first inverter 221 is connected to the first stator coil 141. The first microcomputer 301 controls the current flowing through the first stator coil 141 by outputting an operation signal MS1 to the first inverter 221. The control device 20 includes a second inverter 222 and a second microcomputer 302 as a circuit for a second system. The second inverter 222 is connected to the second stator coil 142. The second microcomputer 302 controls the current flowing through the second stator coil 142 by outputting an operation signal MS2 to the second inverter 222. The first microcomputer 301 and the second microcomputer 302 can communicate with each other via a communication line 42.

[0024] Hereinafter, the letter "k", which may be "1" or "2", is used to collectively describe the first system and the second system. For example, "k" is used as follows: "The kth inverter 22k is connected to the kth stator coil 14k".

[0025] The kth microcomputer 30k obtains the three-phase currents iu(k), iv(k), and iw(k) flowing through the kth stator coil 14k and the rotation angle θm(k) of the rotor 12 detected by the kth angle sensor 40k. Each current iu(k), iv(k), iw(k) is detected by, for example, a voltage drop in a corresponding shunt resistor connected to a corresponding branch of the kth inverter 22k.

[0026] The k-th microcomputer 30k includes a central processing unit (CPU) 32k, a read-only memory (ROM) 34k, a storage device 36k, a peripheral circuit 38k, etc. The CPU 32k, the ROM 34k, the storage device 36k, the peripheral circuit 38k, etc. can communicate with each other via a local area network 39k. The storage device 36k is an electrically rewritable non-volatile memory. The peripheral circuit 38k includes a circuit for generating a clock signal for regulating internal operation based on an external clock signal, a power supply circuit, a reset circuit, etc.

[0027] The control device 20 can communicate with an external upper electronic control unit (ECU) 60 via a communication line 50. The target angle θp* output from the upper ECU 60 is input to the first microcomputer 301 and the second microcomputer 302. The target angle θp* is a target value of a convertible angle that can be converted into a steering angle of a steering wheel (steering angle of a tire). In the present embodiment, the target angle θp* is a target value of a rotation angle of a steering shaft. Specifically, the target angle θp* according to the present embodiment has a value of "0" at a reference angle and has different signs on the right turn side and the left turn side. The reference angle is a straight-line driving angle, i.e., an angle at which the vehicle drives straight. The terminal voltage of the battery 52 is applied to the upper ECU 60, the kth microcomputer 30k, and the kth inverter 22k. More specifically, the voltage of the battery 52 is applied to the kth microcomputer 30k via a relay 24k. A relay 26k is provided between the kth inverter 22k and the kth stator coil 14k.

[0028] The upper ECU 60 includes a CPU 62, a ROM 64, and a peripheral circuit 66. The CPU 62, the ROM 64, and the peripheral circuit 66 can communicate with each other via a local area network 68. The upper ECU 60 refers to various sensor values ​​such as the yaw rate detected by the yaw rate sensor 70 and the lateral acceleration ay detected by the lateral acceleration sensor 72 to output a target angle θp*. An operation state signal of an automatic driving switch 74 is input to the upper ECU 60. The automatic driving switch 74 is a switch with which the driver sends an instruction to execute automatic driving.

[0029] Figure 2 Specifically, among the processes executed by the first microcomputer 301 and the second microcomputer 302 , the processes executed when the automatic driving is executed are shown. Figure 2 The illustrated process is realized by the CPU 32k executing the program stored in the ROM 34k. Hereinafter, the processes executed by the first microcomputer 301 and the second microcomputer 302 are collectively denoted by reference numerals ending with the letter "k".

[0030] The integration process M10k is a process of integrating the rotation angle θm(k). The conversion process M12k is a process of multiplying the output of the integration process M10k by a predetermined coefficient K to convert the output into the rotation angle θp(k) of the steering shaft.

[0031] The feedback manipulated variable calculation process M20k is a process for calculating the feedback manipulated variable MFBk. The feedback manipulated variable MFBk is a manipulated variable for performing feedback control to feed back the rotation angle θp(k) to the target angle θp*. In the present embodiment, the feedback manipulated variable MFBk is basically the sum of the output value of the proportional element, the output value of the integral element, and the output value of the differential element. Specifically, the deviation calculation process M22k is a process for calculating the difference between the rotation angle θp(k) and the target angle θp*, and the proportional element M24k is a process for multiplying the difference by the proportional coefficient Kp. The integral gain multiplication process M26k is a process for multiplying the difference by the integral gain Ki, and the integral process M28k is a process for updating the integral value of the output of the integral gain multiplication process M26k and outputting the updated integral value. The integral element is composed of the integral gain multiplication process M26k and the integral process M28k. The differential gain multiplication process M30k is a process of multiplying the difference by the differential gain Kd, and the differential process M32k is a process of differentiating the output of the differential gain multiplication process M30k. The differential element is composed of the differential gain multiplication process M30k and the differential process M32k. The addition process M34k is a process of calculating the sum of the output values ​​of the proportional element M24k, the integral process M28k, and the differential process M32k and outputting the sum as the feedback manipulated variable MFBk.

[0032] The feedforward manipulated variable calculation process M40k is a process for calculating the feedforward manipulated variable MFFk. The feedforward manipulated variable MFFk is a manipulated variable used for control to achieve the target angle θp*. Specifically, the feedforward manipulated variable calculation process M40k is a process in which the absolute value of the feedforward manipulated variable MFFk is set to a larger value when the absolute value of the target angle θp* is relatively large than when the absolute value of the target angle θp* is small. This can be achieved by, for example, the CPU 32k mapping with mapping data pre-stored in the ROM 34k to calculate the feedforward manipulated variable MFFk. For example, the input variable of the mapping data is the target angle θp*, and the output variable of the mapping data is the feedforward manipulated variable MFFk. The mapping data is a set of discrete values ​​of the input variables and values ​​of the output variables corresponding to the values ​​of the input variables. Calculation by mapping is a process in which, when the value of an input variable matches one of the values ​​of the input variable in the mapping data, the corresponding value of the output variable in the mapping data is output as a calculation result, and when the value of the input variable does not match any value of the input variable in the mapping data, a value calculated by interpolation of multiple values ​​of the output variable in the mapping data is output as a calculation result.

[0033] The addition process M42k is a process of adding the feedback manipulated variable MFBk and the feedforward manipulated variable MFFk to calculate the kth manipulated variable MVk. The kth manipulated variable MVk is the q-axis current command value.

[0034] The first operation signal generating process M441 is a process of calculating and outputting the operation signal MS1 for the first inverter 221 so that the q-axis current flowing through the first stator coil 141 becomes “1 / 2” of the first manipulated variable MV1.

[0035] The selection process M50 is a process of selectively outputting one of two manipulated variables, ie, the first manipulated variable MV1 and the second manipulated variable MV2, to the second operation signal generating process M442.

[0036] The second operation signal generating process M442 is in principle a process of calculating and outputting the operation signal MS2 for the second inverter 222 so that the q-axis current flowing through the second stator coil 142 becomes “1 / 2” of the output of the selecting process M50.

[0037] In this embodiment, based on Figure 2 Process execution in Figure 3 The process shown in Figure 2 The process shown in is modified appropriately. Figure 3 There are shown processes implemented by the CPU 321 repeatedly executing a program stored in the ROM 341 at, for example, predetermined intervals, and processes implemented by the CPU 322 repeatedly executing a program stored in the ROM 342 at, for example, predetermined intervals. Figure 3 The steps of each process are indicated by numbers beginning with the letter "S". Figure 3 process.

[0038] exist Figure 3 In the series of processes shown, the CPU 321 first determines whether the communication between the first microcomputer 301 and the second microcomputer 302 is normal (S10). In this example, the first microcomputer 301 and the second microcomputer 302 periodically send and receive predetermined data to each other via the communication line 42, and when the first microcomputer 301 and the second microcomputer 302 cannot periodically send and receive predetermined data to each other via the communication line 42, the CPU 321 determines that the communication between the first microcomputer 301 and the second microcomputer 302 is abnormal.

[0039] When the CPU 321 determines that the communication between the first microcomputer 301 and the second microcomputer 302 is normal (S10: Yes), the CPU 321 determines whether the first microcomputer 301 cannot control the current flowing through the first stator coil 141 by operating the first inverter 221 (S12). The CPU 321 determines that the first microcomputer 301 cannot control the current flowing through the first stator coil 141 when the first angle sensor 401 is abnormal, when the temperature of the first stator coil 141 or the first inverter 221 is equal to or higher than a prescribed temperature, etc. For example, when the output signal of the first angle sensor 401 is fixed to the ground potential or the terminal potential of the battery 52, etc., it is determined that the first angle sensor 401 is abnormal. Whether the temperature of the first stator coil 141 or the first inverter 221 is equal to or higher than a prescribed temperature is determined based on the history of the currents iu(1), iv(1), and iw(1), etc.

[0040] When the CPU 321 determines that the first microcomputer 301 can control the current flowing through the first stator coil 141 (S12: No), the CPU 321 outputs the first manipulated variable MV1 to the second microcomputer 302 via the communication line 42 (S14). When the process of S14 is completed, the CPU 321 terminates. Figure 3 A series of processes shown.

[0041] like Figure 3 As shown, the CPU 322 determines whether the first microcomputer 301 has stopped controlling the current flowing through the first stator coil 141 (S20). When the first microcomputer 301 is operating (S20: No), the CPU 322 stops the integration process M282 (S22). Specifically, the value held by the integration process M282 is fixed to the initial value "0". Therefore, the feedback manipulated variable MFB2 is the sum of the output value of the proportional element M242 and the output value of the differential process M322, and the second manipulated variable MV2 is the sum of the feedback manipulated variable MFB2 and the feedforward manipulated variable MFF2.

[0042] Then, the CPU 322 determines whether the communication between the first microcomputer 301 and the second microcomputer 302 is normal (S24). When the CPU 322 determines that the communication between the first microcomputer 301 and the second microcomputer 302 is normal (S24: Yes), the CPU 322 obtains the Figure 3The first manipulated variable MV1 output by the process of S14 in (S26). Then, the CPU 322 determines whether the absolute value of the difference between the first manipulated variable MV1 and the second manipulated variable MV2 is less than the prescribed value Mth (S28). This process is a process of determining whether the rotation angle θp(k) is normally controlled to the target angle θp*. That is, the difference between the first manipulated variable MV1 and the second manipulated variable MV2 is the difference between the feedback manipulated variables MFB1 and MFB2, and the difference between the feedback manipulated variables MFB1 and MFB2 should be very small.

[0043] That is, the first factor causing the difference between the feedback manipulated variables MFB1 and MFB2 is that the output value of the integral process M282 is zero. Since the output value of the integral process M281 is a value that compensates for the control error caused by the feedforward manipulated variable MFF1, the absolute value of the output value of the integral process M281 does not become so large. The second factor causing the difference between the feedback manipulated variables MFB1 and MFB2 is the difference between the proportional elements M241 and M242 and the difference between the differential processes M321 and M322 caused by the difference between the rotation angle θm(1) detected by the first angle sensor 401 and the rotation angle θm(2) detected by the second angle sensor 402. However, since the absolute value of the difference between the rotation angles θm(1) and θm(2) is very small, the absolute value of the difference between the proportional elements M241 and M242 and the absolute value of the difference between the differential processes M321 and M322 are also small.

[0044] When the CPU 322 determines that the absolute value of the difference between the first manipulated variable MV1 and the second manipulated variable MV2 is less than the prescribed value Mth (S28: Yes), it is considered that the control is being performed normally. Therefore, the CPU 322 selects the first manipulated variable MV1 as the selection process M50 (S30). Therefore, in the second operation signal generation process M442, an operation signal MS2 for operating the second inverter 222 is generated and output so that the q-axis current flowing through the second stator coil 142 becomes "1 / 2" of the first manipulated variable MV1. When the process of S30 is completed, the CPU 322 terminates. Figure 3 A series of processing shown.

[0045] When the communication between the microcomputers is normal and the control of the first microcomputer 301 is abnormal, as shown in FIG. Figure 3As shown, since the CPU 321 determines in S12 that the first microcomputer 301 cannot control the current flowing through the first stator coil 141 (S12: Yes), the CPU 321 notifies the second microcomputer 302 via the communication line 42 that the first microcomputer 301 cannot control the current flowing through the first stator coil 141 (S16). The CPU 321 switches the relays 241, 261 to the disconnected state via the peripheral circuit 381, etc. (S18). When the process of S18 is completed, the CPU 321 terminates Figure 3 A series of processes shown.

[0046] In this case, if Figure 3 As shown, the CPU 322 determines that the first microcomputer 301 has stopped controlling the current flowing through the first stator coil 141 (S20: YES), and executes the integration process M282 to calculate the second manipulated variable MV2 based on the integration element (I term) (S32).

[0047] The CPU 322 selects the second manipulated variable MV2 as the selection process M50 (S34). In this case, in the second operation signal generation process M442, an operation signal MS2 for operating the second inverter 222 is generated and output so that the q-axis current flowing through the second stator coil 142 becomes the second manipulated variable MV2. That is, because no current is applied to the first stator coil 141, the q-axis current applied to the second stator coil 142 needs to be the second manipulated variable MV2 in order to control the rotation angle θp(2) to the target angle θp*. When the process of S34 is completed, the CPU 322 terminates Figure 3 A series of processes shown.

[0048] When the communication between microcomputers is normal and the control is abnormal, it is assumed that Figure 3 The process of S14 in is executed. In this case, Figure 3 In the process of S28 shown, the CPU 322 determines that the absolute value of the difference between the first manipulated variable MV1 and the second manipulated variable MV2 is not less than the prescribed value Mth (S28: No), and the routine continues to S34. In the second operation signal generation process M442, an operation signal MS2 for operating the second inverter 222 is generated and output so that the q-axis current flowing through the second stator coil 142 becomes "1 / 2" of the second manipulated variable MV2.

[0049] In this case, if Figure 3 As shown, the CPU 321 determines that an abnormality has occurred in the communication between the first microcomputer and the second microcomputer 301, 302 (S10: No), and terminates the communication. Figure 3 A series of processes shown.

[0050] In this case, Figure 3 In S24, the CPU 322 determines that the communication between the first microcomputer 301 and the second microcomputer 302 is not normal (S24: No), and the routine proceeds to S34. In the second operation signal generating process M442, an operation signal MS2 for operating the second inverter 222 is generated and output so that the q-axis current flowing through the second stator coil 142 becomes "1 / 2" of the second manipulated variable MV2.

[0051] Next, a process of setting a reference angle, which is a rotation angle θp(k) at which the vehicle travels straight, to zero will be described. Figure 4 A process of learning a reference angle according to the present embodiment is shown. Figure 4 The process shown in FIG. 1 is realized by the CPU 32k repeatedly executing a program stored in the ROM 34k at, for example, predetermined intervals. Figure 4 The process shown in FIG. 6 is also realized by the CPU 62 repeatedly executing the program stored in the ROM 64 at, for example, predetermined intervals.

[0052] exist Figure 4 In the series of processes shown, the CPU 32k first determines whether the CPU 32k has received the target angle θp* (S40). When the CPU 32k determines that the CPU 32k has not received the target angle θp* (S40: No), the CPU 32k outputs the rotation angle θp(k) to the upper ECU 60 via the communication line 50 (S42).

[0053] exist Figure 4 In the series of processes shown, CPU 62 first determines whether the flag F is "1" (S60). When the flag F is "1", it indicates that the learning of the reference angle has been completed and the automatic steering process can be performed. When the flag F is "0", it indicates that the learning of the reference angle is not completed and the active steering process cannot be performed. When CPU 62 determines that the flag F is "0" (S60: No), CPU 62 receives the rotation angle θp(1) from the first microcomputer 301, and receives the rotation angle θp(2) from the second microcomputer 302 (S62). Then, CPU 62 determines whether the vehicle is traveling in a straight line (S64). In S64, CPU 62 determines whether the vehicle is traveling in a straight line based on the yaw rate γ, the lateral acceleration ay, etc.

[0054] When the CPU 62 determines that the vehicle is traveling in a straight line (S64: Yes), the CPU 62 replaces the reference angle θpr0(1) with the rotation angle θp(1) received in S62, and replaces the reference angle θpr0(2) with the rotation angle θp(2) received in S62 (S66). Then, the CPU 62 replaces the reference angle θpr(1) with the reference angle θpr0(1), and replaces the reference angle θpr(2) with the reference angle θpr0(2) (S68). Subsequently, the CPU 62 outputs the reference angle θpr(1) to the first microcomputer 301 via the communication line 50, and outputs the reference angle θpr(2) to the second microcomputer 302 via the communication line 50 (S70).

[0055] like Figure 4 As shown, the CPU 32k waits until the CPU 32k receives the reference angle θpr(k) (S44: No). When the CPU 32k receives the reference angle θpr(k) (S44: Yes), the CPU 32k stores the reference angle θpr(k) in the storage device 36k (S46). Then, the CPU 32k outputs the same value as the stored reference angle θpr(k) to the upper ECU 60 via the communication line 50 (S48).

[0056] like Figure 4 As shown, the CPU 62 waits until the CPU 62 receives the reference angles θpr(1), θpr(2) (S72: No). When the CPU 62 receives the reference angles θpr(1), θpr(2) (S72: Yes), the CPU 62 determines whether the logical product of "the received reference angle θpr(1) matches the reference angle θpr0(1)" and "the received reference angle θpr(2) matches the reference angle θpr0(2)" is true (S74). When the CPU 62 determines that the logical product is true (S74: Yes), the CPU 62 sets the flag F to "1" (S76).

[0057] When the CPU 62 determines that the flag F is "1" (S60: Yes), the CPU 62 determines whether there is an automatic driving request based on the operation state of the automatic driving switch 74 (S78). When the CPU 62 determines that there is an automatic driving request (S78: Yes), the CPU 62 calculates the target angle θp* and outputs the calculated target angle θp* to the first microcomputer 301 and the second microcomputer 302 via the communication line 50 (S80). The target angle θp* output to the first microcomputer 301 and the target angle θp* output to the second microcomputer 302 are the same angle.

[0058] like Figure 4As shown, when the CPU 32k receives the target angle θp* (S40: YES), the CPU 32k reads the reference angle θpr(k) stored in the storage device 36k (S50). Then, the CPU 32k replaces the rotation angle θp(k) to be input to the feedback manipulated variable calculation process M20k with a value obtained by subtracting the reference angle θpr(k) from the rotation angle θp(k) (S52).

[0059] When the process of S48 or S52 is completed or when the determination result in S44 is NO, the CPU 32k terminates Figure 4 When the process of S76 or S80 is completed or when the determination result in S64, S72, S74 or S78 is negative, the CPU 62 terminates the process. Figure 4 A series of processes shown.

[0060] The function and effect of the present embodiment will be described. Each time the rotation angle θp(k) is calculated before learning the reference angle θpr(k), the CPU 32k outputs the calculated rotation angle θp(k) to the upper ECU 60. When the vehicle is traveling in a straight line, the CPU 62 determines that the rotation angle θp(k) output from the kth microcomputer 30k corresponds to the reference angle, and replaces the reference angle θpr(k), θpr0(k) with the rotation angle θp(k). Then, the CPU 62 outputs the reference angle θpr(k) to the kth microcomputer 30k. Therefore, the first microcomputer 301 has the reference angle θpr1, and the second microcomputer 302 has the reference angle θpr2. Since each of the first microcomputer 301 and the second microcomputer 302 has a reference angle individually, the difference between the angle for control by the first microcomputer 301 and the angle for control by the second microcomputer 302 is reduced.

[0061] The above embodiment also has the following functions and effects. When the CPU 32k receives the reference angle θpr(k), the CPU 32k outputs the received reference angle θpr(k) to the upper ECU 60. When the reference angle θpr(1) output from the first microcomputer 301 is equal to the reference angle θpr0(1) and the reference angle θpr(2) output from the second microcomputer 302 is equal to the reference angle θpr0(2), the CPU 62 allows automatic steering. Therefore, after confirming that each of the first microcomputer 301 and the second microcomputer 302 has the correct angle, automatic steering is performed.

[0062] In a normal state, the CPU 321 calculates the first manipulated variable MV1 for controlling the rotation angle θp(1) to the target angle θp*, and operates the first inverter 221 so that the q-axis current flowing through the first stator coil 141 becomes "1 / 2" of the first manipulated variable MV1. The CPU 322 operates the second inverter 222 so that the q-axis current flowing through the second stator coil 142 becomes "1 / 2" of the first manipulated variable MV1. Therefore, compared with the case where the q-axis current flowing through the second stator coil 142 is controlled to be the second manipulated variable MV2 calculated when the integration process M282 is executed, interference is less likely to occur when controlling the steering angle of the steering wheel.

[0063] That is, the rotation angle θp(1) corrected by the CPU 321 in S52 is controlled to be the target angle θp*. When the target angle θp* output in S80 is the reference angle, the CPU 321 controls the actual angle to be the reference angle. In addition, the rotation angle θp(2) corrected by the CPU 322 in S52 is controlled to be the target angle θp*. When the target angle θp* output in S80 is the reference angle, the CPU 322 controls the actual angle to be the reference angle. Therefore, when the target angle θp* output in S80 is the reference angle, the CPU 321 and the CPU 322 control the steering angle to be the reference angle. However, unless the target angle θp* is the reference angle or an angle that is an integer multiple of a predetermined angle different from the reference angle, the CPU 321 and the CPU 322 may control the steering angle to be a different angle due to deformation of the rotor 12. This is because, when the target angle θp* is not the reference angle, etc., the actual steering angle corresponding to the rotation angle θp(1) corrected by the CPU 321 in S52 and the actual steering angle corresponding to the rotation angle θp(2) corrected by the CPU 322 in S52 may differ from each other due to deformation of the rotor 12. The output value of the integration process M281 is a value for eliminating the steady-state deviation between the target angle θp* and the rotation angle θp(1) corrected by the CPU 321 in S52, and the output value of the integration process M282 is a value for eliminating the steady-state deviation between the target angle θp* and the rotation angle θp(2) corrected by the CPU 322 in S52. Therefore, when the actual steering angle corresponding to the rotation angle θp(1) corrected by the CPU 321 in S52 and the actual steering angle corresponding to the rotation angle θp(2) corrected by the CPU 322 in S52 differ from each other, interference in control occurs.

[0064] In the case where an abnormality occurs in the control whose cause cannot be identified by the first microcomputer 301, the CPU 322 detects the abnormality when the absolute value of the difference between the first manipulated variable MV1 and the second manipulated variable MV2 is equal to or greater than the prescribed value Mth. In this case, the CPU 322 uses the second manipulated variable MV2 to operate the second inverter 222. This reduces the contribution of the first manipulated variable MV1 to the control of the target angle θp* compared to the case where the first manipulated variable MV1 is used to operate the second inverter 222 even when the first manipulated variable MV1 is abnormal. In this case, the CPU 322 calculates the second manipulated variable MV2 with the integration process M282 stopped. This avoids the disturbance in the control that occurs because the output values ​​of the integration processes M281, M282 are values ​​that eliminate the steady-state deviations that are different from each other.

[0065] When the communication between the first microcomputer 301 and the second microcomputer 302 is abnormal, the CPU 322 uses the second manipulated variable MV2 to operate the second inverter 222. Therefore, the q-axis current flowing through the first stator coil 141 is controlled to be "1 / 2" of the first manipulated variable MV1, and the q-axis current flowing through the second stator coil 142 is controlled to be "1 / 2" of the second manipulated variable MV2. Therefore, the torque of the motor 10 is controlled to a value suitable for controlling to the target angle θp*. In this case, the CPU 322 calculates the second manipulated variable MV2 when the integration process M282 is stopped. This avoids interference in control that occurs because the output values ​​of the integration processes M281, M282 are values ​​that eliminate steady-state deviations that are different from each other.

[0066] The correspondence between the contents described in the above embodiment and the contents described in the above “Summary of the Invention” is as follows. The k-th drive circuit corresponds to the k-th inverter 22k, and the k-th processing circuit corresponds to the k-th microcomputer 30k, where the variable k is “1” or “2”. The command circuit corresponds to the upper ECU 60. The detection process corresponds to the process of S64, the first notification process corresponds to the process of outputting the reference angle θpr(1) in the process of S70, and the second notification process corresponds to the process of outputting the reference angle θpr(2) in the process of S70. The first correction process corresponds to the process of making correction using the reference angle θpr(1) in the process of S52, and the second correction process corresponds to the process of making correction using the reference angle θpr(2) in the process of S52. The first output process corresponds to the process of S42 executed by the CPU 321, and the first comparison output process corresponds to the process of S48 executed by the CPU 321. The second output process corresponds to the process of S42 executed by the CPU 322, and the second comparison output process corresponds to the process of S48 executed by the CPU 322. The first comparison process corresponds to the process of determining whether the reference angle θpr0(1) matches the reference angle θpr(1) in the process of S74. The second comparison process corresponds to the process of determining whether the reference angle θpr0(2) matches the reference angle θpr(2) in the process of S74. The kth manipulated variable calculation process corresponds to the feedback manipulated variable calculation process M20k, the feedforward manipulated variable calculation process M40k and the addition process M42k. The manipulated variable output process corresponds to the process of S14. The first use and operation process corresponds to the second operation signal generation process M442 executed when the process of S30 is executed. The determination process corresponds to the process of S28. The second use and operation process corresponds to the second operation signal generation process M442 executed when the process of S34 is executed.

[0067] At least one aspect of the above embodiment may be modified as follows. In the above embodiment, the reference angle θpr(k) is output to the kth microcomputer 30k. However, the present invention is not limited thereto. For example, when the determination result in S64 is yes, a signal indicating the determination result may be output to the kth microcomputer 30k as the kth result signal. In this case, the kth microcomputer 30k replaces the reference angle θpr(k) with the rotation angle θp(k) when receiving the kth result signal. Even in this case, after the CPU 62 executes the process of S68 and the CPU 32k replaces the reference angle θpr(k) with the rotation angle θp(k) when receiving the kth result signal, it is still expected that the CPU 32k outputs the result value in S48. Therefore, the process of S74 may be executed.

[0068] In the process of S42, a timestamp indicating the time when the rotation angle θp(k) is detected can be output together with the rotation angle θp(k). Therefore, the CPU 62 more accurately obtains the rotation angle θp(k) corresponding to the moment when the CPU 62 determines in S64 that the vehicle is traveling straight.

[0069] In the above embodiment, the rotation angle θp(k) to be input to the feedback manipulated variable calculation process M20k is corrected. However, the present invention is not limited to this. For example, the target angle θp* to be input to the feedback manipulated variable calculation process M20k may be corrected. Even in this case, the relative angle between the target angle θp* output in S80 and the rotation angle θp(k) output by the conversion process M12k may be corrected. The value to be corrected is not limited to the input of the feedback manipulated variable calculation process M20k. For example, when the feedforward manipulated variable MFFk is calculated based on the rotation angle θp(k), the rotation angle θp(k) to be input to the feedforward manipulated variable calculation process M40k is also corrected.

[0070] For example, in the case where the integral gain Ki for the feedback manipulated variable MFBk is not variable, the integral element may be a process of multiplying the output value of the integral process M28k by the integral gain Ki in the integral gain multiplication process M26k.

[0071] The feedback manipulated variable MFBk is not limited to the sum of the output values ​​of the proportional element M24k, the integral element, and the differential element. For example, the feedback manipulated variable MFBk may be the sum of the output values ​​of the proportional element and the integral element, the sum of the output values ​​of the integral element and the differential element, or the output value of the integral element.

[0072] Regarding the feedforward manipulated variable MFFk, the feedforward manipulated variable MFFk based on the convertible angle (target angle θp*, etc.) is not limited to the feedforward manipulated variable MFFk calculated only from the convertible angle. For example, the feedforward manipulated variable MFFk may vary according to the vehicle speed. For example, the second-order time differential value of the convertible angle multiplied by the proportional coefficient may be further added to calculate the feedforward manipulated variable MFFk.

[0073] The kth manipulated variable MVk is not necessarily calculated based on the feedforward manipulated variable MFFk.

[0074] In the above embodiment, the convertible angle is the angle of the steering axis. However, the present invention is not limited thereto. The convertible angle may be a steering angle, that is, a steering angle of a tire.

[0075] In the above embodiments, ROM is shown as a program storage device forming a processing circuit, but the type of ROM is not mentioned in the above description. The ROM may be a non-rewritable memory, or may be an electrically rewritable nonvolatile memory. The program storage device is not limited to ROM.

[0076] The processing circuit is not limited to a software processing circuit including a program storage device having a program stored therein and a CPU for executing the program. The processing circuit may be a dedicated hardware circuit such as an application specific integrated circuit (ASIC) for executing a predetermined process.

[0077] The processing circuit is not limited to a processing circuit formed by a software processing circuit or a dedicated hardware circuit. The processing circuit may perform a part of the above process by a software processing circuit and perform the rest of the above process by a dedicated hardware circuit.

[0078] The above embodiment shows a device having two systems, namely a first system and a second system. However, the present invention is not limited thereto. For example, the device may further include a third system, etc. Specifically, the device may include three or more stator coils, three or more drive circuits, and three or more processing circuits. In this case, it is desirable that one of the three or more components is used as a main component, and the remaining components are used as subcomponents.

[0079] The motor is not limited to SPMSM. The motor may be an internal permanent magnet synchronous motor (IPMSM). In the case of IPMSM, it is expected that the kth manipulated variable MVk is a torque command value, and in the kth operation signal generating process M44k, the torque command value is converted into a d-axis current command value and a q-axis current command value. The motor is not limited to a synchronous motor, but may be an asynchronous motor. The motor is not limited to a brushless motor, but may be a brushed DC motor.

[0080] In the above embodiment, a three-phase inverter is shown as a drive circuit. However, the present invention is not limited thereto. For example, when a DC motor is used as a motor, an H-bridge circuit may be used as a drive circuit.

[0081] In addition, in S18, it is not necessary to provide relays 261 and 262 and to turn off relay 261. In S18, relay 261 may be turned off, but relay 241 may not be turned off.

Claims

1. A control system for a motor (10), the motor (10) being configured to steer a steering wheel and comprising a first stator coil and a second stator coil insulated from each other, the control system being characterized by comprising: A first processing circuit (301) configured to operate a first drive circuit (221) connected to the first stator coil (141); A second processing circuit (302) configured to operate a second drive circuit (222) connected to the second stator coil (142); as well as A command circuit (60) is configured to output a signal related to a command value for a steering angle of the steering wheel to the first processing circuit (301) and the second processing circuit (302), wherein: The command circuit (60) is configured to execute a detection process, a first notification process, and a second notification process, wherein the detection process is configured to detect when the steering angle becomes a reference angle as an angle for the vehicle to travel in a straight line, i.e., a straight-line travel angle, based on the driving state of the vehicle, the first notification process is configured to output a first result signal to the first processing circuit (301), the first result signal being a signal based on a detection result of the detection process, and the second notification process is configured to output a second result signal to the second processing circuit (302), the second result signal being a signal based on a detection result of the detection process, The first processing circuit (301) is configured to perform a first correction process based on the first result signal to control the steering angle to the command value, the first correction process being a process of correcting a relative angle between a first convertible angle and a convertible angle according to the command value, operating the first drive circuit (221) with the corrected relative angle input, the first convertible angle being a convertible angle that can be converted to the steering angle of the steering wheel, and the first convertible angle being an angle based on a detection value of a first angle sensor, and The second processing circuit (302) is configured to perform a second correction process based on the second result signal to control the steering angle to the command value, the second correction process being a process of correcting a relative angle between a second convertible angle and the convertible angle according to the command value, operating the second drive circuit (222) with the corrected relative angle input, and the second convertible angle is an angle based on a detection value of a second angle sensor, The first processing circuit (301) is configured to execute a first output process and a first comparison output process, the first output process is a process of outputting the first convertible angle to the command circuit (60), the first comparison output process is a process of outputting a reference first angle to the command circuit, and the reference first angle is a value when the first convertible angle output by the first output process based on the first result signal indicates the reference angle, The second processing circuit (302) is configured to execute a second output process and a second comparison output process, the second output process is a process of outputting the second convertible angle to the command circuit, the second comparison output process is a process of outputting a reference second angle to the command circuit, and the reference second angle is a value when the second convertible angle output by the second output process based on the second result signal indicates the reference angle, and The command circuit (60) is configured to execute a first comparison process and a second comparison process, wherein the first comparison process is a process of checking whether a value obtained based on the detection process when the first convertible angle output by the first output process indicates the reference angle matches the reference first angle output by the first comparison output process, and the second comparison process is a process of checking whether a value obtained based on the detection process when the second convertible angle output by the second output process indicates the reference angle matches the reference second angle output by the second comparison output process.

2. The control system of the motor (10) according to claim 1, characterized in that: The first notification process includes the following process: when the detection process detects that the steering angle becomes the reference angle based on the first convertible angle outputted through the first output process, outputting a signal related to the first convertible angle as the first result signal to the first processing circuit, The first comparison and output process includes a process of outputting the first convertible angle notified by the first notification process as the reference first angle, The second notification process includes the following process: when the detection process detects that the steering angle becomes the reference angle based on the second convertible angle outputted by the second output process, outputting a signal related to the second convertible angle as the second result signal to the second processing circuit (302), and The second comparison output process includes a process of outputting the second convertible angle notified by the second notification process as the reference second angle.

3. A control system for a motor (10) according to claim 1 or 2, characterized in that: The first processing circuit (301) is configured to execute the following process: a first manipulated variable calculation process that calculates a first manipulated variable based on an output value of an integral element according to a difference between the first convertible angle and a target angle according to the command value; a process of operating the first drive circuit (221) based on the first manipulated variable; and a manipulated variable outputting process of outputting the first manipulated variable to the second processing circuit (302), and The second processing circuit (302) is configured to perform the following process: a second manipulated variable calculation process that calculates a second manipulated variable without using an integral element according to a difference between the second convertible angle and the target angle; a first use and operation process that operates the second drive circuit based on the first manipulated variable; and a determination process for determining whether the first processing circuit (301) is abnormal based on a deviation between the first manipulated variable and the second manipulated variable calculated by the second manipulated variable calculation process during the first use and operation process.

4. The control system for a motor (10) according to claim 3, characterized in that: The second processing circuit (302) is configured to stop the first use and operation process and execute a second use and operation process of operating the second drive circuit based on the second manipulated variable when it is determined in the determination process that the first processing circuit (301) is abnormal.

5. A control device (20) for a motor (10), the motor (10) being configured to steer a steering wheel and comprising a first stator coil and a second stator coil insulated from each other, the control device (20) being characterized by comprising: A first processing circuit (301) configured to operate a first drive circuit (221) connected to the first stator coil (141); and A second processing circuit (302) is configured to operatively connect to a second drive circuit (222) of the second stator coil (142), The first processing circuit (301) is configured to perform a first correction process based on a first result signal from a command circuit (60) to control the steering angle to a command value, the command circuit (60) is configured to output a signal related to the command value of the steering angle for the steering wheel to the first processing circuit (301) and the second processing circuit (302), and is configured to perform a detection process, a first notification process, and a second notification process, the detection process being configured to detect when the steering angle becomes a reference angle as an angle for straight-line driving of the vehicle, i.e., a straight-line driving angle, based on a driving state of the vehicle, the first notification process being configured to notify the first processing circuit (301) of the command value. outputting a first result signal, the first result signal being a signal based on the detection result of the detection process, and the second notification process being configured to output a second result signal to the second processing circuit (302), the second result signal being a signal based on the detection result of the detection process, the first correction process being a process of correcting a relative angle between a first convertible angle and a convertible angle according to a command value, operating the first drive circuit (221) with input of the corrected relative angle, the first convertible angle being a convertible angle that can be converted to a steering angle of the steering wheel, and the first convertible angle being an angle based on a detection value of a first angle sensor, and The second processing circuit (302) is configured to perform a second correction process based on the second result signal to control the steering angle to the command value, the second correction process being a process of correcting a relative angle between a second convertible angle and the convertible angle according to the command value, operating the second drive circuit (222) with the corrected relative angle input, and the second convertible angle is an angle based on a detection value of a second angle sensor, The first processing circuit (301) is configured to execute a first output process and a first comparison output process, the first output process is a process of outputting the first convertible angle to the command circuit (60), the first comparison output process is a process of outputting a reference first angle to the command circuit, and the reference first angle is a value when the first convertible angle output by the first output process based on the first result signal indicates the reference angle, The second processing circuit (302) is configured to execute a second output process and a second comparison output process, the second output process is a process of outputting the second convertible angle to the command circuit, the second comparison output process is a process of outputting a reference second angle to the command circuit, and the reference second angle is a value when the second convertible angle output by the second output process based on the second result signal indicates the reference angle.

6. The control device (20) for a motor (10) according to claim 5, characterized in that: The first notification process includes the following process: when the detection process detects that the steering angle becomes the reference angle based on the first convertible angle outputted by the first output process, outputting a signal related to the first convertible angle as the first result signal to the first processing circuit (301), The first comparison and output process includes a process of outputting the first convertible angle notified by the first notification process as the reference first angle, The second notification process includes the following process: when the detection process detects that the steering angle becomes the reference angle based on the second convertible angle outputted by the second output process, outputting a signal related to the second convertible angle as the second result signal to the second processing circuit (302), and The second comparison output process includes a process of outputting the second convertible angle notified by the second notification process as the reference second angle.