CN113805611A - Video image stabilization method based on three-axis holder - Google Patents
Video image stabilization method based on three-axis holder Download PDFInfo
- Publication number
- CN113805611A CN113805611A CN202111123803.2A CN202111123803A CN113805611A CN 113805611 A CN113805611 A CN 113805611A CN 202111123803 A CN202111123803 A CN 202111123803A CN 113805611 A CN113805611 A CN 113805611A
- Authority
- CN
- China
- Prior art keywords
- angle
- speed
- stepping motor
- control
- algorithm
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 230000006641 stabilisation Effects 0.000 title claims abstract description 26
- 238000011105 stabilization Methods 0.000 title claims abstract description 26
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 55
- 230000001133 acceleration Effects 0.000 claims description 21
- 238000005070 sampling Methods 0.000 claims description 10
- 230000005484 gravity Effects 0.000 claims description 8
- 239000011159 matrix material Substances 0.000 claims description 6
- 238000005096 rolling process Methods 0.000 claims description 6
- 239000000126 substance Substances 0.000 claims description 6
- 230000004927 fusion Effects 0.000 claims description 5
- 238000004364 calculation method Methods 0.000 claims description 4
- 230000000087 stabilizing effect Effects 0.000 claims description 4
- 230000007774 longterm Effects 0.000 claims description 3
- 238000010606 normalization Methods 0.000 claims description 2
- 230000033228 biological regulation Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 3
- 238000004088 simulation Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D3/00—Control of position or direction
- G05D3/12—Control of position or direction using feedback
- G05D3/20—Control of position or direction using feedback using a digital comparing device
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Studio Devices (AREA)
- Control Of Position Or Direction (AREA)
Abstract
The invention relates to a video image stabilization method based on a three-axis holder, which comprises an attitude information acquisition part and a control part. The attitude information acquisition part uses a three-axis holder based on a stepping motor as an image stabilization platform, an inertial sensor as an attitude information acquisition element, and the attitude data acquired by an accelerometer and a gyroscope in the inertial sensor are fused to calculate an attitude angle; the controller of the control part controls the drive of the stepping motor driver by adopting a hierarchical regulation mode, directly calculates the number of pulses for smaller angle errors and outputs the pulses, determines the correlation between the angle and the speed by using a double-layer control algorithm for larger angle errors, controls the output of the pulses by using a Time Shortened PID (Time short-PID, TS-PID) algorithm, and shortens the compensation Time of the attitude angle errors when the errors are smaller.
Description
Technical Field
The invention relates to the technical field of video processing, in particular to a video image stabilizing method based on a three-axis holder.
Background
Video surveillance systems are used in various aspects of daily life. However, in the process of acquiring video information by the camera device, the situation of shaking, blurring, distortion and the like of the video image caused by the shaking noise is inevitable, and important monitoring information is lost. The mechanical image stabilization technology can effectively reduce the shaking degree of the camera shooting equipment, the camera shooting equipment is installed on the document holder, and the shaking amplitude of the camera shooting equipment can be stabilized in a smaller range by adjusting the posture of the holder.
The camera device can shake at three angles under large amplitude shaking: pitch angle, yaw angle, and roll angle. The electronic image stabilization means often assists the mechanical image stabilization means to compensate small-amplitude shaking outside the mechanical image stabilization precision, the electronic image stabilization means is most difficult to compensate image rolling, a common two-axis cradle head can only realize the compensation of a pitch angle and a yaw angle, and in order to reduce the complexity of the electronic image stabilization, the mechanical image stabilization means selects a three-axis cradle head capable of compensating three attitude angles including a rolling angle as an image stabilization platform.
Aiming at the condition that the shaking angle range of the camera equipment is large, different control methods are adopted to compensate errors, the characteristics of the stepping motor are combined with a PID algorithm, the number of calculated pulses is directly output and output pulses when the angle is small, and the pulses are output when the angle is large by adopting a double-layer control algorithm. When the error of the traditional PID control algorithm is small, the output control quantity becomes small, so that the speed of the deviation approaching zero is reduced, and therefore the traditional PID algorithm needs to be improved, the running frequency of the stepping motor when the error is small is increased, and the time for the cloud platform to reach stability is shortened.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a video image stabilization method based on a three-axis pan/tilt, which can effectively overcome the problems that the electronic image stabilization technique has a poor effect on processing large-amplitude video shaking, and a common two-axis cloud platform cannot compensate for a roll angle, and meanwhile, on the basis of ensuring that three attitude angle compensations can be realized, a control algorithm is improved, and the compensation time is shortened.
The technical scheme adopted by the invention is as follows:
the invention provides a video image stabilization method based on a three-axis holder, which specifically comprises the following steps:
s1: the method comprises the following steps that a three-axis tripod head which is provided with a pitching shaft, a yawing shaft and a rolling shaft and is based on a stepping motor is used as an image stabilizing platform, the camera shooting equipment is arranged at the intersection point of three axes of the three-axis tripod head, and an inertial sensor is arranged at the intersection point of plane coordinate axes of the three-axis tripod head to collect attitude information of the camera shooting equipment; the attitude information acquisition is based on an inertial sensor arranged on a three-dimensional image stabilization platform, and an accelerometer and a gyroscope in the inertial sensor respectively acquire the triaxial acceleration a of the camera equipmentx,ay,azAnd triaxial angular velocity ωx',ωy',ωz';
S2: correcting angular velocity drift by using the collected acceleration, performing data fusion on the collected acceleration and angular velocity by using a vector outer product compensation algorithm, and calculating an attitude angle of the camera by using quaternion: a roll angle phi, a vertical pitch angle theta and a horizontal azimuth angle psi;
s3: carrying out attitude adjustment on the three-axis holder through a stepping motor; the inertial sensor is connected with the microcontroller, the microcontroller is connected with a driver of the stepping motor, and the microcontroller outputs a pulse signal to control the driver of the stepping motor to drive the stepping motor to rotate; controlling the step motor driver to drive the step motor to rotate in a step adjusting mode, selecting a control method according to the difference value between the current angle and the expected angle, and when the angle difference value is smaller than T1Directly calculating the pulse number and the pulse frequency to be output and outputting the pulse; when the angle difference is greater than T1When the pulse is output by using a double-layer control algorithm, the first layer is controlled to be an angle layer, the second layer is controlled to be a speed layer, an angle layer controller is called an angle controller, and a speed layer controller is called a speed controller;
s4: inputting the difference value of the expected angle and the actual angle into an angle controller, and outputting the difference value as the expectation of the speed; in the angle controller, a positive correlation exists between the output of the angle controller and the speed expectation, and in order to enhance the smoothness of speed change, the angle controller outputs the speed expectation by adopting an open square control algorithm to control the rotating speed of the stepping motor;
s5: the speed layer inputs the difference value between the expected speed and the actual speed output by the angle layer into a speed controller by using a TS-PID control algorithm, and the speed controller outputs the expected speed;
s6: calculating the expected pulse frequency of the stepping motor according to the expected speed, outputting pulses to a driver of the stepping motor through a microcontroller to drive the stepping motor to rotate, and when the difference between the acquired angle and the expected angle is less than T1Then, the method in step S3 is adopted to directly output the pulse, and the control process is cycled until the difference between the acquired angle and the desired angle is within the allowable error range.
Further, in the step S2, the acceleration a collected by the accelerometer and the gyroscope in the inertial sensor is usedx,ay,azAnd angular velocity ωx',ωy',ωzPerforming data fusion by adopting a vector outer product compensation algorithm, and resolving an attitude angle by using a quaternion; the method comprises the following specific steps:
when the time is n, firstly, the memorability quaternion is initialized, and q is0 (0)=1,q1 (0)=0,q2 (0)=0, q 3 (0)0; firstly, the accelerometer signal passes through a low-pass filter to eliminate high-frequency noise, then the gravity acceleration measured by an accelerometer is normalized to obtain an accelerometer value normalized at n moments Acquiring the gravity component of the quaternion in the equivalent cosine matrix, and normalizing the acceleration and the gravity componentPerforming vector outer product operation to obtain attitude error En;
Accumulating the error to obtain InCompensating the attitude error to the angular velocity through a proportional-integral control algorithm, predicting the angular velocity and correcting the integral drift of the angular velocity;
Wn=W'(n)+CpEn+In
will In=In-1+CiEnSubstituting the formula to obtain:
Wn=W'n+CpEn+CiEn+In-1
wherein the content of the first and second substances,for the corrected three-axis angular velocity,acquiring three-axis angular velocity values, C, for the n-time gyroscopepIs a proportionality coefficient, CiIs an integral coefficient;
Cpcontrolling confidence of accelerometer data, CpThe larger the confidence degree of the data measured by the accelerometer is, the smaller the confidence degree of the data measured by the accelerometer is, and the smaller the confidence degree of the data measured by the accelerometer is; the value of the acceleration is very accurate in the long term and the data measured by the gyroscope is more accurate in the short time, so that the value of the accelerometer in the short time is kept with smaller weight in the compensation process, CpKeeping the value small, C, as time increasespIs appropriately increased;
according to the corrected angular velocity value, the quaternion value can be recurred by utilizing a quaternion differential equation and a Runge Kutta method, and then the real-time attitude angle can be solved:
φ=tan-1[2(q0q1+q2q3)/q0 2-q1 2-q2 2+q3 2]
θ=-sin-1(2(q1q3-q0q2))
ψ=tan-1[2(q0q3+q1q2)/q0 2+q1 2-q2 2-q3 2]。
further, in the step S3, the threshold T is set1The determination of (2) is as follows: the sampling time of the inertial sensor to the attitude angle of the camera device is TsSelecting a proper pulse frequency f which can accurately drive the stepping motor by the pulse output by the main control chip, and determining the stepping angle of the stepping motor under the condition of determining the subdivision number of a driver of the stepping motor, wherein the assumption is that n and T are1I.e. the angle, T, at which the stepping motor can rotate within a sampling period1=Ts·f·n。
Further, in step S4, the square root control algorithm used in the angle control includes: setting a boundary quantityDividing a linear region range by the positive and negative values of the quantity, K being the proportionality coefficient, in which range K.e is followedaThe control quantity is output in a calculation mode, and when the control quantity exceeds L, the error is large, and the control quantity needs to be in an evolution formCalculating an actual control quantity, i.e. a desired speed, ofeaDifference between desired angle and actual angle, amaxIs the maximum acceleration value achievable by the system.
Further, in step S5, the TS-PID algorithm is an algorithm obtained by improving the PID algorithm, and when the difference is small, the compensation time is shortened by maintaining a fast compensation speed:
the incremental discrete PID algorithm formula is as follows:
Δu(k)=Kp(e(k)-e(k-1))+Ki·e(k)+Kd(e(k)-2e(k-1)+e(k-2))
let x (0) e (k) -e (k-1)
x(1)=e(k)
x(2)=e(k)-2e(k-1)+e(k-2)
Then Δ u (K) ═ Kp(x(0))+Ki·x(1)+Kd(x(2))
Wherein, Deltau (k) is the control quantity of the speed at the moment k, e is the deviation, and along with the output of the control quantity, when e is small, the output control quantity becomes small, which causes the deviation compensation speed to become slow, so the PID algorithm is improved, and the threshold value T is set2In a stepwise manner, T2Is one is greater than T1A smaller value; when err>T2Outputting the control quantity by adopting a PID control algorithm, and continuously updating the values of x (0), x (1) and x (3) until err<T2Then, x (0), x (1) and x (3) keep the control quantity output of the previous moment unchanged until the angle error is less than T1Then continue to press the angle error to be less than T1Compensates for the angular error.
Further, in step S5, the data of the inertial sensor may be obtained not only by calculating the angle but also by the gyroscope of the inertial sensor; in view of the zero drift characteristics of the gyroscope, zero calibration of the gyroscope to zero drift is required.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention can realize the compensation of three attitude angles, thereby reducing the complexity of electronic image stabilization;
2. different control methods are adopted when the sizes of errors to be compensated are different, pulses can be directly output at angles which can be completely compensated in one sampling period, and a double-layer control algorithm is adopted when compensation in one sampling period is difficult, so that the compensation time is shortened, and the compensation precision is improved;
3. the TS-PID algorithm is adopted, and the error compensation time is reduced;
4. the cost is low, and the gesture acquisition sensors and the controllers are various.
Drawings
Fig. 1 is a schematic overall flow chart of a video image stabilization method based on a three-axis pan-tilt according to the present invention;
FIG. 2 is a block diagram of attitude angle control;
FIG. 3 is a schematic diagram of an evolution control algorithm simulation;
FIG. 4 is a diagram illustrating the comparison between the PID algorithm and the TS-PID algorithm.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Referring to fig. 1 to 4, a specific implementation process of a video image stabilization method based on a three-axis pan-tilt head provided by the invention includes the following steps:
s1: using a three-axis pan-tilt with a pitching axis, a yawing axis and a rolling axis based on a stepping motor as an image stabilizing platform, arranging the camera equipment on the three-axis pan-tilt, arranging an inertial sensor on the camera equipment to acquire the attitude information of the camera equipment, namely the three-axis acceleration ax,ay,azAnd triaxial angular velocity ωx',ωy',ωzThe inertial sensor may also capture the camera device's feedback for later speed control.
S2: will acquire the three-axis acceleration ax,ay,azAnd triaxial angular velocity ωx',ωy',ωzThe method comprises the following specific steps of performing data fusion by using a vector outer product compensation algorithm to obtain attitude angles of the camera equipment, namely a rolling angle phi, a vertical pitch angle theta and a horizontal azimuth angle psi, and comprises the following specific steps:
first, a memorability quaternion is initialized, q0 (0)=1,q1 (0)=0,q2 (0)=0,q 3 (0)0; the accelerometer signal is firstly passed through a low-pass filter to eliminate high-frequency noise, and then the gravity measured by the accelerometer is measuredAcceleration normalization to obtain an n-time normalized accelerometer value
Acquiring the gravity component of the quaternion in the equivalent cosine matrix:
Vn=C2 TE1
wherein the content of the first and second substances,C2is a direction cosine matrix, and the direction cosine matrix,
the vector cross product yields the attitude error:
En=An×Vn
wherein the content of the first and second substances,for the acceleration matrix, the operation can be found as:
and integrating the errors, accumulating the errors in a recursion mode, and reducing the budget complexity:
In=In-1+CiE(n
vector outer product compensation, namely compensating through a proportional-integral controller, compensating the attitude error to the angular velocity, predicting the angular velocity, and correcting the integral drift of the angular velocity:
Wn=W'(n)+CpEn+In
will In=In-1+CiEnSubstituting the formula to obtain:
Wn=W'n+CpEn+CiEn+In-1
wherein the content of the first and second substances,for the purpose of the corrected angular velocity value,angular velocity values, C, acquired by the gyroscope at n sampling instantspIs a proportionality coefficient;
Cpcontrolling confidence of accelerometer data, CpThe larger the confidence level of the data measured by the accelerometer, and the smaller the confidence level of the data measured by the accelerometer. The acceleration value is very accurate in the long term, and the data measured by the gyroscope is more accurate in the short time, so that C is accurate in the short timepKeeping the value small, C, as time increasespThe value of (a) is increased appropriately.
A quaternion updating equation can be obtained by using a quaternion differential equation and a Longge Kutta method:
Qn+1=Qn+μ·Un
and continuously updating the quaternion to obtain a new Euler angle calculated according to the relation between the Euler angle and the quaternion, and obtaining:
φ=tan-1[2(q0q1+q2q3)/q0 2-q1 2-q2 2+q3 2]
θ=-sin-1(2(q1q3-q0q2))
ψ=tan-1[2(q0q3+q1q2)/q0 2+q1 2-q2 2-q3 2]
s3: carrying out attitude adjustment on the three-axis holder through a stepping motor; the inertial sensor is connected with the microcontroller, the microcontroller is connected with a driver of the stepping motor, and the microcontroller outputs a pulse signal to control the driver of the stepping motor to drive the stepping motor to rotate; controlling the step motor driver to drive the step motor to rotate in a step adjusting mode, selecting a control method according to the difference value between the current angle and the expected angle, and when the angle difference value is smaller than T1Directly calculating the pulse number and the pulse frequency to be output and outputting the pulse; when the angle difference is greater than T1When the pulse is output by using a double-layer control algorithm, the first layer is controlled to be an angle layer, the second layer is controlled to be a speed layer, an angle layer controller is called an angle controller, and a speed layer controller is called a speed controller; the specific process is as follows:
threshold value T1The determination method comprises the following steps: the sampling time of the inertial sensor to the attitude angle of the camera equipment is TsSelecting a proper pulse frequency f which can accurately drive the stepping motor by the pulse output by the main control chip, and determining the stepping angle of the stepping motor under the condition of determining the subdivision number of a driver of the stepping motor, wherein the assumption is that n and T are1I.e. the angle, T, by which the stepping motor can rotate within a sampling period1=Ts·f·n。
Taking the compensation of the difference of the roll angle as an example: difference between roll angle and roll angle expected at time k:
eφ(k)=φ-φtarget;
when e isφ(k)<T1Output by directly counting the number of pulsesThe mode, the pulse number calculation mode is: when the fine division number of the stepping motor driver is determined, assuming that the stepping angle of the stepping motor is n, the number of pulses to be output is:when e isφ(k)>T1And outputting pulses by adopting a double-layer control algorithm.
S4: inputting the difference value of the expected angle and the actual angle into an angle controller, and outputting the difference value as the expectation of the speed; in the angle controller, the output of the angle controller and the speed expectation have positive correlation, and in order to enhance the smoothness of speed change, the angle controller outputs the speed expectation by adopting an open square control algorithm to control the rotating speed of the stepping motor. The specific process is as follows:
the input of the angle controller is the difference value between the actual angle and the angle expectation, the output is the speed expectation, the larger the angle is, the faster the speed compensation is expected, and the speed and the angle keep positive correlation. Meanwhile, in order to enhance the smoothness of the speed variation, as shown in FIG. 3, a boundary amount is setDividing a linear region range by taking the positive value and the negative value of the quantity as a boundary, outputting the control quantity in the range by following a K.e calculation mode, and indicating that the error is large after L is exceeded, wherein the error needs to be in an open formCalculating an actual control quantity, i.e. a desired speed, ofamaxMaximum acceleration value achievable for the system;
s5: the speed layer uses a TS-PID control algorithm, the difference value between the speed expectation and the actual speed output by the angle layer is input into a speed controller, and the speed controller outputs the expectation speed. The specific process is as follows:
the speed controller inputs the desired speed and actual speedThe output speed of the difference value of the actual speeds is the rotating speed of the stepping motor, and the value of the actual speeds is obtained from a measured value after the zero point drift of the gyroscope in the inertial sensor is removed. Considering that the angle error is smaller and smaller along with the rotation of the stepping motor, the compensation speed is slower and slower to cause the side length of the compensation time, so the PID algorithm of the speed layer is improved, the step regulation is carried out, and the T is2Is one is greater than T1Smaller value of (a). When err>T2Outputting the control quantity by adopting a PID control algorithm until err<T2Keeping the output of the control quantity at the previous moment unchanged, and in order to avoid the occurrence of the overshoot phenomenon, the proportionality coefficient KpA smaller value should be set.
The incremental discrete PID algorithm formula is as follows:
Δu(k)=Kp(e(k)-e(k-1))+Ki·e(k)+Kd(e(k)-2e(k-1)+e(k-2))
let x (0) e (k) -e (k-1)
x(1)=e(k)
x(2)=e(k)-2e(k-1)+e(k-2)
Then Δ u (K) ═ Kp(x(0))+Ki·x(1)+Kd(x(2))
Wherein, Deltau (k) is the control quantity of the speed at the moment k, e is the deviation, along with the output of the control quantity, when e is small, the output control quantity becomes small, which causes the deviation compensation speed to become slow, so the PID algorithm is improved, and the threshold value T is set2In a stepwise manner, T2Is one is greater than T1A smaller value; when err>T2Outputting the control quantity by adopting a PID control algorithm, and continuously updating the values of x (0), x (1) and x (3) until err<T2Then, x (0), x (1) and x (3) keep the control quantity output of the previous moment unchanged until the angle error is less than T1Then continue to press the angle error to be less than T1Compensates for the angular error.
FIG. 4 is a simulation comparison graph of the conventional PID algorithm and the TS-PID algorithm within the error compensation to the allowable range, taking the compensation step signal as an example, the validity of the TS-PID algorithm is verified, and the proportion, the integral and the differential coefficients of the two algorithms are consistent, so that it can be obviously seen that when the error is less than T2Then, TS-PThe ID algorithm still maintains the previous compensation speed, the compensation time is obviously shortened compared with the traditional PID algorithm, and the effectiveness of the TS-PID algorithm is proved.
S6: calculating the expected pulse frequency of the stepping motor according to the expected speed, outputting pulses to a driver of the stepping motor through a microcontroller to drive the stepping motor to rotate, and when the difference between the acquired angle and the expected angle is less than T1And directly outputting pulses, and circulating the control process until the difference value between the acquired angle and the expected angle reaches an error allowable range.
The above-mentioned embodiments are merely illustrative of the preferred embodiments of the present invention, and do not limit the scope of the present invention, and various modifications and improvements of the technical solution of the present invention by those skilled in the art should fall within the protection scope defined by the claims of the present invention without departing from the spirit of the present invention.
Claims (6)
1. A video image stabilization method based on a three-axis pan-tilt head is characterized by comprising the following steps:
s1: the method comprises the following steps that a three-axis tripod head which is provided with a pitching shaft, a yawing shaft and a rolling shaft and is based on a stepping motor is used as an image stabilizing platform, the camera shooting equipment is arranged at the intersection point of three axes of the three-axis tripod head, and an inertial sensor is arranged at the intersection point of plane coordinate axes of the three-axis tripod head to acquire attitude information of the camera shooting equipment; the attitude information acquisition is based on an inertial sensor arranged on a three-dimensional image stabilization platform, and an accelerometer and a gyroscope in the inertial sensor respectively acquire the triaxial acceleration a of the camera equipmentx,ay,azAnd triaxial angular velocity ωx',ωy',ωz';
S2: correcting angular velocity drift by using the collected acceleration, performing data fusion on the collected acceleration and angular velocity by using a vector outer product compensation algorithm, and calculating an attitude angle of the camera by using quaternion: a roll angle phi, a vertical pitch angle theta and a horizontal azimuth angle psi;
s3: carrying out attitude adjustment on the three-axis holder through a stepping motor; the inertial sensor is connected with the microcontroller, and the microcontroller is connected with the inertial sensorThe microcontroller outputs pulse signals to control the driver of the stepping motor to drive the stepping motor to rotate; controlling a stepping motor driver to drive a stepping motor to rotate in a step adjusting mode, selecting a control method according to the difference value between the current angle and the expected angle, and when the angle difference value is smaller than T1Directly calculating the pulse number and the pulse frequency to be output and outputting the pulse; when the angle difference is greater than T1When the pulse is output by using a double-layer control algorithm, the first layer is controlled to be an angle layer, the second layer is controlled to be a speed layer, an angle layer controller is called an angle controller, and a speed layer controller is called a speed controller;
s4: inputting the difference value of the expected angle and the actual angle into an angle controller, and outputting the difference value as the expectation of the speed; in the angle controller, positive correlation exists between the output of the angle controller and the speed expectation, and in order to enhance the smoothness of speed change, the angle controller outputs the speed expectation by adopting an open square control algorithm to control the rotating speed of the stepping motor;
s5: the speed layer inputs the difference value between the expected speed and the actual speed output by the angle layer into a speed controller by using a TS-PID control algorithm, and the speed controller outputs the expected speed;
s6: calculating the expected pulse frequency of the stepping motor according to the expected speed, outputting pulses to a driver of the stepping motor through a microcontroller to drive the stepping motor to rotate, and when the difference between the acquired angle and the expected angle is less than T1Then, the method in step S3 is adopted to directly output the pulse, and the control process is cycled until the difference between the acquired angle and the desired angle is within the allowable error range.
2. The video image stabilization control method based on the three-axis pan-tilt head according to claim 1, characterized in that: in the step S2, the acceleration a collected by the accelerometer and the gyroscope in the inertial sensor is usedx,ay,azAnd angular velocity ωx',ωy',ωzPerforming data fusion by adopting a vector outer product compensation algorithm, and resolving an attitude angle by using a quaternion; comprises the following stepsThe method comprises the following steps:
when the time is n, firstly, the memorability quaternion is initialized, and q is0 (0)=1,q1 (0)=0,q2 (0)=0,q3 (0)0; firstly, the accelerometer signal passes through a low-pass filter to eliminate high-frequency noise, then the gravity acceleration measured by the accelerometer is normalized to obtain the accelerometer value after n-time normalization Acquiring the gravity component of the quaternion in the equivalent cosine matrix, and carrying out vector outer product operation on the normalized acceleration and the gravity component to obtain an attitude error En;
Accumulating the error to obtain InCompensating the attitude error to the angular velocity through a proportional-integral control algorithm, predicting the angular velocity and correcting the integral drift of the angular velocity;
Wn=W'(n)+CpEn+In
will In=In-1+CiEnSubstituting the formula to obtain:
Wn=W'n+CpEn+CiEn+In-1
wherein the content of the first and second substances,for the corrected three-axis angular velocity,acquiring three-axis angular velocity values, C, for the n-time gyroscopepIs a proportionality coefficient, CiIs an integral coefficient;
Cpcontrolling confidence of accelerometer data, CpThe larger the confidence level of the data measured by the accelerometer is, the higher the confidence level isOtherwise, the smaller the size is; the value of the acceleration is very accurate in the long term and the data measured by the gyroscope is more accurate in the short time, so that the value of the accelerometer in the short time is kept with smaller weight in the compensation process, CpKeeping the value small, C, as time increasespThe value of (a) is properly increased;
according to the corrected angular velocity value, the quaternion value can be recurred by utilizing a quaternion differential equation and a Runge Kutta method, and then the real-time attitude angle can be solved:
φ=tan-1[2(q0q1+q2q3)/q0 2-q1 2-q2 2+q3 2]
θ=-sin-1(2(q1q3-q0q2))
ψ=tan-1[2(q0q3+q1q2)/q0 2+q1 2-q2 2-q3 2]。
3. the video image stabilization method based on the three-axis pan-tilt head according to claim 1, wherein: in the step S3, the threshold T is set1The determination of (2) is as follows: the sampling time of the inertial sensor to the attitude angle of the camera equipment is TsSelecting a proper pulse frequency f which can accurately drive the stepping motor by the pulse output by the main control chip, and determining the stepping angle of the stepping motor under the condition of determining the subdivision number of a driver of the stepping motor, wherein the assumption is that n and T are1I.e. the angle, T, by which the stepping motor can rotate within a sampling period1=Ts·f·n。
4. The video image stabilization method based on the three-axis pan-tilt head according to claim 1, wherein: in step S4, the square root control algorithm used for the angle control includes: setting a boundary quantityDividing a linear region by the positive and negative values of the quantity, K being the proportionality coefficient, in which region K.e is followedaThe control quantity is output in a calculation mode, and when the control quantity exceeds L, the error is large, and the control quantity needs to be in an evolution formCalculating an actual control quantity, i.e. a desired speed, ofeaDifference between desired angle and actual angle, amaxIs the maximum acceleration value achievable by the system.
5. The video image stabilization method based on the three-axis pan-tilt head according to claim 1, wherein: in step S5, the TS-PID algorithm is an algorithm obtained by improving the PID algorithm, and when the difference is small, the compensation time is shortened by maintaining a fast compensation speed:
the incremental discrete PID algorithm formula is as follows:
Δu(k)=Kp(e(k)-e(k-1))+Ki·e(k)+Kd(e(k)-2e(k-1)+e(k-2))
let x (0) e (k) -e (k-1)
x(1)=e(k)
x(2)=e(k)-2e(k-1)+e(k-2)
Then Δ u (K) ═ Kp(x(0))+Ki·x(1)+Kd(x(2))
Wherein, Deltau (k) is the control quantity of the speed at the moment k, e is the deviation, along with the output of the control quantity, when e is small, the output control quantity becomes small, which causes the deviation compensation speed to become slow, so the PID algorithm is improved, and the threshold value T is set2In a stepwise manner, T2Is one is greater than T1A smaller value; when err>T2Outputting the control quantity by adopting a PID control algorithm, and continuously updating the values of x (0), x (1) and x (3) until err<T2Then, x (0), x (1) and x (3) keep the control quantity output of the previous time unchanged until the angleError less than T1Then continue to press the angle error to be less than T1Compensates for the angular error.
6. The video image stabilization method based on the three-axis pan-tilt head according to claim 1, wherein: in step S5, the data of the inertial sensor may be obtained not only by calculating the angle but also by the gyroscope of the inertial sensor; in view of the zero drift characteristics of the gyroscope, zero calibration of the gyroscope to zero drift is required.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111123803.2A CN113805611B (en) | 2021-09-24 | 2021-09-24 | Video image stabilizing method based on triaxial holder |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111123803.2A CN113805611B (en) | 2021-09-24 | 2021-09-24 | Video image stabilizing method based on triaxial holder |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113805611A true CN113805611A (en) | 2021-12-17 |
CN113805611B CN113805611B (en) | 2023-12-12 |
Family
ID=78896576
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111123803.2A Active CN113805611B (en) | 2021-09-24 | 2021-09-24 | Video image stabilizing method based on triaxial holder |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113805611B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114515228A (en) * | 2022-03-11 | 2022-05-20 | 上海新纪元机器人有限公司 | Active vibration reduction method and system and active vibration reduction stretcher |
CN114604439A (en) * | 2022-03-23 | 2022-06-10 | 北京科技大学 | Aerial photography video image stabilization system for flapping wing flying robot |
CN114900616A (en) * | 2022-07-14 | 2022-08-12 | 四川三思德科技有限公司 | Direct current motor driving device and method for photovoltaic camera |
CN115174610A (en) * | 2022-05-31 | 2022-10-11 | 亿航智能设备(广州)有限公司 | Aircraft and external environment monitoring system and firmware OTA method thereof |
CN115420306A (en) * | 2022-11-07 | 2022-12-02 | 浙江芯昇电子技术有限公司 | Digital filtering mode-based gyroscope temperature drift compensation implementation method and system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106679649A (en) * | 2016-12-12 | 2017-05-17 | 浙江大学 | Hand movement tracking system and tracking method |
WO2018214071A1 (en) * | 2017-05-24 | 2018-11-29 | 深圳市大疆创新科技有限公司 | Method and device for controlling unmanned aerial vehicle, and unmanned aerial vehicle system |
WO2018214157A1 (en) * | 2017-05-26 | 2018-11-29 | SZ DJI Technology Co., Ltd. | Method and system for motion camera with embedded gimbal |
CN109564433A (en) * | 2016-11-02 | 2019-04-02 | 深圳市大疆创新科技有限公司 | The system and method that height for loose impediment controls |
CN113359867A (en) * | 2021-06-07 | 2021-09-07 | 合肥工业大学 | Unmanned aerial vehicle self-stabilizing cradle head and control method |
CN113365043A (en) * | 2021-06-02 | 2021-09-07 | 北京理工大学 | Variable-scale panoramic imaging synchronous switching reflector device and panoramic expansion method |
-
2021
- 2021-09-24 CN CN202111123803.2A patent/CN113805611B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109564433A (en) * | 2016-11-02 | 2019-04-02 | 深圳市大疆创新科技有限公司 | The system and method that height for loose impediment controls |
CN106679649A (en) * | 2016-12-12 | 2017-05-17 | 浙江大学 | Hand movement tracking system and tracking method |
WO2018214071A1 (en) * | 2017-05-24 | 2018-11-29 | 深圳市大疆创新科技有限公司 | Method and device for controlling unmanned aerial vehicle, and unmanned aerial vehicle system |
WO2018214157A1 (en) * | 2017-05-26 | 2018-11-29 | SZ DJI Technology Co., Ltd. | Method and system for motion camera with embedded gimbal |
CN113365043A (en) * | 2021-06-02 | 2021-09-07 | 北京理工大学 | Variable-scale panoramic imaging synchronous switching reflector device and panoramic expansion method |
CN113359867A (en) * | 2021-06-07 | 2021-09-07 | 合肥工业大学 | Unmanned aerial vehicle self-stabilizing cradle head and control method |
Non-Patent Citations (2)
Title |
---|
江杰;王康;李刚;: "一种四旋翼姿态解算与控制优化方法设计分析", 计算机仿真, no. 11 * |
黄艳国;樊云东;陈自如;: "基于信息融合的四旋翼飞行器的姿态解算", 计算机仿真, no. 09 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114515228A (en) * | 2022-03-11 | 2022-05-20 | 上海新纪元机器人有限公司 | Active vibration reduction method and system and active vibration reduction stretcher |
CN114515228B (en) * | 2022-03-11 | 2023-05-23 | 上海新纪元机器人有限公司 | Active vibration reduction method and system and active vibration reduction stretcher |
CN114604439A (en) * | 2022-03-23 | 2022-06-10 | 北京科技大学 | Aerial photography video image stabilization system for flapping wing flying robot |
CN115174610A (en) * | 2022-05-31 | 2022-10-11 | 亿航智能设备(广州)有限公司 | Aircraft and external environment monitoring system and firmware OTA method thereof |
CN114900616A (en) * | 2022-07-14 | 2022-08-12 | 四川三思德科技有限公司 | Direct current motor driving device and method for photovoltaic camera |
CN114900616B (en) * | 2022-07-14 | 2022-10-28 | 四川三思德科技有限公司 | Direct current motor driving device and method for photovoltaic camera |
CN115420306A (en) * | 2022-11-07 | 2022-12-02 | 浙江芯昇电子技术有限公司 | Digital filtering mode-based gyroscope temperature drift compensation implementation method and system |
Also Published As
Publication number | Publication date |
---|---|
CN113805611B (en) | 2023-12-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113805611A (en) | Video image stabilization method based on three-axis holder | |
CN109000612B (en) | Equipment angle estimation method and device, camera shooting assembly and aircraft | |
CN104267743B (en) | Shipborne camera shooting stabilized platform control method with active disturbance rejection control technology adopted | |
WO2018184467A1 (en) | Method and device for detecting posture of ball head | |
US10659695B2 (en) | Gimbal control method, gimbal control system and gimbal device | |
CN102377941B (en) | Image stabilization control apparatus and control method thereof, optical apparatus, and imaging apparatus | |
CN106200693B (en) | The holder real-time control system and control method of land investigation small drone | |
WO2021027638A1 (en) | Yaw angle fusion method and apparatus, and aerial vehicle | |
US20220214699A1 (en) | Method and apparatus for yaw fusion and aircraft | |
CN111522352B (en) | Design method of single-parameter active disturbance rejection attitude controller of multi-rotor aircraft | |
CN110758774B (en) | Active disturbance rejection attitude control method with flexible attachment and liquid sloshing spacecraft | |
CN110873563B (en) | Cloud deck attitude estimation method and device | |
JP4775296B2 (en) | Imaging space stabilization device and subject tracking device | |
CN113219838A (en) | High-precision control method of triaxial inertially stabilized platform based on adaptive time-varying bandwidth observer | |
CN111061286A (en) | Method for realizing lateral overload control of aircraft by providing damping through filtering differentiation | |
CN111556309A (en) | Control method of binocular tripod head with variable base line | |
Mansur et al. | Deploying Complementary filter to avert gimbal lock in drones using Quaternion angles | |
CN114510065A (en) | Ground target tracking control method for multi-rotor unmanned aerial vehicle | |
CN110989691B (en) | Cloud deck control method and device, storage medium, electronic equipment and unmanned aerial vehicle | |
CN116149193B (en) | Anti-disturbance control method and system for rotor unmanned aerial vehicle based on vision | |
CN110530400A (en) | Gyroscopic drift modification method, device, photoelectric nacelle and aircraft | |
CN109788200B (en) | Camera stability control method based on predictive analysis | |
CN108803681B (en) | Brushless motor stability-increasing cradle head control method and system | |
CN112611379A (en) | Inertial navigation stable platform and calibration and installation method thereof | |
US10473949B2 (en) | Systems and methods for an optical image stabilizer system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |