CN106842905B - PID control method and device - Google Patents
PID control method and device Download PDFInfo
- Publication number
- CN106842905B CN106842905B CN201710206850.0A CN201710206850A CN106842905B CN 106842905 B CN106842905 B CN 106842905B CN 201710206850 A CN201710206850 A CN 201710206850A CN 106842905 B CN106842905 B CN 106842905B
- Authority
- CN
- China
- Prior art keywords
- error amount
- value
- pid control
- controlled
- control
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B11/00—Automatic controllers
- G05B11/01—Automatic controllers electric
- G05B11/36—Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential
- G05B11/42—Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential for obtaining a characteristic which is both proportional and time-dependent, e.g. P. I., P. I. D.
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Feedback Control In General (AREA)
Abstract
The embodiment of the invention discloses a kind of PID control method and device, the method includes:The controlled variable value of controlled plant is obtained in controlling cycle, and calculates the error amount of the controlled variable value and corresponding default desired value;The difference for calculating corresponding first error amount of current control period the second error amount corresponding with a upper controlling cycle, obtains target difference;When the target difference and first error amount meet preset condition, the integral term of the correspondence current control period in PID control formula is determined according to the change rate of first error amount, obtains target PID control formula;Output control variable value is calculated according to the target PID control formula, and control variable value is exported according to gained, the controlled plant is controlled accordingly.The embodiment of the present invention improves integral term on the basis of existing PID control formula, realizes the advantageous effect of the tracking velocity and response quality that can take into account system simultaneously.
Description
Technical field
The present embodiments relate to PID technical fields more particularly to a kind of PID control method and devices.
Background technology
In the various methods of control system, PID (proportion-integral-derivative, proportional, integral-
Derivative controller) control method have the advantages that it is simple in structure, be easily achieved.PID control is initially applied to process control, with
The development of electronic technology, PID control steps into computer control field, wherein just comprising leading in flight-control computer
Boat control loop.
Regulatory PID control method is as follows:
Wherein, u (k) is output control variable value, KPFor proportional gain, e (k) is controlled variable value and default desired value
Error amount, KiFor storage gain, KdFor the differential gain, Δ t periods in order to control.
In formula, the stable state accuracy of integral adjustment and system is closely related, and integral, which is added, can eliminate the steady-state error of system,
The tracking accuracy of raising system.However, the addition of integral term can cause the response of system to lag to a certain extent, it is unfavorable
In the response quality of system.
Invention content
A kind of PID control method of offer of the embodiment of the present invention and device, can take into account the tracking velocity and response product of system
Matter.
In a first aspect, an embodiment of the present invention provides a kind of PID control methods, including:
The controlled variable value of controlled plant is obtained in controlling cycle, and is calculated the controlled variable value and preset with corresponding
The error amount of desired value;
The difference of corresponding first error amount of current control period the second error amount corresponding with a upper controlling cycle is calculated,
Obtain target difference;
When the target difference and first error amount meet preset condition, according to the variation of first error amount
Rate determines the integral term of the correspondence current control period in PID control formula, obtains target PID control formula;
Output control variable value is calculated according to the target PID control formula, and control variable value pair is exported according to gained
The controlled plant is controlled accordingly.
Further, the preset condition includes:
The target difference is less than 0 and first error amount is greater than or equal to default changing value.
Further, the product in the default changing value period and default maximum rate of change in order to control.
Further, the integral term in PID control formula is determined according to the change rate of first error amount, including:
The integral term in PID control formula is determined according to following formula:
Wherein, I (k) is the corresponding integral term of current control period;
E (k) is corresponding first error amount of current control period;
Δ t periods in order to control;
I (k-1) is the corresponding integral term of a upper controlling cycle;
To preset maximum rate of change.
Further, the target PID control formula is:
U (k)=KPe(k)+I(k)+Kd[e(k)-e(k-1)]
Wherein, u (k) is output control variable value;
KPFor proportional gain;
KdFor the differential gain.
Further, when the target difference or first error amount are unsatisfactory for preset condition, according to Traditional PID control
Formula processed calculates output control variable value, and exports control variable value according to gained and controlled accordingly to the controlled plant
System.
Further, the controlled plant includes unmanned plane or pilotless automobile.
Second aspect, the embodiment of the present invention additionally provide a kind of PID control device, including:
Error amount computing module, the controlled variable value for obtaining controlled plant in controlling cycle, and calculate the quilt
Control the error amount of variate-value and corresponding default desired value;
Target difference computing module, for calculating corresponding first error amount of current control period and a upper controlling cycle pair
The difference for the second error amount answered, obtains target difference;
Target PID control formula acquisition module, for meeting default item when the target difference and first error amount
When part, the integral of the correspondence current control period in PID control formula is determined according to the change rate of first error amount
, obtain target PID control formula;
Control module for calculating output control variable value according to the target PID control formula, and is exported according to gained
Control variable value controls the controlled plant accordingly.
Further, the target difference is less than and first error amount is greater than or equal to default changing value.
Further, the product in the default changing value period and default maximum rate of change in order to control.
An embodiment of the present invention provides a kind of PID control method and devices, by calculating the first error amount and target difference,
When target difference and the first error amount meet preset condition simultaneously, PID control public affairs are determined according to the change rate of the first error amount
The integral term of correspondence current control period in formula obtains target PID control formula, is calculated further according to target PID control formula
Control variable value is exported, and control variable value is exported according to gained, controlled plant is controlled accordingly, in existing PID control
On the basis of formula, integral term is improved, realizes the tracking velocity and response quality that can take into account system simultaneously
Advantageous effect.
Description of the drawings
Figure 1A is a kind of flow chart of PID control method in the embodiment of the present invention one;
Figure 1B is a kind of flow chart of unmanned plane PID control method in the embodiment of the present invention one;
Fig. 1 C are a kind of to obtain the rate error schematic diagram of next controlling cycle based on regulatory PID control method;
Fig. 1 D are the rate error schematic diagrames that PID control method provided in an embodiment of the present invention obtains next controlling cycle;
Fig. 2 is a kind of structural schematic diagram of PID control device in the embodiment of the present invention two.
Specific implementation mode
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limitation of the invention.It also should be noted that in order to just
Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Figure 1A is a kind of flow chart for PID control method that the embodiment of the present invention one provides, and the present embodiment is applicable to respectively
The case where kind needs PID control method, this method can be executed by PID control device provided in an embodiment of the present invention, the dress
It sets and the mode of software and/or hardware can be used realizes, which can be integrated in any equipment for providing pid control function, example
Such as can be computer or controlled plant.As shown in Figure 1A, it specifically includes:
S110, in controlling cycle obtain controlled plant controlled variable value, and calculate the controlled variable value with it is corresponding
Default desired value error amount.
Wherein, controlling cycle can be the arbitrary value being manually set, and the value of controlling cycle is smaller, be run to controlled plant
The control of state is more accurate;Controlled plant is the equipment that is run based on PID control method, as unmanned plane, pilotless automobile,
Robot and it is various based on error measure come modified production equipment etc.;Controlled variable may include the operating status of controlled plant
Parameter, correspondingly, controlled variable value may include the corresponding value of the running state parameter of controlled plant;Default desired value can be
The corresponding value of expection running state parameter of the controlled plant of artificial settings.The controlled of controlled plant is obtained in controlling cycle
Variate-value can be the corresponding value of running state parameter that any time obtains in controlling cycle is initial or controlling cycle,
It can also be the mean value in controlling cycle take after multiple value.It should be noted that since controlled plant is in operational process
In have multiple controlling cycles, it is therefore desirable to the running state parameter in each controlling cycle is monitored in real time, to ensure controlled plant
State is without departing from preset motion state etc..Because of error amount of the PID control method with controlled variable value and default desired value
It is related, so in the controlled variable value of the controlled plant in obtaining different controlling cycles, it can be in different controlling cycles
Synchronization value, can also be in the different moments value in different controlling cycles.
Preferably, in the present embodiment, the controlled plant includes unmanned plane or pilotless automobile.
For example, when controlled plant is unmanned plane, the Navigation Control that PID control method can be used for controlling unmanned plane is returned
Road.Corresponding, in the Navigation Control circuit of unmanned plane, controlled variable may include the running state parameter of unmanned plane during flying,
Such as at least one of attitude angle, attitude angular rate, speed, acceleration and position.It is being controlled for another example choosing unmanned plane
Speed in period is as controlled variable, wherein speed value when unmanned plane during flying can be passed by velocity sensor and inertia
Sensor monitors in real time.The default desired value of the velocity amplitude of acquisition and speed is compared, speed error value is obtained.Or for example,
Attitude angle angle value of the unmanned plane in controlling cycle is chosen as controlled variable, attitude angle angle value can in real time be supervised by gyroscope
It surveys, the attitude angle angle value of acquisition and the default desired value of attitude angle angle value is compared, attitude angle error amount is obtained.
It should be noted that when controlled plant is pilotless automobile, PID control method can equally obtain nobody and drive
Running state parameter when automobile is sailed, error amount is calculated according to default desired value.Wherein, when controlled plant is pilotless automobile
When, controlled variable may include at least one of speed, acceleration, steering angle and steering angular velocity etc..
S120, corresponding first error amount of current control period the second error amount corresponding with a upper controlling cycle is calculated
Difference obtains target difference.
Specifically, the difference of the error amount for being calculated as the two neighboring period of target difference.It, can according to the size of target difference
It is missed with knowing controlled plant whether corresponding first error amount of current control period is less than a upper controlling cycle corresponding second
Difference, to judge whether the controlled variable value of current controlled plant and the error of default desired value are reduced trend.When current
When the controlled variable value of controlled plant and the error of default desired value have reduction trend, then the of current control period is can determine whether
One error amount is smaller, is not further added by a certain range then controlling the error;When the controlled variable of current controlled plant
When the error of value and default desired value does not reduce trend, then can on the basis of original control variable value increasing degree it is larger
Control variable value reduce error to ensure system quick response.
It should be noted that corresponding first error amount of current control period the second error corresponding with a upper controlling cycle
Difference between value is preferably the difference of absolute value, i.e., target difference can be corresponding first error amount of current control period
Difference between absolute value the second error amount absolute value corresponding with a upper controlling cycle.
S130, when the target difference and first error amount meet preset condition, according to first error amount
Change rate determine the integral term of the correspondence current control period in PID control formula, obtain target PID control formula.
Specifically, the stable state accuracy of the integral term and system in PID control formula is closely related, integral term, which is added, to disappear
Except the steady-state error of system, the tracking accuracy of system is improved.But since existing PID control method is not to controlled plant
The positive and negative values of target difference distinguish between current control period and a upper controlling cycle, i.e., not to current controlled plant
Whether controlled variable value and the error of default desired value there is reduction trend to be judged, but it is public to substitute into regulatory PID control
Formula, therefore when the error of controlled plant system can be caused constantly to reduce, the integral term accumulated before is still larger, eventually leads to controlled
The response of device systems lags, and is unfavorable for the response quality of system.And the preset condition provided in the embodiment of the present invention can
Whether judged with reduction trend with the error of controlled variable value and default desired value to current controlled plant.Meanwhile
Determine the integral term in PID control formula whether for positive value using whether the first error amount meets preset condition.Work as goal discrepancy
When value and first error amount meet preset condition, determined in PID control formula according to the change rate of first error amount
The correspondence current control period integral term, obtain target PID control formula.
In the present embodiment, the preset condition includes:The target difference be less than 0 and first error amount be more than or
Equal to default changing value.
Specifically, when corresponding first error amount of current control period the second error amount corresponding with a upper controlling cycle
When target difference is less than 0, illustrate in current control period, the error between the controlled variable of controlled plant and default desired value
It is reducing, it is meant that operating status of the controlled plant in current control period is closer to predetermined paths.
In the present embodiment, the default changing value is preferably the product of controlling cycle and default maximum rate of change.
Wherein, the default maximum rate of change of controlled plant is related with the inertia of controlled plant itself and power, and every by
The default maximum rate of change for controlling equipment is definite value.Also, when controlled plant be unmanned plane when, preset maximum rate of change then with rotation
Inertia and power are related.Wherein, rotary inertia be Rigid Body in Rotation With when inertia measurement, magnitude depend on object shape,
The position of Mass Distribution and shaft;Power is then only related with the maximum value of pulling force.
Specifically, the side of the default maximum rate of change product by the controlling cycle and different controlled variable values of controlled plant
Formula can obtain the default changing value of corresponding controlled variable value, and for every controlled plant, and it is one solid to preset changing value
Determine threshold limit value.For example, when controlled plant is certain unmanned plane, for controlled variable angular speed, angular speed maximum rate of change
For 500 °/s;For controlled variable acceleration, acceleration maximum rate of change is 2000deg/s2.Again by controlled plant not
The first error amount with controlled variable value is compared with corresponding default changing value, you can whether big obtains the first error amount
In fixed threshold limit value.
Specifically, when the target difference of controlled plant be less than 0 and first error amount be greater than or equal to default changing value when, root
The integral term of the correspondence current control period in PID control formula is determined according to the change rate of the first error amount.
In the present embodiment, the integral term in PID control formula is determined according to the change rate of first error amount, wrapped
It includes:
The integral term in PID control formula is determined according to following formula:
Wherein, I (k) is the corresponding integral term of current control period;
E (k) is corresponding first error amount of current control period;
Δ t periods in order to control;
I (k-1) is the corresponding integral term of a upper controlling cycle;
To preset maximum rate of change.
It should be noted that the integral term in the present embodiment is the rule of e change rates decaying so that when current controlled plant
The error of controlled variable value and default desired value when there is reduction trend, the value of integral term is also finely adjusted accordingly, to protect
Error is demonstrate,proved within control range.
When the target difference of controlled plant and the first error amount meet preset condition, the integral of current control period is calculated
, and the integral term of the current control period is substituted into target PID control formula.
In embodiments of the present invention, the target PID control formula is:
U (k)=KPe(k)+I(k)+Kd[e(k)-e(k-1]
Wherein, u (k) is output control variable value;
KPFor proportional gain;
KdFor the differential gain.
It should be noted that e (k) in the present embodiment is the first error amount of current control period, while being controlled
The error amount of variate-value and default desired value;E (k-1) is the second error amount of previous controlling cycle, therefore, the mesh of controlled plant
Marking difference value equation is:E (k)-e (k-1), and preferably | e (k)-e (k-1) |.
S140, output control variable value is calculated according to the target PID control formula, and control variable is exported according to gained
Value controls the controlled plant accordingly.
Wherein, the parameter that output control variable is adjusted by controlled plant in next controlling cycle, output control variable
Value is the corresponding numerical value of parameter that is adjusted.The output control variable of unmanned plane may include throttle, aileron, rudder and elevator
At least one of.For example, throttle is made by electricity regulation and control, the size of output current is adjusted to change properller by controlling electricity
Rotating speed, and then change thrust, adjust the speed of controlled plant.By to the corresponding First Speed error amount of current period and upper one
The calculating of period corresponding second speed error amount can obtain the target velocity difference and First Speed error amount of controlled plant
Whether preset condition is met simultaneously.If meeting preset condition simultaneously, the integral term of current control period is calculated, and this is current
The integral term of controlling cycle substitutes into target PID control formula, obtains desired Throttle Opening Control amount of next period.
In the present embodiment, when the target difference or first error amount are unsatisfactory for preset condition, according to routine
PID control formula calculates output control variable value, and exports control variable value according to gained and carried out accordingly to the controlled plant
Control.
Wherein, regulatory PID control formula:
Wherein, KPFor proportional gain;
Integral term is:
Specifically, as long as there are one items in the target difference of controlled plant the first error amount corresponding with current control period
When part is unsatisfactory for preset condition, i.e., the target difference of controlled plant is more than or equal to 0 or corresponding first mistake of current control period
When difference is less than default changing value, output control variable value is calculated according to regulatory PID control formula, and export and control according to gained
Variate-value controls controlled plant accordingly.When the target difference of controlled plant is more than or equal to 0, illustrate currently controlled set
The error of standby controlled variable value and default desired value increases, it is therefore desirable to be used using the integral term in regulatory PID control formula
In making output controlled quentity controlled variable persistently increase to obtain stronger correction amount, quickly reduce tracking error.And work as current control period pair
When the first error amount answered is less than default changing value, the integral term substituted into the embodiment of the present invention is then negative value, due to not meeting
The design principle of " integral one-way attenuation, symbol are constant ", therefore still need to use regulatory PID control formula.If not former according to design
When then executing, as soon as when the integral term of the current control period calculated is positive and negative opposite with the integral term of upper controlling cycle,
It is that positive accumulated error suddenly becomes negative accumulated error, does not meet convention.Because as the PID using decaying integral item mode
When method, it is desirable that the integral term is decayed, and is not changed positive and negative.
It should be noted that the design principle of the embodiment of the present invention is preset " proper integral, rapid decay;Product
Point one-way attenuation, symbol are constant " Integral Principle.Specifically, the integral term in PID can be understood as the cumulant of error, by
It can just be born in error, therefore integral term also can just be born.When using the PID of decaying integral item mode, one of condition is
Error is more than certain threshold value, then before the first error amount decays in threshold range, the symbol of the first error amount is protected always
Hold constant, and the symbol of integral term is consistent within this time with the first error amount symbol, therefore no matter which kind of decaying is used
Mode should not all change in the symbol of this time inner product subitem.And when corresponding first error amount of current control period is small
When default changing value, if still substituting into the integrated attenuation algorithm in the embodiment of the present invention, integral term symbol can be caused on the contrary, not
Meet one-way attenuation design principle.
It should be noted that regulatory PID control formula can be directly indicated using following formula:
U (k)=KPe(k)+[I(k-1)+Kie(k)Δt]+Kd[e(k)-e(k-1)]
As shown in Figure 1B, Figure 1B is the flow diagram of PID control Navigation of Pilotless Aircraft control loop.Ideally, it leads
Boat control loop can control unmanned plane and carry out normal flight along course line is preset.But air can be inevitably encountered in flight course
The extraneous factors such as stream, therefore can in time be adjusted in the case where unmanned plane drifts off the course by PID control method,
So that unmanned plane is quickly returning to scheduled course line.
Before the controlled variable value of input current period, first the parameter involved in control method process is carried out initial
Change.In some controlling cycle, when analyzing unmanned plane in flight course there are when deviation, the attitude angle of unmanned plane can be acquired
For angle value as controlled variable value, then it is attitude angle variate to control output variable.For example, unmanned plane is in some controlling cycle
Preset posture angle desired value is 36 °, is 30 ° according to the practical current pose angle for measuring the unmanned plane of gyroscope, then first
Error amount is 6 °, and assumes that the second error amount of a upper controlling cycle is 6.5 °, and final integrated value is 1.5.By the predetermined angle phase
30 ° of PID control method flow charts substituted into Figure 1B of 36 ° of prestige value and actual angle value.Due to meeting preset condition, pass through
It substitutes into improved integral term and control output variable (attitude angular velocity variate) is calculated as (P+D+1.375) in PID formula.
Wherein P, D are P, D result of calculations in PID controller.Then, unmanned plane adjusts motor speed to change according to attitude angle
Attitude angle is finally reached the purpose for maintaining body posture.
It should be noted that PID control method provided in an embodiment of the present invention is changing based on regulatory PID control method
Into.If being 36 ° and 30 ° of substitution regulatory PID control formula of actual angle value by above-mentioned predetermined angle desired value, calculate
Conventional control output variable (attitude angle variate) be (P+D+1.506).It follows that using conventional control output variable tune
For whole unmanned plane in the control parameter of next controlling cycle, anti-increasing does not drop in the integrated value than a upper controlling cycle, even if the later stage is practical
Error amount can adjust, and be gradually reduced, but undoubtedly increase the system adjustment time, slow down the speed that error correction reaches stable state
Degree, as illustrated by figures 1C and 1D.
Fig. 1 C are to obtain the attitude angular rate error schematic diagram of next controlling cycle based on regulatory PID control method;Fig. 1 D
The attitude angular rate error schematic diagram of next controlling cycle, abscissa are obtained for PID control method provided in an embodiment of the present invention
For the time, ordinate is attitude angular rate error amount.Regulatory PID control method is respectively adopted in Fig. 1 C and Fig. 1 D implements with the present invention
The PID control method that example provides has carried out intuitive comparison to the control result of the attitude angle error after integral term is added.Due to
Integral term is directly inputted to execution equipment, driving motor rotation speed change, and motor speed variation can be examined by angular-rate sensor
It is rotationally-varying caused by measuring it at first, therefore the integral term can be accurately reflected by observation attitude angular rate error and worked
Control effect afterwards can also reflect that the integral term role, the fluctuation characteristic of Fig. 1 C and Fig. 1 D curves can directly reflect
The stability of the ride comfort and posture of motor output, and attitude angular rate carries out an integral and calculating and attitude angle angle value can be obtained.
When attitude angular rate error amount is 0, illustrate that the running orbit of unmanned plane and preset motion state have no deviation, by figure
1C and Fig. 1 D comparisons are significantly less than curve shown in Fig. 1 C it is found that the curve of Fig. 1 D latter halfs fluctuates situation up and down, therefore,
The unmanned plane that PID control method provided in an embodiment of the present invention is adjusted is more flat in the operating status of next controlling cycle
Surely.
An embodiment of the present invention provides a kind of PID control methods to work as target by calculating the first error amount and target difference
When difference and the first error amount meet preset condition simultaneously, determined in PID control formula according to the change rate of the first error amount
The integral term of corresponding current control period, obtains target PID control formula, and output control is calculated further according to target PID control formula
Variate-value processed, and control variable value is exported according to gained, controlled plant is controlled accordingly, in existing PID control formula
On the basis of, integral term is improved, the beneficial effect of the tracking velocity and response quality that can take into account system simultaneously is realized
Fruit.
Embodiment two
Fig. 2 is a kind of structural schematic diagram of PID control device provided by Embodiment 2 of the present invention, and the present embodiment is applicable to
Various the case where needing PID control method, this method can be executed by PID control device provided in an embodiment of the present invention, should
Software can be used in device and/or the mode of hardware is realized, which can be integrated in any equipment for providing pid control function,
Such as can be computer or controlled plant.As shown in Fig. 2, specifically including:Error amount computing module 21, target difference computing module
22, target PID control formula acquisition module and control module 24.
Error amount computing module 21, the controlled variable value for obtaining controlled plant in controlling cycle, and described in calculating
The error amount of controlled variable value and corresponding default desired value;
Target difference computing module 22, for calculating corresponding first error amount of current control period and a upper controlling cycle
The difference of corresponding second error amount, obtains target difference;
Target PID control formula acquisition module 23, for being preset when the target difference and first error amount satisfaction
When condition, the product of the correspondence current control period in PID control formula is determined according to the change rate of first error amount
Subitem, obtains target PID control formula;
Control module 24, for calculating output control variable value according to the target PID control formula, and it is defeated according to gained
Go out control variable value to control the controlled plant accordingly.
On the basis of the above embodiments, the preset condition includes:The target difference is greater than or equal to 0 and described the
One error amount is greater than or equal to default changing value.
On the basis of the above embodiments, the product in the default changing value period and default maximum rate of change in order to control.
On the basis of the above embodiments, target PID control formula acquisition module 23 is used for:
The integral term in PID control formula is determined according to following formula:
Wherein, I (k) is the corresponding integral term of current control period;
E (k) is the error amount of controlled variable value and default desired value;
Δ t periods in order to control;
I (k-1) is the corresponding integral term of a upper controlling cycle;
To preset maximum rate of change.
On the basis of the above embodiments, the target PID control formula is:
U (k)=KPe(k)+I(k)+Kd[e(k)-e(k-1)]
Wherein, u (k) is output control variable value;
KPFor proportional gain;
KdFor the differential gain.
On the basis of the above embodiments, when the target difference or first error amount are unsatisfactory for preset condition,
Output control variable value is calculated according to regulatory PID control formula, and control variable value is exported to the controlled plant according to gained
It is controlled accordingly.
On the basis of the above embodiments, the controlled plant includes unmanned plane or pilotless automobile.
An embodiment of the present invention provides a kind of PID control devices to work as target by calculating the first error amount and target difference
When difference and the first error amount meet preset condition simultaneously, determined in PID control formula according to the change rate of the first error amount
The integral term of corresponding current control period, obtains target PID control formula, and output control is calculated further according to target PID control formula
Variate-value processed, and control variable value is exported according to gained, controlled plant is controlled accordingly, in existing PID control formula
On the basis of, integral term is improved, the beneficial effect of the tracking velocity and response quality that can take into account system simultaneously is realized
Fruit.
Note that above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that
The present invention is not limited to specific embodiments described here, can carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out to the present invention by above example
It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also
May include other more equivalent embodiments, and the scope of the present invention is determined by scope of the appended claims.
Claims (10)
1. a kind of proportional integral differential PID control method, which is characterized in that including:
The controlled variable value of controlled plant is obtained in controlling cycle, and calculates the controlled variable value and corresponding default expectation
The error amount of value;
The difference for calculating corresponding first error amount of current control period the second error amount corresponding with a upper controlling cycle, obtains
Target difference;
When the target difference and first error amount meet preset condition, the change rate according to first error amount is true
The integral term for determining the correspondence current control period in PID control formula, obtains target PID control formula;
Output control variable value is calculated according to the target PID control formula, and control variable value is exported to described according to gained
Controlled plant is controlled accordingly;
Wherein, the change rate of first error amount is absolute value of first error amount to the derivative of time Maximum value be default maximum rate of changee(k)
For corresponding first error amount of current control period;E (k-1) is corresponding second error amount of a upper controlling cycle;Δ t is in order to control
Period.
2. according to the method described in claim 1, it is characterized in that, the preset condition includes:
The target difference is less than 0 and first error amount is greater than or equal to default changing value.
3. according to the method described in claim 2, it is characterized in that, default changing value period and default maximum change in order to control
The product of rate.
4. according to the method described in claim 3, it is characterized in that, determining that PID is controlled according to the change rate of first error amount
Integral term in formula processed, including:
The integral term in PID control formula is determined according to following formula:
Wherein, I (k) is the corresponding integral term of current control period;
E (k) is corresponding first error amount of current control period;
Δ t periods in order to control;
I (k-1) is the corresponding integral term of a upper controlling cycle;
To preset maximum rate of change.
5. according to the method described in claim 4, it is characterized in that, the target PID control formula is:
U (k)=KPe(k)+I(k)+Kd[e(k)-e(k-1)]
Wherein, u (k) is output control variable value;
KPFor proportional gain;
KdFor the differential gain.
6. according to the method described in claim 1, it is characterized in that, when the target difference or first error amount are unsatisfactory for
When preset condition, output control variable value is calculated according to regulatory PID control formula, and control variable value is exported to institute according to gained
Controlled plant is stated to be controlled accordingly.
7. according to any methods of claim 1-6, which is characterized in that the controlled plant includes unmanned plane or nobody drives
Sail automobile.
8. a kind of proportional integral differential PID control device, which is characterized in that including:
Error amount computing module, the controlled variable value for obtaining controlled plant in controlling cycle, and calculate the controlled change
The error amount of magnitude and corresponding default desired value;
Target difference computing module, it is corresponding with a upper controlling cycle for calculating corresponding first error amount of current control period
The difference of second error amount, obtains target difference;
Target PID control formula acquisition module, for when the target difference and first error amount meet preset condition,
The integral term that the correspondence current control period in PID control formula is determined according to the change rate of first error amount, obtains
To target PID control formula;
Control module for calculating output control variable value according to the target PID control formula, and is exported according to gained and is controlled
Variate-value controls the controlled plant accordingly;
Wherein, the change rate of first error amount is absolute value of first error amount to the derivative of time Maximum value be default maximum rate of changee(k)
For corresponding first error amount of current control period;E (k-1) is corresponding second error amount of a upper controlling cycle;Δ t is in order to control
Period.
9. device according to claim 8, which is characterized in that the preset condition includes:
The target difference is less than and first error amount is greater than or equal to default changing value.
10. device according to claim 9, which is characterized in that the default changing value period and default maximum in order to control
The product of change rate.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710206850.0A CN106842905B (en) | 2017-03-31 | 2017-03-31 | PID control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710206850.0A CN106842905B (en) | 2017-03-31 | 2017-03-31 | PID control method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106842905A CN106842905A (en) | 2017-06-13 |
CN106842905B true CN106842905B (en) | 2018-11-09 |
Family
ID=59142129
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710206850.0A Active CN106842905B (en) | 2017-03-31 | 2017-03-31 | PID control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106842905B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107678276B (en) * | 2017-08-15 | 2020-07-14 | 北京航天控制仪器研究所 | Adaptive composite control method based on turntable control |
CN110032064A (en) * | 2018-01-12 | 2019-07-19 | 西安远智电子科技有限公司 | Unmanned aerial vehicle control method and device |
CN109828456B (en) * | 2019-03-04 | 2022-02-01 | 沈阳华控科技发展有限公司 | Self-adaptive PID control method |
CN111752143B (en) * | 2020-03-21 | 2022-10-25 | 哈尔滨工程大学 | An Adjustable Inertia Integral Control Method |
CN111923047B (en) * | 2020-08-11 | 2021-08-13 | 北京航空航天大学 | An Attitude Control Method for Armed Rotor UAV Aiming at Center of Mass Offset and Base Float |
CN112181034A (en) * | 2020-09-01 | 2021-01-05 | 深圳市格睿德电气有限公司 | Constant-voltage constant-current loop control system and control method thereof |
CN113303775A (en) * | 2021-04-30 | 2021-08-27 | 湖南科技大学 | Automatic health detection equipment based on cloud platform and control method thereof |
CN113608474A (en) * | 2021-08-06 | 2021-11-05 | 长春市九台区侬富米业有限公司 | Intelligent rice particle screening system with swinging device |
CN115453856B (en) * | 2022-09-23 | 2024-11-22 | 中国兵器工业集团第二一四研究所苏州研发中心 | An adaptive PID control method and device for refrigerator |
CN117506936B (en) * | 2024-01-04 | 2024-03-08 | 唐山先坤工业机器人有限公司 | Mechanical arm control method and master-slave control system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1956447A2 (en) * | 2007-02-09 | 2008-08-13 | Samsung Electronics Co., Ltd. | Apparatus and method for proportional-integral-derivative control |
CN103269195A (en) * | 2013-05-24 | 2013-08-28 | 电子科技大学 | A Variable Speed Integral PID Controller for Vector Control of Asynchronous Motors in Electric Vehicles |
CN103383571A (en) * | 2013-08-13 | 2013-11-06 | 湖南航天机电设备与特种材料研究所 | Asymmetric four-rotor UAV (unmanned aerial vehicle) and control method thereof |
CN105083567A (en) * | 2015-08-14 | 2015-11-25 | 深圳一电科技有限公司 | Unmanned aerial vehicle flight control method and device |
CN105301957A (en) * | 2015-11-24 | 2016-02-03 | 泉州装备制造研究所 | Novel anti-integral-saturation PID control method |
CN106169897A (en) * | 2016-08-02 | 2016-11-30 | 中车株洲电力机车研究所有限公司 | A kind of motor speed real-time anti-saturation PID control method and device |
-
2017
- 2017-03-31 CN CN201710206850.0A patent/CN106842905B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1956447A2 (en) * | 2007-02-09 | 2008-08-13 | Samsung Electronics Co., Ltd. | Apparatus and method for proportional-integral-derivative control |
CN103269195A (en) * | 2013-05-24 | 2013-08-28 | 电子科技大学 | A Variable Speed Integral PID Controller for Vector Control of Asynchronous Motors in Electric Vehicles |
CN103383571A (en) * | 2013-08-13 | 2013-11-06 | 湖南航天机电设备与特种材料研究所 | Asymmetric four-rotor UAV (unmanned aerial vehicle) and control method thereof |
CN105083567A (en) * | 2015-08-14 | 2015-11-25 | 深圳一电科技有限公司 | Unmanned aerial vehicle flight control method and device |
CN105301957A (en) * | 2015-11-24 | 2016-02-03 | 泉州装备制造研究所 | Novel anti-integral-saturation PID control method |
CN106169897A (en) * | 2016-08-02 | 2016-11-30 | 中车株洲电力机车研究所有限公司 | A kind of motor speed real-time anti-saturation PID control method and device |
Non-Patent Citations (1)
Title |
---|
"基于模糊自适应PID的伺服系统控制";吕博 等;《系统仿真学报》;20091130;第21卷(第21期);第6794-6797段 * |
Also Published As
Publication number | Publication date |
---|---|
CN106842905A (en) | 2017-06-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106842905B (en) | PID control method and device | |
CN108827299B (en) | Aircraft attitude calculation method based on improved quaternion second-order complementary filtering | |
CN104898429B (en) | A kind of three rotor attitude control methods based on Active Disturbance Rejection Control | |
CN107844123B (en) | Nonlinear aircraft track control method | |
Derafa et al. | Super twisting control algorithm for the attitude tracking of a four rotors UAV | |
Erginer et al. | Design and implementation of a hybrid fuzzy logic controller for a quadrotor VTOL vehicle | |
JP3308532B2 (en) | High-speed turning adjustment method for rotary wing aircraft | |
Brezoescu et al. | Adaptive trajectory following for a fixed-wing UAV in presence of crosswind | |
CN105676853B (en) | A kind of flight control method of unmanned plane neutral position adjust automatically | |
Huang et al. | Generic adaptive sliding mode control for a quadrotor UAV system subject to severe parametric uncertainties and fully unknown external disturbance | |
CN106843245A (en) | A kind of UAV Attitude control method, device and unmanned plane | |
Verboom et al. | Attitude and altitude estimation and control on board a flapping wing micro air vehicle | |
CN105353761B (en) | The method for control speed and device of a kind of aircraft | |
CN108717265B (en) | Unmanned aerial vehicle cruise tracking control system and control method based on control variable parameterization | |
CN108196563B (en) | Active-disturbance-rejection compensation control method and system for multi-rotor unmanned aerial vehicle | |
Alqaisi et al. | Adaptive sliding mode control based on RBF neural network approximation for quadrotor | |
CN113296525A (en) | Data-driven nonlinear control method for tilting three-rotor unmanned aerial vehicle | |
CN118226884B (en) | Method for controlling precise cruising of flying robot in air | |
Wang et al. | Non-cascaded dynamic inversion design for quadrotor position control with L1 augmentation | |
CN115454113A (en) | Attitude stability control method of unmanned aerial vehicle in high-altitude environment | |
CN112462798B (en) | Unmanned aerial vehicle and method for improving flight performance of unmanned aerial vehicle | |
CN111857172A (en) | Quadrotor Dynamic Area Fractional Sliding Mode Controller Based on Preset Tracking Error | |
Corona-Sánchez et al. | Experimental real-time validation of an attitude nonlinear controller for the quadrotor vehicle | |
CN115755590A (en) | Anti-interference guidance control system and method for hypersonic aircraft | |
Islam et al. | Modeling and simulation of longitudinal autopilot for general aviation aircraft |
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 |