Motor control method and control device
The feedback control method is used to identify the abnormal motor oscillation and adjust the driving signal, which solves the problem of edge tapping during optical anti-shake process, and improves the running stability and service life of the motor.
Patent Information
- Application Number
- CN202411491565.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-07
AI Technical Summary
The motor may have edge-punching during optical anti-shake process, resulting in wear and more serious failure of internal parts, shortening the motor life.
Through the feedback control method, the monitoring data of motor displacement is obtained and the degree of discreteness is calculated. If the preset abnormal conditions are met, the motor oscillation is determined to be abnormal and the driving signal is adjusted, the driving excitation is reduced or the discrete control mode is switched to the open-loop control mode.
Reduce abnormal motor running time, improve running stability, extend the service life of the motor, and prevent wear and failure caused by edge punching.
Smart Images

Figure CN119396047A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of electronic equipment, and more particularly to a control method and a control device for a motor. Background Art
[0002] In recent years, with the development of science and technology, cameras have become increasingly widely used in handheld devices, drones, and other applications, and the requirements for the clarity of captured images have become increasingly higher.
[0003] Optical Image Stabilization (OIS) is one of the important technologies to improve the clarity of photos. It uses the stabilizer inside the lens or the movable lens module to adjust the lens position in real time according to the shaking situation, thereby maintaining the stability of the image and reducing blur and shaking.
[0004] However, during the lens adjustment process, the motor may have abnormal phenomena such as edge rubbing. Motor edge rubbing refers to the collision or friction of the rotor or stator edge during the operation of the motor. If the motor frequently rubs, it will cause serious wear and damage to its internal parts, especially the direct contact parts such as the rotor edge and the inner wall of the stator, and may also cause more serious faults, such as bearing damage, coil burning, etc., which will greatly shorten the life of the motor. Summary of the invention
[0005] In view of this, embodiments of the present application provide a motor control method and a motor control device.
[0006] An embodiment of the present application provides a motor control method, including: controlling a drive signal of the motor based on a feedback control form; obtaining monitoring data indicating the displacement of the motor; calculating a discrete degree parameter of the monitoring data; if the discrete degree parameter meets a preset abnormal condition, determining that the motor oscillation is abnormal, and adjusting the drive signal.
[0007] In some embodiments, the motor control method further includes: if the discrete degree parameter does not meet the abnormal condition, maintaining the feedback control form to control the driving signal.
[0008] In some embodiments, adjusting the driving signal includes:
[0009] Reduce driving incentives;
[0010] And / or, the drive signal is controlled in an open loop control form.
[0011] In some embodiments, the motor control method also includes: if the number of times the discrete degree parameter meets the abnormal condition is less than a preset abnormal number threshold, reducing the drive excitation; if the number of times the discrete degree parameter meets the abnormal condition is equal to the preset abnormal number threshold, switching to open-loop control to control the drive signal.
[0012] In some embodiments, the discrete degree parameter includes: the discrete degree ratio of the monitoring data; calculating the discrete degree parameter of the monitoring data includes: calculating the ratio of the standard deviation of the monitoring data to the range to obtain the discrete degree ratio.
[0013] In some embodiments, if the discrete degree parameter meets the preset abnormal condition, the motor oscillation is determined to be abnormal, and the method for adjusting the drive signal includes: if the discrete degree ratio is greater than or equal to the first preset threshold, the drive signal is adjusted; wherein the first preset threshold is determined by a performance indicator of the feedback control form.
[0014] In some embodiments, the performance indicators of the feedback control form include: stabilization time; the motor control method also includes: determining the maximum adjustment frequency based on the stabilization time; and determining the discrete degree ratio corresponding to the maximum adjustment frequency as the first preset threshold.
[0015] In some embodiments, the discrete degree parameter includes: the range of the monitoring data; the method for calculating the discrete degree parameter of the monitoring data includes: calculating the difference between the maximum value and the minimum value of the monitoring data to obtain the range.
[0016] In some embodiments, if the discrete degree parameter meets the preset abnormal condition, the motor oscillation is determined to be abnormal, and the method for adjusting the drive signal includes: if the extreme difference is greater than or equal to the second preset threshold, updating the value of the preset extreme value counter; in response to the value of the extreme value counter being greater than or equal to the third preset threshold, adjusting the drive signal and clearing the value of the extreme value counter.
[0017] In some embodiments, the motor control method also includes: obtaining time period data, the time period data is the monitoring data of the motor displacement acquired by intercepting the monitoring data within the segmented time length; wherein the segmented time length is determined according to the maximum adjustment frequency and / or the preset jitter frequency corresponding to the feedback control form; the method for calculating the discrete degree parameters of the monitoring data includes: calculating the discrete degree parameters of the time period data.
[0018] An embodiment of the present application also provides a motor control device, which includes: a first control module, used to control the driving signal of the motor based on feedback control; an acquisition module, used to acquire monitoring data indicating the displacement of the motor; a calculation module, used to calculate the discrete degree parameter of the monitoring data; and a second control module, used to determine that the motor oscillation is abnormal and adjust the driving signal if the discrete degree parameter meets a preset abnormal condition.
[0019] In some embodiments, the first control module is further configured to maintain the feedback control form to control the driving signal if the discrete degree parameter does not satisfy the abnormal condition.
[0020] In some embodiments, the second control module is specifically used to reduce the driving excitation; or, the second control module is specifically used to switch to an open-loop control form to control the driving signal.
[0021] In some embodiments, the motor control device also includes: a third control module, which is used to switch to open-loop control to control the drive signal if the number of times the discrete degree parameter meets the abnormal condition is equal to a preset abnormal number threshold; the first control module is specifically used to clear the abnormal number if the discrete degree parameter does not meet the abnormal condition.
[0022] In some embodiments, the discrete degree parameter includes: the discrete degree ratio of the monitoring data; the calculation module is specifically used to calculate the ratio of the standard deviation and the range of the monitoring data to obtain the discrete degree ratio.
[0023] In some embodiments, the second control module is specifically configured to adjust the drive signal if the discrete degree ratio is greater than or equal to a first preset threshold; wherein the first preset threshold is determined by a performance indicator in the form of feedback control.
[0024] In some embodiments, the performance indicators of the feedback control form include: stabilization time; the control device also includes a preset module for determining the maximum adjustment frequency according to the stabilization time; and determining the discrete degree ratio corresponding to the maximum adjustment frequency as the first preset threshold.
[0025] In some embodiments, the discrete degree parameter includes: a range of the monitoring data; the calculation module is specifically used to calculate the difference between the maximum value and the minimum value of the monitoring data to obtain the range.
[0026] In some embodiments, the second control module is specifically used to update the value of the preset counter if the range is greater than or equal to the second preset threshold; in response to the counter value being greater than or equal to the third preset threshold, adjust the drive signal and clear the counter value.
[0027] In some embodiments, the acquisition module is specifically used to acquire time period data, where the time period data is the monitoring data of the motor displacement acquired by intercepting the monitoring data within the segmented duration; wherein the segmented duration is determined according to the maximum adjustment frequency and / or the preset jitter frequency corresponding to the feedback control form; the calculation module is specifically used to calculate the discrete degree parameter of the time period data.
[0028] An embodiment of the present application also provides an electronic device, including: a processor and a memory for storing computer instructions for running on the processor; the processor is used to execute the above-mentioned motor control method when running the computer instructions.
[0029] The motor control method in the embodiment of the present application obtains monitoring data indicating the displacement of the motor, and identifies the discrete degree of the monitoring data by calculating the discrete degree parameter, and determines whether the motor has abnormal oscillation or edge beating according to the comparison between the discrete degree parameter and the preset abnormal condition. If the discrete degree parameter of the monitoring data meets the preset abnormal condition, the drive signal of the motor is adjusted in time to reduce the abnormal operation time of the motor, improve the stability of the motor operation, and increase the service life of the motor. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 The steps of the motor control method in the embodiment of the present application are as follows: Figure 1 ;
[0031] Figure 2 The steps of the motor control method in the embodiment of the present application are as follows: Figure 2 ;
[0032] Figure 3 The steps of the motor control method in the embodiment of the present application are as follows: Figure 3 ;
[0033] Figure 4 The steps of the motor control method in the embodiment of the present application are as follows: Figure 4 ;
[0034] Figure 5 A corresponding relationship diagram between the maximum adjustment frequency and the first preset threshold value in an embodiment of the present application;
[0035] Figure 6 A schematic flow chart of a method for controlling a motor of a control device in an embodiment of the present application;
[0036] Figure 7 This is a schematic diagram of the structure of the control device in the embodiment of the present application;
[0037] Figure 8 Schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The following will be combined with the embodiments of the present application and the accompanying drawings to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0039] In the following description, a large number of specific details are given to provide a more thorough understanding of the present application. However, it is obvious to those skilled in the art that the present application can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present application, some technical features known in the art are not described; that is, all features of the actual embodiments are not described here, and well-known functions and structures are not described in detail.
[0040] The purpose of the terms used herein is only to describe specific embodiments and is not intended to be limiting of the present application. When used herein, the singular forms "one", "an" and "said / the" are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "consisting of" and / or "comprising", when used in this specification, determine the presence of the features, integers, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, parts and / or groups. When used herein, the term "and / or" includes any and all combinations of the relevant listed items.
[0041] In order to thoroughly understand the present application, detailed steps and detailed structures will be presented in the following description to illustrate the technical solution of the present application. The preferred embodiments of the present application are described in detail below, but in addition to these detailed descriptions, the present application may also have other implementation methods.
[0042] Optical image stabilization is a technology that uses physical means to reduce the impact of camera shake on image quality. Specifically, when the camera shakes, the processor calculates the displacement that needs to be compensated and moves the lens group or the entire lens module in the lens through the motor to offset the shake of the camera. In this way, clear and stable images can be captured even when shooting handheld or in dynamic environments.
[0043] However, during the control process of the motor, abnormal conditions such as motor edge breaking may occur, which will not only cause wear on the motor itself, but also affect the control accuracy of the motor, thereby aggravating the damage to the motor.
[0044] In view of this, an embodiment of the present application provides a motor control method, such as Figure 1 As shown, the motor control method includes: steps S101 to S104.
[0045] S101: Controlling the driving signal of the motor based on feedback control.
[0046] S102: Acquire monitoring data indicating motor displacement.
[0047] S103: Calculate the discrete degree parameter of the monitoring data.
[0048] S104: If the discrete degree parameter meets the preset abnormal condition, the motor oscillation is considered abnormal and the drive signal is adjusted.
[0049] Feedback control refers to a control relationship in which the output of the motor is returned to the input of the system in a certain way and a control influence is exerted on the input. The feedback control form adjusts the control behavior of the motor system through feedback information so that the output of the motor system can meet the expected requirements. Specifically, the feedback control form can be one of the following control forms: proportional (P) control form, proportional-integral (PI) control form, proportional-integral-derivative (PID) control form, fuzzy control form, adaptive control form, robust control form and optimal control form.
[0050] In some embodiments, a Hall sensor may be used to monitor the displacement of the motor, and an electrical signal output by the Hall sensor may be obtained as monitoring data. It is understood that the embodiments of the present application do not limit the specific type of sensor for monitoring the displacement of the motor and the specific form of the monitoring data.
[0051] In this embodiment, the dispersion parameter is used to characterize the oscillation level of the motor, which may include range, variance, standard deviation, coefficient of variation or a function of their components.
[0052] Specifically, the discrete degree parameter meets the preset abnormal conditions, that is, the monitoring data undergoes a sudden change within a period of time. For example, if the monitoring data shows high-frequency changes or fluctuations over a large range, it is determined that the motor oscillation is abnormal, and the motor is very likely to have an edge-breaking situation. At this time, the motor drive signal is no longer controlled based on the original feedback control form through the output feedback information, but the motor drive signal is directly adjusted. Exemplarily, the absolute value of the input current can be reduced, or the absolute value of the input voltage can be reduced, or the duty cycle of the pulse signal can be reduced, or the feedback control form can be switched to an open-loop control form, so that the motor drive signal is not affected by the output feedback information.
[0053] The motor control method provided in the embodiment of the present application obtains monitoring data indicating the displacement of the motor, and identifies the discrete degree of the monitoring data by calculating the discrete degree parameter, and determines whether the motor has abnormal oscillation or edge-breaking according to the comparison between the discrete degree parameter and the preset abnormal condition. If the discrete degree parameter of the monitoring data meets the preset abnormal condition, the driving signal of the motor is adjusted in time to reduce the abnormal operation time of the motor, improve the stability of the motor operation, and increase the service life of the motor.
[0054] It should be noted that the motor control method provided in the embodiment of the present application can not only determine the abnormal oscillation of the motor caused by external collision, but also identify the abnormal vibration caused by the control loop that may perform abnormal control on the motor.
[0055] In some embodiments, Figure 2 As shown, the motor control method further includes: step S201.
[0056] S201: If the discrete degree parameter does not meet the abnormal condition, the feedback control form is maintained to control the driving signal.
[0057] The corresponding discrete degree parameter is calculated based on the acquired monitoring data. If the discrete degree parameter does not meet the preset abnormal condition, it is considered that the motor is operating normally, and the original feedback control form is maintained to control the motor drive signal.
[0058] In some embodiments, after adjusting the driving signal of the motor, the abnormal oscillation of the motor may be alleviated or may be restored to normal operation. In order to determine the control form of the subsequent driving signal, it is necessary to further determine the operation of the motor after adjusting the driving signal.
[0059] After adjusting the drive signal, the monitoring data indicating the motor displacement is re-acquired based on the adjusted drive signal, and the monitoring data is different from the monitoring data acquired before the drive signal is adjusted. If the discrete degree parameter of the adjusted monitoring data does not meet the abnormal condition, it is considered that the motor operation has returned to normal, and the original feedback control form can be maintained to control the motor drive signal.
[0060] In some embodiments, in the above step S104, adjusting the driving signal includes step S301 and / or step S302.
[0061] Step S301: reducing the driving excitation.
[0062] The driving excitation includes the absolute value of the driving current or the driving voltage, and reducing the duty cycle of the pulse signal.
[0063] Specifically, the drive current can directly affect the torque of the motor. In some embodiments, reducing the drive current can reduce the motor torque or speed. Since the torque is proportional to the drive current, when the drive current is reduced, the torque is reduced and the speed is reduced. Similarly, in some other embodiments, reducing the drive voltage can also reduce the motor speed.
[0064] It should be noted that the driving excitation in the embodiment of the present application does not limit the degree of reduction of the absolute value of the driving current or driving voltage. The driving current or driving voltage may be reduced by a certain percentage, or may be directly reduced to zero.
[0065] It is understood that in some other embodiments, in the above step S104, adjusting the driving signal may also include: reducing the duty cycle of the pulse signal. If a pulse width modulation signal is used to control the motor, the average voltage across the motor may be reduced by reducing the duty cycle of the pulse signal, thereby reducing the motor speed. Similarly, the pulse duty cycle may also be reduced to zero.
[0066] Step S302: controlling the driving signal in an open-loop control manner.
[0067] Specifically, open-loop control, also known as non-feedback control, is a control method that allows the motor to reach a desired state without feedback information. The output signal of the control system depends on the preset control information and will not be adjusted according to the feedback information of the motor.
[0068] If the monitoring data shows high-frequency changes or large-scale fluctuations, and the motor drive signal is still controlled through feedback control, the control system will be unable to judge the current state and deviation, seriously affecting the control accuracy and system stability. Switching the feedback control form to open-loop control can simplify the control logic, avoid amplifying error information, and improve system stability.
[0069] In some embodiments, Figure 3 As shown, after executing the above step S103, it is determined whether the discrete parameter meets the preset abnormal condition. If the discrete degree parameter meets the preset abnormal condition, step S301 and / or S302 are executed: the driving excitation is reduced, and / or the driving signal is controlled in an open-loop control form. If the discrete degree parameter does not meet the preset abnormal condition, step S201 is executed: the driving signal is controlled in a feedback control form.
[0070] In some embodiments, adjusting the driving signal only includes reducing the driving excitation, and the above step S104 specifically includes: if the discrete degree parameter meets the preset abnormal condition, and the number of times the discrete degree parameter meets the abnormal condition is less than the preset abnormal number threshold N, then the driving excitation is reduced by a first reduction amplitude. If the discrete degree parameter meets the preset abnormal condition, and the number of times the discrete degree parameter meets the abnormal condition is equal to the preset abnormal number threshold N, then the driving excitation is reduced by a second reduction amplitude. Among them, the first reduction amplitude and the second reduction amplitude are not equal, and the reduction amplitude refers to: the degree of reduction of the driving excitation (absolute value of driving current / absolute value of driving voltage / duty cycle) after adjustment relative to the driving excitation before the adjustment. Exemplarily, when the discrete degree parameter meets the preset abnormal condition, if the number of times the discrete degree parameter meets the abnormal condition is less than the preset abnormal number threshold N, then the driving excitation is reduced by 50%; if the number of times the discrete degree parameter meets the abnormal condition is equal to the preset abnormal number threshold N, then the driving excitation is reduced by 80%.
[0071] In some other embodiments, if the number of times the discrete degree parameter meets the abnormal condition is equal to the preset abnormal number threshold N, the drive excitation is directly adjusted to zero. It is understandable that the above step S104 may also directly reduce the drive excitation without determining the specific number of times the abnormal condition is met.
[0072] In some embodiments, adjusting the driving signal only includes controlling the driving signal in an open-loop control form. Then the above step S104 specifically includes: if the discrete degree parameter meets the abnormal condition, directly switching to the open-loop control form to control the driving signal.
[0073] In some embodiments, adjusting the driving signal includes reducing the driving excitation (step S301) and controlling the driving signal in an open-loop control form (step S302). The above steps S301 and S302 specifically include: steps S401 and S402:
[0074] Step S401: if the number of times the discrete degree parameter meets the abnormal condition is less than a preset abnormal number threshold N, then the driving excitation is reduced;
[0075] Step S402: If the number of times that the discrete degree parameter meets the abnormal condition is equal to the preset abnormal number threshold N, the drive signal is switched to an open-loop control mode.
[0076] For the monitoring data before or after adjusting the driving signal, its discrete degree parameter may meet the abnormal condition. If the number of times the discrete degree parameter meets the abnormal condition is less than the preset abnormal number threshold N, the driving excitation is reduced. If the number of times the discrete degree parameter meets the abnormal condition is equal to the preset abnormal number threshold N, the driving signal is switched to open-loop control.
[0077] In some embodiments, in the above step S201, if the discrete degree parameter of the monitoring data does not meet the abnormal condition, it specifically includes step S403: clearing the number of abnormal times and maintaining the feedback control form to control the driving signal.
[0078] It should be noted that the initial value of the number of abnormalities can be set to 0, and the preset threshold value N of the number of abnormalities can be 1 or more times. Figure 4 Provide detailed explanation.
[0079] In some embodiments, if the preset abnormal number threshold N is 1, that is, when the discrete degree parameter meets the abnormal condition for the first time, the feedback control form is switched to the open-loop control form to control the driving signal.
[0080] Specifically, after executing the above step S102 and obtaining the monitoring data data1, step S103 is executed to calculate the discrete degree parameter of the monitoring data data1. If the discrete degree parameter of the monitoring data data1 meets the abnormal condition, and the number of times the discrete degree parameter meets the abnormal condition is 1, that is, the number of times the discrete degree parameter meets the abnormal condition is equal to the preset abnormal number threshold N=1, then step S402 is performed: switch to open-loop control to control the drive signal of the motor. If the discrete degree parameter of the monitoring data data1 does not meet the abnormal condition, step S403 is performed: clear the abnormal number, and maintain the feedback control form to control the drive signal.
[0081] It should be noted that, since the preset abnormal number threshold N is 1, the determination of the abnormal number can be omitted in this embodiment.
[0082] In other embodiments, if the preset abnormal number threshold N≥2 times, the determination of the abnormal number cannot be omitted. After each execution of step S103, it is necessary to determine whether the discrete degree parameter meets the abnormal condition.
[0083] If the discrete degree parameter does not meet the abnormal condition, step S403 is executed: the number of abnormal times is cleared, and the driving signal is controlled in the feedback control form.
[0084] If the discrete degree parameter meets the abnormal condition, step S401 or S402 is executed. Specifically, if the discrete degree parameter meets the abnormal condition, the abnormal number is increased by 1. After the abnormal number is updated, it is necessary to determine whether the updated abnormal number is equal to the preset abnormal number threshold N. If the updated abnormal number is not equal to the abnormal number threshold N, step S401 is executed: reduce the driving excitation to adjust the driving signal. If the updated abnormal number is equal to the abnormal number threshold N, step S402 is executed: switch to open-loop control to control the driving signal.
[0085] In a specific embodiment, the preset abnormal number threshold N is 2 times. Figure 4 When the discrete degree parameter meets the abnormal condition for the first time, the driving signal is adjusted by reducing the driving excitation; when the abnormal condition is met for the second time, the driving signal is switched to the open-loop control form.
[0086] Specifically, after obtaining the monitoring data data2, step S103 is executed to calculate the discrete degree parameter of the obtained monitoring data data2. If the discrete degree parameter of the monitoring data data2 meets the abnormal condition, the abnormal number is increased by 1, and the updated abnormal number is 1. Then it is determined whether the updated abnormal number is equal to the preset abnormal number threshold N=2. If the updated abnormal number (1 time) is not equal to the preset abnormal number threshold N=2, step S401 is executed: the first drive signal is adjusted to reduce the drive excitation. After the driving signal is adjusted for the first time, step S103 is executed again to calculate the discrete degree parameter of the monitoring data data3 obtained after the first adjustment. If the discrete degree parameter of the monitoring data data3 after the first adjustment still meets the abnormal condition, the abnormal number is increased by 1, the updated abnormal number is 2 times, and the number of times the discrete degree parameter meets the abnormal condition is equal to the preset abnormal number threshold N=2. At this time, step S402 is executed: switch to the open-loop control form to control the driving signal. If the discrete degree parameter does not meet the abnormal condition, the feedback control form is maintained. That is, when the discrete degree parameter corresponding to the monitoring data data2 before the first adjustment does not meet the abnormal condition, or when the discrete degree parameter corresponding to the monitoring data data3 after the first adjustment does not meet the abnormal condition, step S403 is executed: the number of abnormal times is cleared, and the feedback control form is maintained to control the driving signal of the motor, that is, return to S103.
[0087] In some embodiments, the motor control method also includes: obtaining time period data, the time period data is the monitoring data of the motor displacement acquired by intercepting the monitoring data within the segmented time length; wherein the segmented time length is determined according to the maximum adjustment frequency and / or the preset jitter frequency corresponding to the feedback control form; calculating the discrete degree parameters of the monitoring data includes: calculating the discrete degree parameters of the time period data.
[0088] In this embodiment, the maximum adjustment frequency f corresponding to the feedback control form is max Refers to the highest frequency of the input signal that the system can stably track, which reflects the control performance of this feedback control form to a certain extent. The preset jitter frequency can be set to the human hand jitter frequency.
[0089] In some embodiments, the segment duration can be determined according to the maximum adjustment frequency corresponding to the feedback control form and the preset shaking frequency. Exemplarily, the segment duration T is set to be greater than the inverse of the maximum adjustment frequency and less than the inverse of the human hand shaking frequency.
[0090] Specifically, the acquired monitoring data is processed in segments according to the determined segment duration. The embodiments of the present application provide several specific ways of segment processing, and do not limit the specific ways of segment processing.
[0091] In some embodiments, the segment duration is fixed and equal to the step length, that is, the acquired monitoring data is continuously segmented into equal length segments. Exemplarily, the monitoring data within 1 second is evenly divided into 100 time period data, each time period data includes monitoring data within 10 ms, and the 100 time period data do not overlap.
[0092] In other embodiments, the segment duration and the step length are fixed values, and the segment duration is smaller than the step length. For example, the segment duration is set to 10ms and the step length is set to 20ms, that is, the monitoring data within 10ms is taken as the time period data every 20ms, that is, the interval between each two adjacent time period data is intercepted.
[0093] In some other embodiments, the segment duration and the step length are fixed values, and the segment duration is greater than the step length. For example, if the segment duration can be set to 10ms and the step length can be set to 5ms, half of the data in each adjacent time period overlaps.
[0094] It should be noted that, in some embodiments, the segment duration and step length may not be fixed values, that is, the segment durations corresponding to multiple adjacent time period data may also be different. For example, the segment duration corresponding to the previous time period data is 10ms, and the segment duration corresponding to the adjacent subsequent time period data may be 20ms or 5ms. The specific numerical settings of the segment duration and step length can be adjusted according to actual needs, as long as the segment duration satisfies the requirement of being greater than the inverse of the maximum adjustment frequency corresponding to the feedback control form, or less than the inverse of the preset jitter frequency.
[0095] This embodiment intercepts multiple segmented time lengths and calculates the discrete degree parameters of the time period data within each segmented time length, that is, obtains the discrete degree parameters in the form of reducing the total statistical time length of a single data. This can more accurately obtain the vibration state of the motor in a short period of time, and thus can more accurately determine whether there is abnormal oscillation in the motor during the vibration process.
[0096] In some embodiments, the discrete degree parameter includes: the discrete degree ratio of the monitoring data; step S103 (calculating the discrete degree parameter of the monitoring data) in the above method includes: calculating the ratio of the standard deviation of the monitoring data to the range to obtain the discrete degree ratio.
[0097] In this embodiment, the dispersion ratio is defined as the ratio of the standard deviation of the monitoring data to the range, which reflects the proportion of the dispersion of the monitoring data to the range of the monitoring data.
[0098] Among them, the range is the difference between the maximum value and the minimum value. The calculation formula of the standard deviation can refer to Formula 1:
[0099]
[0100] Where σ is the standard deviation, N is the total number of data points, and x i is the sampling data point and μ is the mean value of the data.
[0101] For example, the time period data is 10 data points collected within 10ms. By calculating the standard deviation and range of the 10 data points, the dispersion ratio can be determined. By comparing the dispersion ratio with the abnormal condition, it can be determined whether the motor has abnormal oscillation in this 10ms.
[0102] In some embodiments, step S104 in the above method (if the discrete degree parameter meets the preset abnormal condition, the motor oscillation is deemed abnormal and the drive signal is adjusted) includes: if the discrete degree ratio is greater than or equal to the first preset threshold, the drive signal is adjusted; wherein the first preset threshold is determined by a performance indicator of the feedback control form.
[0103] It should be noted that the first preset threshold is determined by the performance index of the feedback control form. Based on the same feedback control form, if the performance index is different, the corresponding first preset threshold is also different.
[0104] If the discreteness ratio of the monitoring data is greater than or equal to the first preset threshold, that is, the discreteness parameter meets the abnormal condition, the motor oscillation is considered abnormal, and the drive signal can be directly adjusted to protect the motor.
[0105] In some embodiments, the performance indicators of the feedback control form include: stabilization time; the motor control method also includes: determining the maximum adjustment frequency based on the stabilization time; and determining the discrete degree ratio corresponding to the maximum adjustment frequency as the first preset threshold.
[0106] Specifically, the feedback control form may include multiple performance indicators, such as stabilization time, response time, or maximum adjustment frequency. s It refers to the time required for the system to receive a signal and for the output to reach and remain in a stable state.
[0107] In the feedback control form, the settling time t s and the maximum adjustment frequency f max There is a certain constraint relationship between them. It can be determined by the stabilization time t s Determine the maximum regulation frequency f in the feedback control form max For example, the stabilization time t s and the maximum adjustment frequency f max The following formula 2 is satisfied:
[0108]
[0109] In a specific embodiment, the feedback control form is a PID control form, and its corresponding stable time ts =0.001s, then the maximum adjustment frequency f can be determined according to the above formula 2 max =250Hz. The oscillation level varies with the maximum adjustment frequency. Figure 5 is a corresponding relationship diagram between different maximum adjustment frequencies and the first preset threshold. Figure 5 As shown, when the maximum adjustment frequency is 250 Hz, the corresponding first preset threshold is 0.056.
[0110] Figure 6 is a flow chart of the motor control method in this embodiment, wherein the initial value of the abnormal number is 0, and the abnormal number threshold N is 2. Figure 6 As shown, after executing step S601 and determining that the first preset threshold is 0.056, step S602 is executed to calculate the discrete degree ratio A1 of the monitoring data within the segment duration. When the discrete degree ratio A1 of the monitoring data within the segment is less than 0.056, the discrete degree ratio does not meet the abnormal condition, and it is considered that the motor is running normally, then step S603 is executed to clear the abnormal number of times, and maintain the PID control form to control the driving signal of the motor. When the discrete degree ratio A1 of the monitoring data within the segment is greater than or equal to 0.056, the discrete degree ratio meets the abnormal condition, then step S604 is executed to determine that the motor oscillation is abnormal. In addition, the number of abnormal times is increased by 1, and the number of times the discrete degree ratio meets the abnormal condition is 1, which is less than the abnormal number threshold N, and the driving signal is adjusted. Specifically, the driving excitation can be directly reduced to slow down or eliminate the abnormal oscillation. After this adjustment, step S605 is executed to obtain the monitoring data within the next segment duration, and the discrete degree ratio A2 of the monitoring data within the segment is calculated. If the discrete degree ratio A2 is still greater than or equal to 0.056, step S606 is executed and it is considered that the motor oscillation abnormality has not been eliminated. In addition, the number of abnormal times is increased by 1, and the number of times the discrete degree ratio meets the abnormal condition is 2 times, which is equal to the abnormal number threshold N, and the open-loop control form is switched to control the motor drive signal. If the discrete degree ratio A2 is less than 0.056, step S603 is executed, and it is considered that the motor has resumed normal operation, then the number of abnormal times is cleared, and the PID control form is maintained to control the motor drive signal. In the process of controlling the motor based on the PID control form, the monitoring data is acquired by real-time acquisition, and the discrete degree ratio of the monitoring data is calculated in segments. Based on the comparison result between the calculation result and the first preset threshold value, it can be determined whether the motor has abnormal oscillation during the time period.
[0111] It should be noted that the embodiment of the present application does not limit the method for determining the maximum adjustment frequency, nor does it limit the specific correspondence between the maximum adjustment frequency and the first preset threshold. In some embodiments, the maximum adjustment frequency can be determined according to the operating frequency or anti-shake frequency of the system, and the correspondence between the maximum adjustment frequency and the first preset threshold can be determined according to corresponding theoretical analysis and calculation.
[0112] In some embodiments, the discrete degree parameter includes: the range of the monitoring data; step S103 (calculating the discrete degree parameter of the monitoring data) in the above method includes: calculating the difference between the maximum value and the minimum value of the monitoring data to obtain the range.
[0113] In this embodiment, the range reflects the fluctuation range of the monitoring data. Specifically, the larger the range of the monitoring data, the larger the fluctuation range of the monitoring data, and the greater the discreteness of the monitoring data; the smaller the range of the monitoring data, the smaller the fluctuation range of the monitoring data, and the smaller the discreteness of the monitoring data.
[0114] In some embodiments, step S104 in the above method (if the discrete degree parameter meets the preset abnormal condition, the motor oscillation is deemed abnormal and the drive signal is adjusted) includes: if the extreme difference is greater than or equal to the second preset threshold, the value of the preset extreme value counter is updated; in response to the value of the extreme value counter being greater than or equal to the third preset threshold, the drive signal is adjusted and the value of the extreme value counter is cleared.
[0115] Specifically, the second preset threshold and the third preset threshold can be determined according to actual needs.
[0116] For a certain period of time data, when the range is greater than or equal to the second preset threshold, it is considered that the motor may have an abnormal oscillation phenomenon during the period corresponding to the period of time data, and the value of the preset extreme value counter is updated and the range of the next period of time data is continued to be calculated. For example, the value of the counter is increased by one.
[0117] For multiple consecutive time period data, when the value of the extreme value counter is greater than or equal to the third preset threshold, that is, the discrete degree parameter meets the abnormal condition, it is considered that the motor has an abnormal oscillation phenomenon during this period, and it is necessary to directly adjust the drive signal to control the motor. For example, reduce the absolute value of the drive current or drive voltage. In some embodiments, in response to the value of the counter being less than the third preset threshold, the calculation of the extreme difference within the next preset time period is continued.
[0118] Exemplarily, the third preset threshold is set to 2. For multiple consecutive time period data, when the value of the extreme value counter is greater than or equal to 2, that is, the discrete degree parameter meets the abnormal condition, it is considered that the motor has an abnormal oscillation phenomenon. At this time, timely remedies are taken by reducing the driving excitation to protect the motor, reduce the risk of damage to the motor due to edge breaking, and extend the service life of the motor.
[0119] It should be noted that the embodiment of the present application does not limit the specific values of the second preset threshold and the third preset threshold, which can be adjusted according to actual requirements such as control accuracy.
[0120] The motor control method provided in the embodiment of the present application obtains monitoring data indicating the displacement of the motor, and identifies the discrete degree of the monitoring data by calculating the discrete degree parameter, and determines whether the motor has abnormal oscillation or edge-breaking according to the comparison between the discrete degree parameter and the preset abnormal condition. If the discrete degree parameter of the monitoring data meets the preset abnormal condition, the driving signal of the motor is adjusted in time to reduce the abnormal operation time of the motor, improve the stability of the motor operation, and increase the service life of the motor.
[0121] Based on the same inventive concept, another embodiment of the present application further provides a motor control device, such as Figure 7 As shown, the control device 701 includes: a first control module 702, which is used to control the driving signal of the motor based on the feedback control form; an acquisition module 703, which is used to obtain monitoring data indicating the displacement of the motor; a calculation module 704, which is used to calculate the discrete degree parameter of the monitoring data; a second control module 705, which is used to determine that the motor oscillation is abnormal and adjust the driving signal if the discrete degree parameter meets the preset abnormal condition.
[0122] The motor control device provided in the embodiment of the present application calculates the discrete degree parameter of the monitoring data obtained by the acquisition module through the calculation module, and identifies the discrete degree of the monitoring data. Then, based on the comparison between the discrete degree parameter and the preset abnormal condition, it is determined whether the motor has abnormal oscillation or edge-breaking phenomenon. If the discrete degree parameter of the monitoring data does not meet the preset abnormal condition, the first control module maintains the feedback control form to control the drive signal of the motor. If the discrete degree parameter of the monitoring data meets the preset abnormal condition, the second control module timely adjusts the drive signal of the motor to reduce the time of abnormal operation of the motor, improve the stability of the motor operation, and increase the service life of the motor.
[0123] In some embodiments, the first control module is further configured to maintain the feedback control form to control the driving signal if the discrete degree parameter does not satisfy the abnormal condition.
[0124] In some embodiments, the second control module is specifically used to reduce the driving excitation; or, the second control module is specifically used to switch to an open-loop control form to control the driving signal.
[0125] In some embodiments, the motor control device also includes: a third control module, which is used to switch to open-loop control to control the drive signal if the number of times the discrete degree parameter meets the abnormal condition is equal to a preset abnormal number threshold; the first control module is specifically used to clear the abnormal number if the discrete degree parameter does not meet the abnormal condition.
[0126] In some embodiments, the discrete degree parameter includes: the discrete degree ratio of the monitoring data; the calculation module is specifically used to calculate the ratio of the standard deviation and the range of the monitoring data to obtain the discrete degree ratio.
[0127] In some embodiments, the second control module is specifically configured to adjust the drive signal if the discrete degree ratio is greater than or equal to a first preset threshold; wherein the first preset threshold is determined by a performance indicator in the form of feedback control.
[0128] In some embodiments, the performance indicators of the feedback control form include: stabilization time; the control device also includes a preset module for determining the maximum adjustment frequency according to the stabilization time; and determining the discrete degree ratio corresponding to the maximum adjustment frequency as the first preset threshold.
[0129] In some embodiments, the discrete degree parameter includes: a range of the monitoring data; the calculation module is specifically used to calculate the difference between the maximum value and the minimum value of the monitoring data to obtain the range.
[0130] In some embodiments, the second control module is specifically used to update the value of the preset counter if the range is greater than or equal to the second preset threshold; in response to the counter value being greater than or equal to the third preset threshold, adjust the drive signal and clear the counter value.
[0131] In some embodiments, the acquisition module is specifically used to acquire time period data, where the time period data is the monitoring data of the motor displacement acquired by intercepting the monitoring data within the segmented duration; wherein the segmented duration is determined according to the maximum adjustment frequency and / or the preset jitter frequency corresponding to the feedback control form; the calculation module is specifically used to calculate the discrete degree parameter of the time period data.
[0132] Based on the same inventive concept, another embodiment of the present application further provides an electronic device, such as Figure 8 As shown, the electronic device 801 includes: a processor 802 and a memory 803 for storing computer instructions running on the processor; the processor 802 is used to execute the above-mentioned motor control method when running the computer instructions. Since the computer instructions can implement the above-mentioned motor control method when executed by the processor, the electronic device has similar beneficial technical effects as the above-mentioned motor control method. Therefore, the beneficial effects of the electronic device will not be repeated here.
[0133] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0134] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0135] The various embodiments / implementations provided in this application can be combined with each other without causing any contradiction.
[0136] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A motor control method, characterized in that: include: Controlling a drive signal of the motor based on a feedback control form; acquiring monitoring data indicative of displacement of the motor; Calculating a discrete degree parameter of the monitoring data; If the discrete degree parameter meets the preset abnormal condition, the motor oscillation is deemed abnormal and the drive signal is adjusted.
2. The control method according to claim 1, characterized in that: Also includes: If the discrete degree parameter does not satisfy the abnormal condition, the feedback control form is maintained to control the driving signal.
3. The control method according to claim 1, characterized in that: The adjusting the driving signal comprises: Reduce driving incentives; And / or, the drive signal is controlled in an open loop control form.
4. The control method according to claim 3, characterized in that: The adjusting the driving signal specifically includes: If the number of times that the discrete degree parameter satisfies the abnormal condition is less than a preset abnormal number threshold, reducing the driving incentive; If the number of times that the discrete degree parameter satisfies the abnormal condition is equal to a preset abnormal number threshold, the drive signal is controlled in an open-loop control mode.
5. The control method according to any one of claims 1 to 4, characterized in that: The discrete degree parameter includes: the discrete degree ratio of the monitoring data; The calculating of the discrete degree parameter of the monitoring data includes: calculating the ratio of the standard deviation to the range of the monitoring data to obtain the discrete degree ratio.
6. The control method according to claim 5, characterized in that: If the discrete degree parameter satisfies a preset abnormal condition, the motor oscillation is determined to be abnormal, and the drive signal is adjusted, including: If the discrete degree ratio is greater than or equal to a first preset threshold, the drive signal is adjusted; wherein the first preset threshold is determined by a performance indicator of the feedback control form.
7. The control method according to claim 6, characterized in that: The performance indicators of the feedback control form include: stabilization time; The control method further comprises: Determining a maximum adjustment frequency according to the stabilization time; The discrete degree ratio corresponding to the maximum adjustment frequency is determined as the first preset threshold.
8. The control method according to any one of claims 1 to 4, characterized in that: The discrete degree parameters include: the range of the monitoring data; The calculating of the discrete degree parameter of the monitoring data includes: calculating the difference between the maximum value and the minimum value of the monitoring data to obtain the range.
9. The control method according to any one of claims 1 to 4, characterized in that: The control method further comprises: Acquire time period data, wherein the time period data is the monitoring data within the segmented time length of the acquired monitoring data of the motor displacement; Wherein, the segment duration is determined according to the maximum adjustment frequency and / or the preset jitter frequency corresponding to the feedback control form; The calculating the discrete degree parameter of the monitoring data includes: calculating the discrete degree parameter of the time period data.
10. A motor control device, characterized in that: include: A first control module, configured to control a driving signal of the motor based on a feedback control form; An acquisition module, used for acquiring monitoring data indicating the displacement of the motor in real time; A calculation module, used for calculating the discrete degree parameter of the monitoring data; The second control module is used to determine that the motor oscillation is abnormal and adjust the drive signal if the discrete degree parameter meets a preset abnormal condition.