Motor driving method, system and device, storage medium and computer product
By introducing a cyclic alternating mechanism between the charging stage and the slow free-flow stage in the motor drive system, combined with the detection of a given target current, the problem of insufficient current detection and control strategies in the existing motor drive circuit is solved, and the stability and response speed of the motor are improved.
Patent Information
- Application Number
- CN202510447770.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-29
AI Technical Summary
The existing motor drive circuits have shortcomings in current detection and control strategies, resulting in unstable motor operation, high energy consumption and high noise, and poor actual current follow-up effect.
The cyclic alternating mechanism between the charging stage and the slow free-flow stage is adopted. By comparing the actual driving current with the given target current, the motor drive system is controlled to switch between different stages, and combined with the continuous detection of the given target current, the current stability and response speed are ensured.
It improves the stability and accuracy of the motor drive system, suppresses current fluctuations and interference, and ensures the smooth operation and efficient control of the motor.
Smart Images

Figure CN120389671A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of motor drive, and particularly to a motor drive method, system, device, storage medium, and computer product. Background Art
[0002] In the technical field of motor drive, the design of the motor drive circuit and the control strategy are the keys to realizing the efficient and stable operation of the motor. However, the current motor drive circuit has some limitations, which affect the performance of the motor.
[0003] On the one hand, the existing motor drive circuit has deficiencies in current detection. Due to factors such as circuit design, sensor accuracy, or sampling frequency, the drive circuit cannot accurately obtain the actual drive current of the motor at each operating stage. This results in the motor control system being unable to grasp the current state of the motor in real time and accurately, thereby affecting the precise control of the motor. The inaccurate detection of current may cause problems such as overload and overheating of the motor during operation, reducing the reliability and service life of the motor.
[0004] On the other hand, the current drive control strategy is relatively fixed, which usually includes a fast freewheeling control link. Fast freewheeling is a control method used to improve the response speed of the motor, but it also brings some problems in practical applications. As the number of fast freewheeling times increases, the stability of the motor gradually deteriorates, and the following effect becomes increasingly unsatisfactory. This is because the fast freewheeling control will cause large fluctuations in the current and voltage of the motor, resulting in unstable operation of the motor and even oscillation phenomena. At the same time, the fast freewheeling control may also increase the energy consumption and noise of the motor, further reducing the performance of the motor.
[0005] In summary, the existing motor drive circuit has obvious deficiencies in current detection and control strategy, and urgent improvement and optimization are needed. Summary of the Invention
[0006] The main purpose of this application is to provide a motor drive method, system, device, storage medium, and computer product, aiming to solve the technical problem of poor following effect between the given current and the actual current in the existing motor drive control strategy.
[0007] To achieve the above object, this application proposes a motor drive method, which includes: when the motor drive system is in the charging stage, comparing the actual drive current with the given target current; when the actual drive current is consistent with the given target current, controlling the motor drive system to exit the current stage and enter the slow freewheeling stage; detecting whether the given target current is updated; when the given target current is not updated and after a preset time when the motor drive system enters the slow freewheeling stage, controlling the motor drive system to exit the slow freewheeling stage; and controlling the motor drive system to perform stage selection based on the actual drive current.
[0008] In one embodiment, before the step of obtaining the actual drive current of the motor drive system, the following steps are further included: obtaining system target information; obtaining start information and a given target current based on the system target information; and controlling the motor drive system to enter a charging stage according to the start information and the given target current.
[0009] In one embodiment, after the step of detecting whether the given target current is updated, the following steps are further included: when the given target current is updated, obtaining the updated given target current; comparing the updated given target current with the actual drive current; and when the updated given target current is greater than the actual drive current, controlling the motor drive system to exit the slow freewheeling stage and enter the charging stage.
[0010] In one embodiment, after the step of comparing the updated given target current with the actual drive current, the following steps are further included: when the updated given target current is less than the actual drive current, controlling the motor drive system to exit the slow freewheeling stage and enter the fast freewheeling stage; when the motor drive system is in the fast freewheeling stage, comparing the actual drive current with the updated given target current; and when the actual drive current is consistent with the updated given target current, controlling the motor drive system to exit the fast freewheeling stage and enter the slow freewheeling stage.
[0011] In one embodiment, the step of detecting whether the given target current is updated when the motor drive system is in the slow freewheeling stage includes: when the motor drive system is in the slow freewheeling stage, obtaining the working state of the motor and a user instruction in real time; generating a preliminary given target current based on the working state and the user instruction; verifying the effectiveness of the preliminary given target current; and when the preliminary given target current is effective, issuing the preliminary given target current as the updated given target current and determining that the given target current has been updated.
[0012] In one embodiment, the working time of the charging stage is determined based on the actual drive current and the given target current; the working time of the slow freewheeling stage is calibrated and obtained based on the following characteristics of the actual drive current and the given target current; and the working time of the fast freewheeling stage is determined based on the actual drive current and the given target current.
[0013] In addition, to achieve the above object, the present application further provides an electric motor drive system. The electric motor drive system applies the electric motor drive method as described above. The electric motor drive system includes: a control module, a detection module, and a drive module; the drive module includes: a charging circuit, a slow freewheeling circuit, and a fast freewheeling circuit; the detection module is configured to obtain the actual drive current of the drive module; the control module is configured to compare the actual drive current with a given target current when the charging circuit is turned on; the control module is configured to control the drive module to disconnect the charging circuit and turn on the slow freewheeling circuit when the actual drive current is consistent with the given target current; the control module is configured to detect whether the given target current is updated when the slow freewheeling circuit is turned on; the control module is configured to control the electric motor drive system to exit the slow freewheeling stage and control the electric motor drive system to perform stage selection based on the actual drive current after the given target current is not updated and the slow freewheeling circuit of the drive module is turned on for a preset time.
[0014] In addition, to achieve the above object, the present application further provides an electric motor drive device. The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor. The computer program is configured to implement the steps of the electric motor drive method as described above.
[0015] In addition, to achieve the above object, the present application further provides a storage medium. The storage medium is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the electric motor drive method as described above are implemented.
[0016] In addition, to achieve the above object, the present application further provides a computer program product. The computer program product includes a computer program. When the computer program is executed by a processor, the steps of the electric motor drive method as described above are implemented.
[0017] One or more technical solutions provided by the present application have at least the following technical effects:
[0018] Through the cyclic alternation mechanism of the charging stage and the slow freewheeling stage, the current of the electric motor drive system is regulated and controlled by using the complementary characteristics of the two stages. In the charging stage, the system quickly increases the current close to the target; in the slow freewheeling stage, the current is maintained at a low rate to keep it stable and avoid overshoot. At the same time, by continuously detecting the given target current, it is ensured to keep abreast of the changes in real time, improving the response speed and followability, suppressing current fluctuations and interference, and ensuring the stability and accuracy of the electric motor drive system. Description of the Drawings
[0019] The accompanying drawings here are incorporated into and constitute a part of this specification, showing embodiments consistent with this application and, together with the specification, are used to explain the principles of this application.
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or in the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0021] Figure 1 Schematic diagram of a motor drive circuit and drive current in the prior art;
[0022] Figure 2 Effect schematic diagram of the motor drive circuit control method in the prior art;
[0023] Figure 3 Flow schematic diagram provided by Embodiment 1 of the motor drive method of this application;
[0024] Figure 4 Flow schematic diagram provided by Embodiment 2 of the motor drive method of this application;
[0025] Figure 5 Effect schematic diagram of the motor drive method provided by Embodiment 2 of this application;
[0026] Figure 6 Module structure schematic diagram of the motor drive system according to the embodiment of this application;
[0027] Figure 7 Device structure schematic diagram of the hardware operating environment involved in the motor drive method according to the embodiment of this application.
[0028] The implementation, functional features, and advantages of this application will be further described in combination with the embodiments and with reference to the accompanying drawings. Detailed implementation manners
[0029] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not used to limit this application.
[0030] To better understand the technical solutions of this application, the following will be described in detail in combination with the accompanying drawings of the specification and specific implementation manners.
[0031] In the prior art, a drive circuit for driving a stepper motor or a brushed DC motor using an H-bridge circuit is provided to control the drive current to follow the target current. Usually, a sampling resistor is connected in series at the power input end of the H-bridge circuit or at the grounded end in series, and the motor drive current is detected by measuring the voltage across the sampling resistor.
[0032] Specifically, please refer to Figure 1 , Figure 1 which is a schematic diagram of a motor drive circuit and drive current in the prior art. From top to bottom and from left to right in sequence are the first MOS transistor, the second MOS transistor, the third MOS transistor, and the fourth MOS transistor. It is usually a cycle of a charging stage, a diode slow freewheeling stage, a MOS transistor slow freewheeling stage, a fast freewheeling stage, and a diode slow freewheeling stage.
[0033] First, in the charging stage, the H-bridge circuit inputs a rising current to the motor. Conducting the first MOS transistor and the fourth MOS transistor is the driving force for the motor to continue running. At this time, the motor winding terminal current can be obtained on the resistor.
[0034] Secondly, in the diode slow freewheeling stage, after the current reaches the target value Vrefx / Rsense in the charging stage, it needs to switch to the MOS transistor slow freewheeling stage. The diode slow freewheeling stage serves as a connection state between the charging stage and the MOS transistor slow freewheeling stage. At this time, the first MOS transistor is turned off, and the current flows in through the body diode of the second MOS transistor due to the action of the motor inductance. This stage is mainly the dead zone inserted by the MOS switch, and the time is very short and can be ignored. Therefore, it can be understood as directly connecting to the MOS transistor slow freewheeling stage. After the current reaches Vrefx / Rsense, it enters slow freewheeling, and the current slowly drops.
[0035] It can be understood that in the fast freewheeling stage, compared with the Iphase of the slow freewheeling, in order to accelerate the current drop, a reverse voltage is obtained on Vsensex at this time. Finally, immediately following is the diode slow freewheeling stage, which is used to connect the fast freewheeling stage to the charging stage of the next cycle, and is the same dead zone time as the diode slow freewheeling stage.
[0036] For the convenience of the following description, a summary is made here: When the first MOS transistor and the fourth MOS transistor are conducting and the other MOS transistors are turned off, a charging circuit is formed, and the charging circuit corresponds to the charging stage described above and will not be elaborated here; when the second MOS transistor and the fourth MOS transistor are conducting and the other MOS transistors are turned off, a slow freewheeling circuit is formed, and the slow freewheeling circuit corresponds to the slow freewheeling stage described above and will not be elaborated here; when the second MOS transistor and the third MOS transistor are conducting and the other MOS transistors are turned off, a fast freewheeling circuit is formed, and the fast freewheeling circuit corresponds to the fast freewheeling stage described above and will not be elaborated here.
[0037] Further, please refer to Figure 2 , Figure 2It is a schematic diagram of the effect of the motor drive circuit control method in the prior art. The dotted line represents the target current (IXref), and the solid line represents the actual drive current of the motor. As can be seen from the figure, there is an obvious difference between the two. From 0° to 90°, the target current IXref decreases slowly, and the actual drive current also shows a similar downward trend, but there is some lag. Specifically, the decrease rate is lower in the slow freewheeling stage and faster in the fast freewheeling stage. The same is true from 180° to 270°.
[0038] In the fast freewheeling stage, the decrease rate of the target current accelerates, while the decrease rate of the actual drive current, although also increasing, often cannot fully match the decrease speed of the target current. This rate difference may cause unstable torque output during the actual operation of the motor, affecting the performance and control accuracy of the motor. In the continuous control process, due to the fixed process, the actual drive current fluctuates greatly when following the given target current, and the following effect is poor.
[0039] Based on this, the embodiment of the present application provides a motor drive method, referring to Figure 3 , Figure 3 It is a schematic flow chart provided by Embodiment 1 of the motor drive method of the present application.
[0040] In this embodiment, the motor drive method includes steps S10 to S40:
[0041] Step S10, when the motor drive system is in the charging stage, compare the actual drive current with the given target current.
[0042] It should be noted that during the motor drive process, the actual drive current is an important parameter reflecting the operating state of the motor. Accurately obtaining the actual drive current is crucial for achieving precise control, improving the performance of the motor, and protecting the motor from damage.
[0043] Specifically, the actual drive current of the charging circuit, slow freewheeling circuit, and fast freewheeling circuit of the motor drive system can be obtained through a current sensor or a current detection circuit. The current sensor is usually installed at an appropriate position in the motor drive circuit to monitor the current flowing through the motor in real time. The obtained actual drive current signal can be an analog signal or a digital signal, depending on the type and output mode of the current sensor.
[0044] In addition, at the initial start-up, that is, before the step of obtaining the actual drive current of the motor drive system, it also includes: obtaining system target information; obtaining start-up information and a given target current based on the system target information; and controlling the motor drive system to enter the charging stage according to the start-up information and the given target current.
[0045] It is understandable that the purpose of obtaining the system target information is to understand the expected working objectives and states of the motor drive system, including parameters such as required speed, torque, power, etc. This is usually achieved by reading the system configuration file, receiving user input, or communicating with other system components (such as the host computer, sensors, etc.).
[0046] It should be noted that the startup information includes startup mode (such as soft startup, hard startup), startup time, startup acceleration, etc. These information determine how the motor smoothly transitions from the stationary state to the operating state. Based on the system target information and the characteristics of the motor, the given target current required by the motor during the startup phase is calculated. This current value will be used in the subsequent control process to ensure that the motor can start in the expected manner.
[0047] It is understandable that when the motor is started for the first time, the actual drive current usually starts from zero or a very low level. This is because the motor and the drive system need to gradually establish the working state to avoid instantaneous overload or impact. The charging phase is the process in which the actual drive current gradually climbs, enabling the motor to smoothly transition to the normal working state.
[0048] It is understandable that the charging phase is the process in which the actual drive current approaches the given target current. When starting for the first time, the actual drive current needs to charge and climb to the given target current. Based on the startup information and the given target current, the motor drive system will adjust its output current, voltage, and change rate, and the motor drive system can ensure that the actual drive current smoothly climbs to the given target current.
[0049] It is understandable that when the motor drive system is in the charging phase, it is applied to the H-bridge circuit described above. That is, in the positive half-cycle of the target sine wave, the charging phase is when the first MOS transistor and the fourth MOS transistor are turned on. In the negative half-cycle of the sine wave, the charging phase is when the second MOS transistor and the third MOS transistor are turned on. The reason for this difference is that the target current in the positive half-cycle of the current goes up, and the target current in the negative half-cycle of the current goes down, and the rest are turned off.
[0050] It should be noted that during the charging phase, the motor drive system will continuously monitor the magnitude of the actual drive current. At the same time, the system will compare the actual drive current with the preset given target current. Through this comparison, the system can understand whether the actual drive current has reached or approached the given target current. This is an important basis for judging whether the charging phase is completed and whether to enter the next phase (i.e., the slow freewheeling phase).
[0051] Specifically, during the execution process, the above objective can also be achieved by calculating the working time of the charging stage. When the actual driving current and the given target current in the charging stage are known, the working time of the charging stage can be calculated based on the charge-discharge time formula VM = I*R + L*di / dt + BEMF and BEMF = -p*ψ*ω*sin(pωt).
[0052] Wherein, p is the number of pole pairs of the motor; ψ is the maximum value of the motor magnetic flux; ω is the angular velocity of the motor; VM is the supply voltage of the motor; I is the actual driving current; L is the inductance of the motor; R is the resistance of the motor; and for di / dt, that is, the change rate corresponding to the time under the change of ΔI current (the difference between the actual driving current and the given target current), which is calculated under the known above conditions; finally, solving for t gives the working time of the charging stage.
[0053] In practical applications, some boundary conditions or safety thresholds may need to be considered. For example, if ΔI is very small (i.e., the actual driving current is already close to the given target current), a minimum working time may need to be set to ensure the stability of the charging process.
[0054] Step S20, when the actual driving current is consistent with the given target current, control the motor drive system to exit the current stage and enter the slow freewheeling stage.
[0055] It can be understood that when the actual driving current is consistent with the given target current (or close within an acceptable range), the system considers that the charging stage has been completed. Or rather, the working time of the charging stage has been completed, and the actual driving current has climbed to the given target current. At this time, the motor drive system will control the motor drive system to exit the current stage, that is, the charging stage, and enter the slow freewheeling stage. In the slow freewheeling stage, the motor drive system will continue to maintain the running state of the motor with a lower current to prepare for the subsequent normal operation or acceleration stage.
[0056] It can be understood that when the motor drive system is in the slow freewheeling stage, applied to the H-bridge circuit described above, that is, control the second MOS tube and the fourth MOS tube to conduct, and the rest to turn off.
[0057] It can be understood that in the slow freewheeling stage, the actual driving current drops slowly. This slow drop rate helps the motor and the drive system to gradually adapt to the normal working state, reducing mechanical shock and electrical stress, and is a good differential unit. Therefore, the working time of the slow freewheeling stage can be selected through calibration.
[0058] It should be noted that the determination of the working time in the slow continuous current stage usually involves experimental measurement and data analysis. By conducting multiple tests in the actual system, the current change characteristics in the slow continuous current stage can be observed, and a suitable working time range can be determined. During the calibration process, factors such as the type of motor, load conditions, and ambient temperature need to be considered.
[0059] It should be noted that the selection of the working time should be based on the performance requirements and stability considerations of the system. An overly long working time may lead to slow system response, while an overly short working time may not fully utilize the role of the slow continuous current stage. In practical applications, the calibrated working time can be integrated into the control algorithm of the motor drive system through programming. In this way, the system can automatically enter the slow continuous current stage during startup and operate according to the calibrated working time.
[0060] Step S30: Detect whether the given target current is updated.
[0061] It can be understood that during the slow continuous current stage, the system needs to continuously monitor whether the given target current changes, as this will affect subsequent control strategies. This can be achieved by reading the values in the memory, receiving external signals, or performing other appropriate detection methods.
[0062] In this embodiment, the step of detecting whether the given target current is updated includes: when the motor drive system is in the slow continuous current stage, obtaining the working state of the motor and user instructions in real time; generating a preliminary given target current based on the working state and the user instructions; verifying the validity of the preliminary given target current; and when the preliminary given target current is valid, issuing the preliminary given target current as the updated given target current and determining that the given target current has been updated.
[0063] It should be noted that the system obtains the current operating state of the motor in real time through sensors, controllers, or other monitoring devices, including parameters such as speed, torque, and temperature. The system also receives operation instructions from the user, which may be input through a control panel, remote control, mobile APP, etc., for changing the operating state or target of the motor.
[0064] It can be understood that the system calculates the preliminary given target current through a preset algorithm or logic based on the obtained working state and user instructions. This current value is determined according to the actual situation of the current motor and the user's expectations.
[0065] Specifically, a mathematical model of the motor can be established based on the type, specifications, and performance parameters of the motor. This model should be able to reflect the dynamic and static characteristics of the motor. Then, according to the application scenario and control requirements of the motor, a suitable control algorithm is selected, such as PID control, fuzzy control, neural network control, etc. Finally, combining the motor model and the control algorithm, a preset logical judgment process is designed.
[0066] During the execution process, the preprocessed motor operating state parameters and the parsed results of the user instructions are used as input parameters and input into the mathematical model to generate a preliminary given target current.
[0067] It can be understood that the system will also verify the generated preliminary given target current to ensure that it meets the operating range of the motor and the safety requirements of the system. The verification process may include checking whether the current value is within the allowable range, whether it will cause the motor to be overloaded or overheated, etc. If the preliminary given target current is the same as the original given target current, it is considered not updated.
[0068] It can be understood that if the preliminary given target current passes the verification, the system will send it to the motor drive controller as the updated given target current. This means that the motor drive controller will adjust the operating state of the motor according to the new target current. The system will record the update situation of the given target current and determine that the given target current has been updated. This helps the subsequent control and monitoring of the system to ensure that the motor can operate smoothly according to the new target current.
[0069] It can be understood that if it is detected that the given target current has been updated, the system needs to adjust the control strategy according to the new target current. This may involve adjusting the duration of the slow commutation phase, changing the rate of current decline, or taking other measures to ensure that the motor can smoothly transition to the new operating state.
[0070] Step S40, when the given target current is not updated and after a preset time in the slow commutation phase of the motor drive system, control the motor drive system to exit the slow commutation phase.
[0071] It can be understood that the given target current has not been updated, which means that the system has not received new operation instructions or targets. The system sets a preset time to determine the duration of the slow commutation phase. When the duration of the system in this phase reaches or exceeds the preset time, subsequent control actions will be triggered. The preset time here is the working time of the slow commutation phase mentioned above and can be obtained through calibration.
[0072] Step S50, based on the actual drive current, control the motor drive system to perform phase selection.
[0073] It can be understood that in general, when the system stops the control strategy of the slow continuous current stage, it is necessary to switch to the control strategy of the charging stage, and no longer let the actual drive current decrease at a slow speed. Instead, start increasing the drive current so that the actual drive current approaches the target given current.
[0074] However, due to the fact that the current direction in the slow continuous current stage is related to the back electromotive force of the motor, the slow continuous current stage cannot necessarily ensure that the current is near the given target current or that the current will decrease. Therefore, affected by the back electromotive force, after the slow continuous current stage ends, the actual drive current may be larger than the unupdated given target current.
[0075] Therefore, it is necessary to control the motor drive system to select a stage based on the actual drive current. When the actual drive current is greater than the given target current, enter the fast continuous current stage; when the actual drive current is less than the given target current, enter the charging stage.
[0076] It can be understood that whether the system enters the charging stage or the fast continuous current stage, step S20 will be executed. When the actual drive current is consistent with the given target current, control the motor drive system to exit the current stage and enter the slow continuous current stage. When the given target current is not updated, a stable following effect is achieved through the cyclic transition of the slow continuous current stage.
[0077] This embodiment provides a motor drive method. Through the cyclic alternation mechanism of the charging stage and the slow continuous current stage, the current of the motor drive system is regulated and controlled by using the complementary characteristics of the two stages. In the charging stage, the system quickly increases the current close to the target; in the slow continuous current stage, it maintains the current stable at a low rate to avoid overshoot. At the same time, by continuously detecting the given target current, it ensures to keep abreast of the changes in real time, improves the response speed and following performance, suppresses current fluctuations and interference, and ensures the stability and accuracy of the motor drive system.
[0078] Based on the first embodiment of this application, in the second embodiment of this application, for the content that is the same as or similar to the above-mentioned embodiment one, reference can be made to the above introduction and will not be elaborated hereinafter. On this basis, this embodiment gives the control strategy of the given target current update for the electric drive system. Please refer to Figure 4 , Figure 4 which is the flowchart provided for the second embodiment of the motor drive method of this application.
[0079] In this embodiment, after step S50, the motor drive method further includes steps S60 to S110:
[0080] Step S60, when the given target current is updated, obtain the updated given target current.
[0081] It can be understood that when the system detects an update in the given target current, that is, the value of the target current has changed, this change may be triggered by an external control signal, the internal logic decision of the system, or a preset condition.
[0082] It can be understood that the system can obtain the updated given target current by receiving signals from an external controller or a host computer. These signals may be transmitted in a wired or wireless manner, depending on the communication protocol and hardware design of the system. After the system receives the updated given target current signal, it needs to perform data parsing to extract the effective current value. The specific acquisition method has been described in Embodiment 1 and will not be elaborated here.
[0083] Step S70, compare the updated given target current with the actual driving current.
[0084] It can be understood that by comparing the updated given target current with the actual driving current, the system can understand the difference between the current motor driving state and the target state.
[0085] Step S80, when the updated given target current is greater than the actual driving current, control the motor drive system to exit the slow freewheeling stage and enter the charging stage.
[0086] It can be understood that if the comparison result shows that the updated given target current is greater than the actual driving current, it means that the output of the current motor drive system is insufficient to meet the new target requirements. The system will control the motor drive system to exit the slow freewheeling stage and enter the charging stage. In the charging stage, the system will increase the current at a faster rate and quickly approach the given target current.
[0087] Step S90, when the updated given target current is less than the actual driving current, control the motor drive system to exit the slow freewheeling stage and enter the fast freewheeling stage.
[0088] It can be understood that if the comparison result shows that the updated given target current is less than the actual driving current, it means that the output of the current motor drive system exceeds the new target requirements. The system will control the motor drive system to exit the slow freewheeling stage. In the slow freewheeling stage, the system maintains the current stability at a lower rate, but at this time, since the actual current is already higher than the target current, continuing the slow freewheeling may cause current excess.
[0089] It can be understood that subsequently, the system will control the motor drive system to enter the fast freewheeling stage. In the fast freewheeling stage, the system will reduce the current at a faster rate and quickly approach and stabilize at the new given target current value.
[0090] It can be understood that when the motor drive system is in the fast freewheeling stage, it is applied to the H-bridge circuit described above, that is, the second MOS transistor and the third MOS transistor are controlled to conduct, and the others are turned off.
[0091] Step S100, when the motor drive system is in the fast freewheeling stage, compare the actual drive current with the updated given target current.
[0092] Step S110, when the actual drive current is consistent with the updated given target current, control the motor drive system to exit the fast freewheeling stage and enter the slow freewheeling stage.
[0093] It can be understood that if the comparison result shows that the actual drive current is consistent with the updated given target current (or within an acceptable error range), it means that the goal of the fast freewheeling stage has been achieved.
[0094] Specifically, in practical applications, the working time of the fast freewheeling stage can also be controlled. Given the actual drive current and the updated given target time, the working time of the fast freewheeling stage can be calculated through an algorithm.
[0095] Combined with the above content, please refer to Figure 5 , Figure 5 which is a schematic diagram of the effect of the motor drive method provided in the second embodiment of the present application. Among them, the content of the first embodiment is also included.
[0096] Specifically, t1 and t3 are the charging stages, and the working time of the charging stage is based on the current Iphase reaching Vref. t2, t4, and t6 are the slow freewheeling stages, and the time of the slow freewheeling stage can be set by the user. t5 is the fast freewheeling stage, and the working time of the fast freewheeling stage is based on the current Iphase reaching Vref. Q1, Q2, Q3, and Q4 are the first MOS transistor, the second MOS transistor, the third MOS transistor, and the fourth MOS transistor respectively. The dotted line is the given target current updated once in the figure, and the updated given target current is lower than the original one. The solid line is the actual drive current.
[0097] Combined with the above content and Figure 5 it can be known that when the given target current is not updated, maintaining basic following is to control the on-off states of the first MOS transistor, the second MOS transistor, the third MOS transistor, and the fourth MOS transistor by alternating the slow freewheeling stage and the charging stage. When the updated given target current is lower than the original one, it enters the fast freewheeling stage from the slow freewheeling stage, and then enters the slow freewheeling stage from the fast freewheeling stage after the current is followed.
[0098] In addition, during the slow freewheeling stage or the fast freewheeling stage, the second MOS transistor can also remain non-conductive, and the body diode inside the second MOS transistor is used for freewheeling. At this time, the current flow direction will not change. Similarly, during the fast freewheeling stage, the third MOS transistor can also remain non-conductive, and freewheeling is carried out through the body diode inside the third MOS transistor.
[0099] In this embodiment, by comparing and judging the updated given target current and the actual driving current, the control logic after the update of the given target current is given. When the former is larger, it is increased through the charging stage. When the latter is larger, it is decreased through the fast freewheeling stage. Finally, it enters the cycle of the slow freewheeling stage and the charging stage, maintaining stability while improving the response speed and avoiding current surplus.
[0100] It should be noted that the above examples are only used to understand this application and do not constitute a limitation to the motor driving method of this application. Based on this technical concept, more forms of simple transformations are within the protection scope of this application.
[0101] This application also provides a motor drive system. Please refer to Figure 6 The motor drive system applies the motor drive method as described in the above embodiment. The motor drive system includes: a control module 10, a detection module 20, and a drive module 30; the drive module 30 includes: a charging circuit, a slow freewheeling circuit, and a fast freewheeling circuit; the detection module 20 is used to obtain the actual driving current of the drive module 30; the control module 10 is used to compare the actual driving current with the given target current when the charging circuit is turned on; the control module 10 is used to control the drive module 30 to disconnect the charging circuit and turn on the slow freewheeling circuit when the actual driving current is consistent with the given target current; the control module 10 is used to detect whether the given target current is updated when the slow freewheeling circuit is turned on; the control module 10 is used to control the motor drive system to exit the slow freewheeling stage and, based on the actual driving current, control the motor drive system to perform stage selection after the slow freewheeling circuit of the drive module 30 is turned on for a preset time when the given target current is not updated.
[0102] The motor drive system provided by this application adopts the motor drive method in the above embodiment and can solve the technical problem that the following effect of the given current and the actual current in the existing motor drive control strategy is poor. Compared with the prior art, the beneficial effects of the motor drive system provided by this application are the same as those of the motor drive method provided by the above embodiment, and the other technical features in the motor drive system are the same as those disclosed in the method of the above embodiment, which will not be elaborated here.
[0103] The present application provides a motor drive device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the motor drive method in Embodiment 1 above.
[0104] Reference is made below Figure 7 , which shows a schematic structural diagram of a motor drive device suitable for implementing the embodiments of the present application. The motor drive device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The motor drive device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0105] As Figure 7 shown, the motor drive device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in the read-only memory 1002 or a program loaded from the storage device 1003 into the random access memory 1004. In the random access memory 1004, various programs and data required for the operation of the motor drive device are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. The input / output interface 1006 is also connected to the bus. Generally, the following systems may be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the motor drive device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a motor drive device having various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be alternatively implemented or had.
[0106] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by a processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are executed.
[0107] The motor drive device provided by the present application adopts the motor drive method in the above-mentioned embodiment, and can solve the technical problem that the given current and the actual current following effect of the existing motor drive control strategy are poor. Compared with the prior art, the beneficial effects of the motor drive device provided by the present application are the same as those of the motor drive method provided by the above-mentioned embodiment, and other technical features in the motor drive device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.
[0108] It should be understood that each part disclosed in the present application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0109] As described above, the above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present application, and all of them should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0110] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the motor drive method in the above-mentioned embodiment.
[0111] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0112] The above computer-readable storage medium can be included in a motor drive device; or it can exist separately without being assembled into the motor drive device.
[0113] The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by a motor drive device, the motor drive device is caused to: obtain the actual drive current of the motor drive system; compare the actual drive current with a given target current when the motor drive system is in the charging stage; when the actual drive current is consistent with the given target current, control the motor drive system to exit the charging stage and enter the slow freewheeling stage; detect whether the given target current is updated when the motor drive system is in the slow freewheeling stage; and when the given target current is not updated and a preset time after the motor drive system enters the slow freewheeling stage, control the motor drive system to exit the slow freewheeling stage and enter the charging stage.
[0114] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0115] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutively represented blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0116] The modules involved in the embodiments of this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.
[0117] The readable storage medium provided by this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., computer programs) for performing the above-mentioned motor drive method, and can solve the technical problem that the given current and the actual current following effect of the existing motor drive control strategy are poor. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the motor drive method provided by the above embodiments, and will not be elaborated here.
[0118] The present application also provides a computer program product, including a computer program which, when executed by a processor, implements the steps of the motor driving method as described above.
[0119] The computer program product provided by the present application can solve the technical problem that the given current and the actual current following effect of the existing motor drive control strategy are poor. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the motor driving method provided by the above embodiments, and will not be elaborated here.
[0120] The above are only partial embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. A motor driving method, characterized in that, The motor driving method includes: When the motor driving system is in the charging stage, comparing the actual driving current with the given target current; When the actual driving current is consistent with the given target current, controlling the motor driving system to exit the current stage and enter the slow freewheeling stage; Detecting whether the given target current is updated; When the given target current is not updated and after a preset time when the motor driving system enters the slow freewheeling stage, controlling the motor driving system to exit the slow freewheeling stage; Based on the actual driving current, controlling the motor driving system to perform stage selection.
2. The motor driving method according to claim 1, wherein Before the step of comparing the actual driving current with the given target current when the motor driving system is in the charging stage, it further includes: Obtaining system target information; Based on the system target information, obtaining start information and the given target current; According to the start information and the given target current, controlling the motor driving system to enter the charging stage.
3. The motor driving method according to claim 1, characterized in that, After the step of detecting whether the given target current is updated, it further includes: When the given target current is updated, obtaining the updated given target current; Comparing the updated given target current with the actual driving current; When the updated given target current is greater than the actual driving current, controlling the motor driving system to exit the slow freewheeling stage and enter the charging stage.
4. The motor driving method according to claim 3, wherein, After the step of comparing the updated given target current with the actual driving current, it further includes: When the updated given target current is less than the actual driving current, controlling the motor driving system to exit the slow freewheeling stage and enter the fast freewheeling stage; When the motor driving system is in the fast freewheeling stage, comparing the actual driving current with the updated given target current; When the actual driving current is consistent with the updated given target current, controlling the motor driving system to exit the fast freewheeling stage and enter the slow freewheeling stage.
5. The motor driving method according to claim 1, characterized in that, The step of detecting whether the given target current is updated includes: When the motor driving system is in the slow freewheeling stage, real-time obtaining the working state of the motor and user instructions; Based on the working state and the user instructions, generating a preliminary given target current; Verifying the validity of the preliminary given target current; When the preliminary given target current is valid, issuing the preliminary given target current as the updated given target current and determining that the given target current has been updated.
6. The motor driving method according to any one of claims 1 to 5, characterized in that, The working time of the charging stage is determined based on the actual driving current and the given target current; The working time of the slow freewheeling stage is calibrated and obtained based on the following characteristics of the actual driving current and the given target current; The working time of the fast freewheeling stage is determined based on the actual driving current and the given target current.
7. A motor drive system, characterized in that, The motor driving system applies the motor driving method according to any one of claims 1 to 6. The motor driving system includes: a control module, a detection module, and a driving module; The driving module includes: a charging circuit, a slow freewheeling circuit, and a fast freewheeling circuit; The detection module is used to obtain the actual driving current of the driving module; The control module is used to compare the actual driving current with the given target current when the charging circuit is turned on; The control module is configured to control the drive module to disconnect the charging circuit and turn on the slow freewheeling circuit when the actual drive current is consistent with the given target current; The control module is configured to detect whether the given target current is updated when the slow freewheeling circuit is turned on; The control module is configured to, when the given target current is not updated and after the slow freewheeling circuit of the drive module is turned on for a preset time, control the motor drive system to exit the slow freewheeling stage and, based on the actual drive current, control the motor drive system to perform stage selection.
8. A motor drive device, characterized in that, The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the motor drive method according to any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the motor drive method according to any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes a computer program, and the computer program, when executed by a processor, implements the steps of the motor drive method according to any one of claims 1 to 6.