飞控PID控制方法简介共16页文档
- 格式:ppt
- 大小:2.04 MB
- 文档页数:16
PID控制器的原理与调节方法PID控制器是一种常见的控制算法,广泛应用于工业自动化系统中。
它是通过对反馈信号进行比例、积分和微分处理,来实现对被控对象的控制。
本文将介绍PID控制器的原理和调节方法,并探讨其在实际应用中的一些注意事项。
一、PID控制器原理PID控制器的原理基于三个基本元素:比例、积分和微分。
这三个元素分别对应控制误差的当前值、累积值和变化值。
PID控制器根据这三个元素的加权和来生成控制信号,以实现对被控对象的稳定控制。
1. 比例元素(P)比例元素是根据当前的控制误差进行调节的。
它直接乘以一个比例系数,将误差放大或缩小,生成相应的控制信号。
比例元素的作用是快速响应控制误差,但可能引起超调和震荡。
2. 积分元素(I)积分元素是对控制误差的累积值进行调节的。
它将误差进行积分,得到一个累积值,并乘以一个积分系数,生成相应的控制信号。
积分元素的作用是消除稳态误差,但可能导致系统响应过慢或产生超调。
3. 微分元素(D)微分元素是对控制误差的变化率进行调节的。
它将误差进行微分,得到一个变化率,并乘以一个微分系数,生成相应的控制信号。
微分元素的作用是预测误差的变化趋势,以提前调整控制信号,但可能引起过度调节和噪声放大。
通过调节比例、积分和微分元素的系数权重,可以优化PID控制器的响应速度、控制精度和抗干扰能力。
二、PID控制器调节方法PID控制器的调节方法通常包括经验法和自整定法两种。
1. 经验法经验法是基于经验和试错的方法,通过手动调节PID控制器的系数来实现对被控对象的控制。
具体步骤如下:步骤一:将积分和微分元素的系数设为零,只调节比例元素的系数。
步骤二:逐渐增大比例系数,观察系统的响应,并调整至系统稳定且响应时间较短。
步骤三:增加积分系数,减小系统的稳态误差,但要注意避免系统过调和震荡。
步骤四:增加微分系数,提高系统对突变的响应速度,但要避免过度调节和噪声放大。
2. 自整定法自整定法是基于系统辨识和参数整定理论的方法,通过对系统的频域或时域特性进行分析,自动计算得到PID控制器的系数。
AUTONOMOUS QUADCOPTER STABILITYWITH PID CONTROLSri Wahyuni1, M. Izar Bahroni2, Faikul Umam3University of Trunojoyo MaduraMechatronics Department of Engineering FacultyEngineering FacultyBangkalan, East Java, Indonesia1**********************.id,2*******************,3*******************.idAbstract—Unmanned Aerial Vehicle (UAV) has many uses, including aerial photography, aerial mapping and monitoring activities. Quadcopter is a type of UAV that uses four rotors. The speed of each rotor has a considerable influence on the movement. The quadcopter movement can be done in this research, namely the process of arming, taking off, hover, and landing on decisions made by the system (autonomous). How the quadcopter achieves a balance in its movement to be stable and responsive requires a method. One method that is suitable for processing stability is the method (PID). The PID method has three main parameters, namely Proportional (Kp), Integral (Ki), Derivatives (Kd), with the determination of the constant through the trial and error process to obtain the optimal stability value as the purpose of this study. But the load of the quadcopter and the wind tightness around it is very influential to get the quadcopter movement to survive in stable conditions. Through a series of experimental processes carried out to produce the best constant values, at Kp = 1.3, Ki = 0.04, and Kd = 18, where the quadcopter is able to survive for 20 sec at the same relative point from the time of departure. The addition of GPS sensors in advanced research will be able to make this quadcopter move stable with the monitored position.Keywords—UAV; Quadcopter; PID; AutonomousI.I NTRODUCTIONQuadcopter / quadrotor is one type of UAV (Unmanned Aerial Vehicle) which has a manual or automatic control system. The development of this UAV has been used in various aspects. For example in agriculture. The Center for Agricultural Land Resources Research and Development began developing unmanned aircraft with the aim of analyzing the condition of plants / vegetation or agricultural land using VNIR, SWIR, thermal, radar or SAR bands [1]. Another example in the military field, the reconnaissance process in hard-to-reach areas is the background of the development of drones / UAVs by the National Aeronautics and Space Agency (LAPAN) [2].Aerial footage Photographty, Aerial footage Videography, Aerial mapping including activities that require drones / UAVs in the implementation. In addition to the skills of the user users, the stability and the surrounding natural conditions also have a considerable influence. A good drone is a drone / UAV that can maintain stability from outside interference, for example wind speed and frequency interference. Quadcopter is one type of UAV with four rotor drives. Each rotating rotor has a lift force and has the same distance to the center of gravity. This type of quadcopter is one type of drone that is quite easy to maneuver.The method used to be able to adjust the rotational speed of a quadcopter motor is the PID method. The method that uses proportional (Kp), integral (Ki), derivative (Kd) elements aims to accelerate the reaction of a system, eliminate offsets and produce large initial changes.Literatur ReviewResearchers of Gembong ES examined the height control on a quadcopter. In controlling the quadcopter, the PID method was used to obtain stability. Researchers are more likely to do testing in the form of simulations [3]. Likewise with Panca AK researchers, the method used is the Fuzzy PID in stabilizing the height of the quadcopter. This research only focuses on pitch and roll angle movements [4]. Guneshwor Singh menjelaskan tentang navigasi otomatis pada quadcopter.There are two types of propellers in the test. Propellers with a 10 inch size and a pitch of 4.5 can produce a greater total thrust than the use of an 8 inch size propeller with the same pitch size. This also affects flight time which tends to be longer when using a 10 inch propeller [5].Analysis of the stability of diagonal motion has been carried out by Salmaa. The analysis includes the combination of lateral motion and longitudinal motion in a quadcopter. Based on the analysis, the stability of the diagonal motion model is obtained that all diagonal motion models are unstable. Therefore PID control is needed by determining the gain of Kp, Ki, and Kd [6].Determination of the combination of PID constants is very influential on the control of stability of the quadcopter. The PID constant generated from the research conducted by Wili Kumara is Kp = 40, Ki = 40, Kd = 60 for roll motion while Kp = 40, Ki = 60, and Ki = 60 for pitch movement. However, the value of this constant has a fluctuation of 1 ° to (-5 °) slope [7].II.P ID M ETHODThe PID method is a control system consisting of three types of controllers, namely Proportional, Integral andInternational Conference on Science and Technology (ICST 2018)Derivative controllers. PID controller is one of the control methods that is often used in industrial control systems [8]. A. Proportional ControllerThe proportional controller has an output proportional to the magnitude of the error signal (the difference between the desired amount and the actual price). More simply it can be said that proportional controller output is a multiplication between proportional constants with input. Changes to the input signal will immediately cause the system to directly change its output by its constants.B. Integral ControllerThe integral controller functions to produce a system response that has a steady state error (zero steady state error). If a plant does not have an integrator element, the proportional controller will not be able to guarantee the system output with a zero steady state error. The use of an integral controller, the system response can be corrected, which has a zero steady state error.An integral controller has characteristics as well as an integral. The controller output is greatly affected by changes that are proportional to the error value. If the error signal does not change, the output will maintain the state as before the input changes.C. Derivative ControllerIntuitively, the oscillating system response is caused by several things. The dynamic process of a plant causes the response of a plant to not change immediately with a change in the control signal, but requires processing time. This time will make the control system experience delays to correct errors. This requires a controller that can predict errors from a system. Derivative controllers are generally used to speed up the initial response of a system, but do not minimize errors in the steady state. Derivative controller work is only effective in a narrow scope, namely in the transition period. Therefore the derivative controller is never used without any other controller of a system [8].III. BLOCK D IAGRAM S YSTEMThe block diagram in Fig. 1 is a system diagram consisting of several inputs which include the MPY-6050 type GY module in which there is an MPU-6050 sensor. Input in the form of slope data (gyrometer) and acceleration (accelerometer) becomes a reference for quadcopter balancing movements. The output of the system in the form of the speed value converted into a voltage value by ESC will drive a brushless motor that amounts to four. Brushless motor speed will be fully controlled using the PID method calculation. The ESC specification and brushless motor are adjusted to the load of the quadcopter.Input in the form of height sensor / wind pressure is a barometer and receiver from 2.4GHz radio control in the process on a different microcontroller. This section is as a medium for information on the height of the quadcopter when the quadcopter airs. Quadcopter communication with groundstation uses a bluetooth / wireless network module. The ground station receives altitude data from bluetooth to be able to control the 2.4Ghz transmitter radio control and provide information on the current mode status and height data on the personal computer.BMP-85MPU-6050Receiver (Rx)Arduino Nano Arduino Nano ESC 30A (4)Brushless MotorBluetoothPersonal ComputerTransmitterInputProcessOutputGround StationBluetoothFig. 1. Block Diagram SystemIV.F LOWCHARTA. General Flowchart Autonomous SystemIn Fig. 2 and Fig. 3 are general autonomous system flowcharts. Overall testing is done if the constant Kp, Ki, Kd is found to be optimal. This process is the whole process of moving the system on a quadcopter.Start Calibration Connecting ?NoYesCheck Bluetooth ConnectionSwitch ModeConnect PersonalComputerConnecting ?NoYesFig. 2. General flowchart of autonomous systems part 1Two bluetooth (master / slave) auto-pairing, both have ID identifiers, so bluetooth will be connected to bluetooth whose identification ID has been aligned. After the Bluetooth connection process is complete, the next step is to connect the personal computer to the system using a USB cable. Users can choose to use autonomous mode (automatic) or manual mode. When using autonomous mode, the system will run automatically according to the system design that has been made. The command to turn on the brushless motor is done by using a radio control transmitter. In the aeromodeling field, the process is often known as the Arming process. Then Take off is a quadcopter process to take off. Take off is done until it reaches a height of five meters. If the height has reached ten meters, the quadcopter will maintain height and stability for 30 seconds. Then the quadcopter will land / land slowly until it reaches the surface. But if the user uses manual mode. The manual program will be activated, all control systems are carried out manually by the user with a radio control device.Flowchart PID.Height = 10 m ?Arming/Motor ONMotor Off EndNoYes Take Off HoverLandingAutonomous Mode ON.?Start AutonomousProgram Start Manual ProgramYesNoCheck QuadcopterHeightControl by user (Transmitter)Fig. 3. General flowchart of autonomous systems part 2In Fig. 4 is a flowchart from the PID method. The PID method is used to maintain the stability of the quadcopter when moving. This method requires the main constants, Kp, Ki, Kd and Set point. The constant will be used to obtain an optimalsystem response. Determination of the value of Kp, Ki and Kd based on experiments by adjusting specifications on hardware. Starting with the reading of the gyro quadcopter value on the pitch, roll and yaw axis. The gyro data will be used as input for the calculation of the PID method. The output from the PID calculation will produce a PWM value for each brushless motor. The process will repeat the process until the error value is 0. The PID calculation is applied to the manual mode or autonomous mode.StartKp, Kd, Ki, Error, Last Error, SetpointRead MPU-6050 Gyro Value PID calculation Check ErrorError = 0EndYesNoPitch, Roll, Yaw PWM Motor BrushlessPWM motor1 = motor2 = motor3 = motor4Fig. 4. Flowchart PIDV.T ESTINGA.Bluetooth Distance TestingTesting is done in the open. This test aims to determine the range of the second Bluetooth communication. Because bluetooth communication is very important, the installation of the bluetooth module and the direction of the antenna on the bluetooth module must be considered very carefully. shown in Table 1.TABLE I.REACH TESTING DATAbluetooth communication, the average value of the range was 21.5 meters. If the Bluetooth range exceeds the range that has been entered in the test, the data communication will not be sent to the maximum or even thecommunication will be interrupted.B. Testing of Motor Lifting Power (Thrust)Lifting (thrust) testing is carried out on each brushless motor used on a quadcopter. Figure 5 is a graph of testing the lift using a 9540 (9 inch) propeller.Fig. 5. Motor Lift Power ChartC. Testing the PID MethodPID method is the main method used for quadcopter stabilization process. In testing this method, to get proportional (Kp), integral (Ki) and derivative (Kd) constants is done by trial and error. When the system is given a constant Kp, Ki, Kd is observed for quadcopter behavior. Testing the PID method is done in the test box. The test box is shown in Fig. 6.Testing to find a good system response is repeated. By observing the movement of the quadcopter in the stabilization process there will be some differences, including the response of the quadcopter stability to time. Here are some test results using Kp, Ki, Kd that have been done.Fig. 6. Stability TestFig. 7 is a test with a constant value of Kp = 1.3, Ki = 0.04 Kd = 5. The value of this constant is used continuously by the system. In addition to the response to steadystate fast enough, the response is not too visible to perform large oscillations. When testing, 200 sensor reading samples were taken with the assumption of data retrieval for four seconds.Fig. 7. Results of Testing the PID MethodVI. CONCLUSION AND FURTHER RESEARCHBased on the testing and analysis results that have been carried out in the research, the following conclusions are obtained:1. Quadcopter can perform optimal stability movementsusing the PID method. With a constant value of Kp = 1.3, Ki = 0.04 and Kd = 18.2. Delivery of altitude data sent via bluetooth communicationcan work well up to a distance of 21.5 meters.3. The initial position of the quadcopter during take off willaffect the shift of movement during flight.4.The type of propeller 1045 has a fairly large lift, but thetemperature of the motor when used is faster heat.5. The type of propeller 9450 tends to be more stable inmovement.6. Quadcopter tends to stay away from the initial coordinatepoint if the flight time is increased.From the results of the research conducted, for the next development, it is suggested that the following:1. Pay attention to the specifications of the quadcopter partused, especially in the specifications of the motor for lift strength and propeller type.munication for quadcopter and ground station shoulduse telemetry. So that the data transmission range can be carried out with a considerable distance and minimize frequency interference from outside.3.Adding GPS components, to determine the position /location when flying.4.Provides an electronic shock damper component that is inthe quadcopter to minimize the vibration generated by the four brushless rotors.5.Better mechanical design, to make it easier to implementthe control algorithm used.6.Pay attention to security factors during implementation.Addition of propeller protectors so that the propeller is safe when experiencing a system experiencing errors / crashes.7.When testing, you must first consider the state of the windspeed, this is to reduce the potential of the quadcopter carried by the wind (flyaway).A CKNOWLEDGMENTWe would like to show our gratitude to all our college and student in Mechatronics Department for sharing their wisdom during our research. This research was supported by Basic Mechatronic Laboratory.R EFERENCES[1]R. Shofiyanti, “Teknologi Pesawat Tanpa Awak untuk Pemetaan danPemantau an Tanaman dan Lahan Pertanian”, Informatika Pertanian, Vol.20, No.2, pp 58-64, 2011.[2]Aerostar TUAV : Drone Intai Andalan Skadron Udara 51 TNI AU.</aerostar-tuav-drone-intai-andalan-skadron udara-51-tni-au/> accessed on September 12th 2017.[3]G.E. Setyawan, E. Setiawan, W. Kurniawan, “Sistem KendaliKetinggian Quadcopter Menggunakan PID,” JT IIK, vol 2, no 2, pp 125-131, 2015.[4]P.A. Kusuma, A. Dharmawan, April, “Pengendalian KestabilanKetinggian pada Penerbangan Quadrotor dengan Metode PID Fuzzy,”IJE IS, Vol.7, No.1, pp 61-70, 2017.[5]I.O.G. Singh, “ Self-Navigating Quadcopter,” Int. J. Computer Sci. andInformation Technologies (IJCSIT), vol 6(3), pp 2761-2765, 2015.[6]Salmaa, “Analisa Kestabilan Gerak Diagonal pada Quadrotormenggunakan Kontrol PID,” Jurnal Ilmiah Matematika (MATH unesa), vol 3, no 6, 2017.[7]W.K. Juang, and L.L. Tung, “Pembuatan Mode l Quadcopter yang DapatMempertahankan Ketinggian Tertentu,” Jurnal Teknik Elektro, vol 9, no 2, 2016.[8]W.K. Juang, and L.L. Tung, “Pembuatan Mode l Quadcopter yang DapatMempertahankan Ketinggian Tertentu,” Jurnal Teknik Elektro, vol 9, no 2, 2016.。
PID控制算法介绍与实现一、PID的数学模型在工业应用中PID及其衍生算法是应用最广泛的算法之一,是当之无愧的万能算法,如果能够熟练掌握PID算法的设计与实现过程,对于一般的研发人员来讲,应该是足够应对一般研发问题了,而难能可贵的是,在很多控制算法当中,PID控制算法又是最简单,最能体现反馈思想的控制算法,可谓经典中的经典。
经典的未必是复杂的,经典的东西常常是简单的,而且是最简单的。
PID算法的一般形式:PID算法通过误差信号控制被控量,而控制器本身就是比例、积分、微分三个环节的加和。
这里我们规定(在t时刻):1.输入量为i(t)2.输出量为o(t)3.偏差量为err(t)=i(t)− o(t)u(t)=k p(err(t)+1T i.∫err(t)d t+T D d err(t)d t)二、PID算法的数字离散化假设采样间隔为T,则在第K个T时刻:偏差err(k)=i(k) - o(k)积分环节用加和的形式表示,即err(k) + err(k+1) + …微分环节用斜率的形式表示,即[err(k)- err(k−1)]/T; PID算法离散化后的式子:u(k)=k p(err(k)+TT i.∑err(j)+T DT(err(k)−err(k−1)))则u(k)可表示成为:u(k)=k p(err(k)+k i∑err(j)+k d(err(k)−err(k−1)))其中式中:比例参数k p:控制器的输出与输入偏差值成比例关系。
系统一旦出现偏差,比例调节立即产生调节作用以减少偏差。
特点:过程简单快速、比例作用大,可以加快调节,减小误差;但是使系统稳定性下降,造成不稳定,有余差。
积分参数k i:积分环节主要是用来消除静差,所谓静差,就是系统稳定后输出值和设定值之间的差值,积分环节实际上就是偏差累计的过程,把累计的误差加到原有系统上以抵消系统造成的静差。
微分参数k d:微分信号则反应了偏差信号的变化规律,或者说是变化趋势,根据偏差信号的变化趋势来进行超前调节,从而增加了系统的快速性。
智能飞行器的研究一、序言(问题的提出、研究的动机)。
二、理论依据。
三、研究目标。
四、研究方法(采用哪些教育科研方法)。
五、研究的主要内容。
1。
PID 算法在四轴飞行器中的应用摘要:本文讨论了如何将PID 算法应用到四轴飞行器上,使之保持机身平衡与稳定。
关键词:PID 算法、四轴飞行器(1) 问题的提出:PID (比例、积分、微分)控制器作为最早实用化的控制器已有 50多年的历史,现在仍然是应用最广泛的工业控制器。
PID 控制器简单易懂,使用中不需精确的系统模型等先决条件,因而成为应用最广泛的控制器。
如何将PID 算法应用到PID 控制器中,使其在陀螺仪的配合下调整电机转速而达到飞行器的平稳飞行。
(2) 问题的分析:我们都知道PID 算法可以表示为:])()(1)([)(⎰++=dtt de TI dt t e TI t e kp t u其中u(t)为输出,e(t)为输入,kp为比例系数,四轴的飞行模式有两种,一种是“+”模式,另一种是""⨯模式,它"⨯模式,我们打算用"更加灵活。
要将PID算法运用到四轴飞行器中,就要搞清楚四轴飞行器中的什么数据作为PID算法的输入,什么作为PID算法的输出。
因为我们是为了稳定飞行器,所以将角速度的数值作为输入是比较合适的,所以我们要装一个陀螺仪芯片,实时监测角速度的变化。
PID算法中有三个参数:kp,TI,TD。
这三个参数应该根据飞行器具体情况来设定。
得到输出u(t)后,怎样处理u(t)是关键。
四轴有四个电机,对应4个转速,每一个转速棵对应1个PPM值。
电机的转速直接影响陀螺仪的值。
我们的目的就是要通过PID的反馈确定PPM 的合适的增量让陀螺仪示数稳定到基准值。
怎样处理u(t)呢?由于我们用的是""⨯模式,如下图1和4是逆时针旋转,2和3是顺时针旋转。
陀螺仪输出X、Y、Z、三轴的角速度W1、W2、W3。
PID控制简介及PID调节经验方法PID就是比例微积分调节,具体你可以参照自动控制课程里有详细介绍!正作用与反作用在温控里就是当正作用时是加热,反作用是制冷控制。
PID控制简介目前工业自动化水平已成为衡量各行各业现代化水平的一个重要标志。
同时,控制理论的发展也经历了古典控制理论、现代控制理论和智能控制理论三个阶段。
智能控制的典型实例是模糊全自动洗衣机等。
自动控制系统可分为开环控制系统和闭环控制系统。
一个控控制系统包括控制器﹑传感器﹑变送器﹑执行机构﹑输入输出接口。
控制器的输出经过输出接口﹑执行机构﹐加到被控系统上﹔控制系统的被控量﹐经过传感器﹐变送器﹐通过输入接口送到控制器。
不同的控制系统﹐其传感器﹑变送器﹑执行机构是不一样的。
比如压力控制系统要采用压力传感器。
电加热控制系统的传感器是温度传感器。
目前,PID控制及其控制器或智能PID控制器(仪表)已经很多,产品已在工程实际中得到了广泛的应用,有各种各样的PID控制器产品,各大公司均开发了具有PID参数自整定功能的智能调节器(intelligentregulator),其中PID控制器参数的自动调整是通过智能化调整或自校正、自适应算法来实现。
有利用PID控制实现的压力、温度、流量、液位控制器,能实现PID控制功能的可编程控制器(PLC),还有可实现PID控制的PC系统等等。
1、开环控制系统开环控制系统(open-loopcontrolsystem)是指被控对象的输出(被控制量)对控制器(controller)的输出没有影响。
在这种控制系统中,不依赖将被控量反送回来以形成任何闭环回路。
闭环控制系统(closed-loopcontrolsystem)的特点是系统被控对象的输出(被控制量)会反送回来影响控制器的输出,形成一个或多个闭环。
闭环控制系统有正反馈和负反馈,若反馈信号与系统给定值信号相反,则称为负反馈(NegativeFeedback),若极性相同,则称为正反馈,一般闭环控制系统均采用负反馈,又称负反馈控制系统。
PID控制原理及编程方法PID控制是一种常见的控制算法,用于调节系统输出与期望输入之间的偏差。
PID控制的原理是根据当前的误差、误差变化率和误差累积值来调整系统输出,从而使系统输出逐渐接近期望输入。
PID控制具有简单易实现、调节性能良好的特点,被广泛应用于各种自动控制系统中。
比例项是根据当前误差的大小来调整系统输出,比例增益参数Kp决定了比例项的权重。
当误差较大时,比例项的影响较大,系统输出会迅速调整;当误差较小时,比例项的影响较小。
积分项是根据误差累积值来调整系统输出,积分增益参数Ki决定了积分项的权重。
积分项可以弥补比例项无法完全消除的稳态误差,使系统更加准确地跟踪期望输入。
微分项是根据误差变化率来调整系统输出,微分增益参数Kd决定了微分项的权重。
微分项可以抑制系统的震荡和超调,使系统响应更加平滑。
u(t) = Kp * e(t) + Ki * ∫e(t)dt + Kd * de(t)/dt其中,u(t)为系统输出,e(t)为当前误差,de(t)/dt为误差变化率。
离散PID控制适用于基于采样的离散系统,通常在嵌入式系统中应用较多。
离散PID控制的基本步骤如下:1.初始化PID参数:设置比例增益Kp、积分增益Ki和微分增益Kd的初值,以及误差累积值和上一次误差的初值。
2.读取当前输入和期望输入。
3.计算当前误差:e(t)=期望输入-当前输入。
4. 计算比例项:Proportional = Kp * e(t)。
5. 计算积分项:Integral = Ki * ∑e(t)dt。
其中,∑e(t)dt是误差累积值,可以通过将当前误差加到上一次误差累积值上来计算。
6. 计算微分项:Derivative = Kd * (e(t) - 上一次误差)。
7. 计算PID输出:u(t) = Proportional + Integral + Derivative。
8.将PID输出作为系统控制信号。
9.更新上一次误差和误差累积值。
PID控制详解一、PID控制简介PID( Proportional Integral Derivative)控制是最早发展起来的控制策略之一,由于其算法简单、鲁棒性好和可靠性高,被广泛应用于工业过程控制,尤其适用于可建立精确数学模型的确定性控制系统。
在工程实际中,应用最为广泛的调节器控制规律为比例、积分、微分控制,简称PID控制,又称PID调节,它实际上是一种算法。
PID控制器问世至今已有近70年历史,它以其结构简单、稳定性好、工作可靠、调整方便而成为工业控制的主要技术之一。
当被控对象的结构和参数不能完全掌握,或得不到精确的数学模型时,控制理论的其它技术难以采用时,系统控制器的结构和参数必须依靠经验和现场调试来确定,这时应用PID控制技术最为方便。
即当我们不完全了解一个系统和被控对象,或不能通过有效的测量手段来获得系统参数时,最适合用PID控制技术。
PID控制,实际中也有PI和PD控制。
PID控制器就是根据系统的误差,利用比例、积分、微分计算出控制量进行控制的。
从信号变换的角度而言,超前校正、滞后校正、滞后-超前校正可以总结为比例、积分、微分三种运算及其组合。
PID调节器的适用范围:PID调节控制是一个传统控制方法,它适用于温度、压力、流量、液位等几乎所有现场,不同的现场,仅仅是PID参数应设置不同,只要参数设置得当均可以达到很好的效果。
均可以达到0.1%,甚至更高的控制要求。
PID控制的不足1. 在实际工业生产过程往往具有非线性、时变不确定,难以建立精确的数学模型,常规的PID控制器不能达到理想的控制效果;2. 在实际生产现场中,由于受到参数整定方法烦杂的困扰,常规PID控制器参数往往整定不良、效果欠佳,对运行工况的适应能力很差。
二、PID控制器各校正环节任何闭环控制系统的首要任务是要稳(稳定)、快(快速)、准(准确)的响应命令。
PID调整的主要工作就是如何实现这一任务。
增大比例系数P将加快系统的响应,它的作用于输出值较快,但不能很好稳定在一个理想的数值,不良的结果是虽较能有效的克服扰动的影响,但有余差出现,过大的比例系数会使系统有比较大的超调,并产生振荡,使稳定性变坏。
PID控制算法通俗讲解PID控制算法是一种经典的反馈控制算法,其全称为“比例-积分-微分控制算法”,是目前工业领域使用最广泛的一种控制方法。
它通过调整输出信号和目标值之间的差异来实现系统的稳定和精确控制。
PID控制算法的原理非常复杂,但可以用一种通俗易懂的方式来解释。
我们可以把PID控制算法类比为一个小孩子学习骑自行车的过程。
小孩子第一次骑自行车时,会感到不稳定,容易摔倒。
这时,父母可能会帮助他们保持平衡,通过把手握住自行车后座来保持稳定。
这个过程就相当于PID控制算法中的“比例”部分。
“比例”部分是PID控制算法的基础,它通过调整输出信号和目标值之间的差值,来决定控制量的大小。
比如说,当小孩子离平衡点很远时,父母会用力拉住自行车,让他尽快回到平衡点。
而当离平衡点很近时,父母会放松控制,让他能够自主控制。
这就是“比例”部分的作用,根据偏差的大小来调整控制量,使系统向目标值靠近。
然而,只有“比例”部分还不足以保持稳定。
因为当小孩子骑自行车时,即便靠近平衡点,也有可能因为一些突发因素而失去平衡。
这时,父母可能会及时给他支撑,保持平衡。
这个过程就相当于PID控制算法中的“积分”部分。
“积分”部分的作用是累积系统在长时间内的偏差,并根据累积值来调整控制量。
当系统出现长时间的偏差时,积分部分会逐渐增加,产生补偿作用,使系统更加稳定。
比如说,当小孩子长时间无法保持平衡时,父母可能会给予更多的支撑力,帮助他恢复平衡。
不过,积分部分也有一个缺点,就是会导致系统的响应速度较慢。
因此,PID控制算法引入了“微分”部分来解决这个问题。
我们可以把微分部分类比为小孩子骑自行车时,父母根据自行车的倾斜程度来给予支撑的力度。
“微分”部分通过测量系统的变化速率来调整控制量。
当系统变化速率很快时,微分部分会增加控制量,使系统迅速做出反应。
比如说,当小孩子在转弯时,系统的变化速率会加大,父母就会给予更多的支撑力,以避免摔倒。
综上所述,PID控制算法通过比例、积分和微分三部分的组合来实现系统的稳定和精确控制。
智能飞行器的研究一、序言(问题的提出、研究的动机)。
二、理论依据。
三、研究目标。
四、研究方法(采用哪些教育科研方法)。
五、研究的主要内容。
1。
PID 算法在四轴飞行器中的应用摘要:本文讨论了如何将PID 算法应用到四轴飞行器上,使之保持机身平衡与稳定。
关键词:PID 算法、四轴飞行器(1) 问题的提出:PID (比例、积分、微分)控制器作为最早实用化的控制器已有 50多年的历史,现在仍然是应用最广泛的工业控制器。
PID 控制器简单易懂,使用中不需精确的系统模型等先决条件,因而成为应用最广泛的控制器。
如何将PID 算法应用到PID 控制器中,使其在陀螺仪的配合下调整电机转速而达到飞行器的平稳飞行。
(2) 问题的分析:我们都知道PID 算法可以表示为:])()(1)([)(⎰++=dtt de TI dt t e TI t e kp t u其中u(t)为输出,e(t)为输入,kp为比例系数,四轴的飞行模式有两种,一种是“+”模式,另一种是""⨯模式,它"⨯模式,我们打算用"更加灵活。
要将PID算法运用到四轴飞行器中,就要搞清楚四轴飞行器中的什么数据作为PID算法的输入,什么作为PID算法的输出。
因为我们是为了稳定飞行器,所以将角速度的数值作为输入是比较合适的,所以我们要装一个陀螺仪芯片,实时监测角速度的变化。
PID算法中有三个参数:kp,TI,TD。
这三个参数应该根据飞行器具体情况来设定。
得到输出u(t)后,怎样处理u(t)是关键。
四轴有四个电机,对应4个转速,每一个转速棵对应1个PPM值。
电机的转速直接影响陀螺仪的值。
我们的目的就是要通过PID的反馈确定PPM 的合适的增量让陀螺仪示数稳定到基准值。
怎样处理u(t)呢?由于我们用的是""⨯模式,如下图1和4是逆时针旋转,2和3是顺时针旋转。
陀螺仪输出X、Y、Z、三轴的角速度W1、W2、W3。
PID自动控制控制基本原理与控制算法PID自动控制是一种常用的控制方法,其基本原理是通过对被控对象的输出与期望值之间的差异进行反馈调节,从而实现对被控对象的精确控制。
PID控制算法由三个部分组成,分别是比例控制、积分控制和微分控制。
下面将详细介绍PID自动控制的基本原理和控制算法。
比例控制是PID控制的基本组成部分,它根据被控对象的输出与期望值之间的差异的大小来产生控制器的输出信号。
比例控制的输出与差异成正比,输出信号等于比例增益乘以差异。
比例增益决定了输出信号对差异的敏感程度,当比例增益较大时,控制器的输出信号会更加敏锐地响应差异,但也容易产生震荡或超调现象。
因此,比例增益需要根据被控对象的特性进行适当调整,以实现稳定的控制效果。
积分控制是为了解决比例控制无法完全消除静差的问题。
静差指的是被控对象输出与期望值之间的稳态偏差。
积分控制会根据差异的积分累加值来产生控制器的输出信号。
积分控制可以通过累加差异的方式来积累静差,并且随着时间的增加,积分增益的效果会越来越显著。
通过积分控制可以消除系统的静态误差,提高系统的稳定性和精度。
然而,过大的积分增益也可能导致振荡或超调,因此需要根据实际情况进行调整。
微分控制是为了解决比例控制和积分控制在快速响应和消除振荡方面的不足。
微分控制会根据差异的变化率来产生控制器的输出信号。
微分控制可以通过控制差异变化的速率来实现快速响应和消除振荡。
然而,过大的微分增益可能会引入噪声干扰或增强系统的震荡,因此需要合理选择微分增益。
PID控制算法是将比例控制、积分控制和微分控制三者综合起来进行控制,以实现对被控对象的精确控制。
PID控制器的控制信号由比例响应、积分响应和微分响应三者组成,通过调整三者之间的权重来实现控制效果的调整。
PID控制算法的具体形式可以表示为:u(t)=Kp·e(t)+Ki·∫e(t)dt+Kd·de(t)/dt其中,u(t)表示控制器的输出信号,Kp、Ki和Kd分别为比例增益、积分增益和微分增益,e(t)表示被控对象的输出与期望值之间的差异,∫e(t)dt表示差异的积分,de(t)/dt表示差异的微分。
PID 控制原理和特点工程实际中,应用最为广泛调节器控制规律为比例、积分、微分控制,简称PID m 又称PID 调 节。
PID 控制器问世至今已有近70年历史,它以其结构简单、稳世性好、工作可靠、调整方 便而成为工业控制主要技术之一。
当被控对象结构和参数不能完全掌握,或不到精确数学模型时, 控制理论其它技术难以采用时,系统控制器结构和参数必须依靠经验和现场调试来确宦,这时应 用PID 控制技术最为方便。
即当我们不完全了解一个系统和被控对象,或不能有效测S 手段来 获系统参数时,最适合用PID 控制技术。
PID 控制,实际中也有PI 和PD 控制。
PID 控制器 就是系统误差,利用比例、积分、微分计算出控制虽进行控制。
厦\>闢專巒n 电S 应抚止11、比例控制(P):比例控制是最常用的控制手段之一,比方说我们控制一个加热器的恒温100度,当开始加热 时,离目标温度相差比较远,这时我们通常会加大加热,使温度快速上升,当温度超过100 度时,我们则关闭输出,通常我们会使用这样一个函数e(t) = SP - y{t)-u(t) = e(t)*P SP —-设泄值e(t)— 误差值y(t)—反馈值u(t)—输出值P 一一比例系数滞后性不是很大的控制对象便用比例控制方式就可以满足控制要求,但很多被控对象中因为 有滞后性。
也就是如果设宦温度是200度,当采用比例方式控制时,如果P 选择比较大,则会岀现当温度 达到200度输出为0后,温度仍然会止不住的向上爬升,比方说升至230度,当温度i 迦200度 太多后又开始回落,尽管这时输出开始岀力加热,但温度仍然会向下跌落一定的温度才会止跌 回升,比方说降至170度,最后整个系统会稳宦在一定的范用内进行振荡。
如果这个振荡的幅度是允许的比方说家用电器的控制,那则可以选用比例控制2、比例积分控制(PI):积分的存在是针对比例控制要不就是有差值要不就是振荡的这种特点提出的改进,它常打比 例一块进行控制, 其公式有很多种, u(t) = Kp*eCt)u(t) ---- 输出 Kp 一一比例放大系数也就是PI 控制。
四轴飞行器飞行原理与双闭环PID控制四轴飞行器是微型飞行器的其中一种,相对于固定翼飞行器,它的方向控制灵活、抗干扰能力强、飞行稳定,能够携带一定的负载和有悬停功能,因此能够很好地进行空中拍摄、监视、侦查等功能,在军事和民用上具备广泛的运用前景。
四轴飞行器关键技术在于控制策略。
由于智能控制算法在运行复杂的浮点型运算以及矩阵运算时,微处理器计算能力受限,难以达到飞行控制实时性的要求;而PID控制简单,易于实现,且技术成熟,因此目前主流的控制策略主要是围绕传统的PID控制展开。
1 四轴飞行器的结构与基本飞行原理四轴飞行器结构主要由主控板和呈十字交叉结构的4个电子调速器、电机、旋浆组成,电机由电子调速器控制,主控板主要负责解算当前飞行姿态、控制电调等功能。
以十字飞行模式为例,l号旋翼为头,1、3号旋翼逆时针旋转,2、4号旋翼顺时针旋转,如图1所示。
图1 四轴飞行器结构图参照飞行状态表1变化电机转速,由于四个电机转速不同,使其与水平面倾斜一定角度,如图l所示。
四个电机产生的合力分解为向上的升力与前向分力。
当重力与升力相等时,前向分力驱动四轴飞行器向倾斜角度的方向水平飞行。
空间三轴角度欧拉角分为仰俯角、横滚角、航向角:倾斜角是仰俯角时,向前、向后飞行;倾斜角是横滚角时,向左、向右飞行;而倾斜航向角时,向左、右旋转运动,左(右)旋转是由于顺时针两电机产生的反扭矩之和与逆时针两电机产生的反扭矩之和不等,即不能相互抵消,机身便在反扭矩作用下绕z轴自旋转。
【分页导航】第1页:四轴飞行器的结构与基本飞行原理第2页:四轴飞行器姿态解算第3页:四轴飞行器双闭环PID控制第4页:四轴飞行器的油门输出计算及油门补偿第5页:四轴飞行器姿态PID控制测试2 姿态解算四轴飞行器运用姿态解算计算出空间三轴欧拉角。
结构框架如图2所示,陀螺仪采样三轴角速度值,加速度传感器采样三轴加速度值,而磁力传感器采样得到三轴地磁场值,将陀螺仪、加速度传感器、磁力传感器采样后的数据进行标定、滤波、校正后得到三轴欧拉角度,其中陀螺仪和加速度传感器选用MPU6050芯片,磁力传感器选用HMC5883L芯片,采用IIC总线与主控板通信。