Fuzzy PID (proportion integration differentiation) triaxial stabilizer based on particle swarm optimization and genetic algorithm optimization

文档序号:1686519 发布日期:2020-01-03 浏览:11次 中文

阅读说明:本技术 一种基于粒子群与遗传算法优化的模糊pid的三轴稳定器 (Fuzzy PID (proportion integration differentiation) triaxial stabilizer based on particle swarm optimization and genetic algorithm optimization ) 是由 曹啸 姚清元 欧亚非 许炎君 张志嘉 蒋劲茂 于 2019-10-31 设计创作,主要内容包括:本发明公开了一种基于粒子群与遗传算法优化的模糊PID的三轴稳定器,包括主控芯片、驱动模块、步进电机、陀螺仪和机械连接结构,所述机械连接结构的三个侧面上分别固定一组电气连接的驱动模块和步进电机,每个所述驱动模块均与主控芯片电气连接。本发明中,该基于粒子群与遗传算法优化的模糊PID的三轴稳定器通过自行调整滤波中的方差,可以有效的减少对陀螺仪数据漂移时的影响,提高陀螺仪数据的滤波效果,通过粒子群算法与遗传算法的运用,优化PID的控制参数,有效提升了响应速度,减少了超调量与稳态误差,同时还提高了系统的鲁棒性,并有效克服了系统中存在的各种干扰噪声,提升了拍摄效果,具有很好的实用性。(The invention discloses a particle swarm and genetic algorithm optimization-based fuzzy PID (proportion integration differentiation) triaxial stabilizer which comprises a main control chip, a driving module, a stepping motor, a gyroscope and a mechanical connection structure, wherein a group of electrically connected driving module and stepping motor are respectively fixed on three side surfaces of the mechanical connection structure, and each driving module is electrically connected with the main control chip. According to the fuzzy PID three-axis stabilizer based on the particle swarm optimization and the genetic algorithm, the variance in filtering is automatically adjusted, so that the influence on the drift of gyroscope data can be effectively reduced, the filtering effect of the gyroscope data is improved, the PID control parameters are optimized through the application of the particle swarm optimization and the genetic algorithm, the response speed is effectively improved, the overshoot and the steady-state error are reduced, the robustness of a system is improved, various interference noises in the system are effectively overcome, the shooting effect is improved, and the fuzzy PID three-axis stabilizer has good practicability.)

1. A three-axis stabilizer of fuzzy PID (proportion integration differentiation) based on particle swarm optimization and genetic algorithm optimization is characterized by comprising a main control chip (1), a driving module (2), a stepping motor (3), a gyroscope (4) and a mechanical connection structure (5), wherein a group of electrically connected driving module (2) and stepping motor (3) are respectively fixed on three side surfaces of the mechanical connection structure (5), and each driving module (2) is electrically connected with the main control chip (1);

the main control chip (1) is used for receiving pose data of a mechanical connection structure (5) monitored by the gyroscope (4) in real time, filtering the data by using a maximum posterior noise estimator, processing and fuzzifying the filtered data by using a particle swarm algorithm and a genetic algorithm, processing a rule base in fuzzy control by using a particle swarm algorithm, performing fuzzy solution based on the rule base, selecting optimized PID control parameters, calculating corresponding control quantity and sending the control quantity to the driving module (2);

and the driving module (2) is used for controlling the corresponding stepping motor (3) to rotate according to the control quantity sent by the main control chip (1) so as to realize the pose adjustment of the mechanical connection structure (5).

2. The three-axis stabilizer based on fuzzy PID optimized by particle swarm and genetic algorithm according to claim 1, characterized in that the main control chip (1) is located on top of the mechanical connection structure (5).

3. The particle swarm and genetic algorithm optimized fuzzy PID based triaxial stabilizer according to claim 1, characterized in that each stepper motor (3) is fixed at the head of the corresponding driving module (2).

4. The three-axis stabilizer based on the fuzzy PID optimized by the particle swarm and genetic algorithm as claimed in claim 1, wherein the driving module (2) generates a corresponding PWM pulse width waveform to control the rotation amount of the stepping motor (3) according to the control amount calculated by the main control chip (1) and sends the calculated control amount to the driving module (2).

5. The particle swarm and genetic algorithm optimized fuzzy PID based triaxial stabilizer according to claim 1, characterized in that the gyroscope (4) is horizontally installed at the bottom center position of the mechanical connection structure (5) clamping part.

Technical Field

The invention relates to the technical field of intelligent control, in particular to a fuzzy PID (proportion integration differentiation) triaxial stabilizer based on particle swarm optimization and genetic algorithm optimization.

Background

