Method and device for online adjusting control parameters of voice coil motor in real time
By calculating the back electromotive force and resonance frequency of the voice coil motor in real time, estimating the K value, and adjusting the control parameters, the performance degradation caused by the voice coil motor due to mechanical deformation is solved, and the automatic focus and OIS anti-shake effect of the voice coil motor is improved.
Patent Information
- Application Number
- CN202510538020.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-07-29
AI Technical Summary
In the prior art, the voice coil motor is deformed due to drop or impact during use of the terminal equipment, resulting in changes in sensitivity and shrapnel K value, which affects the decline in focus and OIS anti-shake performance, making it difficult to calibrate and correct parameters in real time.
By obtaining the voltage across both ends of the voice coil motor coil in real time, calculating the back electromotive force and resonance frequency, estimating the K value, and adjusting the control parameters such as PID coefficients in real time to improve the autofocus and OIS anti-shake performance of the voice coil motor.
It realizes accurate estimation of the voice coil motor resonance frequency and K value without relying on external sensors, adjusting control parameters in real time, and improving the focus and anti-shake performance of the voice coil motor.
Smart Images

Figure CN120389667A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of voice coil motors, and particularly to a method and device for online real-time adjustment of control parameters of a voice coil motor. Background Art
[0002] Most camera modules on terminal devices (such as smart phones, AR (Augmented Reality) / VR (Virtual Reality) devices, etc.) use voice coil motors to drive the lens group to move to achieve functions such as focusing or optical image stabilization (OIS). Generally, the calibrated voice coil motor parameters are burned into the storage device when the voice coil motor leaves the factory. It is very difficult to calibrate and correct the parameters after the voice coil motor is installed on the terminal device. When the terminal device drops or receives a strong impact during use, it will cause the mechanical structure of the voice coil motor to deform, resulting in changes in the mechanical characteristics of the voice coil motor, such as changes in the sensitivity of the voice coil motor and the K value (elastic coefficient) of the shrapnel. The change in the sensitivity of the voice coil motor is mainly reflected in the change in the distance that the voice coil motor can be pushed to move by the same current, which will ultimately cause the focusing or OIS anti-shake performance of the voice coil motor to decline. The change in the K value of the shrapnel is mainly reflected in the change in the bandwidth of the voice coil motor, and the control effect of the original control parameters such as PID parameters will decline. Summary of the Invention
[0003] The purpose of the present invention is to provide a method and device for online real-time adjustment of control parameters of a voice coil motor, which is used to improve the automatic focus (AF) or OIS anti-shake performance of the voice coil motor.
[0004] In order to achieve the above purpose, the present invention provides the following technical solutions:
[0005] A method for online real-time adjustment of control parameters of a voice coil motor includes:
[0006] Step S1: Real-time obtain the voltages at both ends of the voice coil motor coil;
[0007] Step S2: Calculate the back electromotive force according to the voltages at both ends of the voice coil motor coil;
[0008] Step S3: Calculate the resonance frequency of the voice coil motor according to the back electromotive force;
[0009] Step S4: Calculate the K value of the voice coil motor according to the resonance frequency of the voice coil motor;
[0010] Step S5: Real-time adjust the control parameters of the voice coil motor according to the K value of the voice coil motor.
[0011] Optionally, the step S1 includes: setting a sampling circuit in the driving chip of the voice coil motor, and collecting the voltages at both ends of the voice coil motor coil through the sampling circuit.
[0012] Optionally, step S1 further includes:
[0013] Drive the voice coil motor to move using a step excitation signal or a sine wave excitation signal, and then collect the voltage across the voice coil motor coil through the sampling circuit.
[0014] Optionally, step S2 includes: calculating the back electromotive force EMF using the following formula:
[0015] EMF = U - Ri
[0016] Wherein, U is the voltage across the voice coil motor coil, i is the current applied to the voice coil motor coil, and R is the resistance value of the voice coil motor coil.
[0017] Optionally, step S3 includes: calculating the motor resonance frequency f0 through the time between two peaks in the back electromotive force, i.e., the resonance period ΔT, as:
[0018]
[0019] Optionally, step S4 includes:
[0020] K = m * (2π * f0) 2
[0021] Wherein, K represents the K value of the voice coil motor, m represents the weight of the motor lens; f0 represents the motor resonance frequency.
[0022] Optionally, step S5 includes:
[0023] Adjust the PID coefficient in the controller parameters according to the K value of the voice coil motor to adjust the motor controller loop gain.
[0024] Optionally, step S3 further includes: performing FFT processing on the back electromotive force to obtain the voice coil motor resonance frequency.
[0025] On the other hand, the present invention also provides a device for online real-time adjustment of the control parameters of a voice coil motor. A sampling circuit is connected to the voice coil motor coil for real-time collection of the voltage across the voice coil motor coil; a calculation module is connected to the sampling circuit for calculating the back electromotive force based on the voltage across the voice coil motor coil, calculating the voice coil motor resonance frequency based on the back electromotive force, and calculating the K value of the voice coil motor based on the voice coil motor resonance frequency; a controller is used to adjust the controller parameters in real time according to the K value of the voice coil motor to adjust the motor controller loop gain.
[0026] Optionally, the calculation module specifically calculates the K value of the voice coil motor according to the following formula:
[0027] The back electromotive force EMF is calculated using the following formula:
[0028] EMF = U - Ri
[0029] K = m*(2π*f0) 2
[0030] Wherein, U is the voltage across the coil of the voice coil motor, i is the current applied to the voice coil motor coil, and R is the resistance value of the voice coil motor coil; m represents the weight of the motor lens; f0 represents the motor resonance frequency directly calculated from the back electromotive force or calculated by performing FFT processing on the back electromotive force.
[0031] The present invention has at least the following technical effects:
[0032] The present invention estimates the resonance frequency f0 of the voice coil motor by using the back electromotive force generated on the coil during the movement of the voice coil motor, then calculates the K value of the shrapnel of the voice coil motor, and adjusts the control parameters of the motor in real time online according to the change of the K value, thereby improving the AF focusing or OIS anti-shake performance of the voice coil motor. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a schematic flow chart of a method for online real-time adjustment of the control parameters of a voice coil motor provided by an embodiment of the present invention;
[0034] Figure 2 It is a step signal excitation test block diagram provided by an embodiment of the present invention;
[0035] Figure 3 It is a schematic diagram of the back electromotive force under step signal excitation provided by an embodiment of the present invention;
[0036] Figure 4 It is a sine signal excitation test block diagram provided by an embodiment of the present invention;
[0037] Figure 5 It is a schematic diagram of the back electromotive force under sine signal excitation provided by an embodiment of the present invention;
[0038] Figure 6 It is a schematic block diagram for calculating the resonance frequency of a voice coil motor using FFT provided by an embodiment of the present invention;
[0039] Figure 7 It is a schematic diagram of an EMF sampling circuit provided by an embodiment of the present invention;
[0040] Figure 8 It is a closed-loop control block diagram of a voice coil motor provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0041] The following further elaborates in detail a method and device for online real-time adjustment of the control parameters of a voice coil motor in conjunction with the accompanying drawings and specific embodiments. According to the following description, the advantages and features of the present invention will be clearer. It should be noted that the accompanying drawings are in a very simplified form and use non-precise scales, only for conveniently and clearly assisting in explaining the purpose of the embodiments of the present invention. In order to make the purpose, features, and advantages of the present invention more obvious and understandable, please refer to the accompanying drawings. It should be noted that the structures, scales, sizes, etc. shown in the drawings of this specification are only used to cooperate with the content disclosed in the specification for those familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention. Therefore, they do not have a substantial technical meaning. Any modification of the structure, change in the proportional relationship, or adjustment of the size, without affecting the effects that the present invention can produce and the purpose that can be achieved, should still fall within the scope covered by the technical content disclosed in the present invention.
[0042] As Figure 1 shown, this embodiment provides a method for online real-time adjustment of the control parameters of a voice coil motor, including:
[0043] Step S1: Real-time obtain the voltages at both ends of the voice coil motor coil;
[0044] Step S2: Calculate the back electromotive force according to the voltages at both ends of the voice coil motor coil;
[0045] Step S3: Calculate the resonance frequency of the voice coil motor according to the back electromotive force;
[0046] Step S4: Calculate the K value of the voice coil motor according to the resonance frequency of the voice coil motor;
[0047] Step S5: Real-time adjust the control parameters of the voice coil motor according to the K value of the voice coil motor.
[0048] In this embodiment, by using the back electromotive force generated on the coil during the movement of the voice coil motor to estimate the resonance frequency f0 of the voice coil motor, then calculating the K value of the diaphragm of the voice coil motor, and online real-time adjusting the control parameters of the motor according to the change of the K value, so as to improve the AF focusing or OIS anti-shake performance of the voice coil motor.
[0049] In this embodiment, the step S1 includes: by setting a sampling circuit in the voice coil motor, and collecting the voltages at both ends of the voice coil motor coil through the sampling circuit. The specific sampling circuit can be referred to Figure 7 shown, and will be described in detail later.
[0050] In this embodiment, as Figure 2 and Figure 3 shown, the step S1 further includes:
[0051] The voice coil motor is driven by a step excitation signal Target, and then the voltage across the voice coil motor coil is collected by the sampling circuit.
[0052] In this embodiment, the step S2 includes: The back electromotive force EMF is calculated as follows:
[0053]
[0054] In the formula, U is the voltage across the voice coil motor coil, L is the coil inductance, i is the current applied to the coil, and R is the resistance value of the coil. Since the voice coil motor mostly uses constant current drive and the inductance of the voice coil motor coil is very small and can be ignored, so there is:
[0055] EMF = U - Ri (2)
[0056] After calculating the back electromotive force on the coil from the above formula, the resonant frequency of the voice coil motor and the K value of the shrapnel can be calculated according to the information of the back electromotive force.
[0057] The step S3 includes: Please continue to refer to Figure 3 as shown Figure 3 is a schematic diagram of the back electromotive force EMF generated by the voice coil motor coil under the drive of the step excitation signal Target. The resonant frequency f0 of the voice coil motor can be calculated through the time of the two wave peaks in the back electromotive force EMF, that is, the resonant period ΔT:
[0058]
[0059] The step S4 includes: The natural oscillation frequency f of the voice coil motor can be calculated from the resonant frequency f0 n as:
[0060]
[0061] In the formula, ζ represents the damping of the voice coil motor;
[0062] The transfer function VCM(s) of the voice coil motor under common constant current drive is shown as follows:
[0063]
[0064] In the formula: X(s) represents the displacement transfer function of the voice coil motor; I(s) represents the drive current of the voice coil motor; s represents the complex frequency, which is the expression in the frequency domain; m is the mass of the motor lens, c is the motor damping, K is the elastic coefficient of the shrapnel, and BL is the sensitivity of the motor.
[0065] It can be known from the second-order typical system formula that:
[0066]
[0067] where w n represents the natural oscillation frequency of the voice coil motor, also known as the undamped frequency. The subscript n has no meaning. w n is integral; the weight m of the voice coil motor lens is generally given by the motor factory, so the K value of the motor can be known as:
[0068] K = m * (2π * f p ) 2 (8)
[0069] Also, since the damping ζ of the voice coil motor is generally made very small, there is:
[0070] f n ≈ f0 (9)
[0071] So the calculation of the K value is simplified to:
[0072] K = m * (2π * f0) 2 (10)
[0073] In some other embodiments, as shown in Figure 4 and Figure 5 , similarly, the voice coil motor can also be driven or excited by a sine wave excitation signal, as shown in Figure 4 . At the end of the sine wave excitation signal excitation, the voltage across the voice coil motor coil is collected through a sampling circuit, and the back electromotive force EMF is calculated using the above formula (2). The amplitude of the back electromotive force signal collected by this method is larger than that under the step excitation signal, which is convenient for calculating the resonance period ΔT.
[0074] In some other embodiments, as shown in Figure 6 , the step S3 further includes: performing FFT (Fast Fourier Transform) processing on the back electromotive force EMF to obtain the resonance frequency of the voice coil motor. That is, when the back electromotive force is calculated, FFT processing is performed on the back electromotive force, and FFT processing can calculate the resonance frequency more accurately.
[0075] Through FFT processing, it can solve the problem that due to the noise of the actual sampling circuit and the very small back electromotive force of the voice coil motor itself, the back electromotive force is not obvious or submerged in the noise, making it difficult to calculate the more accurate resonance period f0 of the voice coil motor according to the methods of Figure 3 and Figure 5 .
[0076] As shown in Figure 6 , after obtaining the resonance frequency f0 through FFT processing, the K value of the voice coil motor can be further calculated according to the above formula (10).
[0077] In this embodiment, the step S5 includes:
[0078] Adjust the PID coefficients in the controller parameters according to the K value of the voice coil motor to adjust the loop gain of the motor controller.
[0079] On the other hand, as Figure 7 and Figure 8 shown, this embodiment also provides a device for online real-time adjustment of the control parameters of a voice coil motor, including:
[0080] A sampling circuit 100, connected to the voice coil motor coil (VCM coil), for real-time acquisition of the voltage across the voice coil motor coil; a calculation module 103, connected to the sampling circuit 100, for calculating the back electromotive force according to the voltage across the voice coil motor coil, calculating the resonance frequency of the voice coil motor according to the back electromotive force, and calculating the K value of the voice coil motor according to the resonance frequency of the voice coil motor; a controller, for real-time adjustment of the controller parameters according to the K value of the voice coil motor to adjust the loop gain of the motor controller.
[0081] In this embodiment, by using the back electromotive force generated on the coil during the movement of the voice coil motor to estimate the resonance frequency f0 of the voice coil motor, then calculating the K value of the shrapnel of the voice coil motor, and online real-time adjusting the control parameters of the motor according to the change of the K value, the AF focusing or OIS anti-shake performance of the voice coil motor is improved.
[0082] As Figure 7 shown, the sampling circuit 100 includes an amplification circuit 101 and an analog-to-digital conversion circuit ADC (Analog to Digital Converter) 102. First, the amplification circuit 101 amplifies the voltage across the voice coil motor coil by a certain multiple, and adds a bias voltage so that the voltage is positive when the voice coil motor coil moves on both sides, and after adding the bias voltage, it is necessary to meet the voltage range collected by the analog-to-digital conversion circuit 102, such as within the range of 0 - 3.3V. Then, after the analog-to-digital conversion circuit 102 collects the voltage across the voice coil motor coil, it converts it into a digital signal and gives it to the calculation module (algorithm processing module) 103, and calculates parameters such as the value of the back electromotive force EMF and the K value of the voice coil motor through algorithm processing.
[0083] The specific calculation is as follows: In this embodiment, the calculation module 103 specifically calculates the K value of the voice coil motor according to the following formula: The back electromotive force EMF is calculated using the following formula:
[0084] EMF = U - Ri
[0085] K = m * (2π * f0) 2
[0086] Wherein, U is the voltage across the voice coil motor coil, i is the current applied to the voice coil motor coil, and R is the resistance value of the voice coil motor coil; m represents the weight of the motor lens; f0 represents the motor resonance frequency directly calculated from the back electromotive force or obtained by performing FFT processing on the back electromotive force.
[0087] As Figure 8 shown, in this embodiment, the K - value compensation algorithm is used to adjust the parameters of the motor controller to improve the control performance of the motor after the K - value changes.
[0088] After the voice coil motor leaves the factory, the parameters of the controller are already fixed and no longer adjusted. During use, the voice coil motor may experience situations such as aging, collision, and high temperature, which may cause changes in the mechanical characteristics of the voice coil motor. The most typical one is the change in the K - value. At this time, the parameters of the current controller are difficult to meet the performance requirements of the voice coil motor. In this embodiment, after the K - value of the voice coil motor is detected by the motor EMF observer (i.e., including the sampling circuit 100 and the calculation module 103), the parameters of the controller of the voice coil motor (such as the PID coefficients, where P is the proportional coefficient, I is the integral coefficient, and D is the differential coefficient) are adjusted in a timely manner, so that the voice coil motor can still maintain high performance after undergoing the above - mentioned changes. Its control block diagram is as Figure 8 shown. On the basis of closed - loop control, an EMF observer is introduced. After calculating the resonance frequency f0 of the voice coil motor and the change in the K - value of the shrapnel, the controller parameters are further adjusted.
[0089] For example, some factors may cause the K - value of the voice coil motor to become smaller. At this time, the controller loop gain of the voice coil motor needs to be increased, and the PID coefficients can be appropriately increased; sometimes the K - value of the voice coil motor becomes larger, then in order to meet the consistency of the control performance of the voice coil motor, the PID coefficients can be appropriately decreased.
[0090] In addition, Figure 8 in the [figure / description], the feedback is generally multiplied by a gain, and the gain is mostly 1, that is, direct negative feedback. The controller is generally a PID controller. The control signal output by the PID controller is converted by the digital - to - analog conversion module DAC and then output to the voice coil motor coil to achieve the control of the voice coil motor coil.
[0091] In summary, the present invention provides a method for estimating the resonance frequency f0 of a voice coil motor, which can effectively estimate the resonance frequency f0 of the voice coil motor without relying on external sensor signals. By adjusting the control parameters of the voice coil motor according to the change of the resonance frequency f0, the automatic focusing or OIS control effect of the VCM (Voice Coil Motor) can be improved. Currently, other common methods include calculating the resonance frequency f0 of the voice coil motor based on the signals output by the built-in position sensor of the motor, such as a Hall chip or a Hall chip built into the drive chip, or testing the frequency response curve of the motor through a specific frequency response tester, and then obtaining the resonance frequency f0 of the voice coil motor. Such methods are relatively dependent on position sensors or external instruments, and the signal output by the hall chip is very small, at the mV (millivolt) level. If the signal-to-noise ratio of the corresponding signal amplification circuit is not high enough, the error between the estimated resonance frequency f0 and the actual value will be relatively large. The present invention can detect the resonance frequency f0 of the voice coil motor without a position sensor, and the amplitude of the coil voltage signal is large, the signal chain has a high signal-to-noise ratio, and the calculation result is relatively accurate, which can better improve the automatic focusing or OIS control effect of the voice coil motor.
[0092] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or device including the said element.
[0093] It should be noted that the devices and methods disclosed in the embodiments of this article can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of this article. In this regard, each block in the flowchart or block diagram can represent a module, program, or a part of the code. The part of the module, program segment, or code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0094] In addition, each functional module in the various embodiments of this article can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.
[0095] Although the content of the present invention has been introduced in detail through the above preferred embodiments, it should be recognized that the above description should not be considered as a limitation of the present invention. After those skilled in the art have read the above content, various modifications and alternatives to the present invention will be obvious. Therefore, the protection scope of the present invention should be defined by the appended claims.
Claims
1. A method for online real-time adjustment of control parameters of a voice coil motor, characterized in that, Including: Step S1: Obtain the voltages at both ends of the voice coil motor coil in real time; Step S2: Calculate the back electromotive force according to the voltages at both ends of the voice coil motor coil; Step S3: Calculate the resonance frequency of the voice coil motor according to the back electromotive force; Step S4: Calculate the K value of the voice coil motor according to the resonance frequency of the voice coil motor; Step S5: Adjust the control parameters of the voice coil motor in real time according to the K value of the voice coil motor.
2. The method for online real-time adjustment of the control parameters of a voice coil motor according to claim 1, wherein, The said Step S1 includes: By setting a sampling circuit in the driving chip of the voice coil motor, and collecting the voltages at both ends of the voice coil motor coil through the sampling circuit.
3. The method for online real-time adjustment of control parameters of a voice coil motor according to claim 2, wherein The said Step S1 further includes: Driving the voice coil motor to move with a step excitation signal or a sine wave excitation signal, and then collecting the voltages at both ends of the voice coil motor coil through the sampling circuit.
4. The method for online real-time adjustment of control parameters of a voice coil motor according to claim 1, characterized in that The said Step S2 includes: Calculating the back electromotive force EMF by using the following formula: EMF = U - Ri In the formula, U is the voltage at both ends of the voice coil motor coil, i is the current applied to the voice coil motor coil, and R is the resistance value of the voice coil motor coil.
5. The method for online real-time adjustment of control parameters of a voice coil motor according to claim 1, wherein, The said Step S3 includes: Calculating the motor resonance frequency f0 through the time between two wave peaks in the back electromotive force, that is, the resonance period ΔT as:
6. The method for online real-time adjustment of the control parameters of a voice coil motor according to claim 1, characterized in that The said Step S4 includes: K = m*(2π*f0) 2 In the formula, K represents the K value of the voice coil motor, m represents the weight of the motor lens; f0 represents the motor resonance frequency.
7. The method for online real-time adjustment of the control parameters of a voice coil motor according to claim 1, characterized in that, The said Step S5 includes: Adjusting the PID coefficient in the controller parameters according to the K value of the voice coil motor to adjust the loop gain of the motor controller.
8. The method for online real-time adjustment of the control parameters of a voice coil motor according to claim 1, characterized in that, The said Step S3 further includes: Performing FFT processing on the back electromotive force to obtain the resonance frequency of the voice coil motor.
9. An apparatus for online real-time adjustment of control parameters of a voice coil motor, characterized in that, A sampling circuit, connected to the voice coil motor coil, for collecting the voltages at both ends of the voice coil motor coil in real time; A calculation module, connected to the sampling circuit; for calculating the back electromotive force according to the voltages at both ends of the voice coil motor coil, calculating the resonance frequency of the voice coil motor according to the back electromotive force, and calculating the K value of the voice coil motor according to the resonance frequency of the voice coil motor; A controller, for adjusting the controller parameters in real time according to the K value of the voice coil motor to adjust the loop gain of the motor controller.
10. The device for online real-time adjustment of the control parameters of a voice coil motor according to claim 1, characterized in that, The said calculation module specifically calculates the K value of the voice coil motor according to the following formula: Calculating the back electromotive force EMF by using the following formula: EMF = U - Ri K = m * (2π * f0) 2 In the formula, U is the voltage at both ends of the voice coil motor coil, i is the current applied to the voice coil motor coil, R is the resistance value of the voice coil motor coil; m represents the weight of the motor lens; f0 represents the motor resonance frequency directly calculated from the back electromotive force or calculated through FFT processing of the back electromotive force.