当前位置:网站首页>PID control details [easy to understand]
PID control details [easy to understand]
2022-06-28 16:20:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
PID Control details
One 、PID Introduction to control
PID( Proportional Integral Derivative) Control is one of the earliest developed control strategies , Because its algorithm is simple 、 Good robustness and high reliability , It is widely used in industrial process control , It is especially suitable for deterministic control systems that can establish accurate mathematical models .
In engineering practice , The most widely used regulator control law is proportion 、 integral 、 Differential control , abbreviation PID control , also called PID Adjust the , It's actually an algorithm .PID The controller has been around since it came out 70 Years of history , It's simple in structure 、 Good stability 、 Work reliably 、 Easy to adjust and become one of the main industrial control technology . When the structure and parameters of the controlled object can not be fully mastered , Or when we can't get an accurate mathematical model , When other technologies of control theory are difficult to adopt , The structure and parameters of the system controller must be determined by experience and on-site debugging , This is the time to apply PID Control technology is the most convenient . That is, when we do not fully understand a system and the controlled object , Or when the system parameters cannot be obtained by effective measurement means , Most suitable for PID control technology .PID control , There are also PI and PD control .PID The controller is based on the error of the system , Utilization ratio 、 integral 、 The derivative calculates the control quantity to control .
From the perspective of signal transformation , Lead correction 、 Lag correction 、 lagging - Advance correction can be summarized as proportional 、 integral 、 Three kinds of differential operations and their combinations .
PID Scope of application of the regulator :PID Regulation control is a traditional control method , It is suitable for temperature 、 pressure 、 Traffic 、 Liquid level, etc. almost all sites , Different sites , just PID The parameters should be set differently , As long as the parameters are set properly, good results can be achieved . Can achieve 0.1%, Even higher control requirements .
PID Inadequate control
1. In the actual industrial production process, it is often nonlinear 、 Time varying uncertainty , It is difficult to establish an accurate mathematical model , The conventional PID The controller can not achieve the ideal control effect ;
2. In the actual production site , Due to the complicated parameter setting method , routine PID Controller parameters are often poorly set 、 The effect is not good , Poor adaptability to operating conditions .
Two 、PID Each calibration link of the controller
The primary task of any closed-loop control system is to stabilize ( Stable )、 fast ( Fast )、 accurate ( accuracy ) Response command for .PID The main task of adjustment is how to achieve this task .
Increase the scale factor P Will speed up the response of the system , Its output is faster , But it's not very stable at an ideal value , The bad result is that although the disturbance can be overcome effectively , But there is a margin , Too large scale coefficient will make the system have relatively large overshoot , And produce oscillation , Deteriorate stability . Integral can eliminate residual error on the basis of proportion , It can trim the error of the system with accumulated error after stabilization , Reducing steady state error . Differential has a leading role , For control channels with capacity lag , Introducing differential participation control , If the differential term is set properly , For improving the dynamic performance index of the system , It has a remarkable effect , It can reduce the overshoot of the system , Increased stability , Dynamic error reduction .
in summary ,P— Rapid response control system , Fast acting on output , like ” Now? ”( It works now , fast ),I— Accuracy of integral control system , Eliminate accumulated errors in the past , like ” In the past ”( Clear away old grievances , Return to the exact track ),D— Stability of differential control systems , It has the function of leading control , like ” future ”( Look to the future , Save against a rainy day , Only when we are stable can we develop ). Of course, this conclusion can not be generalized , Just want to make beginners understand more quickly PID The role of .
When adjusting , All you have to do is if the system structure allows , Trade off adjustment between these three parameters , Achieve the best control effect , Realize the control characteristics of stable, fast and accurate .
Proportional control can be used quickly 、 In time 、 Adjust the deviation in proportion , Improve control sensitivity , But there is static error , Low control accuracy . Integral control can eliminate the deviation , Improve control accuracy 、 Improve steady-state performance , But it is easy to cause shock , Cause overshoot . Differential control is a kind of advanced control , Can adjust the system speed 、 Reduce overshoot 、 Improve stability , However, its time constant is too large to introduce interference 、 Large system impact , If it is too small, the adjustment cycle will be long 、 The effect is not significant . The proportion 、 integral 、 Differential control cooperates with each other , Reasonable choice PID Parameters of the regulator , Scale factor KP、 Integral time constant τi And differential time constant τD, Can quickly 、 accuracy 、 Smooth elimination of deviation , Achieve good control effect .
1. Proportion link
Reflect the deviation signal of the control system in proportion e(t), Once deviation occurs , The controller immediately produces a control effect , To reduce the deviation . When there is only proportional control, the system output has steady-state error (Steady-state error).
P The larger the parameter, the stronger the proportional effect , The faster the dynamic response , The stronger the ability to eliminate errors . But the actual system has inertia , After the control output changes , actual y(t) It will take some time for the value to change slowly . Because the actual system has inertia , The proportional effect should not be too strong , Too strong proportional action will cause system oscillation instability .P The size of parameters shall be based on the above quantitative calculation and according to the system response , Site commissioning decision , Will usually P Parameters from major to minor , To achieve the fastest response without overshoot ( Or no major overshoot ) Is the best parameter .
advantage : Adjust the open-loop proportional coefficient of the system , Improve the steady-state accuracy of the system , Reduce the inertia of the system , Faster response .
shortcoming : Just use P controller , Excessive open-loop proportional coefficient will not only increase the overshoot of the system , And it will reduce the stability margin of the system , Even unstable . 2. Integral link
The output of the controller is proportional to the integral of the input error signal . Mainly used to eliminate static error , Improve the tolerance of the system . The strength of the integral action depends on the integral time constant T,T The bigger it is , The weaker the integral , On the contrary, the stronger .
Why introduce integral action ?
The output of proportional action is proportional to the size of the error , The greater the error , The larger the output , The smaller the error , The smaller the output , The error is zero , The output is zero . Since there is no error, the output is zero , Therefore, the proportional adjustment cannot completely eliminate the error , It is impossible to make the accused PV The value reaches the given value . There must be a stable error , To maintain a stable output , To make the system PV The value remains stable . This is commonly referred to as proportional function, which is differential regulation , There is static error , Strengthening the proportional action can only reduce the static error , Static error cannot be eliminated ( Static error : Static error , Also known as steady-state error ).
In order to eliminate static error, integral action must be introduced , Integral action can eliminate static error , To make the accused y(t) Finally, the value is consistent with the given value . The purpose of introducing integral action is to eliminate static error , send y(t) The value reaches the given value , And be consistent .
The principle of eliminating static error by integral action is , As long as there are errors , Just integrate the error , Make the output continue to increase or decrease , Until the error is zero , Integral stop , The output does not change , Systematic PV The value remains stable ,y(t) The value is equal to u(t) value , Achieve the effect of error free adjustment .
However, due to the inertia of the actual system , After output change ,y(t) The value will not change immediately , It will take some time to change slowly , Therefore, the speed of integration must match the inertia of the actual system , Inertia is great 、 The integral action should be weak , Integral time I It should be bigger , On the contrary . If the integral is too strong , Integral output changes too fast , It will cause the phenomenon of over Integration , Produce integral superharmonic oscillations . Usually I The parameters are also in major to minor , That is, the integral function changes from small to large , Observe the system response to quickly eliminate errors , Reach the given value , Without causing oscillation .
For an automatic control system , If there is a steady-state error after entering the steady state , The control system is said to have steady-state error or to be referred to as a differential system (System with Steady-state Error). In order to eliminate steady-state errors , It is necessary to introduce “ Integral term ”. The error of the integral term depends on the integration of time , Over time , The integral term will increase . such , Even if the error is small , The integral term will also increase with time , It pushes the output of the controller to increase and further reduce the steady-state error , Until it equals zero . therefore , The proportion + integral (PI) controller , It can make the system have no steady-state error after entering the steady state .PI The controller not only maintains the ability of the integral controller to eliminate the steady-state error “ Memory function ”, It overcomes the disadvantage of insensitive integral control when used alone .
advantage : Eliminate steady-state errors . shortcoming : The addition of integral controller will affect the stability of the system , Reduce the stability margin of the system .
3. Differential link
Reflect the variation trend of deviation signal , And before the deviation signal becomes too large , Introduce an effective early correction signal into the system , So as to speed up the action speed of the system , Reduce the adjustment time . In differential control , The differential between the output and input error signals of the controller ( The rate of change of error ) Proportional relation .
Why introduce differential action ?
I've analyzed , Regardless of proportional regulation , Or integral adjustment is based on the generation of error before adjustment to eliminate the error , They are all adjusted afterwards. , Therefore, this regulation is good for steady state , It must be bad for Dynamics , Because of the disturbance caused by load change or given value change , You have to wait for the error to occur , Then adjust it slowly to eliminate it .
But the general control system , Not only for stability control , And there are also requirements for dynamic indicators , It is usually required that after disturbance caused by load change or given adjustment , It's faster to return to steady state , Therefore, light has the function of proportional and integral adjustment, which can not fully meet the requirements , Differential action must be introduced . Proportional action and integral action are afterwards adjustments. ( That is, the adjustment is carried out only after the error occurs ), And differential action is prevention and control in advance , That is, a discovery y(t) There is a tendency to become larger or smaller , Immediately output a control signal to prevent its change , To prevent overshoot or overshoot, etc . D The bigger it is , The stronger the differential effect ,D The smaller it is , The weaker the differential effect . When debugging the system, we usually put D From small to major , The specific parameters are determined by the test .
Such as : Caused by set point adjustment or load disturbance y(t) change , Proportional action and differential action must wait until y(t) Adjust after the value changes , And the error is small , The resulting proportional and integral adjustment effect is also small , The ability to correct errors is also small , When the error is large , The resulting proportional and integral effects increase . Because the dynamic index is adjusted after the event, it will not be ideal . The differential action can be adjusted as soon as the trend of error is found before the error occurs , It's advance control , So timeliness is better , It can minimize the dynamic error , Make the overall effect better . But differential action can only be used as a supplement to proportional and integral control , Cannot play a leading role , Differential action should not be too strong , Too strong will also cause system instability , Produce oscillations , Differential action can only be applied to P and I After that, it will be adjusted from minor to major , Try to add it bit by bit .
The automatic control system may appear oscillation or even instability in the adjustment process to overcome the error . The reason is due to the presence of large inertial components ( link ) Or there is a lag (delay) Components , It has the function of restraining error , Its change always lags behind the change of error . The solution is to change the effect of restraining errors “ leading ”, When the error approaches zero , The effect of suppressing errors should be zero . That is to say , Only... Is introduced into the controller “ The proportion ” Items are often not enough , The function of the proportional term is only to amplify the amplitude of the error , Now what needs to be added is “ Differential terms ”, It can predict the trend of error change . such , In proportion to + Differential controller , It can make the control effect of restraining error equal to zero in advance , Even negative , Thus the serious overshoot of the controlled quantity is avoided . So for the controlled object with large inertia or lag , The proportion + differential (PD) The controller can improve the dynamic characteristics of the system in the regulation process .PD Control works only in dynamic processes , It can block the steady state . therefore , Under no circumstances can differential control be used alone .
advantage : Make the response speed of the system faster , Overshoot reduction , Oscillation reduction , For dynamic processes “ forecast ” effect .
At low frequencies , Mainly PI Control laws work , Raise the system type , Eliminate or reduce steady-state errors ; In the middle and high frequency band, it is mainly PD Rules work , Increase the cut-off frequency and phase angle margin , Improve response time . therefore , The controller can comprehensively improve the control performance of the system .
3、 ... and 、PID Parameter tuning of controller
PID Parameter tuning of controller is the core of control system design . It is determined according to the characteristics of the controlled process PID The proportional coefficient of the controller 、 The magnitude of integral time and differential time .PID There are many ways to adjust controller parameters , To sum up, there are two categories :
1. Theoretical calculation setting method
It is mainly based on the mathematical model of the system , The controller parameters are determined by theoretical calculation . The calculated data obtained by this method may not be used directly , It must also be adjusted and modified through engineering practice .
2. Engineering setting method
It relies mainly on engineering experience , Directly in the control system test , And the method is simple 、 Easy to master , It is widely used in engineering practice .PID Engineering tuning method of controller parameters , There are mainly critical proportion method 、 Reaction curve method and attenuation method . Each of the three methods has its own characteristics , What they have in common is that they pass the test , Then the parameters of the controller are adjusted according to the engineering empirical formula . However, no matter which method is adopted, the controller parameters are obtained , All need to be adjusted and perfected in actual operation. . Now the critical proportion method is generally used . Use this method to PID The setting steps of controller parameters are as follows :
(1) First, a short enough sampling period is preselected to make the system work ;
(2) Only the proportional control link is added , Until a critical oscillation occurs in the step response of the system to the input , Write down the scaling factor and critical oscillation period ;
(3) Under a certain degree of control, we can get PID The parameters of the controller .
PID General principles of debugging
a. When the output does not oscillate , Increase the proportional gain P. b. When the output does not oscillate , Reduce the integral time constant Ti. c. When the output does not oscillate , Increase differential time constant Td.
PID General steps of commissioning
a. Determine the proportional gain P
Determine the proportional gain P when , First remove PID Integral and differential terms of , It's usually to make Ti=0、Td=0( Specific view PID Parameter setting description of ), send PID For pure proportional adjustment . Enter the value set to the maximum value allowed by the system 60%~70%, from 0 Gradually increase the proportional gain P, Until the system oscillates ; And vice versa , From the proportional gain at this time P Gradually decrease , Until the system oscillation disappears , Record the proportional gain at this time P, Set up PID Proportional gain of P Is the current value of 60%~70%. Proportional gain P Debugging completed .
b. Determine the integral time constant Ti
Proportional gain P after , Set a larger integral time constant Ti Initial value of , And then gradually decrease Ti, Until the system oscillates , And then in reverse , Gradually increasing Ti, Until the system oscillation disappears . Record this moment of Ti, Set up PID Integral time constant of Ti Is the current value of 150%~180%. Integral time constant Ti Debugging completed .
c. Determination of differential time constant Td
Differential time constant Td Generally, you don't need to set , by 0 that will do . To set , And confirm P and Ti The same way , Let's take it when we don't oscillate 30%.
d. The system is unloaded 、 On load joint commissioning , Right again PID Fine tuning the parameters , Until the requirements are met .
The basic idea of variable speed integral is , Try to change the cumulative acceleration of the integral term , Make it correspond to the deviation : The bigger the deviation , The slower the integral ; On the contrary, the faster , It helps to improve the quality of the system .
Reprinted address http://blog.sciencenet.cn/blog-699887-948853.html
Let's take a look at Wikipedia PID The moving picture of .
https://zh.wikipedia.org/wiki/PID%E6%8E%A7%E5%88%B6%E5%99%A8
Wikipedia also makes it clear , It looks good when combined .
Thank you for correcting the small mistakes , step C Is the differential time @lubingabby
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/132875.html Link to the original text :https://javaforall.cn
边栏推荐
- 超自动化与网络安全的未来
- Summer Challenge ohos build custom service practice
- Super automation and the future of network security
- wallys/DR7915-wifi6-MT7915-MT7975-2T2R-support-OpenWRT-802.11AX-supporting-MiniPCIe-Module
- Cross cluster deployment of helm applications using karmada
- 一台服务器最大并发 tcp 连接数多少?65535?
- C#/VB.NET 将PDF转为Excel
- 10: 00 interview, came out at 10:02, the question is really too
- Etcd可视化工具:Kstone简介(一)
- 如何查询数据库中一个表中的所有数据呢?
猜你喜欢