The triaxial stabilizer is a technology which enables a carrier to keep relatively stable in the original direction when the carrier is subjected to external disturbance, and the angle and the position of the photographic device are stabilized by compensation provided by a system, so that the definition of a picture is ensured. Typically, the three-axis stabilizer uses conventional PID techniques to control motor rotation based on Kalman filtered data. The anti-shake control device is suitable for anti-shake control of equipment, such as daily photography, unmanned aerial vehicle aerial photography and the like.

The existing triaxial stabilizer has the following problems:

1. the traditional PID has poor robustness, uncertain factors existing in a system are difficult to overcome, a technology for controlling by using the traditional fuzzy PID is developed at present, but the control precision of the traditional fuzzy control is low, and meanwhile, the control grade is fixed and limited in consideration of the storage space of a main control chip;

2. the traditional PID and the traditional fuzzy PID can not effectively inhibit interference noise, and a larger steady-state error is easy to occur when the gyroscope data drifts.

Therefore, a three-axis stabilizer based on fuzzy PID optimized by particle swarm optimization and genetic algorithm is provided.

Disclosure of Invention

The invention aims to solve the problems that the traditional PID is poor in robustness and anti-noise capability, the traditional fuzzy PID is low in precision and limited in control level, the traditional Kalman filtering requires accurate variance of measurement noise and control interference noise, and the variance is difficult to determine in practical application in the prior art, and provides a three-axis stabilizer of the fuzzy PID based on particle swarm optimization and genetic algorithm optimization.

In order to achieve the purpose, the invention adopts the following technical scheme:

a three-axis stabilizer based on a particle swarm and genetic algorithm optimized fuzzy PID comprises a main control chip, a driving module, a stepping motor, a gyroscope and a mechanical connection structure, wherein a group of electrically connected driving module and stepping motor are respectively fixed on three side surfaces of the mechanical connection structure, each driving module is electrically connected with the main control chip, the main control chip is used for receiving pose data of the mechanical connection structure monitored by the gyroscope in real time and filtering the data by using a maximum posterior noise estimator, the filtered data is processed and fuzzified by using a particle swarm algorithm and a genetic algorithm, a rule base in fuzzy control is processed by using a particle swarm algorithm, the optimized PID control parameters are selected based on the rule base for fuzzification, corresponding control quantities are calculated and sent to the driving module, and the driving module is used for calculating the control quantities sent by the main control chip, and controlling the corresponding stepping motor to rotate to realize the pose adjustment of the mechanical connection structure.

Preferably, the main control chip is located on top of the mechanical connection structure.

Preferably, each stepping motor is fixed at the head of the corresponding driving module.

Preferably, the control quantity calculated by the main control chip is sent to the driving module, and the driving module generates a corresponding PWM pulse width waveform to control the rotation quantity of the stepping motor.

Preferably, the gyroscope is horizontally arranged at the bottom center of the clamping part of the mechanical connecting structure.

Compared with the prior art, the invention has the beneficial effects that:

according to the fuzzy PID three-axis stabilizer based on the particle swarm optimization and the genetic algorithm, the variance in filtering is automatically adjusted, so that the influence on the drift of gyroscope data can be effectively reduced, the filtering effect of the gyroscope data is improved, the PID control parameters are optimized through the application of the particle swarm optimization and the genetic algorithm, the response speed is effectively improved, the overshoot and the steady-state error are reduced, the robustness of a system is improved, various interference noises in the system are effectively overcome, the shooting effect is improved, and the fuzzy PID three-axis stabilizer has good practicability.

Drawings

FIG. 1 is a schematic structural diagram of a fuzzy PID triaxial stabilizer optimized based on particle swarm optimization and genetic algorithm according to the present invention;

FIG. 2 is a flow chart of an improved algorithm based on the traditional fuzzy PID and Kalman filtering in a particle swarm and genetic algorithm optimized fuzzy PID based triaxial stabilizer provided by the invention;

FIG. 3 is a flow chart of the fuzzy PID triaxial stabilizer based on particle swarm optimization and genetic algorithm optimization according to the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.

