Motor control method and device, electronic equipment and storage medium
By dynamically managing the motor's blockage current threshold and matching the damping of the flip device according to the change of the Hall number, the problem of excessive motor force caused by the damping attenuation of the flip device is solved, and the risk of shaft gear slitting teeth or fracture is reduced, and the rotation shaft gear is achieved Safer flip control.
Patent Information
- Application Number
- CN202411007890.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-22
AI Technical Summary
As the number of flips increases, the damping attenuation of the on-board flip equipment leads to excessive flip force of the motor, which may lead to problems such as the sliding teeth of the shaft gear or breakage.
By obtaining the degree of change of the current number of Halls per unit time and reference number of Halls per unit time for the motor to run, dynamically manage the blocking current threshold to match the damping of the flip device, so that the threshold is faster and powered off when the motor is stopped, reducing the The risk of excessive flip force.
It effectively reduces the risk of shaft gear tooth or breakage caused by excessive flip force, ensures that the motor is powered off as soon as possible during flipping, and extends the equipment life.
Smart Images

Figure CN119009896A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motor control technology, and in particular to a motor control method, device, electronic device and storage medium. Background Art
[0002] With the development of vehicle technology, various vehicle-mounted devices have emerged, among which there are more and more flip devices such as vehicle-mounted flip screens and vehicle-mounted mobile central consoles.
[0003] Normally, the flip device determines whether the flip device is stuck (stuck midway or when the flip is completed) based on whether the stall current exceeds a fixed threshold, so that the motor can be powered off when it is stuck. However, as the number of flips increases, the damping of the flip device will decay, so when it is stuck, the motor flipping force is likely to be too strong, which will cause the shaft gear to slip or break. Summary of the invention
[0004] Based on this, it is necessary to provide a motor control method, device, electronic device and storage medium to address the above technical problems.
[0005] The present application provides a motor control method, the method comprising:
[0006] When the motor drives the target object to flip, the current Hall number per unit time of the motor is obtained;
[0007] Determining a current first degree of change of the current Hall number per unit time relative to a reference Hall number per unit time;
[0008] The stall current threshold is managed according to the current first change degree.
[0009] The present application provides a motor control device, the device comprising:
[0010] A first acquisition module is used to acquire the current Hall number per unit time of the motor when the motor drives the target object to flip;
[0011] A first determination module, used to determine a current first change degree of the current Hall number per unit time relative to a reference Hall number per unit time;
[0012] The first management module is used to manage the stall current threshold according to the current first change degree.
[0013] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the motor control method provided in any embodiment of the present application are implemented.
[0014] An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the motor control method provided by any embodiment of the present application are implemented.
[0015] The motor control method, device, electronic device and storage medium provided in the embodiments of the present application can obtain the current unit time Hall number of the motor when the motor drives the target object to flip; determine the current first degree of change of the current unit time Hall number relative to the reference unit time Hall number; and manage the stall current threshold according to the current first degree of change. It can be seen that by adopting the above technical solution, the stall current threshold can be managed according to the current first degree of change of the current unit time Hall number and the reference unit time Hall number, so that the stall current threshold matches the damping of the flipping device. In this way, when the target object is subsequently stopped, the stall current can reach the stall current threshold faster, thereby cutting off the power to the motor as soon as possible, reducing the risk of excessive flipping force, and thus reducing the risk of shaft gear slippage or breakage. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of a motor control method in one embodiment;
[0017] Figure 2 is a schematic flow chart of a motor control process in one embodiment;
[0018] Figure 3 is a schematic structural diagram of a motor control device in one embodiment;
[0019] Figure 4 FIG. 1 is a schematic diagram of the structure of an electronic device in an embodiment. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0021] In one embodiment, Figure 2 As shown, a motor control method is provided, which can be applied to improve the scenario of shaft gear slippage or breakage caused by damping attenuation and excessive turning force. The method can be executed by a motor control device, which can be implemented by software and / or hardware methods and can be integrated on an electronic device. The electronic device can be, but is not limited to, various personal computers, laptops, smart phones, or tablet computers. In this embodiment, the method includes the following steps:
[0022] S110 . When the motor drives the target object to flip, obtain the current Hall number per unit time of the motor.
[0023] Specifically, the flipping device includes a motor and a target object, wherein the target object may be, but is not limited to, a screen, a center console, etc.
[0024] Specifically, the "motor drives the target object to flip" mentioned here can be but is not limited to each time the motor drives the target object to flip, an odd number of times the motor drives the target object to flip, an even number of times the motor drives the target object to flip, a multiple of M times the motor drives the target object to flip (where M is an integer greater than 2, such as 10, 20, or 50, etc.), etc.
[0025] Specifically, the current Hall number per unit time is the current Hall number per unit time, where the Hall number per unit time refers to the number of times the Hall sensor of the motor is triggered per unit time. The unit time can be but is not limited to per second, per 10 seconds, per 30 seconds, per minute, or per 5 minutes, etc.
[0026] S120, determining a current first degree of change of the current Hall number per unit time relative to the reference Hall number per unit time.
[0027] Specifically, the reference Hall number per unit time is used as a reference value (or a reference standard) for comparison with the current Hall number per unit time.
[0028] Specifically, the current first change degree is used to characterize how much the current Hall number per unit time changes relative to the reference Hall number per unit time.
[0029] In some embodiments, the current first degree of change may be the absolute value of the difference between the current Hall number per unit time and the reference Hall number per unit time (referred to as the first current absolute value). Of course, in other embodiments, the first degree of change may also be the proportion obtained by dividing the first current absolute value by the reference Hall number per unit time (referred to as the first current proportion), etc., but it is not limited thereto.
[0030] Optionally, the reference Hall number per unit time is the average Hall number per unit time of the target object during the Nth flipping, or the Hall number per unit time corresponding to the current Hall number per unit time during the Nth flipping of the target object, wherein the Nth flip is the first flip, or the difference between the Nth flip and this flip is a preset number of times.
[0031] Specifically, the average Hall number per unit time is the average value of the Hall number per unit time corresponding to all unit times during the Nth flipping process of the target object.
[0032] Specifically, if the current Hall number per unit time is the Hall number per unit time of the Pth (P is a positive integer) unit time during the current flipping process of the target object, then the "Hall number per unit time corresponding to the current Hall number per unit time" refers to the Hall number per unit time of the Pth unit time during the Nth flipping process of the target object.
[0033] Specifically, the preset number of times is a positive integer, and its specific value can be set by those skilled in the art according to actual conditions. For example, the preset number of times may include but is not limited to 1, 2, 3, 5, 10, 20, or 50, etc.
[0034] It can be understood that damping attenuation has not occurred when the target object is flipped for the first time. By setting the Nth flip as the first flip, the reference unit time Hall number is made to be the unit time Hall number before damping attenuation occurs. In this way, according to the current first degree of change of the current unit time Hall number and the reference unit time Hall number, it can be more accurately judged whether the current damping has undergone damping attenuation compared to the initial damping of the flipping device, so as to reduce the stall current as soon as possible after determining that damping attenuation has occurred.
[0035] It can also be understood that when damping attenuation occurs in the flipping device, the Hall number per unit time before and after the damping attenuation usually changes greatly. For example, the Hall number per unit time before and after the first damping attenuation usually changes greatly. For example, compared with the Hall number per unit time after the Lth (L is a positive integer) damping attenuation, the Hall number per unit time after the L+1th damping attenuation usually changes greatly. Therefore, by setting the preset number of times between the Nth flip and the current flip, the reference Hall number per unit time is the Hall number per unit time before the damping attenuation occurs this time. In this way, according to the current first degree of change of the current Hall number per unit time and the reference Hall number per unit time, it can be more accurately judged whether the current damping has undergone damping attenuation compared to the initial damping of the flipping device, or whether damping attenuation has occurred again compared to the last damping attenuation, so as to reduce the stall current as soon as possible after determining that damping attenuation has occurred.
[0036] S130. Manage the stall current threshold according to the current first change degree.
[0037] In some embodiments, if the current first variation degree is greater than a first preset threshold, it is determined to reduce the stall current threshold.
[0038] Specifically, the specific value of the first preset threshold can be set by those skilled in the art according to actual conditions and is not limited here. For example, when the current first degree of change is the first current proportion, the first preset threshold can be any value between 10% and 20%, such as 10%, but is not limited to this.
[0039] In some examples, the reference Hall number per unit time is the average Hall number per unit time of the first flipping of the target object, or the Hall number per unit time corresponding to the current Hall number per unit time during the first flipping of the target object. At this time, if the current first degree of change is greater than the first preset threshold, it indicates that the current damping has undergone damping attenuation relative to the initial damping of the flipping device. At this time, it is determined to lower the initial stall current threshold.
[0040] In other examples, the difference between the Nth flip and the current flip is a preset number of times, and the reference unit time Hall number is the average unit time Hall number of the target object for the Nth flip, or the unit time Hall number corresponding to the current unit time Hall number during the Nth flip of the target object. At this time, if the current first degree of change is greater than the first preset threshold, it indicates that the current damping has undergone damping attenuation relative to the initial damping of the flipping device, or that damping attenuation has occurred again compared to the last damping attenuation. At this time, it is determined to lower the current stall current threshold.
[0041] It can be understood that when the target object encounters resistance and stops during the flipping process (such as manual blocking, flipping is completed, that is, flipping in place), the stall current of the motor will increase. In the related art, when the stall current reaches the stall current threshold, the motor will be powered off. The applicant has found through research that since a fixed stall current threshold is used in the related art, when the flipping device is damped, the flipping force will increase, and the stall force will also change. It is very likely that when the stall current has not reached the stall current threshold, the problem of the shaft gear slipping or breaking due to excessive force of the motor will occur. However, in the embodiment of the present disclosure, by setting the current first change degree of the current unit time Hall number and the reference unit time Hall number to be greater than the first preset threshold, that is, when the target object is damped, it is determined to reduce the stall current threshold, and then reduce the stall current threshold, so that the stall current can reach the reduced stall current threshold as soon as possible, and then the motor is powered off as soon as possible, reducing the risk of excessive flipping force, thereby reducing the problem of the shaft gear slipping or breaking due to excessive force of the motor.
[0042] In the above scheme, when the motor drives the target object to flip, the current unit time Hall number of the motor can be obtained; the current first degree of change of the current unit time Hall number relative to the reference unit time Hall number can be determined; and the stall current threshold can be managed according to the current first degree of change. It can be seen that by adopting the above technical scheme, the stall current threshold can be managed according to the current first degree of change of the current unit time Hall number and the reference unit time Hall number, so that the stall current threshold matches the damping of the flipping device. In this way, when the target object is subsequently stopped, the stall current can reach the stall current threshold faster, thereby cutting off the power to the motor as soon as possible, reducing the risk of excessive flipping force, and thus reducing the risk of shaft gear slippage or breakage.
[0043] In some embodiments, the method further includes: when it is determined that the current first degree of change is greater than a first preset threshold, immediately lowering the stall current threshold; or, after the target object is flipped this time, lowering the stall current threshold.
[0044] As mentioned above, in some examples, "determining to lower the stall current threshold" means "determining to lower the initial stall current threshold". In this case, "lowering the stall current threshold" means "lowering the initial stall current threshold", that is, the lowered stall current threshold is obtained by reducing the initial stall current threshold.
[0045] In other examples, "determining to lower the stall current threshold" means "determining to lower the current stall current threshold". In this case, "lowering the stall current threshold" means "lowering the current stall current threshold", that is, the lowered stall current threshold is obtained by reducing the current stall current threshold.
[0046] Specifically, “immediately lowering the stall current threshold” means that, regardless of whether the current flip has been completed, once it is determined that the current first change degree is greater than the first preset threshold, the stall current threshold is immediately lowered.
[0047] In the above scheme, by setting the stall current threshold to be immediately lowered when it is determined that the current first change degree is greater than the first preset threshold, the stall current threshold can be lowered as soon as possible when damping attenuation occurs, thereby reducing the risk of shaft gear slippage or breakage as early as possible. By setting the stall current threshold to be lowered after the target object is flipped this time, the stall current threshold can be lowered as soon as possible, thereby reducing the risk of shaft gear slippage or breakage as early as possible, and the use of computing resources to reduce the stall current threshold during the target object flipping process can be avoided, thereby avoiding affecting the flipping of the target object.
[0048] In some embodiments, lowering the stall current threshold includes: determining a target reduction value corresponding to the current first change degree, and lowering the stall current threshold by the target reduction value.
[0049] In some examples, determining the target reduction value corresponding to the current first degree of change includes: querying a first mapping relationship to determine the target reduction value corresponding to the current first degree of change, wherein the first mapping relationship is a mapping relationship between a difference value and a reduction value.
[0050] In other examples, the current first change degree is a first current proportion. In this case, determining the target reduction value corresponding to the current first change degree includes: multiplying the first current proportion by the current locked-rotor current to obtain the target reduction value.
[0051] In the above scheme, by setting the target reduction value of the stall current threshold (determined by the current first degree of change), the target reduction value of the stall current threshold can be made to better match the current first degree of change, thereby making the lowered stall current threshold more compatible with the current damping, thereby minimizing the risk of excessive flipping force, thereby minimizing the risk of shaft gear slippage or breakage.
[0052] In other embodiments, lowering the stall current threshold includes: determining a target threshold corresponding to the current number of Halls per unit time, and lowering the stall current threshold to the target threshold.
[0053] In some examples, determining the target threshold corresponding to the current number of Halls per unit time includes: querying a second mapping relationship to determine the target threshold corresponding to the current number of Halls per unit time, wherein the second mapping relationship is a mapping relationship between the number of Halls per unit time and a stall current threshold.
[0054] In other examples, determining the target threshold corresponding to the current number of Halls per unit time includes: inputting the current number of Halls per unit time into a pre-trained neural network model, and obtaining the target threshold output by the neural network model.
[0055] In the above scheme, by setting the stall current threshold to be lowered to the target threshold (determined by the current Hall number per unit time), the target threshold (i.e. the lowered stall current threshold) can be more closely matched with the current damping, thereby minimizing the risk of excessive flipping force and thus minimizing the risk of shaft gear slippage or breakage.
[0056] In some embodiments, managing the stall current threshold according to the current first change degree includes:
[0057] If the current first change degree is less than or equal to the first preset threshold, the locked-rotor current threshold is kept unchanged, and the current total Hall number and the current magnetic encoding angle of the motor are obtained;
[0058] According to the current total number of Hall sensors and the current magnetic encoder angle, the stall current and the power-on and power-off status of the motor are managed.
[0059] Specifically, the current total Hall number is the total Hall number from the beginning of this flip to the current moment.
[0060] Specifically, the current magnetic encoding angle is the current magnetic encoding angle, wherein the magnetic encoding angle is used to characterize the flipping angle of the target object.
[0061] Optionally, the stall current and the power-on and power-off conditions of the motor are managed according to the current total Hall number and the current magnetic encoding angle, including: if the current total Hall number reaches the reference total Hall number and the current magnetic encoding angle is 0, it is determined that the target object flipping is completed, the stall current is reduced and the motor power is controlled to be cut off.
[0062] Specifically, the reference total Hall number is the total Hall number of the entire process of the first flipping of the target object.
[0063] Specifically, if the current total Hall number reaches the reference total Hall number and the current magnetic encoding angle is 0, it indicates that the target object has been flipped. At this time, the stall current can be reduced and the motor can be controlled to be powered off.
[0064] In the above scheme, by setting the stall current to be reduced and the motor to be powered off when the current total Hall number reaches the reference total Hall number and the current magnetic encoding angle is 0, the stall current can be reduced and the power can be cut off as soon as possible when the target object is flipped. When the target object is stuck due to the completion of the flip, the flipping force can be reduced as much as possible, thereby minimizing the risk of shaft gear slippage or breakage.
[0065] Optionally, managing the stall current threshold according to the current first change degree further includes:
[0066] If the current total Hall number does not reach the reference total Hall number and / or the current magnetic encoding angle is not 0, determine the current second change degree of the Hall number per unit time and the Hall number per previous unit time;
[0067] If the current second change degree is greater than the second preset threshold, it is determined that the target object is abnormally turned over midway, the stall current is reduced and the motor is controlled to be powered off.
[0068] Specifically, the last Hall number per unit time is the Hall number per unit time in the last unit time during the current flipping process.
[0069] Specifically, the current second change degree is used to characterize how much the current Hall number per unit time changes relative to the previous Hall number per unit time.
[0070] Specifically, the specific value of the second preset threshold can be set by those skilled in the art according to actual conditions and is not limited here.
[0071] For example, the current second change degree can be the absolute value of the difference between the current Hall number per unit time and the Hall number per unit time (referred to as the second current absolute value); of course, the current second change degree can be the proportion obtained by dividing the second current absolute value by the Hall number per unit time (referred to as the second current proportion), at which time, the second preset threshold value can be any value within 10%-20%, such as 20%. But it is not limited to this.
[0072] Specifically, if the current total Hall number does not reach the reference total Hall number and / or the current magnetic encoding angle is not 0, it indicates that the target object has not been flipped. At this time, if the current second change degree of the current Hall number per unit time relative to the Hall number per unit time is greater than the second preset threshold, it indicates that the target object is abnormally flipped midway. At this time, the stall current can be reduced and the motor can be controlled to cut off power.
[0073] In the above scheme, by setting the current total Hall number not reaching the reference total Hall number and / or the current magnetic encoding angle not to 0, and the current second degree of change of the Hall number per unit time relative to the Hall number per unit time of the previous unit time, the stall current is reduced and the motor is controlled to be powered off. When a flipping abnormality occurs in the target object midway, the stall current can be reduced and the motor can be controlled to be powered off in time to avoid damage to the flipping equipment.
[0074] The following takes the target object as a screen as an example to describe in detail the motor control method provided by the embodiment of the present disclosure. Figure 2 As shown, the motor drives the screen to start flipping; the current total Hall number and the current Hall number per unit time of the motor are recorded; the current Hall number per unit time is compared with the average Hall number per unit time of the last flip record to determine whether the current first change degree of the current Hall number per unit time and the average Hall number per unit time is greater than the first preset threshold; if the current first change degree is greater than the first preset threshold, it is determined that the damping is attenuated, the resistance is reduced, and the output current remains unchanged, resulting in the motor rotating too fast, the Hall value per unit time becomes larger, and the force of the motor also changes, and the stall current threshold must be reduced; if the current first change degree is less than or equal to the first preset threshold, it is determined whether the current total Hall number meets the closing requirement (i.e., the reference total Hall number). If the reference total Hall number is reached and the current magnetic encoding angle is judged to be 0, it is determined that the screen is closed, the stall current is reduced, and the motor is powered off. If the reference total Hall number is not reached and / or the current magnetic encoding angle is not 0, and the current second change degree of the current Hall number per unit time relative to the previous Hall number per unit time is greater than 20%, it is determined that the screen is abnormal midway, the stall current is reduced, and the motor is powered off.
[0075] It should be understood that although Figure 1The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0076] In one embodiment, Figure 3 As shown, a motor control device is provided, comprising:
[0077] The first acquisition module 310 is used to acquire the current Hall number per unit time of the motor when the motor drives the target object to flip;
[0078] A first determination module 320, configured to determine a current first degree of change of a current Hall number per unit time relative to a reference Hall number per unit time;
[0079] The first management module 330 is used to manage the stall current threshold according to the current first change degree.
[0080] Optionally, the reference Hall number per unit time is the average Hall number per unit time of the target object during the Nth flipping, or the Hall number per unit time corresponding to the current Hall number per unit time during the Nth flipping of the target object, wherein the Nth flip is the first flip, or the difference between the Nth flip and this flip is a preset number of times.
[0081] Optionally, the first management module 330 includes a first determination submodule, configured to determine to lower the stall current threshold if the current first degree of change is greater than a first preset threshold.
[0082] Optionally, the method further comprises: a reducing module, configured to immediately reduce the locked-rotor current threshold value when determining that the current first variation degree is greater than a first preset threshold value;
[0083] Alternatively, after the target object is flipped this time, the stall current threshold is lowered.
[0084] Optionally, the reduction module includes a first reduction submodule for reducing the stall current threshold, which is specifically configured to determine a target reduction value corresponding to the current first change degree, and reduce the stall current threshold by the target reduction value.
[0085] Optionally, the reduction module includes a second reduction submodule for reducing the stall current threshold, which is specifically used to determine a target threshold corresponding to the current number of Halls per unit time and reduce the stall current threshold to the target threshold.
[0086] Optionally, the device further comprises:
[0087] A second acquisition module is used to keep the locked-rotor current threshold unchanged if the current first change degree is less than or equal to the first preset threshold, and to obtain the current total Hall number and the current magnetic encoding angle of the motor;
[0088] The second management module is used to manage the stall current and the power-on and power-off status of the motor according to the current total Hall number and the current magnetic encoding angle.
[0089] Optionally, the second management module is specifically used to determine that the target object flipping is completed, reduce the stall current and control the motor to power off if the current total Hall number reaches the reference total Hall number and the current magnetic encoding angle is 0;
[0090] If the current total Hall number does not reach the reference total Hall number and / or the current magnetic encoding angle is not 0, determine the current second change degree of the Hall number per unit time and the Hall number per previous unit time;
[0091] If the current second change degree is greater than the second preset threshold, it is determined that the target object is abnormally turned over midway, the stall current is reduced and the motor is controlled to be powered off.
[0092] The above-mentioned motor control device can obtain the current unit time Hall number of the motor when the motor drives the target object to flip; determine the current first degree of change of the current unit time Hall number relative to the reference unit time Hall number; and manage the stall current threshold according to the current first degree of change. It can be seen that by adopting the above-mentioned technical solution, the stall current threshold can be managed according to the current first degree of change of the current unit time Hall number and the reference unit time Hall number, so that the stall current threshold matches the damping of the flipping device. In this way, when the target object is subsequently stopped, the stall current can reach the stall current threshold faster, thereby cutting off the power to the motor as soon as possible, reducing the risk of excessive flipping force, and thus reducing the risk of shaft gear slippage or breakage.
[0093] For the specific definition of the motor control device, please refer to the definition of the motor control method above, which will not be repeated here. Each module in the above motor control device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0094] In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown. The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a motor control method is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a button, a trackball or a touch pad set on the housing of the electronic device, or an external keyboard, touch pad or mouse, etc.
[0095] Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0096] In one embodiment, the motor control device provided by the present application can be implemented in the form of a computer program. The computer program can be Figure 4 The memory of the electronic device can store various program modules constituting the motor control device, for example, Figure 3 The first acquisition module 310, the first determination module 320, and the first management module 330 are shown. The computer program composed of various program modules enables the processor to execute the steps of the motor control method of each embodiment of the present application described in this specification.
[0097] For example, Figure 4 The electronic device shown can be Figure 3 The first acquisition module 310 in the device shown is executed to obtain the current unit time Hall number of the motor when the motor drives the target object to flip; the first determination module 320 is executed to determine the current first change degree of the current unit time Hall number relative to the reference unit time Hall number; the first management module 330 is executed to manage the stall current threshold according to the current first change degree.
[0098] In one embodiment, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program: when the motor drives the target object to flip, obtaining the current unit time Hall number of the motor; determining the current first degree of change of the current unit time Hall number relative to the reference unit time Hall number; and managing the stall current threshold according to the current first degree of change.
[0099] In one embodiment, the reference unit time Hall number is the average unit time Hall number of the target object during the Nth flipping, or the unit time Hall number of the target object during the Nth flipping corresponding to the current unit time Hall number, wherein the Nth flip is the first flip, or the Nth flip differs from the current flip by a preset number of times.
[0100] In one embodiment, when the processor manages the stall current threshold according to the current first change degree, the following steps are implemented:
[0101] If the current first change degree is greater than the first preset threshold, it is determined to lower the stall current threshold.
[0102] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0103] When it is determined that the current first change degree is greater than the first preset threshold, immediately lowering the locked-rotor current threshold;
[0104] Alternatively, after the target object is flipped this time, the stall current threshold is lowered.
[0105] In one embodiment, lowering the stall current threshold comprises:
[0106] A target reduction value corresponding to the current first degree of change is determined, and the locked-rotor current threshold is reduced by the target reduction value.
[0107] In one embodiment, lowering the stall current threshold comprises:
[0108] Determine the target threshold corresponding to the current number of Halls per unit time, and reduce the stall current threshold to the target threshold.
[0109] In one embodiment, when the processor manages the stall current threshold according to the current first change degree, the processor further implements the following steps:
[0110] If the current first change degree is less than or equal to the first preset threshold, the locked-rotor current threshold is kept unchanged, and the current total Hall number and the current magnetic encoding angle of the motor are obtained;
[0111] According to the current total number of Hall sensors and the current magnetic encoder angle, the stall current and the power-on and power-off status of the motor are managed.
[0112] In one embodiment, when the processor manages the stall current and the power-on and power-off status of the motor according to the current total number of Halls and the current magnetic encoding angle, the following steps are implemented:
[0113] If the current total Hall number reaches the reference total Hall number and the current magnetic encoding angle is 0, it is determined that the target object is flipped, the stall current is reduced, and the motor is controlled to be powered off;
[0114] If the current total Hall number does not reach the reference total Hall number and / or the current magnetic encoding angle is not 0, determine the current second change degree of the Hall number per unit time and the Hall number per previous unit time;
[0115] If the current second change degree is greater than the second preset threshold, it is determined that the target object is abnormally turned over midway, the stall current is reduced and the motor is controlled to be powered off.
[0116] In the above electronic device, when the motor drives the target object to flip, it is possible to obtain the current unit time Hall number of the motor; determine the current first degree of change of the current unit time Hall number relative to the reference unit time Hall number; and manage the stall current threshold according to the current first degree of change. It can be seen that by adopting the above technical solution, the stall current threshold can be managed according to the current first degree of change of the current unit time Hall number and the reference unit time Hall number, so that the stall current threshold matches the damping of the flipping device. In this way, when the target object is subsequently stopped, the stall current can reach the stall current threshold faster, thereby cutting off the power to the motor as soon as possible, reducing the risk of excessive flipping force, and thus reducing the risk of shaft gear slippage or breakage.
[0117] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: when the motor drives the target object to flip, the current unit time Hall number of the motor is obtained; the current first degree of change of the current unit time Hall number relative to the reference unit time Hall number is determined; and the stall current threshold is managed according to the current first degree of change.
[0118] In one embodiment, the reference unit time Hall number is the average unit time Hall number of the target object during the Nth flipping, or the unit time Hall number of the target object during the Nth flipping corresponding to the current unit time Hall number, wherein the Nth flip is the first flip, or the Nth flip differs from the current flip by a preset number of times.
[0119] In one embodiment, when the processor manages the stall current threshold according to the current first change degree, the following steps are implemented:
[0120] If the current first change degree is greater than the first preset threshold, it is determined to lower the stall current threshold.
[0121] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0122] When it is determined that the current first change degree is greater than the first preset threshold, immediately lowering the locked-rotor current threshold;
[0123] Alternatively, after the target object is flipped this time, the stall current threshold is lowered.
[0124] In one embodiment, lowering the stall current threshold comprises:
[0125] A target reduction value corresponding to the current first degree of change is determined, and the locked-rotor current threshold is reduced by the target reduction value.
[0126] In one embodiment, lowering the stall current threshold comprises:
[0127] Determine the target threshold corresponding to the current number of Halls per unit time, and reduce the stall current threshold to the target threshold.
[0128] In one embodiment, when the processor manages the stall current threshold according to the current first change degree, the processor further implements the following steps:
[0129] If the current first change degree is less than or equal to the first preset threshold, the locked-rotor current threshold is kept unchanged, and the current total Hall number and the current magnetic encoding angle of the motor are obtained;
[0130] According to the current total number of Hall sensors and the current magnetic encoder angle, the stall current and the power-on and power-off status of the motor are managed.
[0131] In one embodiment, when the processor manages the stall current and the power-on and power-off status of the motor according to the current total number of Halls and the current magnetic encoding angle, the following steps are implemented:
[0132] If the current total Hall number reaches the reference total Hall number and the current magnetic encoding angle is 0, it is determined that the target object is flipped, the stall current is reduced, and the motor is controlled to be powered off;
[0133] If the current total Hall number does not reach the reference total Hall number and / or the current magnetic encoding angle is not 0, determine the current second change degree of the Hall number per unit time and the Hall number per previous unit time;
[0134] If the current second change degree is greater than the second preset threshold, it is determined that the target object is abnormally turned over midway, the stall current is reduced and the motor is controlled to be powered off.
[0135] In the above-mentioned storable medium, when the motor drives the target object to flip, it is possible to obtain the current unit time Hall number of the motor; determine the current first degree of change of the current unit time Hall number relative to the reference unit time Hall number; and manage the stall current threshold according to the current first degree of change. It can be seen that by adopting the above-mentioned technical solution, the stall current threshold can be managed according to the current first degree of change of the current unit time Hall number and the reference unit time Hall number, so that the stall current threshold matches the damping of the flipping device. In this way, when the target object is subsequently stopped, the stall current can reach the stall current threshold faster, thereby cutting off the power to the motor as soon as possible, reducing the risk of excessive flipping force, and thus reducing the risk of shaft gear slippage or breakage.
[0136] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static random access memory (SRAM) and dynamic random access memory (DRAM).
[0137] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0138] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A motor control method, characterized in that: The method comprises: When the motor drives the target object to flip, the current Hall number per unit time of the motor is obtained; Determining a current first degree of change of the current Hall number per unit time relative to a reference Hall number per unit time; The stall current threshold is managed according to the current first change degree.
2. The method according to claim 1, characterized in that: The reference Hall number per unit time is the average Hall number per unit time of the target object for the Nth flip, or the Hall number per unit time corresponding to the current Hall number per unit time during the Nth flip of the target object, wherein the Nth flip is the first flip, or the difference between the Nth flip and this flip is a preset number of times.
3. The method according to claim 1, characterized in that The managing the stall current threshold according to the current first change degree includes: If the current first change degree is greater than a first preset threshold, it is determined to lower the stall current threshold.
4. The method according to claim 3, characterized in that Also includes: When it is determined that the current first change degree is greater than the first preset threshold, immediately lowering the locked-rotor current threshold; Alternatively, after the target object is flipped over this time, the stall current threshold is lowered.
5. The method according to claim 4, characterized in that The step of lowering the stall current threshold comprises: determining a target reduction value corresponding to the current first degree of change, and reducing the locked-rotor current threshold by the target reduction value; Alternatively, a target threshold corresponding to the current number of Hall effects per unit time is determined, and the stall current threshold is reduced to the target threshold.
6. The method according to claim 1, characterized in that The managing the stall current threshold according to the current first change degree further includes: If the current first change degree is less than or equal to the first preset threshold, the locked-rotor current threshold is kept unchanged, and the current total Hall number and the current magnetic encoding angle of the motor are obtained; The stall current and the power-on and power-off conditions of the motor are managed according to the current total Hall number and the current magnetic encoding angle.
7. The method according to claim 6, characterized in that The managing of the stall current and the power-on and power-off conditions of the motor according to the current total Hall number and the current magnetic encoding angle includes: If the current total Hall number reaches the reference total Hall number and the current magnetic encoding angle is 0, it is determined that the target object is flipped, the stall current is reduced, and the motor is controlled to be powered off; If the current total Hall number does not reach the reference total Hall number and / or the current magnetic encoding angle is not 0, determine the current second change degree of the current Hall number per unit time and the Hall number per previous unit time; If the current second change degree is greater than a second preset threshold, it is determined that the target object is abnormally turned over midway, the stall current is reduced, and the motor is controlled to be powered off.
8. A motor control device, characterized in that: The device comprises: A first acquisition module is used to acquire the current Hall number per unit time of the motor when the motor drives the target object to flip; A first determination module, used to determine a current first change degree of the current Hall number per unit time relative to a reference Hall number per unit time; The first management module is used to manage the stall current threshold according to the current first change degree.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Motor angle determination method and device, electronic equipment and storage medium
CN120034073A
A solenoid valve drive control method, drive, and control system
CN122672596A
