Linear motor real-time calibration method and device and electronic equipment
By using PWM wave signals and two-segment signal sequences, the contradiction between accuracy and vibration effect in real-time calibration of linear motors is resolved, achieving stable calibration with high accuracy and strong vibration, and avoiding the problem of inaccurate signal output.
Patent Information
- Application Number
- CN202511129287.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2025-11-18
AI Technical Summary
Existing real-time calibration methods for linear motors present a trade-off between accuracy and synchronous vibration performance. Furthermore, sinusoidal calibration signals are prone to inaccurate or erroneous outputs, leading to abnormal motor response and vibration noise.
Using a PWM wave as the calibration signal, the system is divided into forced vibration and free vibration periods. The back electromotive force signal is detected to determine the resonant frequency, and the PWM wave frequency is adjusted. The system is then combined with a two-segment signal sequence for calibration and vibration.
This improves the balance between calibration accuracy and motor vibration performance, reduces the probability of signal output errors, and ensures stable vibration of the linear motor under different environments.
Smart Images

Figure CN120979277A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of haptic feedback technology, in particular to a linear motor real-time calibration method, device and electronic equipment. BACKGROUND
[0002] As an important haptic device in consumer electronics, linear motors are widely used in smart phones, smart watches, smart bands and other devices, providing haptic feedback to users through single-degree-of-freedom simple harmonic vibration. Linear motors are mainly composed of a shell, a coil, a moving component and a spring, etc. When an alternating excitation signal is passed through the coil, it will interact with the magnetic field generated by the permanent magnet in the moving component, producing a push-pull force to drive the mass to perform simple harmonic vibration.
[0003] As a typical spring simple harmonic vibration system, the linear motor has an inherent resonant frequency and the maximum vibration intensity at the resonant frequency. In order to ensure that the motor achieves the best vibration effect in a limited space, the linear motor needs to be calibrated, i.e. the resonant frequency of the motor is detected and the excitation frequency is set to the resonant frequency.
[0004] Although the existing static calibration method can obtain the calibration frequency, the calibration frequency under the default single condition is the motor resonant frequency. When facing different application environments in actual use, the calibration result will have obvious differences, and cannot adapt to the dynamically changing use conditions.
[0005] The existing real-time calibration method uses a sine wave as the calibration signal base, and there are two main problems in the calibration process. First, real-time calibration needs to allocate time between forced vibration and free vibration. Forced vibration needs enough time to ensure motor vibration intensity, and free vibration needs enough time to obtain reverse electromotive force feedback signal for calibration, but it is difficult to make both reach the ideal state at the same time in a limited signal period, resulting in a contradiction between calibration accuracy and motor vibration effect. Second, the sine wave calibration signal needs to be modulated in real time in terms of frequency and amplitude, especially when the frequency is converted and the signal amplitude jumps, which can easily lead to inaccurate or even incorrect signal output, resulting in abnormal motor response, vibration noise and ultimately affecting product quality. SUMMARY
[0006] The present application aims to provide a linear motor real-time calibration method, device and electronic equipment to solve the problem of contradiction between real-time calibration accuracy and motor synchronous vibration effect in the prior art.
[0007] To solve the above technical problems, the present application provides a linear motor real-time calibration method, comprising:
[0008] generating a PWM wave calibration signal, the PWM wave signal having two half cycles of positive and negative;
[0009] a forced vibration period and a free vibration period are set in each of the half periods;
[0010] the PWM wave calibration signal is input to the linear motor in the forced vibration period to drive the linear motor to perform forced vibration, and the input of the PWM wave calibration signal is stopped in the free vibration period to make the linear motor perform free vibration;
[0011] a counter electromotive force signal generated by the coil in the free vibration period is detected, and the resonance frequency of the linear motor is determined according to the period of the counter electromotive force signal;
[0012] the frequency of the PWM wave calibration signal is adjusted according to the determined resonance frequency.
[0013] Optionally, the PWM wave calibration signal includes two states of high level and low level.
[0014] Optionally, in one signal period T, the total length of the free vibration period and the forced vibration period is T / 2 respectively.
[0015] Optionally, the free vibration period is set in the process of converting from the positive half period to the negative half period of the PWM wave calibration signal.
[0016] Optionally, the method further comprises:
[0017] the PWM wave calibration signal is used for real-time calibration in the calibration stage;
[0018] a sine wave signal is used to maintain the vibration of the linear motor in the vibration stage after the calibration is completed.
[0019] The application further provides a linear motor real-time calibration device for realizing the method, comprising:
[0020] a PWM wave signal generation module for generating a PWM wave calibration signal with positive and negative half periods;
[0021] a signal control module for controlling the switching of the forced vibration period and the free vibration period in each half period;
[0022] a counter electromotive force detection module for detecting a counter electromotive force signal generated by the coil in the free vibration period;
[0023] a frequency calculation module for determining the resonance frequency of the linear motor according to the period of the counter electromotive force signal;
[0024] a frequency adjustment module for adjusting the frequency of the PWM wave calibration signal according to the determined resonance frequency.
[0025] Optionally, the PWM wave signal generated by the PWM wave signal generation module contains high and low levels.
[0026] Optionally, the device further comprises a sine wave signal generation module for generating a sine wave signal to maintain the linear motor vibration after calibration.
[0027] The application also provides an electronic device comprising:
[0028] The linear motor and the linear motor real-time calibration device as described above.
[0029] Compared with the prior art, the application has at least the following technical effects:
[0030] By using PWM wave as the basis of the calibration signal instead of the traditional sine wave, the contradiction between real-time calibration accuracy and motor synchronous vibration effect in the prior art is effectively solved. The PWM wave signal can greatly improve the energy density input by the motor when forced to vibrate under the premise of ensuring calibration time, i.e. calibration accuracy, compared with the sine wave, thereby ensuring normal vibration of the motor, and ultimately achieving the dual purposes of high real-time calibration accuracy and strong motor forced vibration.
[0031] Another significant advantage of using the PWM wave calibration signal is the simplification of signal processing. Since the PWM wave signal only contains high and low levels, compared with the sine wave which needs to be modulated in both period and amplitude during calibration, the PWM wave only needs to receive a calibration value for period modulation during real-time calibration, reducing the error probability and effectively avoiding the problems of motor vibration noise and poor product quality caused by inaccurate or even incorrect output signals. In addition, by using a two-segment signal sequence, i.e. calibration first and then vibration, the accuracy of real-time calibration can be ensured, and the adverse effects of using PWM to drive the linear motor can be avoided. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 A schematic diagram of the working principle of the linear motor in the prior art;
[0033] Figure 2 An exploded view of the linear motor structure in the prior art;
[0034] Figure 3 A schematic diagram of the excitation frequency and vibration intensity of the linear motor in the prior art;
[0035] Figure 4 A schematic diagram of the static calibration process of the linear motor in the prior art;
[0036] Figure 5 A schematic diagram of the real-time calibration signal of the linear motor in the prior art;
[0037] Figure 6 A linear motor real-time calibration method step flowchart in an embodiment of the present application;
[0038] Figure 7 A linear motor real-time calibration signal schematic diagram in an embodiment of the present application;
[0039] Figure 8 A PWM wave and sine wave energy comparison schematic diagram in an embodiment of the present application;
[0040] Figure 9 A two-segment signal sequence schematic diagram in an embodiment of the present application;
[0041] Figure 10 A linear motor real-time calibration device module schematic diagram in an embodiment of the present application. DETAILED DESCRIPTION
[0042] The linear motor real-time calibration method, device and electronic equipment of the present application are described below in conjunction with the schematic diagrams, in which the preferred embodiments of the present application are represented, and it should be understood that the present application described herein can be modified by those skilled in the art while still achieving the advantageous effects of the present application. Therefore, the following description should be understood as extensive knowledge for those skilled in the art, and not as a limitation on the present application.
[0043] Based on the inspiration of the present specification, those skilled in the art can form new technical solutions by cross-combining different embodiments without causing technical contradictions, and such variations should be considered to fall within the protection scope of the present application.
[0044] The present application is described in more detail in the following paragraphs with reference to the accompanying drawings. The advantages and features of the present application will be more apparent based on the following description. It should be noted that the drawings are very simplified and use non-precise proportions, only to facilitate and clarify the purpose of assisting the description of the embodiments of the present application.
[0045] Embodiment one
[0046] Please refer to Figure 1 The basic working principle of the linear motor is to work by using the single-degree-of-freedom simple harmonic vibration principle. The main structure of the linear motor includes: a shell 3, a spring 1, a coil 2, a mover assembly 4, the mover assembly 4 includes a mass block 5 and a magnet 6. When an alternating excitation signal is applied to the coil 2, according to Faraday's law of electromagnetic induction, the alternating electric field in the coil 2 will generate an alternating magnetic field, and the alternating magnetic field interacts with the fixed magnetic field generated by the magnet 6 in the mover assembly 4 to generate a single-degree-of-freedom push-pull force. The push-pull force drives the mass block 5 in the mover assembly 4 to vibrate up and down in simple harmonic motion, and finally the vibration is transmitted to the entire motor body through the spring 1. Figure 1The curve in the figure is a displacement-time curve 8, which is not part of the linear motor structure, but shows the simple harmonic vibration characteristics of the mass block 5 through the curve. Please refer to Figure 2 The exploded view of the linear motor product shown in the figure, Figure 2 The internal structure of the linear motor is shown. It includes the spring sheet 7, the lower casing 31, the coil 2, the upper casing 32, the magnet 6, and the mass block 5. The coil 2 is located in the center, the magnet 6 and the mass block 5 form the mover assembly, the upper casing 32 and the lower casing 31 form the overall housing 3 structure, and the spring sheet 7 serves as a spring support.
[0047] As a typical spring simple harmonic vibration system, the linear motor has an inherent resonance frequency and the maximum vibration intensity at the resonance frequency. As shown in Figure 3 The relationship between the excitation frequency and the vibration intensity g of the linear motor is shown in the figure. The horizontal axis represents the excitation frequency (Hz), and the vertical axis represents the acceleration, i.e. the vibration intensity (g). The curve shows typical resonance characteristics: as the excitation frequency gradually increases, the vibration intensity of the linear motor also gradually increases; when the excitation frequency reaches the motor resonance frequency f0, the vibration intensity reaches the maximum value, as shown in Figure 3 Vibration strength with auto resonance; once the excitation frequency exceeds the resonance frequency f0, the vibration intensity begins to gradually decrease. Figure 3 The vibration strength without auto resonance is also shown in the figure, which shows the vibration intensity of the linear motor working at the f0+Δf frequency point without calibration, which is significantly lower than the vibration intensity at the resonance frequency f0, and the difference is very obvious. Therefore, in order to ensure that the linear motor achieves the best vibration effect in a limited space, the linear motor needs to be calibrated, i.e. the resonance frequency f0 of the motor is detected and the excitation frequency is set to the resonance frequency f0.
[0048] Although the existing static calibration method can obtain the calibrated frequency, the calibrated frequency under the default single condition is the motor resonance frequency. When facing different application environments in actual use, the calibration result will have obvious differences and cannot adapt to the dynamically changing use conditions.
[0049] Please refer to Figure 4 , Figure 4The principle and process diagram of linear motor static calibration. The calibration process is divided into two main stages: forced vibration stage and free vibration stage. In the forced vibration stage, the system inputs the excitation signal (drive signal) to the motor to make the motor vibrate; once the motor can vibrate stably, the excitation signal is removed and the free vibration stage is entered. In the free vibration state, although there is no forward input in the coil, according to the law of electromagnetic induction, a reverse electromotive force with gradually decaying amplitude will be generated in the coil. Figure 4 The signal change process from F PRE to F LRA is shown. By counting the period of the reverse electromotive force, the resonant frequency f0 of the motor in the free vibration state can be obtained.
[0050] Please refer to Figure 5 , Figure 5 for the real-time calibration signal diagram of the linear motor in the prior art. The current method uses a sine signal as the basis, and the entire calibration process is the superposition of sine signals of different frequencies. This results in real-time modulation of different frequencies and different signal amplitudes. Especially during frequency conversion and signal amplitude jump, the signal output is not accurate or even wrong, which leads to abnormal motor response and even vibration noise, ultimately resulting in product defects.
[0051] Then, the existing real-time calibration method uses a sine wave as the calibration signal basis, and there are two main problems in the calibration process. First, real-time calibration needs to allocate time between forced vibration and free vibration. Forced vibration needs enough time to ensure the intensity of motor vibration, and free vibration needs enough time to obtain the feedback signal of reverse electromotive force for calibration. However, it is difficult to make both reach the ideal state at the same time within a limited signal period, resulting in a contradiction between calibration accuracy and motor vibration effect. Second, the sine wave calibration signal needs to be modulated in real time in terms of frequency and amplitude. Especially during frequency conversion and signal amplitude jump, the signal output is not accurate or even wrong, which leads to abnormal motor response and vibration noise, ultimately affecting product quality.
[0052] The embodiment provides a linear motor real-time calibration method, as shown in Figure 6 , comprising the following steps:
[0053] S1, generating a PWM (Pulse Width Modulation, Pulse Width Modulation) wave calibration signal, the PWM wave signal having two half cycles of positive and negative;
[0054] S2, setting a forced vibration period and a free vibration period in each of the half cycles;
[0055] S3, inputting the PWM wave calibration signal to the linear motor in the forced vibration period to drive the linear motor to perform forced vibration, and stopping inputting the PWM wave calibration signal in the free vibration period to make the linear motor perform free vibration;
[0056] S4, detecting a reverse electromotive force signal generated by the coil in the free vibration period, and determining the resonance frequency of the linear motor according to a period of the reverse electromotive force signal;
[0057] S5, adjusting the frequency of the PWM wave calibration signal according to the determined resonance frequency.
[0058] Please refer to Figure 7 - Figure 8 wherein Figure 8 is a schematic diagram of energy comparison between a PWM wave and a sine wave, Figure 8 the waveform a in the above formula is a sine wave, and the waveform b is a PWM wave. The linear motor real-time calibration method provided by the embodiment has a higher signal amplitude, can provide more energy in the same forced vibration time, and effectively solves the problem that the calibration accuracy and the motor synchronous vibration effect are contradictory in the prior art. In addition, by reasonably setting the forced vibration period and the free vibration period in each half cycle, the optimal allocation of calibration time and vibration time is ensured, the energy density input by the motor in forced vibration is greatly improved on the premise of ensuring calibration accuracy, different application environments can be adapted, and finally the real-time calibration accuracy is high and the motor forced vibration vibration feeling is strong, which has a higher signal amplitude and simpler control characteristics compared with a sine wave signal.
[0059] The generation mode of the PWM wave calibration signal belongs to the common means of those skilled in the art, and will not be repeated here.
[0060] In one specific example, it can be directly generated through the PWM output port of the microcontroller, or it can be generated through a dedicated PWM signal generator chip.
[0061] In step S2, the forced vibration period and the free vibration period are set in each half cycle.
[0062] In one signal period T, the total length of the free vibration period and the forced vibration period is dynamically adjusted with the calibration process.
[0063] In one preferred example, in one signal period T, the total length of the free vibration period and the forced vibration period is T / 2 respectively. This time allocation ensures the balance between calibration accuracy and motor vibration effect.
[0064] Further, the free vibration period is set during the process of the positive half cycle of the PWM wave calibration signal converting to the negative half cycle. This design ensures that the linear motor can be in the free vibration state during the smooth transition of signal polarity conversion, facilitating accurate detection of the back electromotive force signal.
[0065] In step S3, the PWM wave calibration signal is input to the linear motor during the forced vibration period to drive the linear motor to perform forced vibration; and the input of the PWM wave calibration signal is stopped during the free vibration period to make the linear motor perform free vibration.
[0066] During the forced vibration period, the PWM wave calibration signal generates an alternating magnetic field through the coil, which interacts with the fixed magnetic field generated by the permanent magnet in the mover assembly to generate a push-pull force to drive the mass to vibrate. Since the PWM wave signal has a higher signal amplitude, it can provide at least 11% energy gain compared to the sinusoidal wave calibration signal, thereby providing stronger driving energy within a limited forced vibration time.
[0067] During the free vibration period, the linear motor continues to vibrate relying on inertia, at this time there is no longer a forward input signal in the coil, but a back electromotive force is generated due to electromagnetic induction.
[0068] In step S4, the back electromotive force signal generated by the coil during the free vibration period is detected, and the resonance frequency of the linear motor is determined according to the period of the back electromotive force signal. The detection of the back electromotive force signal can be realized by connecting a voltage detection circuit in parallel across the coil, and the specific design of the detection circuit belongs to the common means of those skilled in the art and will not be described in detail. By counting the period of the back electromotive force signal, the resonance frequency of the linear motor during free vibration can be obtained.
[0069] In step S5, the frequency of the PWM wave calibration signal is adjusted according to the determined resonance frequency. The system takes the detected resonance frequency f0 as a feedback signal, and adjusts the output frequency of the PWM wave calibration signal to gradually approach the resonance frequency f0. After multiple rounds of feedback optimization, the excitation signal and the feedback signal will stabilize around the resonance frequency, ensuring that the linear motor works in the state of maximum vibration intensity.
[0070] In a preferred embodiment, the method further comprises:
[0071] The PWM wave calibration signal is used for real-time calibration during the calibration phase; and the sinusoidal wave signal is used to maintain the vibration of the linear motor after the calibration is completed.
[0072] Please refer to Figure 9 , Figure 9The two-stage signal sequence diagram is shown, and the two-stage signal sequence design can play the advantages of the PWM wave in the calibration process, and can avoid the electromagnetic compatibility problems and the insufficient smoothness problems that may be generated by the long-term driving of the linear motor by the PWM wave. In the calibration stage, the high energy density and the simple control characteristics of the PWM wave are used to quickly complete the calibration; in the free vibration stage, the sinusoidal wave signal is switched to keep the smooth vibration output.
[0073] Further, assuming that a period is [0, 2π], the T / 4 period of the positive forced vibration is taken for analysis, that is, the integral calculation is performed in the interval [π / 4, 3π / 4]. For the prior art sinusoidal wave scheme, the energy is And for the scheme provided by the application, the energy of the PWM wave calibration signal for real-time calibration is By comparison, the energy of the PWM wave scheme is increased by about 11%.
[0074] In actual application, the linear motor calibration often does not need so much free vibration time of 50%, which means that the forced vibration time will also be increased accordingly, and the above estimation selects a period close to the peak of the sinusoidal wave for comparison. In the case of prolonging the forced vibration period, the energy increase efficiency of the PWM wave relative to the sinusoidal wave will be higher than 11%, which can fully meet the normal vibration requirements of the linear motor.
[0075] Through the improvement of the energy density, the application greatly improves the input energy density of the motor forced vibration under the premise of ensuring the calibration time, that is, the calibration accuracy, and effectively solves the core problem of the contradiction between the real-time calibration accuracy and the motor synchronous vibration effect in the prior art.
[0076] The embodiment of the application sets the free vibration period in the positive and negative half cycle conversion process, which ensures the accuracy and stability of the reverse electromotive force signal detection; in particular, the two-stage optimization scheme is adopted, which not only plays the high energy density and simple control advantages of the PWM wave in the calibration stage, but also avoids the electromagnetic compatibility problems that may be generated by the long-term driving of the PWM wave by switching to the sinusoidal wave signal in the vibration stage, realizes the perfect combination of calibration accuracy and driving smoothness, and provides a stable and reliable real-time calibration solution for the linear motor in various application environments.
[0077] Embodiment two
[0078] Please refer to Figure 10 The embodiment provides a linear motor real-time calibration device for realizing the linear motor real-time calibration method in embodiment one, which comprises the following modules: a PWM wave signal generation module, a signal control module, a reverse electromotive force detection module, a frequency calculation module and a frequency adjustment module.
[0079] The PWM wave signal generation module is configured to generate a PWM wave calibration signal with two half cycles of positive and negative.
[0080] The PWM wave calibration signal generated by the PWM wave signal generation module comprises two states of high and low. The module can be implemented by a digital signal processor (DSP), a microcontroller (MCU) or a dedicated PWM control chip.
[0081] In one specific example, the PWM wave signal generation module includes a clock source, a frequency divider, a comparator and an output drive circuit. The clock source provides a reference clock signal, the frequency divider divides the clock signal according to the required PWM frequency, the comparator generates the PWM waveform, and the output drive circuit amplifies the PWM signal to a level suitable for driving the linear motor.
[0082] The signal control module is configured to control the switching of the forced vibration period and the free vibration period in each half cycle. The module is connected to the PWM wave signal generation module and controls the output and stop of the PWM signal according to the preset timing.
[0083] The signal control module can be implemented by a software algorithm or by a hardware logic circuit.
[0084] The back electromotive force detection module is configured to detect the back electromotive force signal generated by the coil in the free vibration period. The module is electrically connected to the coil of the linear motor.
[0085] The frequency calculation module is configured to determine the resonant frequency of the linear motor according to the period of the back electromotive force signal. The module receives digital signals from the back electromotive force detection module and calculates the period and frequency of the signal through a software algorithm.
[0086] The frequency calculation method includes zero detection method, peak detection method and fast Fourier transform (FFT) method.
[0087] The frequency adjustment module is configured to adjust the frequency of the PWM wave calibration signal according to the determined resonant frequency. The module receives the resonant frequency information from the frequency calculation module and feeds it back to the PWM wave signal generation module to achieve closed-loop control.
[0088] The frequency adjustment can use proportional-integral-derivative (PID) control algorithm, fuzzy control algorithm or other feedback control algorithm.
[0089] In a preferred embodiment, the device further comprises a sine wave signal generation module for generating a sine wave signal to maintain the vibration of the linear motor after calibration.
[0090] In summary, the PWM wave signal generation module as a signal source, the output end is connected to the input end of the signal control module; the signal control module according to the preset timing control PWM signal on-off, its output end is directly connected to the coil input end of the linear motor, for driving linear motor forced vibration. The input end of the reverse electromotive force detection module is connected to the coil output end of the linear motor, for detecting the reverse electromotive force signal generated by the coil in the free vibration period; the detected signal is transmitted to the input end of the frequency calculation module after signal conditioning. The frequency calculation module receives the reverse electromotive force signal and calculates the resonant frequency of the linear motor, and the calculation result is input to the frequency adjustment module; the frequency adjustment module feeds back the resonant frequency information to the PWM wave signal generation module, forming a closed loop control circuit, and realizing the real-time adjustment of the frequency of the PWM wave calibration signal. The modules are connected through the data bus, the control bus or the special signal line, forming a complete calibration system. The control logic ensures that the PWM wave signal generation module works in the calibration stage, and the sine wave signal generation module works in the vibration stage.
[0091] The application also provides an electronic device comprising a linear motor and the linear motor real-time calibration device.
[0092] The electronic device can be a mobile phone, a smart watch, a smart bracelet, a tablet computer, a gamepad or other consumer electronic products requiring tactile feedback. The linear motor as a tactile device is installed inside the device, and provides tactile feedback for the user through vibration.
[0093] The linear motor is connected with the linear motor real-time calibration device, the signal output end of the calibration device is connected to the coil input end of the linear motor, and the input end of the reverse electromotive force detection module is connected to the coil output end of the linear motor.
[0094] The embodiment realizes the technical optimization of the hardware level through the modular system architecture design: the functions of each module are clear, the connection relationship is clear, the stability and reliability of the calibration process are ensured; the device structure is compact and has high integration, which is convenient for integration in various consumer electronic products, and provides high-quality tactile feedback experience for products.
[0095] In summary, the present application improves the balance of calibration accuracy and vibration effect by changing the sine wave calibration signal in the prior art to the PWM wave calibration signal, the PWM wave has higher signal amplitude than the sine wave, and can provide at least 11% energy gain in the same forced vibration time, solving the problem of mutual contradiction between calibration accuracy and motor synchronous vibration effect in the prior art. The PWM wave only contains two states of high level and low level, which is simpler than the sine wave which needs to be modulated in frequency and amplitude, only needs to receive the calibration value for periodic modulation in the real-time calibration process, reduces the error probability, avoids the motor vibration noise and product quality problems caused by inaccurate output signal. Through the two-segment signal sequence design, the advantages of the PWM wave are used for fast and accurate calibration in the calibration stage, and the sine wave is switched to maintain smooth vibration in the vibration stage, which ensures the accuracy of real-time calibration and avoids the disadvantages of PWM wave driving linear motor.
[0096] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application belong to the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.
Claims
1. A method for real-time calibration of a linear motor, characterized by, The method comprises: generating a PWM wave calibration signal, the PWM wave signal having two half cycles of positive and negative; setting a forced vibration period and a free vibration period in each of the half cycles; inputting the PWM wave calibration signal to the linear motor in the forced vibration period to drive the linear motor to perform forced vibration, and stopping inputting the PWM wave calibration signal in the free vibration period to make the linear motor perform free vibration; detecting a back electromotive force signal generated by the coil in the free vibration period, and determining the resonance frequency of the linear motor according to the period of the back electromotive force signal; adjusting the frequency of the PWM wave calibration signal according to the determined resonance frequency.
2. The linear motor real-time calibration method of claim 1, wherein, The PWM wave calibration signal comprises two states of high level and low level.
3. The linear motor real-time calibration method of claim 1, wherein, In one signal cycle T, the total length of the free vibration period and the forced vibration period is T / 2 respectively.
4. The linear motor real-time calibration method of claim 1, wherein, The free vibration period is set in the process of converting the positive half cycle of the PWM wave calibration signal to the negative half cycle.
5. The linear motor real-time calibration method of claim 1, wherein, The method further comprises: using the PWM wave calibration signal for real-time calibration in the calibration stage; using a sine wave signal to maintain the vibration of the linear motor in the vibration stage after the calibration is completed.
6. A linear motor real-time calibration device for implementing the method according to any one of claims 1 to 5, characterized in that, The method comprises: a PWM wave signal generation module for generating a PWM wave calibration signal having two half cycles of positive and negative; a signal control module for controlling the switching of the forced vibration period and the free vibration period in each half cycle; a back electromotive force detection module for detecting a back electromotive force signal generated by the coil in the free vibration period; a frequency calculation module for determining the resonance frequency of the linear motor according to the period of the back electromotive force signal; a frequency adjustment module for adjusting the frequency of the PWM wave calibration signal according to the determined resonance frequency.
7. The linear motor real-time calibration apparatus of claim 6, wherein The PWM wave signal generation module generates a PWM wave calibration signal containing two states of high level and low level.
8. The linear motor real-time calibration apparatus of claim 6, wherein, The method further comprises a sine wave signal generation module for generating a sine wave signal to maintain the vibration of the linear motor after the calibration is completed.
9. An electronic device, comprising: The method comprises: a linear motor and a linear motor real-time calibration device according to any one of claims 6 to 8.