Referring to fig. 1, a three-axis stabilizer based on a particle swarm and genetic algorithm optimized fuzzy PID comprises a main control chip 1, a driving module 2, a stepping motor 3, a gyroscope 4 and a mechanical connection structure 5, wherein a group of electrically connected driving module 2 and stepping motor 3 are respectively fixed on three sides of the mechanical connection structure 5, each driving module 2 is electrically connected with the main control chip 1, the main control chip 1 is used for receiving pose data of the mechanical connection structure 5 monitored by the gyroscope 4 in real time, filtering the data by using a maximum posterior noise estimator, processing and fuzzifying the filtered data by using a particle swarm algorithm and a genetic algorithm, processing and fuzzifying the filtered data by using the particle swarm algorithm and the genetic algorithm, namely processing a membership function in fuzzy control by using the particle swarm algorithm and the genetic algorithm, then fuzzifying the filtered data, meanwhile, a rule base in the fuzzy control is processed by a particle swarm algorithm, fuzzy is solved based on the rule base, optimized PID control parameters are selected, corresponding control quantity is calculated and sent to the driving module 2, and the driving module 2 is used for controlling the corresponding stepping motor 3 to rotate according to the control quantity sent by the main control chip 1, so that pose adjustment of the mechanical connection structure 5 is realized.

Wherein, the main control chip 1 is located on top of the mechanical connection structure 5.

Each stepping motor 3 is fixed to the head of the corresponding driving module 2.

The control quantity calculated by the main control chip 1 is sent to the driving module 2, and the driving module 2 generates a corresponding PWM pulse width waveform to control the rotation quantity of the stepping motor 3.

Wherein, the gyroscope 4 is horizontally arranged at the bottom center position of the clamping part of the mechanical connecting structure 5.

During work, firstly, the main control chip 1 calculates the bottom width of M groups of membership function by using particle swarm algorithm and genetic algorithm according to the iteration number N and the population scale M, and calculates M groups of rule control library by using particle swarm algorithm; the gyroscope 4 measures pose data of the mechanical connection structure 5, the main control chip 1 reads the pose data through an I2C interface and compares the pose data with preset initial data, real-time errors are calculated through a maximum posterior noise estimator, PID control parameters corresponding to three axes are calculated by using optimized fuzzy PID according to M groups of rule control libraries, optimal PID control parameters of the three axes in the iteration at this time are selected through screening of fitness functions, and the optimal PID control parameters of the three axes after N iterations are obtained through repeating the iteration for N times. According to the PID control parameters, the main control chip 1 calculates corresponding output control quantity and sends the output control quantity to the three driving modules 2 to generate PWM corresponding to three axes and adjust the pose of the mechanical connection structure 5; the self-adaptive control is completed on the basis of a fuzzy PID algorithm optimized by particle swarm and genetic algorithm, and both the response speed and the control precision are superior to those of the traditional PID and the traditional fuzzy PID; the algorithm is used in a triaxial stabilizer system, so that the response speed of a control system is improved, steady-state errors and overshoot are reduced, and the self-adaptive capacity of the triaxial stabilizer system is improved.

With reference to the embodiment shown in fig. 2, optimizing the membership function, optimizing the rule control base, and using the maximum a posteriori noise estimator are the innovative core of the algorithm, and are improvements based on the traditional fuzzy PID and kalman filtering.

In the traditional Kalman filtering, the covariance Q of measurement noise and the covariance R of control interference noise are constants, and in a large posterior noise estimator, Q and R can be iterated in each filtering, so that the requirement of the traditional Kalman filtering on the accurate values of Q and R is avoided.

The traditional PID algorithm is easily interfered by noise, and the traditional fuzzy PID algorithm has low control precision and limited control level. The membership function base width of the fuzzy PID is optimized by using the particle swarm algorithm and the genetic algorithm, and the rule control library is optimized by using the particle swarm algorithm, so that the response speed is improved, the steady-state error and overshoot are reduced, and the self-adaptive capacity is improved.

Referring to fig. 3, the control algorithm is implemented on the basis of the main control chip 1, the design is mainly divided into a detection part and a control part, the detection part is used for acquiring pose data of the mechanical connection structure 5 detected by the gyroscope 4 in real time by utilizing the communication of I2C of the main control chip 1; the control part is that the main control chip 1 controls the driving module 2 to generate PWM waves by using data transmitted by the gyroscope 4 to control the rotation of the stepping motor 3; in the control system, the system initialization mainly comprises the initialization of the membership function bottom width and the rule control library and the initialization configuration of the port of the main control chip 1.

In the three-axis stabilizer based on the particle swarm optimization and genetic algorithm optimization fuzzy PID algorithm, the main control chip 1 is used as a control unit, the optimized fuzzy PID algorithm is used for filtering and subsequently calculating the pose data of the gyroscope 4, the defects of poor anti-interference capability and the like of the current traditional PID algorithm control are overcome, the defects of low control precision and the like of the current traditional fuzzy PID algorithm are overcome, the response speed of the system is improved, the steady state error and overshoot of the system are reduced, the self-adaptive capacity of the system is improved, and the shooting effect is improved.

The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.

7页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于类龙伯格观测器的网络化运动控制系统攻击辨识方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!