The sadness of software testers is Their own technical ability can not meet the requirements of large manufacturers?

among us私服搭建

3. caller service call - dapr

Etcd visualization tool: an introduction to kstone (I)

薅羊毛的机会了,点个“赚”即有机会赚取高额佣金

超自动化与网络安全的未来

Azure Kinect微软摄像头Unity开发小结

逆向调试入门-PE结构详解02/07

3. Caller 服务调用 - dapr

字节跳动数据平台技术揭秘:基于ClickHouse的复杂查询实现与优化
随机推荐
LDD knowledge sorting
Interviewer: how does the thread pool reuse threads? Do you know? Tell me about it
Super automation and the future of network security
IPDK — Overview
运维-- 统一网关非常必要
【力扣】977. 有序数组的平方
ID card copy tutorial (use t5577 card to copy 4100 card)
成功迁移到云端需要采取的步骤
3. caller service call - dapr
MySQL auto - Connect Query recommended favorites
使用Karmada实现Helm应用的跨集群部署
A little hesitant in the morning
【Hot100】3. 无重复字符的最长子串
同创伟业合伙人童子平:“元宇宙”究竟该投什么
首次失败后,爱美客第二次冲刺港交所上市,财务负责人变动频繁
leetcode:22. bracket-generating
Open source technology exchange - Introduction to Chengying, a one-stop fully automated operation and maintenance manager
[Spock] process non ASCII characters in an identifier
Ffmpeg forbidden output banner log (30)
PostgreSQL enables grouping statistics by year, month, day, week, hour, minute and second