Disclosed are a method and a device for adjusting PID control parameters in an anti-shake system, a camera device and a storage medium. The method includes: determining a shake state of a camera device according to an angular velocity of an actuator in the anti-shake system in a preset period corresponding to a time acquisition point. The actuator is configured to adjust positions of the optical elements in the camera device to offset the shake of the camera device; determining target PID control parameters to drive the actuator to perform anti-shake compensation on the camera device through the target PID control parameters according to the shake state. The corresponding target PID control parameters are determined through the specific shake state, so that the PID control parameters change according to the shake state to be suitable for different anti-shake scenarios, which improves the flexibility and adaptability of the anti-shake system.
Legal claims defining the scope of protection, as filed with the USPTO.
. A method for adjusting proportion-integration-differentiation (PID) control parameters in an anti-shake system, comprising:
. The method for adjusting PID control parameters in an anti-shake system as described in, wherein the determining the shake state of the camera device according to the angular velocity of the actuator in the anti-shake system in the preset period corresponding to the time acquisition point, comprising:
. The method for adjusting PID control parameters in an anti-shake system as described in, wherein the determining target PID control parameters according to the shake state, comprising:
. The method for adjusting PID control parameters in an anti-shake system as described in, wherein determining the target PID control parameters according to the initial PID control parameters, comprising:
. The method for adjusting PID control parameters in an anti-shake system as described in, wherein determining the target PID control parameters according to the initial PID control parameters, comprising:
. The method for adjusting PID control parameters in an anti-shake system as described in, wherein the target PID control parameters comprises: a target proportional control parameter, a target integral parameter, and a target differential parameter;
. The method for adjusting PID control parameters in an anti-shake system as described in, wherein the shake state is one of zero shake, normal shake, and abnormal shake;
. A device for adjusting proportion-integration-differentiation (PID) control parameters in an anti-shake system, comprising:
. A non-transitory computer-readable storage medium storing a computer program, wherein the computer program implements the method for adjusting PID control parameters in an anti-shake system as described inwhen executed by a processor.
Complete technical specification and implementation details from the patent document.
The present disclosure relates to the field of optical image stabilization and, in particular, to a method and a device for adjusting PID control parameters in an anti-shake system, a camera device and a storage medium.
With the rapid development of science and technology and the continuous innovation of various industries, the importance of optical image stabilizer (OIS) technology in photography and visual applications has become increasingly prominent. By introducing a control system into the optical system, the OIS technology effectively reduces image shake caused by vibration of the camera device, handheld photography or other motions, and thus improving image quality and user experience.
In the conventional anti-shake system, it is usually necessary to continuously correct the position adjustment of the optical elements through proportion integration differentiation (PID) control parameters to achieve the anti-shake effect. The PID control parameters in the related art is a fixed value, and the PID control parameters cannot be adjusted or changed, which is difficult to meet requirements of different anti-shake scenarios.
The object of the present disclosure is to provide a method and a device for adjusting PID control parameters in an anti-shake system, a camera device and a storage medium, so that the PID control parameters may be changed according to a shake state to meet compensation requirements of different anti-shake scenarios.
To solve the above technical problem, embodiments of the present disclosure provides a method for adjusting PID control parameters in an anti-shake system, including: determining a shake state of a camera device according to an angular velocity of an actuator in the anti-shake system in a preset period corresponding to a time acquisition point. The actuator is configured to adjust positions of optical elements in the camera device to offset the shake of the camera device; and determining target PID control parameters to drive the actuator to perform anti-shake compensation on the camera device through the target PID control parameters according to the shake state.
As an improvement, the determining the shake state of the camera device according to the angular velocity of the actuator in the anti-shake system in the preset period corresponding to the time acquisition point, including: determining a maximum angle of the actuator in the preset period according to the angular velocity of the actuator in the anti-shake system in the preset period corresponding to the time acquisition point; and determining the shake state of the camera device according to the maximum angle.
As an improvement, the determining target PID control parameters according to the shake state, including: determining initial PID control parameters corresponding to the shake state; and determining the target PID control parameters according to the initial PID control parameters.
As an improvement, determining the target PID control parameters according to the initial PID control parameters, including: using the initial PID control parameters as the target PID control parameters.
As an improvement, determining the target PID control parameters according to the initial PID control parameters, including: defuzzifying the initial PID control parameters to obtain the target PID control parameters.
As an improvement, the target PID control parameters includes: a target proportional control parameter, a target integral parameter, and a target differential parameter. The defuzzifying the initial PID control parameters to obtain the target PID control parameter, including: determining the target proportional control parameters according to a proportional control membership function and the initial PID control parameters; determining the target integral parameters according to an integral membership function and the initial PID control parameters; and determining the target differential parameters according to a differential membership function and the initial PID control parameters.
As an improvement, the shake state is one of zero shake, normal shake, and abnormal shake. Prior to the determining the target PID control parameters according to the initial PID control parameters, the method further including: obtaining the initial PID control parameters corresponding to the zero shake, the normal shake and the abnormal shake, respectively; and determining the proportional control membership function, the integral membership function and the differential membership function according to the initial PID control parameters corresponding to the zero shake, the normal shake and the abnormal shake.
Embodiments of the present disclosure further provide a device for adjusting PID control parameters in an anti-shake system, including: a first determining module configured to determine a shake state of a camera device according to an angular velocity of an actuator in the anti-shake system in a preset period corresponding to a time acquisition point. The actuator is configured to adjust positions of optical elements in the camera device to offset the shake of the camera device; and a second determining module configured to determine target PID control parameters to drive the actuator to perform anti-shake compensation on the camera device through the target PID control parameters according to the shake state.
Embodiments of the present disclosure further provide a camera device, including: at least one processor; and a memory communicatively connected to the at least one processor, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method for adjusting PID control parameters in an anti-shake system as described above.
Embodiments of the present disclosure further provide a non-transitory computer-readable storage medium storing a computer program, the computer program implements the method for adjusting PID control parameters in an anti-shake system as described above when executed by a processor.
The present disclosure provides method, device, camera device and storage medium for adjusting PID control parameters in an anti-shake system, a shake state of a camera device is determined according to the angular velocity of an actuator in the anti-shake system in a preset period corresponding to time acquisition points. The actuator is configured to adjust the position of the optical elements in the camera device to offset the shake of the camera device. A target PID control parameters is determined to drive the actuator to perform anti-shake compensation on the camera device through the target PID control parameters according to the shake state. The present disclosure determines the corresponding target PID control parameters through the specific shake state, so that the PID control parameters change according to the shake state to be suitable for different anti-shake scenarios, which may improve the flexibility and adaptability of the anti-shake system.
In order to more clearly illustrate objectives, technical solutions, and advantages of embodiments of the present disclosure, the technical solutions in embodiments of the present disclosure are clearly and completely described in details with reference to the accompanying drawings. The described embodiments are merely part of the embodiments of the present disclosure rather than all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without paying creative efforts shall fall into the protection scope of the present disclosure. The following embodiments are divided for ease of description, and shall not constitute any limitation on specific implementations of the present disclosure, and the embodiments may be mutually incorporated by reference without contradiction.
With the rapid development of science and technology and the continuous innovation of various industries, the importance of OIS technology in photography and visual applications has become increasingly prominent. By introducing a control system into the optical system, the OIS technology effectively reduces image shake caused by vibration of the camera device, handheld photography or other motions, and thus improving image quality and user experience.
In a typical OIS system/anti-shake system, a control system usually includes a sensor, an actuator, and a feedback loop. The sensor is responsible for detecting a motion state of a camera device, the actuator performs slight adjustment on optical elements in the camera device to offset shake, and the feedback loop performs monitoring system performance and performs adjustment. These components work cooperatively, so that the OIS system may provide a more stable image in a motion scenario. The actuator may be a voice coil motor/a voice coil motor (VCM) motor. The feedback loop collects a current displacement of the actuator through a Hall device, and calculates a correct displacement that should deviate by collecting an angular velocity through a gyroscope sensor device (Gyro) of an inertial measurement unit (IMU). A compensation current that should be adopted is obtained through a Proportion-Integral-Differential control algorithm through a difference between the two displacements to drive the actuator for correction, which achieves the anti-shake effect.
PID control parameters in a PID control algorithm in the related art are always fixed values, and the PID control parameters cannot be adjusted or changed, which is difficult to meet requirements of different anti-shake scenarios. Therefore, a flexible multi-control algorithm switching mechanism is urgently needed to adapt to different anti-shake scenarios, and a mechanism capable of switching multiple sets of PID control parameters in different anti-shake scenarios is significant.
Embodiments of the present disclosure relate to a method, which, as shown in, includes the following steps.
Step: a shake state of the camera device is determined according to an angular velocity of an actuator in an anti-shake system in a preset period corresponding to time acquisition points.
In the correction process of the anti-shake system, when shake occurs at the lens of the camera device, in addition to the shake that needs to be compensated under the normal condition of the user, there is also a condition that does not need to be compensated which is completely static, and there is also a scenario that needs fast return to the middle, for example, in a Pan (outside the correction capability of the actuator)/Tilt (within the correction capability of the actuator) state, so as to prevent a long waiting time when normal compensation is required.
In embodiments of the present disclosure, the shake state of the camera device includes three types: zero shake, normal shake, and abnormal shake. Zero shake indicates that the camera device is in a static state, normal shake indicates shake within the correction capability of the actuator, and abnormal shake indicates shake outside the correction capability of the actuator.
As for the shake amplitudes of the normal shake and the abnormal shake, as shown in, the abscissa is time, and the ordinate is shake amplitude. It may be seen that the shake amplitude of the normal shake is greater than the shake amplitude of the abnormal shake, and OIS control needs to be performed in different manners for the two shake modes.
Regarding the frequency domain bandwidths of normal shake and abnormal shake, as shown in, the abscissa is the frequency domain bandwidth, and the ordinate is time. It may be seen that the frequency domain bandwidths in these two shake modes are similar, which cannot be distinguished from the frequency domain, and can only be distinguished through the time domain.
It may be seen through experiments that the angular velocity of the actuator is relatively stable in the zero shake state, the change of amplitude of the angular velocity of the actuator in normal shake is greater than that of the angular velocity in the zero shake state, and the change of the amplitude of the angular velocity of the actuator in abnormal shake is greater than that of the angular velocity in the normal shake state.
Therefore, in the present disclosure, the shake state of the camera device may be determined according to the angular velocity of the actuator in the anti-shake system inside the camera device. It is appreciated that, it may also be determined according to other parameters, which is not specifically limited in the embodiments of the present disclosure.
If the camera device is shaking, the shake is an action change in a time period, and therefore, the angular velocity of the actuator in a time period near time acquisition points needs to be collected to determine the shake state of the camera device. The preset period may be set according to actual needs, and is not specifically limited in the embodiments of the present disclosure.
In embodiments of the present disclosure, the actuator is configured to adjust the position of optical elements in the imaging device to offset shake of the camera device.
Step: target PID control parameters are determined according to the shake state.
During normal shake, normal general PID control parameters are started to be used as correction of the target PID control parameters for compensation, so that the problem of fuzzy picture may be solved, but under the zero shake or abnormal shake state, the original PID control coefficient needs to be specially processed according to the shake state of the camera device. After the target PID control parameters are determined, the actuator is driven by using the target PID control parameters to perform anti-shake compensation on the camera device.
In an embodiment, when it is determined that the shake state of the camera device is zero shake, i.e., static state, it is recommended that the PID control algorithm does not work, that is, the PID control parameters may be set to zero, so that power is saved and no photographing fuzzy is caused. When it is determined that the current shake state of the camera device is the abnormal shake state, the general design goal is the position of the center line of the module, and fast return to the middle is required, so as to avoid the crust breaking of the module due to integral saturation to increase the service life of the module. When the state is switched from the abnormal shake state to the shake that needs to be normally compensated, the duration will not be too long, and the user experience is not affected. Return to the middle is used to avoid waiting for a long time when the OIS system is corrected and started next time, because when the lens of the camera device has up and down shake after returning to the center line position of the module, correction may be conveniently carried out through a PID control algorithm through the difference between the desired angle and the target angle, and the OIS system is prepared for initial starting through the return to the middle.
Embodiments of the present disclosure provide a method for adjusting PID control parameters in an anti-shake system, a shake state of a camera device is determined according to the angular velocity of an actuator in the anti-shake system in a preset period corresponding to time acquisition points. The actuator is used to adjust the position of the optical elements in the camera device to offset the shake of the camera device. A target PID control parameters is determined to drive the actuator to perform anti-shake compensation on the camera device through the target PID control parameters according to the shake state. The present disclosure determines the corresponding target PID control parameters through the specific shake state, so that the PID control parameters change according to the shake state to be suitable for different anti-shake scenarios, which may improve the flexibility and adaptability of the anti-shake system.
Based on the method for adjusting PID control parameters in an anti-shake system shown in, embodiments of the present disclosure further provide a method for adjusting PID control parameters in an anti-shake system, as shown in, step: the shake state of the camera device is determined according to the angular velocity of the actuator in the anti-shake system in the preset period corresponding to the time acquisition point, which includes the following steps.
Step: the maximum angle of the actuator in the preset period is determined according to the angular velocity of the actuator in the anti-shake system in the preset period corresponding to the time acquisition point.
The angular velocity signal collected by the gyroscope sensor device is de-DC and integrated to obtain the angle. In order to determine the shake state of the camera device at the current moment, the shake state of the camera device may be determined by selecting the time acquisition point corresponding to the maximum angle of the actuator in the preset period.
As shown in, the abscissa is time, and the ordinate is angle (unit: degrees), Δis the present time, and a maximum angle θwithin the preset period is θThe tolerable error is calculated according to the angle difference multiplied by the focal length, and at present, the tolerable error in the normal state in the field is about +/−2˜3 um, and the tolerable error angle may be obtained by dividing by the general focal length.
In an embodiment, the time acquisition point is usually the current time point.
For example, according to the angular velocity of the actuator in the anti-shake system in the preset period corresponding to the time acquisition point, the timing information of the angle θ is obtained after the angular velocity is preprocessed (including de-DC, filtration and integration), and the angle θ is subjected to low-pass filtering (such as the first-order IIR filter, the purpose is to eliminate the influence of noise interference). As shown in, the maximum angle of the angle θ in the preset period is obtained according to the following method.
If the angle θ(n) of the time acquisition point n1 within the preset period satisfies θ(n1)≥θ(n1−1) and θ(n1)≥θ(n1+1), the maximum angle θ=max((n1),0.05); and if the time acquisition point does not exist, the maximum angle θ=0.05, which is the preset maximum initial value. If the angle θ(n2) of the time acquisition point n2 within the preset period satisfies θ(n2)≤(n2−1) and θ(n2)≥θ(n2+1), the maximum angle θ=min(θ(n),−0.05); and if the time acquisition point does not exist, the maximum angle θ=−0.05, which is the preset minimum initial value. At this time, the maximum angle θ=max(|θ|,|θ|).
Step: the shake state of the camera device is determined according to the maximum angle.
The shake state corresponding to the maximum angle is determined as the shake state of the camera device according to the correspondence between angles and shake states.
For example, if it is known that the angle that the VCM motor may correct is ±0.8 degrees, the correspondence between the angle and the shake state may be preset. For example, when the absolute value of the angle is less than 0.05 degrees, the corresponding shake state is zero shake, the absolute value of the angle is within 0.05 to 0.8 degrees, the corresponding shake state is normal shake, and when the absolute value of the angle is greater than 0.8 degrees, the corresponding shake state is abnormal shake.
In some embodiments, after the maximum angle is obtained, three membership states/membership values in the three shake states may be obtained according to the maximum angle, and then the shake state of the camera device may be determined according to the three membership states/membership values. As shown in, it is a correspondence between three membership states/membership values in three shake states and the maximum angle θ, ZE is zero shake, HS is normal shake, and PT is abnormal shake.
According to the method for adjusting PID control parameters in an anti-shake system provided by the embodiments of the disclosure, the maximum angle of the actuator within the preset period is determined according to the angular velocity of the actuator in the anti-shake system within the preset period corresponding to the time acquisition points, and the shake state of the camera device may be determined according to the maximum angle.
Based on the method for adjusting PID control parameters in an anti-shake system shown in, embodiments of the present disclosure further provide a method for adjusting PID control parameters in an anti-shake system, for example, as shown in, step: target PID control parameters are determined according to the shake state, which includes the following steps.
Step: initial PID control parameters corresponding to the shake state are determined.
The three coefficients K, K, Kin the PID control algorithm have respective functions, which may correspond to different control scenarios as shown in the following table.
The initial PID control parameters may include: an initial proportional control parameter, an initial integral parameter, and an initial differential parameter.
Unknown
September 25, 2025
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.