Method, device, electronic device and storage medium for detecting motor resonance frequency
By using a preset driving signal with constant amplitude and frequency to drive the motor and cancel the excitation detection current signal cycle, the problems of high cost and low efficiency of motor resonance frequency detection in the prior art are solved, and low cost, fast and accurate Detection effect.
Patent Information
- Application Number
- CN202210033711.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-12
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-01-12
AI Technical Summary
The prior art is difficult to achieve accurate, fast and low-cost motor resonance frequency detection, and the detection equipment is relatively expensive, which affects the mass production consistency of linear resonance actuators.
The motor to be detected is driven to resonately move with a constant amplitude and frequency. After the excitation is cancelled, the resonant frequency is determined through the period of the current signal. Only a current sensor is required, no additional expensive devices are required, and the detection time is shortened.
It realizes low-cost, fast and accurate motor resonance frequency detection, reduces detection costs, improves detection efficiency, and is suitable for batch inspection and parameter calibration.
Smart Images

Figure CN114705910B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of linear motor technology, and specifically to a method, device, electronic device and storage medium for detecting the resonant frequency of a motor. Background Art
[0002] Tactile feedback can provide a third sensory experience in addition to vision and hearing, and has a wide range of applications in the field of consumer electronics, such as vibration reminders in mobile phones, vibration tactile simulation on game controllers, vibration feedback of AR / VR products, etc. The Linear Resonant Actuator (LRA) has become the mainstream tactile feedback motor due to its strong, rich, crisp vibration and low energy consumption.
[0003] In the manufacturing process of LRA, due to the limitations of materials, design, processing technology and other factors, it is difficult to ensure the complete consistency of the structure and vibration characteristics of mass-produced LRA, which is usually manifested as inconsistent resonant frequency. Therefore, under the same control signal, it is impossible to output vibration feedback with consistent intensity and crispness. Therefore, it is necessary to detect the resonant frequency of the motor.
[0004] The existing methods for detecting the motor resonant frequency are mainly offline, and the excitation signal is generally a preset specific broadband signal. However, this detection method is relatively complex in calculation, usually takes a long time, and requires relatively expensive components such as voltage sensors, current sensors, accelerometers, displacement sensors, etc., resulting in high detection equipment costs.
[0005] Therefore, there is an urgent need for an accurate, fast, and low-cost method and device for detecting the motor resonant frequency. Summary of the invention
[0006] The present application proposes a method, device, electronic device and storage medium for detecting the resonant frequency of a motor, which have low cost and can achieve a faster and more accurate motor resonant frequency detection effect.
[0007] The first embodiment of the present application provides a method for detecting the resonant frequency of a motor, comprising:
[0008] Generate a preset driving signal with constant amplitude and frequency, wherein the preset driving signal is used to drive the motor to be detected to perform resonant motion;
[0009] Receive a current signal corresponding to the current generated by the motor to be detected during the process of amplitude attenuation after the preset driving signal acts continuously for a preset time and is removed;
[0010] determining a period of the current signal;
[0011] The resonant frequency of the motor to be detected is determined according to the period of the current signal.
[0012] In some embodiments of the present application, determining the period of the current signal includes:
[0013] Detecting peak time information when the current signal reaches a peak value and / or zero point time information when the current signal passes through a zero point;
[0014] The period of the current signal is calculated according to the peak time information and / or the zero time information.
[0015] In some embodiments of the present application, the peak time information includes a first preset number of peak moments, and the zero point time information includes a second preset number of consecutive zero-crossing moments;
[0016] The calculating the period of the current signal according to the peak time information and / or the zero time information comprises:
[0017] Calculating the peak period according to the time difference between different peak moments among the first preset number of peak moments;
[0018] Calculating the zero-crossing period according to the time difference between different zero-crossing moments among the second preset number of zero-crossing moments;
[0019] An average value of the peak period and the zero-crossing period is determined as a period for calculating the current signal.
[0020] In some embodiments of the present application, the peak time information includes a first preset number of peak moments;
[0021] The calculating the period of the current signal according to the peak time information and / or the zero time information comprises:
[0022] A peak period is calculated according to the time difference between different peak moments among the first preset number of peak moments, and the peak period is determined as the period for calculating the current signal.
[0023] In some embodiments of the present application, calculating the peak period according to the time difference between different peak moments in the first preset number of peak moments includes:
[0024] Selecting respectively a first specified number of peak moments preceding in time and a first specified number of peak moments following in time from the first preset number of peak moments;
[0025] Combining a peak moment that is earlier in time with a peak moment that is later in time, respectively, and the two peak moments in each combination are separated by the same number of peak moments;
[0026] The peak period is calculated according to the average value of the time difference between two peak moments in each combination.
[0027] In some embodiments of the present application, the peak time information includes a third preset number of consecutive positive peak moments and a fourth preset number of consecutive negative peak moments;
[0028] The calculating the period of the current signal according to the peak time information and / or the zero time information comprises:
[0029] Selecting respectively a third specified number of positive peak moments before and a third specified number of positive peak moments after from the third preset number of positive peak moments; selecting respectively a fourth specified number of negative peak moments before and a fourth specified number of negative peak moments after from the fourth preset number of negative peak moments;
[0030] Combining the third specified number of positive peak moments in front and the third specified number of positive peak moments in back in pairs respectively, and the two positive peak moments in each combination are separated by the same number of positive peak moments, and calculating the positive peak period of the current signal according to the time difference between the two positive peak moments in each combination;
[0031] Respectively combine the fourth specified number of negative peak moments in front and the fourth specified number of negative peak moments in back in pairs, and the two negative peak moments in each combination are separated by the same number of negative peak moments, and calculate the negative peak period of the current signal according to the time difference between the two negative peak moments in each combination;
[0032] The peak period of the current signal is determined according to an average value of the positive peak period and the negative peak period.
[0033] In some embodiments of the present application, the zero time information includes a second preset number of zero-crossing moments;
[0034] The calculating the period of the current signal according to the peak time information and / or the zero time information comprises:
[0035] A zero-crossing period is calculated according to a time difference between different zero-crossing moments in the second preset number of zero-crossing moments, and the zero-crossing period is determined as the period of the current signal.
[0036] In some embodiments of the present application, calculating the zero-crossing period according to the time difference between different zero-crossing moments in the second preset number of zero-crossing moments includes:
[0037] Selecting respectively a second specified number of zero-crossing moments preceding in time and a second specified number of zero-crossing moments following in time from a second preset number of zero-crossing moments;
[0038] Combining the second specified number of zero-crossing moments in front and the second specified number of zero-crossing moments in back in pairs, respectively, and the two zero-crossing moments in each combination are separated by the same number of zero-crossing moments;
[0039] The zero-crossing period is calculated according to the average value of the time difference between two zero-crossing moments in each combination.
[0040] In some embodiments of the present application, the zero-point time information includes a fifth preset number of consecutive positive zero-crossing moments and a sixth preset number of consecutive negative zero-crossing moments;
[0041] Calculating a plurality of zero-crossing periods according to the zero-point time information includes:
[0042] Selecting respectively the fifth specified number of positive zero-crossing moments before and the fifth specified number of positive zero-crossing moments after from the fifth preset number of positive zero-crossing moments; selecting respectively the sixth specified number of negative zero-crossing moments before and the sixth specified number of negative zero-crossing moments after from the sixth preset number of negative zero-crossing moments;
[0043] Respectively combine the fifth specified number of positive zero-crossing moments in front and the fifth specified number of positive zero-crossing moments in back in pairs, and the two positive zero-crossing moments in each combination are separated by the same number of positive zero-crossing moments, and calculate the positive zero-crossing period of the current signal according to the time difference between the two positive zero-crossing moments in each combination;
[0044] Respectively combine the sixth specified number of negative zero-crossing moments in front and the sixth specified number of negative zero-crossing moments in back in time in pairs, and the two negative zero-crossing moments in each combination are separated by the same number of negative zero-crossing moments, and calculate the negative zero-crossing period of the current signal according to the time difference between the two negative zero-crossing moments in each combination;
[0045] The zero-crossing period of the current signal is determined according to an average value of the positive zero-crossing period and the negative zero-crossing period.
[0046] In some embodiments of the present application, before detecting the peak time information and the zero time information of the current signal, the method further includes:
[0047] The current signal is filtered to remove high-frequency burrs.
[0048] In some embodiments of the present application, generating a preset driving signal with constant amplitude and frequency includes:
[0049] Calculating a preset amplitude and a preset frequency of the resonant motion of the motor to be detected according to the design parameters of the motor to be detected;
[0050] The preset driving signal with constant amplitude and frequency is generated according to the preset amplitude and the preset frequency.
[0051] In some embodiments of the present application, after generating a preset driving signal with constant amplitude and frequency, the method further includes:
[0052] Power matching is performed on the voltage value corresponding to the preset driving signal, and the motor to be detected is driven by the power-matched voltage.
[0053] An embodiment of a second aspect of the present application provides a device for detecting a motor resonant frequency, comprising:
[0054] A signal generating module, used to generate a preset driving signal with constant amplitude and frequency, wherein the preset driving signal is used to drive the motor to be detected to perform resonant motion;
[0055] A signal receiving module, used for receiving a current signal, wherein the current signal corresponds to the current generated by the motor to be detected during the process of amplitude attenuation after the preset driving signal acts continuously for a preset time and is removed;
[0056] A period determination module, used to determine the period of the current signal;
[0057] A frequency calculation module is used to determine the resonant frequency of the motor to be detected according to the period of the current signal.
[0058] An embodiment of the third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect.
[0059] An embodiment of the fourth aspect of the present application provides a computer-readable storage medium on which a computer program is stored, and the program is executed by a processor to implement the method described in the first aspect.
[0060] The technical solution provided in the embodiments of the present application has at least the following technical effects or advantages:
[0061] The embodiment of the present application provides a method for detecting the resonant frequency of a motor. The method uses a preset driving signal with constant amplitude and frequency to drive the motor to be detected (also called a vibration motor) so that the motor to be detected performs resonant motion. After a period of time, when the resonant motion reaches a certain amplitude, the excitation of the preset driving signal is canceled, and the resonant frequency of the motor to be detected is determined according to the current signal generated by the motor to be detected during the gradual attenuation of the vibration amplitude. During the implementation of the method, only the current signal needs to be detected by a current sensor, and no additional expensive devices are required, so the detection cost is low. The preset driving signal acts on the motor to be detected for a preset time, so that the motor to be detected can be canceled after the resonant motion, which can effectively shorten the detection time (to the millisecond level), improve the detection efficiency, and is more conducive to batch detection, such as motor consistency detection and good product screening lights, which can realize parameter calibration of control performance consistency. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] By reading the detailed description of the preferred embodiment below, various other advantages and benefits will become clear to those of ordinary skill in the art. The accompanying drawings are only used for the purpose of illustrating the preferred embodiment and are not considered to be limitations of the present application. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings.
[0063] In the attached picture:
[0064] Figure 1 A schematic diagram showing a flow chart of a method for detecting a motor resonant frequency provided in an embodiment of the present application is shown;
[0065] Figure 2 A logic diagram of a method for detecting a motor resonant frequency provided by an embodiment of the present application is shown;
[0066] Figure 3 A schematic diagram of a current signal in the process of amplitude attenuation of a vibration motor actually used in an embodiment of the present application is shown;
[0067] Figure 4 The overall process diagram of the method for detecting the motor resonant frequency in an embodiment of the present application is shown;
[0068] Figure 5 A schematic diagram of a specific process for calculating the motor resonant frequency in an embodiment of the present application is shown;
[0069] Figure 6 The method for detecting the motor resonant frequency provided by this embodiment is shown in FIG. Figure 5 A schematic diagram of frequency data obtained by detecting a vibration motor in;
[0070] Figure 7 A schematic diagram of the structure of a device for detecting the resonant frequency of a motor provided in an embodiment of the present application is shown;
[0071] Figure 8 A schematic diagram of an electronic device provided in an embodiment of the present application is shown;
[0072] Fig. 9 A schematic diagram of a computer-readable storage medium provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0073] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0074] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.
[0075] The following describes a method, device, electronic device and storage medium for detecting the resonant frequency of a motor according to an embodiment of the present application in conjunction with the accompanying drawings.
[0076] In the related prior art, the methods for detecting the vibration performance of the motor are mainly divided into two categories. One is to construct a parameter test model according to the system characteristics of the motor, and perform data fitting according to the model calculation value and the measured value (accurate measured values need to be obtained with the help of high-precision voltage and current sensors), and use the fitting results to adaptively adjust the parameters to achieve accurate motor parameter detection. The other is to apply drive signals of different types and frequencies to the motor, and then use corresponding sensors (voltage sensors, current sensors, displacement sensors, acceleration sensors and displacement sensors, etc.) to detect the response parameters of the motor under the drive signal, so as to determine the frequency of the motor. However, for these two detection methods, whether it is the process of obtaining the measured value of the model fitting or the process of applying the drive to the motor to obtain the motor response parameters, the response of the motor under the drive needs to reach a steady state before data acquisition, and the detection time is relatively long. And it is necessary to use relatively expensive components such as displacement sensors and acceleration sensors, and the detection cost is relatively high.
[0077] In view of the above problems, before proposing this application, this embodiment of the present application first mathematically models the LRA device, and derives its current response expression in a non-zero initial state and zero input based on a driving signal close to the motor resonant frequency, as shown in the following formula (1):
[0078]
[0079] Wherein, v0 and x0 are the initial velocity and initial displacement at the moment of removing the driving voltage, respectively; ω0 is the resonant angular frequency of LRA; m is the mass of the LRA oscillator; Re is the DC resistance; Bl is the magnetic field intensity parameter; r is the damping coefficient.
[0080] It can be seen from formula (1) that after the driving voltage is withdrawn, the current generated in the motor aftershock process is only related to time t and is sinusoidally related to time t. This shows that the motor to be detected performs resonant motion after the driving signal is withdrawn, and its resonant angular frequency is the same as the resonant angular frequency of the LRA (both are ω0), that is, after the excitation is withdrawn, the motor to be detected will continue to perform resonant motion for a period of time, and the vibration amplitude of the resonant motion gradually decays, but the period remains basically unchanged. It can be considered that the period remains unchanged during the attenuation of the resonant motion. Based on this principle,
[0081] Based on the above principle, the embodiment of the present application proposes a method for detecting the resonant frequency of a motor. The method uses a preset driving signal with constant amplitude and frequency to drive the motor to be detected (also called a vibration motor) so that the motor to be detected performs resonant motion. After a period of time, when the resonant motion reaches a certain amplitude, the excitation of the preset driving signal is canceled, and the resonant frequency of the motor to be detected is determined according to the current signal generated by the motor to be detected during the gradual attenuation of the vibration amplitude. During the implementation of the method, only the current signal needs to be detected by the current sensor, and no additional expensive devices are required, so the detection cost is low. The preset driving signal acts on the motor to be detected for a preset time, so that the motor to be detected can be canceled after the resonant motion, which can effectively shorten the detection time (to the millisecond level), improve the detection efficiency, and is more conducive to batch detection, such as the consistency detection of the motor and the good product screening lamp, which can realize the parameter calibration of the control performance consistency.
[0082] like Figure 1 As shown, the method for detecting the motor resonant frequency may include the following steps:
[0083] Step S1, generating a preset driving signal with constant amplitude and frequency.
[0084] Among them, the preset driving signal is an AC signal with constant amplitude and frequency, which can be but is not limited to a sine signal, a cosine signal or a square wave signal. The amplitude is preferably the rated voltage amplitude of the vibration motor or its multiple, and the frequency is the resonant angular frequency designed for the motor to be detected. It is used to drive the motor to be detected to perform resonant motion and continue to act for a preset time, such as 2-5 resonant cycles. After the resonant motion reaches a certain amplitude, it is canceled and the motor to be detected will continue the resonant motion for a period of time.
[0085] The execution subject of this embodiment may be as follows Figure 2The processing module with calculation function shown in the figure can also be a computer device including the processing module (can be a client computer or a server). When generating a preset driving signal with constant amplitude and frequency, the amplitude setting, frequency setting and action duration setting can be performed first, that is, the preset amplitude and preset frequency of the motor to be detected for resonant motion are calculated according to the design parameters of the motor to be detected. Then, an AC voltage with constant amplitude and frequency is generated according to the preset amplitude and preset frequency. After the AC voltage lasts for a certain period of time, an AC driving signal, i.e., a preset driving signal, is formed.
[0086] After generating the preset driving signal with constant amplitude and frequency, the power amplifier can also perform power matching on the voltage value corresponding to the preset driving signal, convert the digital or analog signal into a driving voltage with power output capability, and use the power-matched voltage to drive the motor to be detected to generate resonant motion. The power amplifier is usually an amplifier that performs power matching on the input signal, such as class A, class B, class AB, or class D drivers, and the input signal can be an analog signal or a customized digital signal.
[0087] During the amplitude attenuation process after the preset drive signal of the motor to be detected is cancelled, Figure 2 As shown, the current on the LRA device winding can be detected by a current detection module connected in series to the LRA device winding. Then, a corresponding current signal can be generated based on the detected current by a signal feedback module, and the current signal can be sent to the above-mentioned processing module.
[0088] Preferably, a current sensor may be provided at the output end of the power amplifier, and the current sensor may generate and feed back a current signal to the above-mentioned processing module for calculating the resonant frequency of the motor to be detected.
[0089] Step S2, receiving a current signal.
[0090] After receiving the current signal, the processing module first uses a low-pass filter to filter the current signal to remove high-frequency burrs. Specifically, the cutoff frequency of the low-pass filter can be set to 5-10 times the resonant frequency of the motor to be detected to avoid delaying and clipping the resonant frequency component in the signal.
[0091] Step S3, determining the period of the current signal.
[0092] Based on the design principle of the above-mentioned method, the processing module can detect the received current signal and calculate the period of the current signal, and then determine the period of the resonant motion of the motor to be detected based on the period, and then determine the frequency of the motor to be detected.
[0093] This embodiment takes the simple harmonic motion of the motor to be detected as an example. When determining the period of the current signal, the period of the current signal can be calculated by the peak time information and / or the zero time information of the current signal. Accordingly, the peak time information when the current signal reaches the peak value and / or the zero time information when it passes the zero point can be detected first, and then the period of the current signal can be calculated based on the peak time information and / or the zero time information.
[0094] The peak time information is the time when the current signal reaches the peak value, and the zero time information is the time when the current signal passes through the zero point.
[0095] In this embodiment, the period of the current signal can be determined by the peak time information or the zero time information. In order to improve the detection accuracy and anti-interference capability, the peak time information and the zero time information can be combined to determine the period. That is, the period of the current signal is calculated according to the peak time information and / or the zero time information, which can include the following processing: calculating the peak period according to the peak time information, and then determining the peak period as the period of the current signal; or calculating the zero-point period according to the zero time information, and then determining the zero-point period as the period of the current signal; or calculating the peak period and the zero-point period of the current signal according to the peak time information and the zero time information, respectively, and then determining the average value of the peak period and the zero-point period as the period of the current signal.
[0096] In some embodiments, the peak time information may include a first preset number of peak moments. Accordingly, the above-mentioned calculation of the period of the current signal based on the peak time information may include the following processing: calculating the peak period according to the time difference between different peak moments in the first preset number of peak moments, and determining the peak period as the period of the calculated current signal.
[0097] Specifically, when calculating the peak period based on the time difference between different peak moments in the first preset number of peak moments, the first specified number of peak moments in the front and the first specified number of peak moments in the back can be selected from the first preset number of peak moments respectively; then, a peak moment in the front and a peak moment in the back are combined respectively, and the two peak moments in each combination are separated by the same number of peak moments; and then the peak period is calculated based on the average value of the time difference between the two peak moments in each combination.
[0098] Among them, the peak moment is the moment when the current signal reaches the peak value. The first preset number of peak moments can be all positive peaks (the peak value reached by the current signal rising), or all negative peaks (the peak value reached by the current signal falling), or can include both positive peaks and negative peaks. The peak information usually also includes the time series corresponding to the peak moment, that is, each peak moment is the nth peak moment of the received current signal, and the number of peak moments between any two peak moments, etc., and the time interval between two adjacent peak moments can be considered as a peak cycle of the current signal. This embodiment can calculate multiple peak cycles and take the average value, and determine the average value as the value cycle of the current signal. And if the peak moment includes both positive peaks and negative peaks, the time interval between two adjacent peak moments can be considered as half a cycle of the current signal.
[0099] If the peak time information includes a third preset number of positive peak moments and a fourth preset number of consecutive negative peak moments, then calculating the period of the current signal according to the peak time information may include the following processing: selecting a third specified number of positive peak moments in front and a third specified number of positive peak moments in the back from the third preset number of positive peak moments; selecting a fourth specified number of negative peak moments in front and a fourth specified number of negative peak moments in the back from the fourth preset number of negative peak moments; selecting the third specified number of positive peak moments in front and the third specified number of positive peak moments in the back from the fourth preset number of negative peak moments; selecting the third specified number of positive peak moments in front and the third specified number of positive peak moments in the back The fourth specified number of negative peak moments in front and the fourth specified number of negative peak moments in back are respectively combined in pairs, and the two negative peak moments in each combination are separated by the same number of negative peak moments, and the negative peak period of the current signal is calculated according to the time difference between the two positive peak moments in each combination; the fourth specified number of negative peak moments in front and the fourth specified number of negative peak moments in back are respectively combined in pairs, and the two negative peak moments in each combination are separated by the same number of negative peak moments, and the negative peak period of the current signal is calculated according to the time difference between the two negative peak moments in each combination; the peak period of the current signal is determined according to the average value of the positive peak period and the negative peak period.
[0100] In this embodiment, starting from the moment when the drive signal cancels the excitation, n1 positive peak moments of the current signal are detected, recorded as tmax1, tmax2, ..., tmaxn1, and then n2 consecutive negative peak moments of the current signal are detected, recorded as tmin1, tmin2, ..., tminn2. Wherein n1 represents the above-mentioned first preset number and / or the third preset number, and n2 represents the above-mentioned second preset number and / or the fourth preset number. For the sake of simplicity, n1 and n2 are both represented by n in the following formulas, but they can take different values in different formulas. The n positive peak moments can be continuous or discontinuous, and only need to be converted accordingly according to the actual number of intervals.
[0101] The minimum value of the first preset number n is 2, and is usually set to be greater than or equal to 3, so as to improve the detection accuracy by detecting multiple peak moments and enhance the robustness of the algorithm. In order to further improve the detection accuracy, the previous peak moment after the preset driving signal is cancelled and the zero-crossing moment described below can be detected.
[0102] When calculating the peak period, taking n consecutive peak moments as an example, if n is an odd number, let m=(n+1) / 2, then the first specified number, the third preset number and the fourth specified number can all be m-1, and using the m-1 moments before and after the m-1 moments, the formula (2) for calculating the positive peak period Tmax is as follows. Similarly, the formula (3) for calculating the negative peak period Tmin is as follows.
[0103]
[0104]
[0105] If n is an even number, let m=n / 2, then the first specified number, the third preset number and the fourth specified number can all be m. Using the first m moments and the last m moments, the formula (4) for calculating the positive peak period Tmax is as shown below. Similarly, the formula (5) for calculating the negative peak period Tmin is as shown below.
[0106]
[0107]
[0108] In some embodiments, the zero-point time information includes a second preset number of zero-crossing moments, and calculating the period of the current signal based on the zero-point time information may include the following processing: calculating the zero-crossing period based on the time difference between different zero-crossing moments in the second preset number of zero-crossing moments, and determining the zero-crossing period as the period of the current signal.
[0109] Specifically, calculating the zero-crossing period based on the time difference between different zero-crossing moments in a second preset number of zero-crossing moments may include the following processing: selecting a second specified number of zero-crossing moments in the front and a second specified number of zero-crossing moments in the back from the second preset number of zero-crossing moments; combining the second specified number of zero-crossing moments in the front and the second specified number of zero-crossing moments in the back in pairs, and the two zero-crossing moments in each combination are separated by the same number of zero-crossing moments; calculating the zero-crossing period based on the average value of the time difference between the two zero-crossing moments in each combination.
[0110] Specifically, when calculating the zero-point period based on the time difference between different zero-crossing moments in the second preset number of zero-crossing moments, a second specified number of zero-crossing moments in the front and a second specified number of zero-crossing moments in the back can be selected from the second preset number of zero-crossing moments respectively; then, a zero-crossing moment in the front and a zero-crossing moment in the back are combined respectively, and the two zero-crossing moments in each combination are separated by the same number of zero-crossing moments; and then the zero-point period is calculated based on the average value of the time difference between the two zero-crossing moments in each combination.
[0111] Among them, the zero-crossing moment is the moment when the current signal reaches the zero-crossing moment. The second preset number of zero-crossing moments can be all positive zero points (the zero point reached by the current signal rising), or all negative zero points (the zero point reached by the current signal falling), and can also include both positive zero points and negative zero points. The zero-point information usually also includes the time series corresponding to the zero-crossing moment, that is, each zero-crossing moment is the number of zero-crossing moments of the received current signal, and there are several zero-crossing moments between any two zero-crossing moments, etc., and the time interval between two adjacent zero-crossing moments can be considered as a zero-point cycle of the current signal. In this embodiment, multiple zero-point cycles can be calculated, and the average value is taken, and the average value is determined as the value cycle of the current signal. And if the zero-crossing moment includes both positive zero points and negative zero points, the time interval between two adjacent zero-crossing moments can be considered as half a cycle of the current signal.
[0112] If the zero-point time information includes a fifth preset number of consecutive positive zero-crossing moments and a sixth preset number of consecutive negative zero-crossing moments, then calculating multiple zero-crossing periods based on the zero-point time information may include the following processing: selecting a fifth specified number of positive zero-crossing moments in front and a fifth specified number of positive zero-crossing moments in the back from the fifth preset number of positive zero-crossing moments; selecting a sixth specified number of negative zero-crossing moments in front and a sixth specified number of negative zero-crossing moments in the back from the sixth preset number of negative zero-crossing moments; selecting the fifth specified number of positive zero-crossing moments in front and the fifth specified number of positive zero-crossing moments in the back The sixth specified number of negative zero-crossing moments in front and the sixth specified number of negative zero-crossing moments in back are respectively combined in pairs, and the two negative zero-crossing moments in each combination are spaced by the same number of negative zero-crossing moments, and the negative zero-crossing period of the current signal is calculated according to the time difference between the two positive zero-crossing moments in each combination; the sixth specified number of negative zero-crossing moments in front and the sixth specified number of negative zero-crossing moments in back are respectively combined in pairs, and the two negative zero-crossing moments in each combination are spaced by the same number of negative zero-crossing moments, and the negative zero-crossing period of the current signal is calculated according to the time difference between the two negative zero-crossing moments in each combination; the zero-crossing period of the current signal is determined according to the average value of the positive zero-crossing period and the negative zero-crossing period.
[0113] In this embodiment, starting from the moment when the drive signal cancels the excitation, n1 positive zero-crossing moments of the current signal are detected, which are recorded as tp1, tp2, ..., tpn11, and then n2 consecutive negative zero-crossing moments of the current signal are detected, which are recorded as tr1, tr2, ..., trn2. Wherein n1 represents the above-mentioned second preset number and / or the fifth preset number, and n2 represents the above-mentioned second preset number and / or the sixth preset number. For simplicity, n1 and n2 are both represented by n in the following formulas, but they can take different values in different formulas. The n positive zero-crossing moments can be continuous or discontinuous, and only need to be converted accordingly according to the actual number of intervals.
[0114] The second preset number n has a minimum value of 2 and is usually set to be greater than or equal to 3, so as to improve the detection accuracy and the robustness of the algorithm by detecting multiple zero-crossing moments. In order to further improve the detection accuracy, the previous zero-crossing moment after the preset drive signal is canceled and the following zero-crossing moment can be detected.
[0115] When calculating the zero point period, taking n consecutive zero-crossing moments as an example, if n is an odd number, let m=(n+1) / 2, then the second specified number, the fifth preset number and the sixth specified number can all be m-1, and using the m-1 moments before and after the m-1 moments of the mth moment, the formula (6) for calculating the positive zero point period Tmax is as follows. Similarly, the formula (7) for calculating the negative zero point period Tmin is as follows.
[0116]
[0117]
[0118] If n is an even number, let m=n / 2, then the first specified number, the third preset number and the fourth specified number can all be m. Using the first m moments and the last m moments, the formula (4) for calculating the positive peak period Tmax is as shown below. Similarly, the formula (5) for calculating the negative peak period Tmin is as shown below.
[0119]
[0120]
[0121] In other embodiments, in order to simplify the calculation, when calculating the above-mentioned period, only the data collected at both ends may be used to calculate the period. Then, the calculation formulas for the above-mentioned peak period Tmax, peak period Tmin, positive zero-crossing period Tp and negative zero-crossing period Tr are respectively as shown in the following formulas (10) to (13).
[0122]
[0123]
[0124]
[0125]
[0126] In other embodiments, the peak time information may include a first preset number of peak moments, and the zero point time information may include a second preset number of consecutive zero-crossing moments. Accordingly, calculating the period of the current signal according to the peak time information includes: calculating the peak period according to the time difference between different peak moments in the first preset number of peak moments; calculating the zero-crossing period according to the time difference between different zero-crossing moments in the second preset number of zero-crossing moments; and determining the average value of the peak period and the zero-crossing period as the period of the calculated current signal.
[0127] In order to reduce the offset effect of the DC bias on the zero-crossing moment and improve the detection accuracy and stability of the detection results, this embodiment averages the four period values obtained above to obtain the average period Tavg, which is the period of the current signal. The calculation formula is shown in the following formula (14).
[0128]
[0129] Step S4, determining the resonant frequency of the motor to be detected according to the period of the current signal.
[0130] The period of the motor to be detected is calculated according to the relationship between the constant amplitude and frequency of the preset driving signal and the rated voltage amplitude and resonant angular frequency of the motor to be detected, and then the frequency of the motor to be detected is determined.
[0131] To facilitate understanding of this embodiment, the method for detecting the motor resonant frequency is further explained below by taking an actual vibration motor as an example. The vibration motor is designed to have a resonant frequency of f0 = 173.5 Hz and a designed rated voltage amplitude of 9 V.
[0132] In this specific embodiment, the preset drive signal is set as follows: the preset constant amplitude is 9V, the preset constant frequency fc is f0, the action time is 2 resonance cycles, and the current response after the action ends is as follows Figure 3 As shown, the current signal value is low-pass filtered, its peak value and zero-crossing point are detected, and the resonant frequency f0 of the device is calculated by combining multiple detection results.
[0133] In addition, in order to verify the detection accuracy and anti-interference ability of the detection algorithm, the feedback current signal is superimposed as follows: Figure 6 The DC bias and high frequency noise of different amplitudes are shown, using the above detection method, referring to Figure 4 and Figure 5 The process shown in the figure, the f0 results are shown in Table 1 and Figure 6 As shown, it can be seen that the f0 detection error is within ±0.5Hz. The algorithm can not only accurately detect the resonant frequency of the LRA, but also has strong robustness against the DC bias and high-frequency noise errors of the current detection.
[0134] Table 1: f0 detection results under different DC bias and high frequency noise conditions
[0135]
[0136]
[0137] Based on the same concept as the above method for detecting the motor resonant frequency, this embodiment also provides a device for detecting the motor resonant frequency, which is used to execute the above method for detecting the motor resonant frequency, such as Figure 7 As shown, the device comprises:
[0138] A signal generating module, used to generate a preset driving signal with constant amplitude and frequency, wherein the preset driving signal is used to drive the motor to be detected to perform resonant motion;
[0139] A signal receiving module, used for receiving a current signal, the current signal corresponding to the current generated by the motor to be detected during the process of amplitude attenuation after the preset driving signal acts continuously for a preset time and is removed;
[0140] A period determination module, used for determining the period of the current signal;
[0141] The frequency calculation module is used to determine the resonant frequency of the motor to be detected according to the period of the current signal.
[0142] The device for detecting the motor resonant frequency provided in this embodiment is based on the same concept as the above-mentioned method for detecting the motor resonant frequency, and can at least achieve the beneficial effects that can be achieved by the above-mentioned method for detecting the motor resonant frequency, which will not be elaborated here.
[0143] The present application also provides an electronic device to perform the above method for detecting the motor resonant frequency. Figure 8 , which shows a schematic diagram of an electronic device provided by some embodiments of the present application. Figure 8 As shown, the electronic device 8 includes: a processor 800, a memory 801, a bus 802 and a communication interface 803, and the processor 800, the communication interface 803 and the memory 801 are connected via the bus 802; the memory 801 stores a computer program that can be run on the processor 800, and when the processor 800 runs the computer program, it executes the method for detecting the motor resonant frequency provided in any of the aforementioned embodiments of the present application.
[0144] The memory 801 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the device network element and at least one other network element is realized through at least one communication interface 803 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0145] The bus 802 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. Among them, the memory 801 is used to store programs, and the processor 800 executes the program after receiving the execution instruction. The method for detecting the motor resonant frequency disclosed in any implementation of the above-mentioned embodiment of the present application can be applied to the processor 800, or implemented by the processor 800.
[0146] The processor 800 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 800. The above processor 800 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a readily available programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 801, and the processor 800 reads the information in the memory 801 and completes the steps of the above method in combination with its hardware.
[0147] The electronic device provided in the embodiment of the present application and the method for detecting the motor resonance frequency provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.
[0148] The electronic device may also include the above-mentioned power converter, current detection module and signal feedback module. The power amplifier may be an amplifier for power matching the preset drive signal, such as a common class A, class B, class AB, or class D driver. The current detection module is used to detect the current of the motor during the amplitude attenuation process after the preset drive signal is cancelled. The signal feedback module is used to generate the above-mentioned current signal from the current detected by the current detection module.
[0149] The present application also provides a computer-readable storage medium corresponding to the method for detecting the motor resonant frequency provided in the above embodiment. Fig. 9 The computer-readable storage medium shown is a CD 30 on which a computer program (ie, a program product) is stored. When the computer program is run by a processor, the method for detecting the motor resonant frequency provided in any of the aforementioned embodiments will be executed.
[0150] It should be noted that examples of computer-readable storage media may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.
[0151] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the method for detecting the motor resonance frequency provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.
[0152] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets should not be constructed as a limitation to the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.
[0153] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for detecting the resonant frequency of a motor, characterized in that: include: Generate a preset driving signal with constant amplitude and frequency, wherein the preset driving signal is used to drive the motor to be detected to perform resonant motion; Receive a current signal corresponding to the current generated by the motor to be detected during the process of amplitude attenuation after the preset driving signal acts continuously for a preset time and is removed; determining a period of the current signal; Determining the resonant frequency of the motor to be detected according to the period of the current signal; Wherein, determining the period of the current signal includes: detecting the peak time information when the current signal reaches the peak value and / or the zero time information when the current signal passes the zero point; calculating the period of the current signal according to the peak time information and / or the zero time information; The peak time information includes a first preset number of peak moments, and the zero point time information includes a second preset number of consecutive zero-crossing moments; The method of calculating the period of the current signal according to the peak time information and / or the zero time information includes: calculating the peak period according to the time difference between different peak moments in the first preset number of peak moments; calculating the zero-crossing period according to the time difference between different zero-crossing moments in the second preset number of consecutive zero-crossing moments; and determining the average value of the peak period and the zero-crossing period as the period for calculating the current signal.
2. The method according to claim 1, characterized in that The peak time information includes a first preset number of peak moments; The calculating the period of the current signal according to the peak time information and / or the zero time information comprises: A peak period is calculated according to the time difference between different peak moments among the first preset number of peak moments, and the peak period is determined as the period for calculating the current signal.
3. The method according to claim 2, characterized in that Calculating the peak period according to the time difference between different peak moments among the first preset number of peak moments includes: Selecting respectively a first specified number of peak moments preceding in time and a first specified number of peak moments following in time from the first preset number of peak moments; Combining a peak moment that is earlier in time with a peak moment that is later in time, respectively, and the two peak moments in each combination are separated by the same number of peak moments; The peak period is calculated according to the average value of the time difference between two peak moments in each combination.
4. The method according to claim 1, characterized in that: The peak time information includes a third preset number of consecutive positive peak moments and a fourth preset number of consecutive negative peak moments; The calculating the period of the current signal according to the peak time information and / or the zero time information comprises: Selecting respectively a third specified number of positive peak moments before and a third specified number of positive peak moments after from the third preset number of positive peak moments; selecting respectively a fourth specified number of negative peak moments before and a fourth specified number of negative peak moments after from the fourth preset number of negative peak moments; Combining the third specified number of positive peak moments in front and the third specified number of positive peak moments in back in pairs respectively, and the two positive peak moments in each combination are separated by the same number of positive peak moments, and calculating the positive peak period of the current signal according to the time difference between the two positive peak moments in each combination; Respectively combine the fourth specified number of negative peak moments in front and the fourth specified number of negative peak moments in back in pairs, and the two negative peak moments in each combination are separated by the same number of negative peak moments, and calculate the negative peak period of the current signal according to the time difference between the two negative peak moments in each combination; The peak period of the current signal is determined according to an average value of the positive peak period and the negative peak period.
5. The method according to claim 1, characterized in that The zero time information includes a second preset number of zero-crossing moments; The calculating the period of the current signal according to the peak time information and / or the zero time information comprises: A zero-crossing period is calculated according to a time difference between different zero-crossing moments in the second preset number of zero-crossing moments, and the zero-crossing period is determined as the period of the current signal.
6. The method according to claim 1 or 5, characterized in that: Calculating the zero-crossing period according to the time difference between different zero-crossing moments among the second preset number of zero-crossing moments includes: Selecting respectively a second specified number of zero-crossing moments preceding in time and a second specified number of zero-crossing moments following in time from a second preset number of zero-crossing moments; Combining the second specified number of zero-crossing moments in front and the second specified number of zero-crossing moments in back in pairs, respectively, and the two zero-crossing moments in each combination are separated by the same number of zero-crossing moments; The zero-crossing period is calculated according to the average value of the time difference between two zero-crossing moments in each combination.
7. The method according to claim 1, characterized in that The zero time information includes a fifth preset number of consecutive positive zero-crossing moments and a sixth preset number of consecutive negative zero-crossing moments; Calculating a plurality of zero-crossing periods according to the zero-point time information includes: Selecting respectively the fifth specified number of positive zero-crossing moments before and the fifth specified number of positive zero-crossing moments after from the fifth preset number of positive zero-crossing moments; selecting respectively the sixth specified number of negative zero-crossing moments before and the sixth specified number of negative zero-crossing moments after from the sixth preset number of negative zero-crossing moments; Respectively combine the fifth specified number of positive zero-crossing moments in front and the fifth specified number of positive zero-crossing moments in back in pairs, and the two positive zero-crossing moments in each combination are separated by the same number of positive zero-crossing moments, and calculate the positive zero-crossing period of the current signal according to the time difference between the two positive zero-crossing moments in each combination; Respectively combine the sixth specified number of negative zero-crossing moments in front and the sixth specified number of negative zero-crossing moments in back in time in pairs, and the two negative zero-crossing moments in each combination are separated by the same number of negative zero-crossing moments, and calculate the negative zero-crossing period of the current signal according to the time difference between the two negative zero-crossing moments in each combination; The zero-crossing period of the current signal is determined according to an average value of the positive zero-crossing period and the negative zero-crossing period.
8. The method according to claim 1, characterized in that Before detecting the peak time information and the zero time information of the current signal, the method further includes: The current signal is filtered to remove high-frequency burrs.
9. The method according to claim 1, characterized in that: The generating of a preset driving signal with constant amplitude and frequency comprises: Calculating a preset amplitude and a preset frequency of the resonant motion of the motor to be detected according to the design parameters of the motor to be detected; The preset driving signal with constant amplitude and frequency is generated according to the preset amplitude and the preset frequency.
10. The method according to claim 1, characterized in that After generating a preset driving signal with constant amplitude and frequency, the method further includes: Power matching is performed on the voltage value corresponding to the preset driving signal, and the motor to be detected is driven by the power-matched voltage.
11. A device for detecting the resonant frequency of a motor, characterized in that: include: A signal generating module, used to generate a preset driving signal with constant amplitude and frequency, wherein the preset driving signal is used to drive the motor to be detected to perform resonant motion; A signal receiving module, used for receiving a current signal, wherein the current signal corresponds to the current generated by the motor to be detected during the process of amplitude attenuation after the preset driving signal acts continuously for a preset time and is removed; A cycle determination module, used to determine the cycle of the current signal; including: detecting the peak time information of the current signal reaching the peak value and / or the zero point time information of the zero crossing point; Calculating the period of the current signal according to the peak time information and / or the zero time information; the peak time information includes a first preset number of peak moments, and the zero time information includes a second preset number of continuous zero-crossing moments; The cycle determination module is specifically used to calculate the peak cycle according to the time difference between different peak moments in the first preset number of peak moments; calculate the zero-crossing cycle according to the time difference between different zero-crossing moments in the second preset number of consecutive zero-crossing moments; determine the average value of the peak cycle and the zero-crossing cycle as the cycle of the current signal. A frequency calculation module is used to determine the resonant frequency of the motor to be detected according to the period of the current signal.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: The processor runs the computer program to implement the method according to any one of claims 1-10.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the method according to any one of claims 1 to 10.
