Motor control method, device and system and readable storage medium
By setting up two independent control circuits in the motor control system and using the difference detection method for comprehensive judgment, the problem of low accuracy in the control circuit fault detection in the prior art is solved, and higher detection accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202311296905.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-08
- Publication Date
- 2025-04-15
AI Technical Summary
In the prior art, the accuracy of motor control circuit fault detection is low and the reliability is insufficient.
By setting up two independent control circuits in the motor control system, one as a backup, the difference detection method (including duty cycle difference, frequency difference and duration detection) is used to comprehensively determine whether there is an abnormality or failure in the control circuit, and switch to the backup control circuit in time when a problem is detected.
It improves the accuracy and reliability of the control circuit fault detection, ensuring high reliability and high safety operation of the motor.
Smart Images

Figure CN119834655A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motor technology, and more specifically, to a motor control method, device, system and readable storage medium. Background Art
[0002] At present, in order to meet the requirements of high reliability and high safety of motors, the control circuit of the motor can be tested to timely discover and handle the faults of the control circuit. However, the accuracy of the fault detection of the control circuit is low and the reliability is insufficient. Summary of the invention
[0003] The present application proposes a motor control method, device, system and readable storage medium.
[0004] In a first aspect, an embodiment of the present application provides a motor control method, which is applied to a motor control system, wherein the motor control system includes a controlled motor, a first control circuit for outputting a drive signal to the controlled motor, and a second control circuit as a backup of the first control circuit, wherein the controlled motor is connected to the first control circuit and the second control circuit, respectively, and the method includes: obtaining a first signal used by the first control circuit to drive the controlled motor, the first signal including a drive signal calculated by the first control circuit for driving the controlled motor to operate at a target speed; obtaining a specified speed of the controlled motor driven by the first signal acquired by the second control circuit, and a first difference between the specified speed and the target speed; obtaining a second difference between the first signal and the second signal, the second signal including a drive signal calculated by the second control circuit based on the second control circuit for driving the controlled motor to operate at the target speed; if the first duration of the first difference in a specified change trend is greater than a first threshold and the second difference is greater than a second threshold, the controlled motor is driven by the second signal output by the second control circuit.
[0005] Optionally, for a possible implementation, the second difference includes a duty cycle difference and a frequency difference, the second threshold includes a third threshold and a fourth threshold, and if the first difference is in a specified change trend for a first duration greater than the first threshold and the second difference is greater than the second threshold, the controlled motor is driven by the second signal output by the second control circuit, including: if the duty cycle difference is greater than the third threshold, the frequency difference is greater than the fourth threshold, and the first difference is in a specified change trend for a first duration greater than the first threshold, the controlled motor is driven by the second signal output by the second control circuit.
[0006] Optionally, for a possible implementation, the method also includes: if the duty cycle difference is less than or equal to the third threshold, the frequency difference is less than or equal to the fourth threshold, or the first duration of the first difference in a specified change trend is less than or equal to the first threshold, the controlled motor is driven by the first signal output by the first control circuit, and the method returns to execute the first signal obtained by the first control circuit for driving the controlled motor and subsequent steps.
[0007] Optionally, for a possible implementation, the method also includes: obtaining a heartbeat signal sent by the first control circuit; if the first duration of the second difference being in a specified change trend is greater than a second threshold and the first difference is greater than the first threshold, the second signal output by the second control circuit drives the controlled motor, including: if the first duration of the first difference being in a specified change trend is greater than the first threshold and the second difference is greater than the second threshold, then determining that the first target condition is met; if the second control circuit does not detect that the second duration of the heartbeat signal is greater than a fifth threshold, then determining that the second target condition is met; if the first target condition is met or the second target condition is met, then the second signal output by the second control circuit drives the controlled motor.
[0008] Optionally, for a possible implementation, the method also includes: if the first target condition is not met and the second target condition is not met, the first signal output by the first control circuit drives the controlled motor, and returns to execute the first signal obtained by the first control circuit for driving the controlled motor and subsequent steps.
[0009] Optionally, for a possible implementation, the method of driving the controlled motor based on the first signal of the first control circuit and returning to execute the first signal of the first control circuit used to drive the controlled motor and subsequent steps also includes: if the first duration of the first difference in a specified change trend is less than or equal to a first threshold or the second difference is less than or equal to a second threshold, it is determined that the first target condition is not met; if the second control circuit does not detect that the second duration of the heartbeat signal is less than or equal to a fifth threshold, it is determined that the second target condition is not met.
[0010] Optionally, for a possible implementation, the first control circuit calculates the first signal based on a magnetic field oriented control algorithm with a position sensor; and the second control circuit calculates the second signal based on a magnetic field oriented control algorithm without a position sensor.
[0011] In a second aspect, the present application embodiment also provides a motor control device, which is applied to a motor control system, wherein the motor control system includes a controlled motor, a first control circuit for outputting a drive signal to the controlled motor, and a second control circuit as a backup of the first control circuit, wherein the controlled motor is connected to the first control circuit and the second control circuit respectively, and the device includes: a first acquisition unit, a second acquisition unit, a third acquisition unit, and a control unit. The first acquisition unit is used to acquire a first signal used by the first control circuit to drive the controlled motor, wherein the first signal includes a drive signal calculated by the first control circuit to drive the controlled motor to work at a target speed; the second acquisition unit is used to acquire a specified speed of the controlled motor driven by the first signal acquired by the second control circuit, and a first difference between the specified speed and the target speed; the third acquisition unit is used to acquire a second difference between the first signal and the second signal, wherein the second signal includes a drive signal calculated by the second control circuit based on the second control circuit to drive the controlled motor to work at a target speed; and the control unit is used to drive the controlled motor by the second signal output by the second control circuit if the first duration of the first difference in the specified change trend is greater than a first threshold value and the second difference is greater than a second threshold value.
[0012] In a third aspect, an embodiment of the present application further provides a motor control system, which includes a controlled motor, a first control circuit and a second control circuit, and the controlled motor is connected to the first control circuit and the second control circuit respectively; the motor control system is used to execute the method described in the first aspect above.
[0013] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the method described in the first aspect above.
[0014] The motor control method, device, system and readable storage medium provided in the embodiment of the present application are applied to the detection module of the motor control system, firstly obtaining the first signal used by the first control circuit to drive the controlled motor, the first signal including the driving signal calculated by the first control circuit to drive the controlled motor to work at the target speed; obtaining the specified speed of the controlled motor driven by the first signal collected by the second control circuit, and the first difference between the specified speed and the target speed; obtaining the second difference between the first signal and the second signal, the second signal including the driving signal calculated by the second control circuit based on the second control circuit to drive the controlled motor to work at the target speed; if the first difference is in the specified change trend for a first duration greater than the first threshold and the second difference is greater than the second threshold, the second signal output by the second control circuit drives the controlled motor. By obtaining the first difference and the second difference, it is comprehensively judged whether the first control circuit has an abnormality or fault. If the second difference is greater than the second threshold and the first difference is in the specified change trend for a first duration greater than the first threshold, the second signal output by the second control circuit can drive the controlled motor. Not only the accuracy of detecting the first control circuit is improved, but also the second control circuit is switched in time to drive the controlled motor when there is a problem in the detection, thereby improving the reliability of driving the controlled motor. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 The structure block diagram of the motor control system provided by the embodiment of the present application is shown;
[0017] Figure 2 A method flow chart of a motor control method provided by an embodiment of the present application is shown;
[0018] Figure 3 A method flow chart of a motor control method provided by another embodiment of the present application is shown;
[0019] Figure 4 A method flow chart of a motor control method provided by another embodiment of the present application is shown;
[0020] Figure 5 A method flow chart of a motor control method provided by another embodiment of the present application is shown;
[0021] Figure 6 A control flow diagram of a motor control system provided by an embodiment of the present application is shown;
[0022] Figure 7 The structure block diagram of the motor control device provided by the embodiment of the present application is shown;
[0023] Figure 8 A structural block diagram of a computer-readable storage medium provided in an embodiment of the present application is shown;
[0024] Fig. 9 A structural block diagram of a computer program product provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0025] In order to make those skilled in the art better understand the present application scheme, the technical scheme in the present application embodiment will be clearly and completely described below in conjunction with the drawings in the present application embodiment. Obviously, the described embodiment is only a part of the present application embodiment, rather than all the embodiments. The components of the present application embodiment usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents the selected embodiment of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0026] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0027] At present, in order to meet the requirements of high reliability and high safety of motors, the control circuit of the motor can be tested to timely discover and deal with the faults of the control circuit. However, the accuracy of the fault detection of the control circuit is low and the reliability is insufficient. How to improve the accuracy and reliability of the control circuit detection is an urgent problem to be solved.
[0028] At present, the motor can be driven by a control circuit, for example, the motor can be controlled to rotate. Therefore, the control circuit can be detected, and if a fault or abnormality is found in the control circuit, the backup control circuit can be switched to drive the motor in time.
[0029] However, the inventors have found in their research that the current detection of faults in the control circuit has low accuracy and insufficient reliability.
[0030] Therefore, in order to solve or partially solve the above technical problems, the present application provides a motor control method, device, system and readable storage medium.
[0031] See also Figure 1 , Figure 1 The structural block diagram of a motor control system provided by an embodiment of the present application is shown. The motor control system 100 may include a controlled motor 120, a first control circuit 130 and a second control circuit 140, wherein the controlled motor 120 of the motor control system 100 is respectively connected to the first control circuit 130 and the second control circuit 140. The first control circuit 130 may be used to output a drive signal to the controlled motor, and the second control circuit 140 may serve as a backup of the first control circuit.
[0032] The motor control system 100 can be used to switch the circuit used to drive the controlled motor 120. For example, the motor control system 100 can control the first control circuit 130 to drive the controlled motor 120; the motor control system 100 can also control the second control circuit 140 to drive the controlled motor 120.
[0033] The motor control system 100 can also be used to detect whether an abnormality or failure occurs in the first control circuit 130 . When it is determined that an abnormality or failure occurs, the second control circuit 140 can be controlled to drive the controlled motor 120 .
[0034] The controlled motor 120 may be a brushless motor, such as a permanent magnet synchronous motor, a brushless direct current motor, etc.
[0035] The first control circuit 130 can be used to drive the controlled motor 120 to rotate, so as to drive the controlled motor 120 to work. The first control circuit 130 can be provided with a first control algorithm, so as to calculate a first signal based on the first control algorithm, and then output the first signal to drive the controlled motor 120 to rotate.
[0036] Similarly, the second control circuit 140 can also be used to drive the controlled motor 120 to rotate, so as to drive the controlled motor 120 to work. The second control circuit 140 can be provided with a second control algorithm, so as to calculate a second signal based on the second control algorithm, and then output the second signal to drive the controlled motor 120 to rotate.
[0037] For specific control methods, please refer to the description of the following embodiments. For some implementations, the control method may be provided in the second control circuit 140 in the motor control system 100 , so that the control method may be executed by the second control circuit 140 .
[0038] Exemplarily, the motor control system may be disposed in an aircraft, and the controlled motor is the power motor of the aircraft.
[0039] See also Figure 2 , Figure 2 A method flow chart of a motor control method provided by an embodiment of the present application is shown. The motor control method can be applied to a motor control system, and specifically can be applied to a second control circuit of a motor control system. The motor control method includes steps S110 to S140.
[0040] Step S110: obtaining a first signal used by the first control circuit to drive the controlled motor, wherein the first signal includes a drive signal calculated by the first control circuit to drive the controlled motor to operate at a target speed.
[0041] In some implementations, the first control circuit may be a main control circuit, and the second control circuit may be a backup control circuit. Thus, by default, the motor control system may drive the controlled motor by the first signal output by the first control circuit.
[0042] The first control circuit can output a first signal to drive the controlled motor to work, and the first signal is a driving signal calculated by the first control circuit for driving the controlled motor to work at a target speed. The target speed can be pre-set, calculated by other program requirements, or sent to the motor control system by other devices or other systems, which is not specifically limited in the embodiments of the present application.
[0043] For example, the motor control system may be arranged in an aircraft, which also includes a flight control system, so that the motor control system is connected to the aircraft control system, and the aircraft control system may input the target speed to the motor control system. Specifically, the aircraft control system may directly input the target speed to the first control circuit in the motor control system.
[0044] Similarly, the second control circuit can output a second signal to drive the controlled motor to work, and the second signal is a driving signal calculated by the second control circuit for driving the controlled motor to work at a target speed. The target speed can be preset; it can also be calculated according to the requirements of other programs; it can also be sent to the motor control system by other devices or other systems, and the embodiments of the present application do not specifically limit this.
[0045] For some implementations, data communication between the aircraft control system and the motor control system can be achieved by using a bus, for example, a control area network (CAN) bus, RS485 bus, RS422 bus, ARINC825 bus, ARINC429 bus, etc.
[0046] The motor control system may further include a drive circuit, which may be connected to the first control circuit, the second control circuit and the controlled motor, respectively. Thus, the first signal of the first control circuit may be input to the drive circuit, and the drive circuit may output a corresponding drive electrical signal to the controlled motor based on the first signal, such as a drive voltage or a drive current, to drive the controlled motor to work.
[0047] If the first control circuit is abnormal or fails, the first signal generated for driving the controlled motor will also be abnormal. Therefore, in the case of driving the controlled motor based on the first control circuit, in order to detect whether the first control circuit is abnormal or fails, the first signal can be detected and analyzed, and the first signal used by the first control circuit to drive the controlled motor can be first obtained. In some embodiments, the motor control system can directly obtain the first signal.
[0048] Step S120: acquiring a specified rotational speed of the controlled motor driven by the first signal, and a first difference between the specified rotational speed and the target rotational speed, collected by the second control circuit.
[0049] Since it is necessary to detect whether the first control circuit is abnormal or faulty, if the specified speed of the controlled motor driven by the first signal is collected by the first control circuit, the specified speed may be an erroneous value, and then it may not be possible to detect whether the first control circuit is abnormal or faulty in time based on the erroneous specified speed, which reduces the accuracy and reliability of the detection. Therefore, in the embodiment of the present application, the specified speed of the controlled motor driven by the first signal collected by the second control circuit can be obtained, because the second control circuit and the first control circuit are independent of each other, so even if the first control circuit is abnormal or faulty, it will not reduce the accuracy and reliability of the specified speed of the controlled motor driven by the first signal collected by the second control circuit, thereby improving the accuracy and reliability of the detection of the first control circuit.
[0050] Exemplarily, the second control circuit can collect the current parameters of the controlled motor, so as to calculate the specified speed. The current parameters can be collected by resistor sampling or by using a Hall sensor, which is not specifically limited in the embodiment of the present application.
[0051] Furthermore, a first difference between the specified speed and the target speed may be obtained, and then, based on the change trend of the first difference, it may be determined whether the first control circuit is abnormal or faulty.
[0052] In some implementations, the motor control system can obtain the target speed, and the motor control system also obtains the specified speed in the aforementioned steps, so that the motor control system can obtain the first difference between the specified speed and the target speed. Since the second control circuit obtains the target speed and the specified speed, the first difference between the specified speed and the target speed can also be directly determined by the second control circuit, and the motor control system directly obtains the first difference from the second control circuit, which is not limited in the embodiments of the present application.
[0053] It is easy to understand that since the target speed is the speed required to drive the controlled motor to work, if the changing trend of the first difference is gradually decreasing, it means that the specified speed and the target speed are getting closer; if the changing trend of the first difference is gradually increasing, it means that the specified speed and the target speed are getting farther and farther away, and at this time, the first control circuit is more likely to have an abnormality or failure.
[0054] It should be noted that the changing trend of the first difference can be determined by multiple first differences. For example, the three first differences are respectively the first value, the second value and the third value, wherein the first value is greater than the second value, and the second value is greater than the third value. Therefore, it can be seen that the changing trend of the three first differences in the example is gradually decreasing; if the first value is less than the second value, and the second value is less than the third value, it can be seen that the changing trend of the three first differences in the example is gradually increasing.
[0055] Step S130: obtaining a second difference between the first signal and the second signal, where the second signal includes a drive signal calculated by the second control circuit based on the second control circuit and used to drive the controlled motor to operate at a target speed.
[0056] In some embodiments, although the second control circuit does not participate in the control of the controlled motor when the controlled motor is driven based on the first control circuit, the first control circuit and the second control circuit can both obtain the target speed. Therefore, the second control circuit can also generate a second signal based on the target speed, and the second signal includes a drive signal calculated by the second control circuit based on the second control circuit for driving the controlled motor to operate at the target speed.
[0057] The second signal can be approximately regarded as a standard signal, so that the second difference between the first signal and the second signal can be obtained, and then the first control circuit can be judged whether it is abnormal or faulty based on the second difference. It is easy to understand that since the second signal can be approximately regarded as a standard signal, the larger the second difference between the first signal and the second signal, the greater the difference between the first signal and the standard signal, and the more likely it is that the first control circuit is abnormal or faulty.
[0058] Step S140: If the first duration of the specified change trend of the first difference is greater than a first threshold and the second difference is greater than a second threshold, the controlled motor is driven by a second signal output by the second control circuit.
[0059] The second difference and the first difference have been obtained in the above steps, and whether the first control circuit has an abnormality or fault can be determined based on the second difference and the first difference. When it is determined that the first control circuit has an abnormality or fault, the controlled motor can be driven by the second signal output by the second control circuit to improve the stability of the motor control system in controlling the controlled motor.
[0060] Specifically, the magnitude relationship between the second difference and the second threshold value can be determined. If the second difference is less than or equal to the second threshold value, it can be characterized that the first control circuit cannot be determined to be abnormal or faulty based on the second difference, so that in some embodiments, the first signal output by the first control circuit can drive the controlled motor, and the first signal used by the first control circuit to drive the controlled motor and subsequent steps can be returned to execute. If the second difference is greater than the second threshold value, a further determination can be made based on the first difference.
[0061] It can be seen from the above introduction that if the change trend of the first difference gradually increases, it indicates that the specified speed is getting further and further away from the target speed, and at this time, the first control circuit is more likely to be abnormal or faulty. Therefore, it is also possible to further judge whether the first control circuit is abnormal or faulty by the first duration of the first difference being in the specified change trend. Among them, the specified change trend can be an increasing trend. In other words, the first duration can be used to characterize the duration of the first difference being in an increasing trend. The longer the first duration, the more likely it is that the first control circuit is abnormal or faulty.
[0062] Thus, in some embodiments, when the second difference is greater than the second threshold, if the first difference is in a specified change trend for a first duration greater than the first threshold, it can be determined that the first control circuit is abnormal or faulty, and the controlled motor can be driven by the second signal output by the second control circuit. The second threshold and the first threshold can be preset values, for example, can be determined in advance based on experimental experience.
[0063] It should be noted that the above-mentioned first judging the size relationship between the second difference and the second threshold value, and then judging the size relationship between the first duration of the first difference being in a specified change trend and the first threshold value when the second difference is greater than the second threshold value is only an example. In other embodiments, it is also possible to first judge the size relationship between the first duration of the first difference being in a specified change trend and the first threshold value, and then further judge the size relationship between the second difference and the second threshold value when the first duration of the first difference being in a specified change trend is greater than the first threshold value. In other words, the embodiment of the present application does not limit the order of judging based on the second difference and the first difference, and can be flexibly adjusted as needed.
[0064] Optionally, the number of controlled motors in the embodiment of the present application may be one or more, so that at least one controlled motor can be redundantly controlled by the motor control system provided in the embodiment of the present application, without having to configure a complete set of control and drive circuit systems for each controlled motor, thereby reducing the space and weight occupied by the control and drive circuits and reducing costs.
[0065] The motor control method provided in the embodiment of the present application is applied to the motor control system of the motor control system, firstly, the first signal used by the first control circuit to drive the controlled motor is obtained, the first signal includes the driving signal calculated by the first control circuit to drive the controlled motor to work at the target speed; the specified speed of the controlled motor collected by the second control circuit under the drive of the first signal, and the first difference between the specified speed and the target speed; the second difference between the first signal and the second signal is obtained, the second signal includes the driving signal calculated by the second control circuit based on the second control circuit to drive the controlled motor to work at the target speed; if the first difference is in the specified change trend for a first duration greater than the first threshold and the second difference is greater than the second threshold, the second signal output by the second control circuit drives the controlled motor. By obtaining the first difference and the second difference, it is comprehensively judged whether the first control circuit has an abnormality or fault. When the second difference is greater than the second threshold and the first difference is in the specified change trend for a first duration greater than the first threshold, the controlled motor can be driven by the second signal output by the second control circuit. Not only is the accuracy of the detection of the first control circuit improved, but also the second control circuit is switched in time to drive the controlled motor when there is a problem in the detection, thereby improving the reliability of driving the controlled motor.
[0066] See also Figure 3 , Figure 3A method flow chart of a motor control method provided by an embodiment of the present application is shown. The motor control method can be applied to a motor control system, and specifically can be applied to a second control circuit of a motor control system. The motor control method includes steps S210 to S280.
[0067] Step S210: obtaining a first signal used by the first control circuit to drive the controlled motor, wherein the first signal includes a drive signal calculated by the first control circuit to drive the controlled motor to operate at a target speed.
[0068] Step S220: obtaining the specified rotational speed of the controlled motor driven by the first signal, and a first difference between the specified rotational speed and the target rotational speed, collected by the second control circuit.
[0069] Step S230: obtaining a second difference between the first signal and the second signal, where the second signal includes a drive signal calculated by the second control circuit based on the second control circuit and used to drive the controlled motor to operate at a target speed.
[0070] Among them, the relevant introduction of step S210 to step S230 has been described in detail in the above-mentioned embodiment, and will not be repeated here.
[0071] In some embodiments, the first signal and the second signal may be pulse signals, such as pulse width modulation (PWM) signals. Thus, the first signal and the second signal may include different parameters for describing the characteristics of the first signal and the second signal, for example, the parameters may include duty cycle and frequency.
[0072] Specifically, the frequency of a pulse signal may refer to the number of times the signal changes from a high level to a low level and then back to a high level within 1 second, that is, the number of cycles of the pulse signal included in one second. The unit of frequency may be Hertz (Hz), such as 50Hz, 100Hz, etc.
[0073] The period of a pulse signal is the inverse of the frequency of the pulse signal, that is, period = 1 / frequency. For example, if the frequency is 50 Hz, then one period is 20 ms, that is, one second includes 50 periods of the pulse signal.
[0074] The duty cycle of a pulse signal is the ratio of the time the signal is high level to the entire cycle time within a cycle. The duty cycle can be represented by a percentage, which can be represented by any number between 0% and 100%, such as 20%, 40%, etc.
[0075] Among them, the first signal can be calculated by the first control circuit based on the first algorithm, and specifically can be a drive signal calculated based on the first algorithm for driving the controlled motor to operate at the target speed; similarly, the second signal can be calculated by the second control circuit based on the second algorithm, and specifically can be a drive signal calculated based on the second algorithm for driving the controlled motor to operate at the target speed.
[0076] For some embodiments, the first algorithm and the second algorithm can both be field-oriented control (FOC) algorithms. The field-oriented control algorithm needs to be driven according to the current position of the rotor of the controlled motor. There are generally two methods to obtain the rotor position of the motor. One is to directly obtain the rotor position through the position sensor installed on the motor, and the other is to calculate the rotor position through the three-phase current of the controlled motor. Therefore, there can be a position sensor field-oriented control algorithm and a position sensorless field-oriented control algorithm. The advantage of the position sensor field-oriented control algorithm is that the control is more precise, and the disadvantage is that there are many parts, and the cost and weight are higher; the advantage of the position sensorless field-oriented control algorithm is that the physical structure is simple, the reliability is higher, the cost and weight are lower, and the disadvantage is that the accuracy is relatively poor. Therefore, in the embodiment of the present application, the first algorithm can be a position sensor field-oriented control algorithm, and the second algorithm can be a position sensorless field-oriented control algorithm. Thus, the first control circuit can calculate the first signal based on the position sensor field-oriented control algorithm; the second control circuit can calculate the second signal based on the position sensorless field-oriented control algorithm. The first control circuit and the second control circuit form heterogeneous redundancy, which not only ensures reliability but also effectively avoids common mode failure, thereby achieving good control effect.
[0077] Thus, when comparing the second difference between the first signal and the second signal, it may specifically include the duty cycle difference and the frequency difference between the first signal and the second signal, and the second threshold may include the third threshold and the fourth threshold. Thus, comparing the magnitude relationship between the second difference and the second threshold may specifically include comparing the magnitude relationship between the duty cycle difference and the third threshold and comparing the magnitude relationship between the frequency difference and the fourth threshold. Among them, the duty cycle difference can be used to characterize the difference between the duty cycle of the first signal and the duty cycle of the second signal, and the frequency difference can be used to characterize the difference between the frequency of the first signal and the frequency of the second signal.
[0078] Among them, the first algorithm can obtain the specified speed of the controlled motor through the position sensor, thereby generating a first signal based on the difference between the specified speed and the target speed. The second algorithm can obtain the specified speed of the controlled motor by collecting the current current parameters of the controlled motor, thereby generating a second signal based on the difference between the specified speed and the target speed. It should be noted that the specified speed obtained by the first algorithm and the specified speed obtained by the second algorithm are both measured values, and there may be a certain deviation from the actual real speed of the controlled motor. Exemplarily, the position sensor can be a rotary transformer, a Hall encoder, etc.
[0079] Step S240: Whether the duty cycle difference is greater than the third threshold.
[0080] In some implementations, it is possible to compare whether the duty cycle difference is greater than the third threshold value. If the duty cycle difference is greater than the third threshold value, it indicates that the difference between the duty cycle of the first signal and the duty cycle of the second signal is large, and at this time, the process can jump to step S250 to further determine whether the frequency difference is greater than the fourth threshold value. If the duty cycle difference is less than or equal to the third threshold value, it indicates that the difference between the duty cycle of the first signal and the duty cycle of the second signal is small, and at this time, the process can jump to step S280.
[0081] The third threshold may be preset, for example, 10%, 15%, etc.
[0082] Step S250: Whether the frequency difference is greater than the fourth threshold.
[0083] Further, it is possible to compare whether the frequency difference is greater than the fourth threshold value. If the frequency difference is greater than the fourth threshold value, it is characterized that the difference between the frequency of the first signal and the frequency of the second signal is large, and at this time, step S260 can be skipped to further determine the magnitude relationship between the first duration and the first threshold value. If the frequency difference is less than or equal to the fourth threshold value, it is characterized that the difference between the frequency of the first signal and the frequency of the second signal is small, and at this time, step S280 can be skipped to be executed.
[0084] The fourth threshold may be preset, for example, 10%, 15%, etc.
[0085] Step S260: Whether the first duration is greater than a first threshold.
[0086] Furthermore, the magnitude relationship between the first duration and the first threshold value can also be compared, wherein the first duration has been introduced in the above embodiment to be used to characterize the duration of the first difference being in an increasing trend, and the longer the first duration is, the more likely the first control circuit is abnormal or faulty. If the first duration is greater than the first threshold value, the process can jump to step S270; if the first duration is less than or equal to the first threshold value, the process can jump to step S280.
[0087] The first threshold may be pre-set, for example, 80ms, 100ms or 120ms, etc., and may be flexibly set according to needs.
[0088] It should be noted that the execution relationship between step S240 to step S260 shown in this embodiment is only an example. In actual application, it may be first determined whether the frequency difference is greater than the fourth threshold, then determined whether the duty cycle difference is greater than the third threshold, and finally determined whether the first duration is greater than the first threshold; it may also be first determined whether the first duration is greater than the first threshold, then determined whether the duty cycle difference is greater than the third threshold, and finally determined whether the frequency difference is greater than the fourth threshold, etc. In other words, the specific execution order of step S240 to step S260 does not constitute a limitation on the embodiments of the present application.
[0089] Step S270: If the duty cycle difference is greater than the third threshold, the frequency difference is greater than the fourth threshold, and the first duration of the first difference in the specified change trend is greater than the first threshold, the second signal output by the second control circuit drives the controlled motor.
[0090] If the duty cycle difference is greater than the third threshold, the frequency difference is greater than the fourth threshold, and the first duration of the first difference in a specified change trend is greater than the first threshold, it can be determined that an abnormality or failure has occurred in the first control circuit, so that the controlled motor can be driven by the second signal output by the second control circuit.
[0091] Step S280: If the duty cycle difference is less than or equal to the third threshold, the frequency difference is less than or equal to the fourth threshold, or the first duration of the first difference in the specified change trend is less than or equal to the first threshold, the first signal output by the first control circuit drives the controlled motor, and returns to execute the first signal obtained by the first control circuit for driving the controlled motor and subsequent steps.
[0092] In some embodiments, if the duty cycle difference is less than or equal to the third threshold, the frequency difference is less than or equal to the fourth threshold, or the first duration of the first difference in a specified change trend is less than or equal to the first threshold, it can be determined that there is no temporary abnormality or failure in the first control circuit, the controlled motor can be driven by the first control circuit, and the process returns to execute the first signal for obtaining the first control circuit to drive the controlled motor and subsequent steps, that is, the process can jump back to execute step S210 and subsequent steps.
[0093] Optionally, a switch module may be included in the motor control system, and the switch module may specifically include a first switch and a second switch, wherein the first switch is connected to the first control circuit and the drive circuit respectively, and the second switch is connected to the second control circuit and the drive circuit respectively. The first switch can be used to turn on or off the signal communication between the first control circuit and the drive circuit, and the second switch can be used to turn on or off the signal communication between the second control circuit and the drive circuit. The on or off of the first switch and the second switch can be controlled based on the motor control system, so that the motor control system can control the first switch to be turned on and the second switch to be turned off, so as to realize the first signal based on the first control module to drive the controlled motor; the motor control system can also switch to control the second switch to be turned on and the first switch to be turned off, so as to realize the second signal based on the second control module to drive the controlled motor.
[0094] The motor control method provided in the embodiment of the present application is applied to a motor control system of a motor control system, firstly obtaining a first signal used by the first control circuit to drive the controlled motor, the first signal including a driving signal calculated by the first control circuit to drive the controlled motor to work at a target speed; obtaining a specified speed of the controlled motor driven by the first signal acquired by the second control circuit, and a first difference between the specified speed and the target speed; obtaining a second difference between the first signal and the second signal, the second signal including a driving signal used to drive the controlled motor to work at a target speed calculated by the second control circuit based on the second control circuit; if the duty cycle difference is greater than the third threshold, the frequency difference is greater than the fourth threshold, and the first duration of the first difference in the specified change trend is greater than the first threshold, the controlled motor is driven by the second signal output by the second control circuit; if the duty cycle difference is less than or equal to the third threshold, the frequency difference is less than or equal to the fourth threshold, or the first duration of the first difference in the specified change trend is less than or equal to the first threshold, the controlled motor is driven by the first signal output by the first control circuit, and the process of obtaining the first signal used by the first control circuit to drive the controlled motor and subsequent steps is returned. Since the first control circuit is judged to be abnormal or faulty by the relationship between the duty cycle difference, the frequency difference, and the first duration of the first difference in the specified change trend and the first threshold, the accuracy of detecting the abnormality or fault of the first control circuit is high, and the reliability of judging the abnormality or fault is also high. Furthermore, the controlled motor can be driven by the second signal output by the second control circuit, so the robustness of the motor control system is also high.
[0095] See also Figure 4 , Figure 4 A method flow chart of a motor control method provided by an embodiment of the present application is shown. The motor control method can be applied to a motor control system, and specifically can be applied to a second control circuit of a motor control system. The motor control method includes steps S310 to S3120.
[0096] Step S310: obtaining a first signal used by the first control circuit to drive the controlled motor, where the first signal includes a drive signal calculated by the first control circuit to drive the controlled motor to operate at a target speed.
[0097] Step S320: obtaining the designated rotational speed of the controlled motor driven by the first signal, and a first difference between the designated rotational speed and the target rotational speed, collected by the second control circuit.
[0098] Step S330: obtaining a second difference between the first signal and the second signal, where the second signal includes a drive signal calculated by the second control circuit based on the second control circuit and used to drive the controlled motor to operate at a target speed.
[0099] Among them, step S310 to step S330 have been introduced in detail in the above embodiments and will not be repeated here.
[0100] Step S340: Acquire the heartbeat signal sent by the first control circuit.
[0101] In some embodiments, the first control circuit can continuously send a heartbeat signal, for example, it can send a heartbeat signal to the second control circuit of the motor control system. If the second control circuit can normally obtain the heartbeat signal sent by the first control circuit, it can be indicated that there is no abnormality or failure in the data communication between the first control circuit and the second control circuit.
[0102] Among them, the heartbeat signal is a signal used to monitor the stability of the connection. The heartbeat signal can be used to implement data exchange between two devices that have established a connection to determine whether the connection is normal. For example, when a network connection is established between two devices, one of the devices will periodically send a small data packet to the other device, namely a heartbeat signal. After receiving this data packet, the other device will determine whether it needs to reply with a smaller data packet to a device as needed. The heartbeat signal mechanism is widely used in various network devices and systems, such as computer networks, telephone networks, fiber optic networks, etc., to ensure the stability and reliability of the connection.
[0103] When the second duration of the heartbeat signal is greater than the fifth threshold, the program can further jump to step S380 to further detect whether there is an abnormality or failure in the data communication between the first control circuit and the second control circuit; when the second duration of the heartbeat signal is less than or equal to the fifth threshold, the program can further jump to step S3110.
[0104] Step S350: Whether the second difference is greater than the second threshold.
[0105] Wherein, judging whether the second difference is greater than the second threshold value may be judging whether the duty cycle difference is greater than the third threshold value and judging whether the frequency difference is greater than the fourth threshold value. For detailed description, please refer to the above-mentioned embodiment. If the second difference is greater than the second threshold value, the process may jump to step S360; if the second difference is less than or equal to the second threshold value, the process may jump to step S3100.
[0106] Step S360: Whether the first duration is greater than a first threshold.
[0107] If the first duration is greater than the first threshold, the process may jump to step S370; if the first duration is less than or equal to the first threshold, the process may jump to step S3100.
[0108] Step S370: If the second difference is greater than the second threshold and the first duration of the first difference being in the specified change trend is greater than the first threshold, it is determined that the first target condition is met.
[0109] If the second difference is greater than a second threshold and the first duration of the first difference in the specified change trend is greater than a first threshold, it is determined that the first target condition is met. Satisfying the first target condition may indicate that a part of the first control circuit used to drive the controlled motor has an abnormality or fault, and at this time, the execution may jump to step S390.
[0110] Step S380: If the second control circuit does not detect that the second duration of the heartbeat signal is greater than the fifth threshold, it is determined that the second target condition is met.
[0111] If the second control circuit does not detect that the second duration of the heartbeat signal is greater than the fifth threshold, it indicates that the data communication between the first control circuit and the second control circuit has been abnormal or faulty, so it can be determined that the second target condition is met. Among them, meeting the second target condition can indicate that the data communication between the first control circuit and the second control circuit has been abnormal or faulty, and at this time, the execution can be jumped to step S390.
[0112] The fifth threshold may be a preset value. For example, when the heartbeat signal is 50 Hz, the fifth threshold may be set to 40 ms.
[0113] Step S390: If the first target condition is met or the second target condition is met, the controlled motor is driven by the second signal output by the second control circuit.
[0114] It is easy to understand that no matter the part of the first detection circuit that communicates data with the second control circuit has an abnormality or fault, or the part used to drive the controlled motor has an abnormality or fault, it can be determined that the first detection circuit has an abnormality or fault, and the controlled motor can be driven by the second signal output by the second control circuit.
[0115] Step S3100: If the second difference is less than or equal to the second threshold or the first duration of the first difference being in the specified change trend is less than or equal to the first threshold, it is determined that the first target condition is not met.
[0116] If the second difference is less than or equal to the second threshold or the first duration of the specified change trend of the first difference is less than or equal to the first threshold, it can be characterized that there is no abnormality or fault in the part of the first control circuit used to drive the controlled motor, and it can be determined that the first target condition is not met.
[0117] Step S3110: If the second control circuit does not detect that the second duration of the heartbeat signal is less than or equal to the fifth threshold, it is determined that the second target condition is not met.
[0118] If the second control circuit does not detect that the second duration of the heartbeat signal is less than or equal to the fifth threshold, it can be indicated that there is no abnormality or failure in the part of the first control circuit used for data communication with the second control circuit, and it can be determined that the second target condition is not met.
[0119] Step S3120: If the first target condition and the second target condition are not met, the controlled motor is driven by the first signal output by the first control circuit, and the process returns to execute the first signal output by the first control circuit for driving the controlled motor and subsequent steps.
[0120] It is easy to understand that if there is no abnormality or fault in the part of the first detection circuit that communicates data with the second control circuit, and there is no abnormality or fault in the part used to drive the controlled motor, then it can be determined that there is no abnormality or fault in the first detection circuit. At this time, the controlled motor can be driven based on the first control circuit, and the process can be returned to execute the first signal of the first control circuit used to drive the controlled motor and subsequent steps, that is, return to execute step S310 and subsequent steps.
[0121] The motor control method provided in the embodiment of the present application is applied to a motor control system of a motor control system, firstly obtaining a first signal used by the first control circuit to drive the controlled motor, the first signal including a driving signal calculated by the first control circuit for driving the controlled motor to operate at a target speed; obtaining a specified speed of the controlled motor driven by the first signal acquired by the second control circuit, and a first difference between the specified speed and the target speed; obtaining a second difference between the first signal and the second signal, the second signal including a driving signal calculated by the second control circuit based on the second control circuit for driving the controlled motor to operate at a target speed; obtaining a heartbeat signal sent by the first control circuit; if the first duration of the first difference in the specified change trend is greater than the first threshold and the second difference is greater than the second threshold, determining that the first target condition is met; if the second control circuit does not detect that the second duration of the heartbeat signal is greater than the fifth threshold, determining that the second target condition is met; if the first target condition is met or the second target condition is met, the controlled motor is driven by the second signal output by the second control circuit. In an embodiment of the present application, when detecting whether the first control circuit has an abnormality or fault, not only is it detected whether the part used to drive the controlled motor is abnormal or faulty, but also, in combination with the heartbeat signal, it is detected whether the part of the first detection circuit that communicates data with the second control circuit has an abnormality or fault, thereby improving the accuracy of the detection of the first detection circuit.
[0122] See also Figure 5 , Figure 5 A method flow chart of a motor control method provided by an embodiment of the present application is shown. The motor control method can be applied to a motor control system, and specifically can be applied to a second control circuit of a motor control system. The motor control method includes steps S410 to S4130.
[0123] Step S410: Obtain a second difference between the first signal and the second signal.
[0124] For the related introduction of the first signal and the second signal, and the introduction of the method for obtaining the second difference, please refer to the aforementioned embodiment, which will not be repeated here.
[0125] Step S420: Whether the duty cycle difference is greater than the third threshold.
[0126] The second difference may include a duty cycle difference. If the duty cycle difference is greater than the third threshold, the process may jump to step S430. If the duty cycle difference is less than or equal to the third threshold, the process may determine that the first signal is normal, and the process may jump to step S490 or step S4110.
[0127] Step S430: Whether the frequency difference is greater than the fourth threshold.
[0128] Optionally, the second difference may also include a frequency difference. If the frequency difference is greater than the fourth threshold, the process may jump to step S440; if the frequency difference is less than or equal to the fourth threshold, it may be determined that the first signal is normal, and the process may jump to step S490 or step S4110.
[0129] Step S440: Whether the first duration is greater than a first threshold.
[0130] The first duration is the duration of the first difference being in a specified change trend, and the specified change trend is an increasing trend. If the first duration is greater than the first threshold, the first signal can be determined to be abnormal, and the process jumps to step S480 or step S4100; if the first duration is less than or equal to the first threshold, the first signal can be determined to be normal, and the process jumps to step S490 or step S4110.
[0131] Step S450: Acquire the heartbeat signal sent by the first control circuit.
[0132] Step S460: Whether the second control circuit detects a heartbeat signal.
[0133] Furthermore, the second control circuit may also obtain a heartbeat signal sent by the first control circuit. If the second control circuit detects a heartbeat signal, the process may return to step S450; if the second control circuit does not detect a heartbeat signal, the process may jump to step S470.
[0134] Step S470: Whether the second duration is greater than the fifth threshold.
[0135] Among them, the second duration is used to characterize the duration during which no heartbeat signal is detected. If the second duration is greater than the fifth threshold, the process can jump to step S480 or step S490; if the second duration is less than or equal to the fifth threshold, the process can jump to step S480 or step S490.
[0136] Step S480: The first signal is abnormal and the heartbeat signal is abnormal.
[0137] Step S490: The first signal is normal and the heartbeat signal is abnormal.
[0138] Step S4100: The first signal is abnormal and the heartbeat signal is normal.
[0139] Wherein, if it is determined that the first signal is abnormal and the second duration is greater than the fifth threshold, step S480 may be executed; if it is determined that the first signal is normal and the second duration is greater than the fifth threshold, step S490 may be executed; if it is determined that the first signal is abnormal and the second duration is less than or equal to the fifth threshold, step S4100 may be executed. Steps S480, S490, and S4100 may be followed by stepping to step S4120.
[0140] Step S4110: The first signal is normal and the heartbeat signal is normal.
[0141] If it is determined that the first signal is normal and the second duration is less than or equal to the fifth threshold, step S4110 may be executed, and the process may jump to step S4130.
[0142] Step S4120: driving the controlled motor with the second signal output by the second control circuit.
[0143] Step S4130: the first control circuit controls the controlled motor, and returns to execute the steps of obtaining the second difference between the first signal and the second signal, obtaining the heartbeat signal sent by the first control circuit, and subsequent steps.
[0144] That is, when the first signal and the heartbeat signal are normal, the controlled motor can be controlled by the first control circuit, and the steps S410 and S450 are jumped to be executed respectively.
[0145] For a detailed description of the above steps, please refer to the description in the aforementioned embodiment, which will not be repeated here.
[0146] See also Figure 6 , Figure 6 A control flow diagram of a motor control system provided in an embodiment of the present application is shown. Figure 6 The target speed 160 can be input into the first algorithm 131 in the first control circuit 130, and the first algorithm 131 can also obtain the specified speed of the controlled motor 120 through the position sensor 132, so that the first algorithm 131 can output a first signal to the drive circuit 180, and the drive circuit 180 then drives the controlled motor 120 to rotate.
[0147] Among them, the target speed 160 can also be input into the second algorithm 141 in the second control circuit 140, and the second algorithm 141 can also obtain the specified speed of the controlled motor 120 through the current sensor 142. Among them, the current sensor 142 can be used to collect the current parameters of the controlled motor 120, and the current sensor 142 can be a resistor sampling or a Hall sensor. The motor control method 110 can also be run in the second control circuit 140, and the second algorithm 141 can output a second signal to the motor control method 110. The motor control method 110 can be used to detect whether the first control circuit 130 is abnormal or faulty, and then switch to drive the controlled motor 120 based on the second signal of the second control circuit 140 when the first control circuit 130 is detected to be abnormal or faulty. For a detailed introduction to the motor control method, please refer to the aforementioned method embodiments, which will not be repeated here.
[0148] Please continue reading Figure 1 , Figure 1 The motor control system 100 shown in the figure may also include a power supply module 190 and a drive circuit 180, wherein the power supply module 190 may include a first power supply 191 and a second power supply 192, wherein the drive circuit 180 may be connected to the first control circuit 130, the second control circuit 140 and the controlled motor 120 respectively, the first power supply 191 is connected to the first control circuit 130 and the drive circuit 180 respectively, and the second power supply 192 is connected to the second control circuit 140 and the drive circuit 180 respectively.
[0149] The first power supply 191 can supply power to the first control circuit 130 and the drive circuit 180 respectively; similarly, the second power supply 192 can supply power to the second control circuit 140 and the drive circuit 180 respectively. For example, the power supply can be to provide a DC signal. It is easy to understand that since the voltage level required by the first control circuit 130 and the second control circuit 140 is generally low, the first power supply 191 can provide a low-voltage DC signal to the first control circuit 130, and similarly, the second power supply 192 can also provide a low-voltage DC signal to the second control circuit 140. In some embodiments, the low-voltage DC signal can be a DC voltage signal of 12V to 28V.
[0150] Since the driving circuit 180 is used to drive the controlled motor 120 to rotate, the voltage level required by the driving circuit 180 is generally high, so the first power supply 191 and the second power supply 192 can provide a high-voltage DC signal for the driving circuit 180. In some embodiments, the high-voltage DC signal can be a DC voltage signal of 100V to 800V.
[0151] Optionally, the first power supply 191 and the second power supply 192 may be two independent power supplies, thereby increasing the redundancy of the motor control system 100 .
[0152] The controlled motor 120 may be provided with a position sensor 121 , so that the rotor position of the controlled motor 120 may be directly acquired through the position sensor 121 .
[0153] Optionally, the motor control system 100 may further include a current sensor 142, which is respectively connected to the first control circuit 130, the second control circuit 140, the controlled motor 120 and the drive circuit 180, so that the second control circuit 140 can obtain the specified speed of the controlled motor 120 based on the current sensor 142.
[0154] In some embodiments, the motor control system 100 may include one or more processing cores. The motor control system 100 uses various interfaces and lines to connect various parts within the entire motor control system 100, and executes or executes the data stored in the memory ( Figure 1 The motor control system 100 can be implemented by using instructions, programs, code sets or instruction sets in the memory (not shown), as well as calling data stored in the memory to execute various functions of the motor control system 100 and process data. Optionally, the motor control system 100 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The motor control system 100 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and computer programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the motor control system 100, but may be implemented separately through a communication chip. Specifically, the method described in the above embodiment can be executed by one or more motor control systems 100.
[0155] For some embodiments, the memory may include a random access memory (RAM) or a read-only memory (ROM). The memory may be used to store instructions, programs, codes, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the motor control system 100 during use, etc.
[0156] See also Figure 7 , Figure 7 A structural block diagram of a motor control device 700 provided in an embodiment of the present application is shown, wherein the motor control device 700 is applied to a motor control system, wherein the motor control system includes a controlled motor, a first control circuit for outputting a drive signal to the controlled motor, and a second control circuit as a backup of the first control circuit, wherein the controlled motor is connected to the first control circuit and the second control circuit, respectively, and the motor control device 700 includes: a first acquisition unit 710, a second acquisition unit 720, a third acquisition unit 730, and a control unit 740.
[0157] The first acquisition unit 710 is used to acquire a first signal used by the first control circuit to drive the controlled motor, where the first signal includes a drive signal calculated by the first control circuit to drive the controlled motor to operate at a target speed.
[0158] The second acquisition unit 720 is used to acquire the specified rotational speed of the controlled motor driven by the first signal, which is collected by the second control circuit, and a first difference between the specified rotational speed and the target rotational speed.
[0159] The third acquisition unit 730 is used to obtain a second difference between the first signal and the second signal, where the second signal includes a drive signal calculated by the second control circuit based on the second control circuit and used to drive the controlled motor to operate at a target speed.
[0160] The control unit 740 is configured to drive the controlled motor by a second signal output by the second control circuit if the first duration of the first difference being in a specified change trend is greater than a first threshold and the second difference is greater than a second threshold. The first control circuit calculates the first signal based on a position sensor-based magnetic field oriented control algorithm; and the second control circuit calculates the second signal based on a position sensor-free magnetic field oriented control algorithm.
[0161] Optionally, the control unit 740 can also be used to drive the controlled motor by the second signal output by the second control circuit if the duty cycle difference is greater than the third threshold, the frequency difference is greater than the fourth threshold, and the first duration of the first difference in a specified change trend is greater than the first threshold.
[0162] Optionally, the control unit 740 can also be used to drive the controlled motor with the first signal output by the first control circuit if the duty cycle difference is less than or equal to the third threshold, the frequency difference is less than or equal to the fourth threshold, or the first duration of the first difference in a specified change trend is less than or equal to the first threshold, and return to execute the first signal output by the first control circuit for driving the controlled motor and subsequent steps.
[0163] Optionally, the control unit 740 can also be used to obtain the heartbeat signal sent by the first control circuit; if the first duration of the first difference in a specified change trend is greater than a first threshold and the second difference is greater than a second threshold, it is determined that the first target condition is met; if the second control circuit does not detect that the second duration of the heartbeat signal is greater than a fifth threshold, it is determined that the second target condition is met; if the first target condition is met or the second target condition is met, the controlled motor is driven by the second signal output by the second control circuit.
[0164] Optionally, the control unit 740 can also be used to drive the controlled motor by the first signal output by the first control circuit if the first target condition is not met and the second target condition is not met, and return to execute the first signal obtained by the first control circuit for driving the controlled motor and subsequent steps.
[0165] Optionally, the control unit 740 can also be used to determine that the first target condition is not met if the first duration of the first difference being in a specified change trend is less than or equal to a first threshold or the second difference is less than or equal to a second threshold; if the second control circuit does not detect that the second duration of the heartbeat signal is less than or equal to a fifth threshold, it is determined that the second target condition is not met.
[0166] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0167] In several embodiments provided in the present application, the coupling between the units may be electrical, mechanical or other forms of coupling. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0168] See also Figure 8 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 800 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0169] The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in an appropriate form.
[0170] Please refer to Fig. 9 , which shows a structural block diagram of a computer program product 900 provided in an embodiment of the present application. The computer program product 900 includes a computer program / instruction 910, and when the computer program / instruction 910 is executed by a processor, the steps of the above method are implemented.
[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A motor control method, characterized in that: Applied to a motor control system, the motor control system includes a controlled motor, a first control circuit for outputting a drive signal to the controlled motor, and a second control circuit as a backup of the first control circuit, the controlled motor is connected to the first control circuit and the second control circuit respectively, and the method includes: Acquire a first signal used by the first control circuit to drive the controlled motor, wherein the first signal includes a drive signal calculated by the first control circuit and used to drive the controlled motor to operate at a target speed; Acquire a specified speed of the controlled motor driven by the first signal, and a first difference between the specified speed and the target speed, collected by the second control circuit; obtaining a second difference between the first signal and the second signal, wherein the second signal includes a driving signal calculated by the second control circuit based on the second control circuit and used to drive the controlled motor to operate at a target speed; If the first duration of the specified change trend of the first difference is greater than a first threshold and the second difference is greater than a second threshold, the controlled motor is driven by a second signal output by the second control circuit.
2. The method according to claim 1, characterized in that The second difference includes a duty cycle difference and a frequency difference, the second threshold includes a third threshold and a fourth threshold, and if the first duration of the first difference in the specified change trend is greater than the first threshold and the second difference is greater than the second threshold, the second signal output by the second control circuit drives the controlled motor, including: If the duty cycle difference is greater than the third threshold, the frequency difference is greater than the fourth threshold, and the first duration of the first difference in the specified change trend is greater than the first threshold, the second signal output by the second control circuit drives the controlled motor.
3. The method according to claim 2, characterized in that The method further comprises: If the duty cycle difference is less than or equal to the third threshold, the frequency difference is less than or equal to the fourth threshold, or the first duration of the first difference in the specified change trend is less than or equal to the first threshold, the controlled motor is driven by the first signal output by the first control circuit, and the process returns to execute the first signal obtained by the first control circuit for driving the controlled motor and subsequent steps.
4. The method according to claim 1, characterized in that: The method further comprises: Acquire a heartbeat signal sent by the first control circuit; If the first duration of the second difference being in the specified change trend is greater than the second threshold and the first difference is greater than the first threshold, the second signal output by the second control circuit drives the controlled motor, including: If the first duration of the specified change trend of the first difference is greater than a first threshold and the second difference is greater than a second threshold, it is determined that the first target condition is met; If the second control circuit does not detect that the second duration of the heartbeat signal is greater than the fifth threshold, it is determined that the second target condition is met; If the first target condition is met or the second target condition is met, the controlled motor is driven by the second signal output by the second control circuit.
5. The method according to claim 4, characterized in that The method further comprises: If the first target condition and the second target condition are not met, the controlled motor is driven by the first signal output by the first control circuit, and the process returns to execute the first signal obtained by the first control circuit for driving the controlled motor and subsequent steps.
6. The method according to claim 5, characterized in that The method of driving the controlled motor based on the first signal of the first control circuit and returning to execute the first signal of the first control circuit used to drive the controlled motor and subsequent steps further includes: If the first duration of the first difference being in the specified change trend is less than or equal to the first threshold or the second difference is less than or equal to the second threshold, it is determined that the first target condition is not met; If the second control circuit does not detect that the second duration of the heartbeat signal is less than or equal to the fifth threshold, it is determined that the second target condition is not met.
7. The method according to claim 1, characterized in that The first control circuit calculates the first signal based on a magnetic field oriented control algorithm with a position sensor; and the second control circuit calculates the second signal based on a magnetic field oriented control algorithm without a position sensor.
8. A motor control device, characterized in that: Applied to a motor control system, the motor control system includes a controlled motor, a first control circuit for outputting a drive signal to the controlled motor, and a second control circuit as a backup of the first control circuit, the controlled motor is connected to the first control circuit and the second control circuit respectively, and the device includes: A first acquisition unit, configured to acquire a first signal used by the first control circuit to drive the controlled motor, wherein the first signal includes a drive signal calculated by the first control circuit and used to drive the controlled motor to operate at a target speed; A second acquisition unit, configured to acquire a specified rotational speed of the controlled motor driven by the first signal, and a first difference between the specified rotational speed and the target rotational speed, collected by the second control circuit; a third acquisition unit, configured to acquire a second difference between the first signal and a second signal, wherein the second signal includes a drive signal calculated by the second control circuit based on the second control circuit and used to drive the controlled motor to operate at a target speed; A control unit is used to drive the controlled motor by a second signal output by the second control circuit if a first duration of the first difference being in a specified change trend is greater than a first threshold and the second difference is greater than a second threshold.
9. A motor control system, characterized in that: The motor control system comprises a controlled motor, a first control circuit and a second control circuit, wherein the controlled motor is connected to the first control circuit and the second control circuit respectively; The motor control system is used to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, and the program code can be called by a processor to execute the method according to any one of claims 1 to 7.