PID parameter automatic setting method and system

文档序号:585065 发布日期:2021-05-25 浏览:9次 中文

阅读说明:本技术 Pid参数自动整定方法及系统 (PID parameter automatic setting method and system ) 是由 张则羿 于 2020-11-27 设计创作,主要内容包括:本发明提供一种PID参数自动整定方法及系统,属于自动控制领域。所述方法包括:S1)设置超参数取值和PID参数组合初值;S2)令受控系统以阶跃幅度和阶跃时间间隔进行N次往返阶跃,计算N次往返阶跃的平均误差积分;其中N为正整数,且N>1;S3)将所述PID参数组合作为优化变量,将获取所述平均误差积分的最小值作为优化目标,构成一个非约束最优化问题,判断所述PID参数组合是否满足最优化收敛条件,若不满足,根据所述求解算法更新所述PID参数组合,重复步骤S2),直到所述PID参数组合满足所述求解算法的最优化收敛条件;S4)输出满足最优化收敛条件的PID参数组合。保证具有强烈非线性、快速动态响应或对噪声敏感的受控系统的控制及时性和准确性。(The invention provides a PID parameter automatic setting method and a system, belonging to the field of automatic control. The method comprises the following steps: s1) setting a hyper-parameter value and a PID parameter combination initial value; s2) the controlled system carries out N round-trip steps according to the step amplitude and the step time interval, and the average error integral of the N round-trip steps is calculated; wherein N is a positive integer and N > 1; s3) taking the PID parameter combination as an optimization variable, taking the minimum value of the obtained average error integral as an optimization target, forming a non-constrained optimization problem, judging whether the PID parameter combination meets the optimization convergence condition, if not, updating the PID parameter combination according to the solving algorithm, and repeating the step S2) until the PID parameter combination meets the optimization convergence condition of the solving algorithm; s4) outputs the PID parameter combination satisfying the optimized convergence condition. The control timeliness and accuracy of a controlled system with strong nonlinearity, fast dynamic response or sensitivity to noise are ensured.)

1. A PID parameter automatic tuning method applied to a controlled system with strong nonlinearity, fast dynamic response or sensitivity to noise is characterized by comprising the following steps:

s1) setting a hyper-parameter value and a PID parameter combination initial value according to the controlled system characteristics and control experience;

s2) the controlled system carries out N round-trip steps according to the step amplitude and the step time interval, so as to obtain the step data of the controlled system each time, and calculate the average error integral of the N round-trip steps; wherein N is a positive integer and N > 1;

s3) taking the PID parameter combination as an optimization variable, taking the minimum value of the obtained average error integral as an optimization target, forming a non-constrained optimization problem, judging whether the PID parameter combination meets the optimization convergence condition according to the existing solving algorithm of the non-constrained optimization problem, if not, updating the PID parameter combination according to the solving algorithm, and repeating the step S2) until the PID parameter combination meets the optimization convergence condition of the solving algorithm;

s4) outputting the PID parameter combination meeting the optimized convergence condition, and completing the PID parameter setting.

2. The PID parameter automatic tuning method according to claim 1, wherein in step S1), the hyper-parameter comprises: sampling period, integral gain, reference set value X, reference set value step amplitude delta X, error integral time and step time interval of the PID controller; wherein the reference setting value of the controlled system is a reference state value set by a user.

3. The PID parameter automatic tuning method according to claim 1, wherein in step S1), the PID parameter combination comprises: proportional gain and differential gain.

4. The PID parameter auto-tuning method according to claim 1, wherein in step S2), the round-trip step process means that the reference set point of the controlled system is changed in steps between X- Δ X and X + Δ X at step time intervals based on the original reference set point X and the reference set point step amplitude Δ X; wherein the step time interval is not less than the error integration time.

5. The PID parameter auto-tuning method according to claim 1, wherein in step S2), the error integral is any one of a square error integral, a time-by-square error integral, an absolute error integral criterion or a time-by-absolute error integral.

6. The PID parameter automatic tuning method according to claim 1, wherein in step S3), the calculation method of the average error integral includes:

enabling the controlled system to carry out N round-trip steps according to the step amplitude and the step time interval, and obtaining step data of the controlled system each time; wherein the round trip step data is configured as a function of time of the state of the controlled system from the start of the step to the error integration time;

dividing the N sets of round-trip step data into N ascending step response curves and N descending step response curves, wherein the reference set value of the ascending step response curve is X + DeltaX, and the reference set value of the descending step response curve is X-DeltaX;

respectively calculating the average response curve of the ascending step response curve and the average response curve of the descending step response curve;

and respectively calculating the error integral of the ascending step and the error integral of the descending step according to the ascending step average response curve and the descending step average response curve, and calculating the average value of the two to be used as the average error integral of the N round-trip steps.

7. The method for automatically tuning the PID parameters according to claim 1, wherein in step S3), the existing solution algorithm of the unconstrained optimization problem at least comprises: steepest descent method, gradient descent method, newton method, quasi-newton method and artificial intelligence method.

8. The method for automatically tuning the PID parameters according to claim 1, wherein in step S3), the updating the PID parameter combination according to the solving algorithm comprises:

acquiring the convergence condition of the unconstrained optimization problem;

calculating a correction value of the PID parameter combination according to the solving algorithm and the convergence condition;

and updating the PID parameter combination according to the correction value.

9. An automatic PID parameter tuning system for use in a controlled system having strong non-linearity, fast dynamic response, or sensitivity to noise, the system comprising:

the sensor unit is used for acquiring the real-time state of the controlled system;

the PID controller unit is used for setting a hyper-parameter value and a PID parameter combination initial value according to the controlled system characteristics and the control experience;

the PID parameter setting unit is used for enabling the controlled system to carry out a plurality of round-trip steps according to the combination of the hyper-parameter and the PID parameter, obtaining step data of each step and calculating average error integral; the PID parameter setting unit is also used for judging whether the PID parameter combination meets the optimized convergence condition and updating the PID parameter combination according to the solving algorithm;

and the execution unit is used for outputting the PID parameter combination meeting the optimized convergence condition.

10. A computer readable storage medium having stored thereon instructions which, when executed on a computer, cause the computer to perform the PID parameter auto-tuning method of any one of claims 1 to 8.

Technical Field

The invention relates to the field of automatic control, in particular to a PID parameter automatic setting method and a PID parameter automatic setting system.

Background

PID parameter tuning plays an important role in accurate control of a controlled system. Through relatively long technical development, the current mature methods for PID parameter tuning include a critical proportion method, a reaction curve method, an attenuation curve method, an empirical method and the like. Since the above conventional PID parameter tuning methods are derived from a summary of common experience, they are not necessarily fully applicable for some special controlled systems. For example, a controlled system with strong nonlinearity has a narrow critical ratio due to instability, and further, when a parameter is fine-tuned, the critical ratio method often cannot achieve an ideal tuning effect; the reaction curve method has strong applicability, but when PID parameter setting is carried out on a controlled system with strong nonlinearity, a reaction curve model is difficult to apply mechanically accurately, and the parameter setting effect is influenced; when a controlled system sensitive to noise is set by the attenuation curve method, due to frequent interference, irregular response curve or continuous small swing, accurate attenuation proportion and attenuation period cannot be obtained, so that the setting effect is not ideal; the empirical method is suitable for a controlled system with moderate dynamic response, and if the dynamic response of the controlled system is fast, an engineer cannot make timely and accurate parameter setting, so that the stability of the control system is easily lost.

Therefore, the above conventional PID parameter tuning method is not suitable for controlled systems with strong nonlinearity, fast dynamic response, or sensitivity to noise, such as magnetic levitation systems, unmanned aerial vehicle systems, and balance cars. In order to solve such a problem, it is necessary to create an automatic PID parameter tuning method suitable for a controlled system having strong nonlinearity, fast dynamic response, or sensitivity to noise.

Disclosure of Invention

An object of an embodiment of the present invention is to provide an automatic PID parameter tuning method, so as to at least solve the problem that the above existing PID parameter tuning method is not suitable for a controlled system with strong nonlinearity, fast dynamic response, or sensitivity to noise.

In order to achieve the above object, a first aspect of the present invention provides a PID parameter automatic tuning method applied to a controlled system with strong nonlinearity, fast dynamic response or sensitivity to noise, the method comprising: s1) setting a hyper-parameter value and a PID parameter combination initial value according to the controlled system characteristics and control experience; s2) the controlled system carries out N round-trip steps according to the step amplitude and the step time interval, so as to obtain the step data of the controlled system each time, and calculate the average error integral of the N round-trip steps; wherein N is a positive integer and N > 1; s3) taking the PID parameter combination as an optimization variable, taking the minimum value of the obtained average error integral as an optimization target, forming a non-constrained optimization problem, judging whether the PID parameter combination meets the optimization convergence condition according to the existing solving algorithm of the non-constrained optimization problem, if not, updating the PID parameter combination according to the solving algorithm, and repeating the step S2) until the PID parameter combination meets the optimization convergence condition of the solving algorithm; s4) outputting the PID parameter combination meeting the optimized convergence condition, and completing the PID parameter setting.

Optionally, in step S1), the hyper-parameter includes: sampling period, integral gain, reference set value X, reference set value step amplitude delta X, error integral time and step time interval of the PID controller; wherein the reference setting value of the controlled system is a reference state value set by a user.

Optionally, in step S1), the PID parameter combination includes: proportional gain and differential gain.

Optionally, in step S2), the round-trip step process means that the reference setting value of the controlled system is changed in steps between X- Δ X and X + Δ X at step time intervals on the basis of the original reference setting value X and the step amplitude Δ X of the reference setting value; wherein the step time interval is not less than the error integration time.

Optionally, in step S2), the error integration is any one of square error integration, time-multiplied square error integration, absolute error integration criterion, or time-multiplied absolute error integration.

Optionally, in step S3), the method for calculating the average error integral includes: enabling the controlled system to carry out N round-trip steps according to the step amplitude and the step time interval, and obtaining step data of the controlled system each time; wherein the round trip step data is configured as a function of time of the state of the controlled system from the start of the step to the error integration time; dividing the N sets of round-trip step data into N ascending step response curves and N descending step response curves, wherein the reference set value of the ascending step response curve is X + DeltaX, and the reference set value of the descending step response curve is X-DeltaX; respectively calculating the average response curve of the ascending step response curve and the average response curve of the descending step response curve; and respectively calculating the error integral of the ascending step and the error integral of the descending step according to the ascending step average response curve and the descending step average response curve, and calculating the average value of the two to be used as the average error integral of the N round-trip steps.

Optionally, in step S3), in step S3), the existing solution algorithm of the unconstrained optimization problem at least includes: steepest descent method, gradient descent method, newton method, quasi-newton method and artificial intelligence method.

Optionally, in step S3), the updating the PID parameter combination according to the solving algorithm includes: acquiring the convergence condition of the unconstrained optimization problem; calculating a correction value of the PID parameter combination according to the solving algorithm and the convergence condition; and updating the PID parameter combination according to the correction value.

The second aspect of the present invention provides a PID parameter automatic tuning system, applied to a controlled system with strong nonlinearity, fast dynamic response or sensitivity to noise, the system comprising: the sensor unit is used for acquiring the real-time state of the controlled system; the PID controller unit is used for setting a hyper-parameter value and a PID parameter combination initial value according to the controlled system characteristics and the control experience; the PID parameter setting unit is used for enabling the controlled system to carry out a plurality of round-trip steps according to the combination of the hyper-parameter and the PID parameter, obtaining step data of each step and calculating average error integral; the PID parameter setting unit is also used for judging whether the PID parameter combination meets the optimized convergence condition and updating the PID parameter combination according to the solving algorithm; and the execution unit is used for outputting the PID parameter combination meeting the optimized convergence condition.

In another aspect, the present invention provides a computer-readable storage medium having stored thereon instructions, which when executed on a computer, cause the computer to execute the PID parameter auto-tuning method according to any one of the above-mentioned items.

According to the technical scheme, a controlled mathematical model of the controlled system is summarized according to the actual operation effect of the controlled system, the combination of the over-parameters and the PID setting parameters of the controlled system is set according to the mathematical model, the setting control is repeatedly carried out on the part of the ideal reference set value by fluctuating up and down of the reference set value of the ideal controlled system, the error integral of each setting process is obtained, the average value of a plurality of groups of error integrals is used as the error integral of the PID setting parameter combination, the minimum value of the error integral is used as a global optimization problem, whether the optimal convergence condition is met or not is judged, and when the optimal convergence condition is met, the set PID setting parameter combination is judged to be the optimal parameter combination. The control timeliness and accuracy of a controlled system with strong nonlinearity, fast dynamic response or sensitivity to noise are ensured.

Additional features and advantages of embodiments of the invention will be set forth in the detailed description which follows.

Drawings

The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the embodiments of the invention without limiting the embodiments of the invention. In the drawings:

FIG. 1 is a flow chart of a method for automatically tuning PID parameters according to an embodiment of the invention;

FIG. 2 is a flowchart of a method for obtaining an average error integral according to an embodiment of the present invention;

FIG. 3 is a schematic diagram of a round-trip step provided by one embodiment of the present invention;

FIG. 4 is a schematic diagram of a method for solving an optimization problem by a gradient descent method according to an embodiment of the present invention;

FIG. 5 is a control flow chart of a PID parameter auto-tuning method according to an embodiment of the invention;

fig. 6 is a system configuration diagram of the PID parameter automatic tuning system according to an embodiment of the present invention.

Description of the reference numerals

10-a sensor unit; 20-PID control unit; 30-PID parameter setting unit; 40-execution unit.

Detailed Description

The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present invention, are given by way of illustration and explanation only, not limitation.

Fig. 6 is a PID parameter automatic tuning system according to an embodiment of the present invention. As shown in fig. 6, an embodiment of the present invention provides a PID parameter auto-tuning system, which is applied to a controlled system with strong nonlinearity, fast dynamic response, or sensitivity to noise, and the system includes: a sensor unit 10 for acquiring a real-time state of the controlled system; a PID controller unit 20 for setting a hyper-parameter value and a PID parameter combination initial value according to the controlled system characteristics and the control experience; the PID parameter setting unit 30 is used for enabling the controlled system to carry out a plurality of round-trip steps according to the combination of the hyper-parameter and the PID parameter, obtaining step data of each step and calculating average error integral; the PID parameter tuning unit is further configured to determine whether the PID parameter combination satisfies an optimized convergence condition and update the PID parameter combination according to the solving algorithm. And the execution unit 40 is used for outputting the PID parameter combination meeting the optimization convergence condition.

Fig. 1 is a flowchart of a method for automatically tuning PID parameters according to an embodiment of the present invention. As shown in fig. 1, an embodiment of the present invention provides a method for automatically tuning PID parameters, which is applied to a controlled system with strong nonlinearity, fast dynamic response, or sensitivity to noise, and the method includes:

step S10: and setting a hyper-parameter value and a PID parameter combination initial value according to the controlled system characteristics and the control experience.

Specifically, the hyper-parameters include: sampling period, integral gain, reference set value X, reference set value step amplitude delta X, error integral time and step time interval of the PID controller; the reference set value of the controlled system is a reference state value set by a user; the initial value of PID parameter combination includes proportional gain and differential gain. Three parameters (k) of proportional gain, integral gain and differential gainp,ki,kd) Serving an incremental digital PID controller, the mathematical expression model is:

Δuk=uk-uk-1=kp(ek-ek-1)+kiek+kd(ek-2ek-1+ek-2)

wherein e isk=xkX is the error value at the kth sampling instant of the controlled system, XkFor the state value of the k-th sampling instant of the controlled system, ukIs the output value at the kth sampling instant of the controller.

The core purpose of the method is to solve the optimal PID parameter combination (k)p,kd). At the time of PID parameter setting, the integral gain k is adjusted according to the control experienceiThe value of the integral gain is set to be constant and is directly related to the robustness after the optimization of the controller, namely kiThe larger the controller is, the better the robustness of the controller after optimization. The setting of the integral gain is therefore determined by the robustness requirements of the controlled system controller, for example, magnetic levitation systems and unmanned aerial vehicles have very different system characteristics: the control target of the magnetic suspension system is to maintain stable suspension, have anti-interference capability and need to ensure the robustness of the controller, so that a larger integral gain can be adopted in the PID parameter setting process; the stability requirement of the unmanned aerial vehicle is relatively low, and a small integral gain can be adopted in the PID parameter setting process.

In addition to the integral gain described above, the reference setpoint step amplitude Δ X is also directly related to the robustness of the optimized controller. The larger the step amplitude delta X of the reference set value is, the larger the disturbance amplitude is, and the better the robustness of the controller after optimization is; however, the step amplitude Δ X of the reference set value should not be too large, so that the superposition of too large disturbance amplitude and strong nonlinearity is avoided, and the situation that the deviation between the setting result and the actual reference set value X is too large. Considering the nonlinear characteristic of a controlled system applying the PID parameter automatic setting method provided by the invention, preferably, the step amplitude Delta X of the set value is set to be 1-10% of the maximum variation range of the reference set value.

Therefore, according to the robustness requirement of the controller after the controlled system is optimized, the influence factors of the integral gain and the reference set value step amplitude are synthesized to complete the integral gain kiAnd a reference deviceThe fixed step amplitude Δ X is set. Then, according to the set kiAnd Δ X, the error integration time is set, preferably Δ X/k, in order to ensure that the controlled system has enough adjustment time to reach the new stable equilibriumi1-10 times of the total amount of the active component.

In addition, the sampling period, the reference set value X and the step time interval of the PID controller are set according to the characteristics and the control experience of the controlled system, and the partial data is preferably input into the PID parameter automatic setting system through related personnel, so that the set parameters are reasonable.

After the super-parameter setting is finished, the mathematical expression of the incremental digital PID controller and the set integral gain k are usediAnd trying and setting a group of feasible PID parameter combinations as initial values of the PID parameter combinations.

In the embodiment of the invention, the combination of the hyper-parameters and the PID parameters of the controlled system is set according to the characteristics and the control experience of the controlled system, and the optimized control robustness is considered on the premise of ensuring the strong nonlinearity, the rapid dynamic response or the stable control of the controlled system sensitive to noise.

Step S20: enabling the controlled system to carry out N round-trip steps according to the step amplitude and the step time interval, obtaining step data of the controlled system each time, and calculating the average error integral of the N round-trip steps; wherein N is a positive integer and N >1, as shown in fig. 2, comprising the steps of:

step S201: and (3) enabling the controlled system to carry out N round-trip steps at step amplitude and step time intervals to obtain step data of the controlled system each time.

Specifically, as shown in fig. 3, according to the preset combination of the hyper-parameter and the PID parameter, the controlled system is made to perform N round-trip steps with a step amplitude and a step time interval, in the process of multiple round-trip steps, the reference set value X is updated alternately according to the reference set value step amplitude Δ X, the interval between two adjacent update time points is equal to the step time interval, wherein the reference set value X isSPThe update rule satisfies the following relationship:

wherein, XSP, risingA reference set value for a rising step; xSP, decreaseIs a reference set point for the falling step. The one-time round-trip step process includes a rising step and a falling step, that is, in the one-time round-trip step process, the reference setting value needs to be updated twice according to the above relationship. Setting the reference setting value at X according to the step time intervalSP, risingAnd XSP, decreaseThe controlled system is repeatedly stepped, so that the controlled system performs multiple round-trip steps, preferably, the number N of the round-trip steps is set by a controller according to experience, and the number is adaptively increased or decreased according to the sensitivity degree of the controlled system to noise. For example, if the number of predetermined round-trip steps is N, N rising steps and N falling steps are performed in total during the whole round-trip step. And acquiring a group of step data every time a rising step or a falling step is completed, wherein the step data is the corresponding relation between the state of the controlled system and the time from the beginning of the step to the error integration time of the controlled system, and the step data is formed into the function relation between the state of the controlled system and the time from the beginning of the step to the error integration time. So that N sets of rising step data and N sets of falling step data are finally obtained in total.

In the embodiment of the invention, the interference of strong nonlinearity on the operation of the controlled system can be effectively avoided by carrying out small round-trip step near the initial value of the reference set value, the error integral can adapt to the quick dynamic response of the controlled system, and the precision and the efficiency of PID parameter setting under the noise sensitive condition are improved by carrying out round-trip for many times.

Step S202: calculating the average error integral of N round-trip steps; wherein N is a positive integer and N > 1.

Specifically, as described in step S201, after N round-trip steps, N sets of rising step data and N sets of falling step data are obtained, that is, a functional relationship between a state of the controlled system from a step start to an error integration time in N rising step processes and a functional relationship between a state of the controlled system from a step start to an error integration time in N falling step processes are obtained, and each functional relationship is converted into a corresponding two-dimensional coordinate curve, so that N rising step response curves and N falling step response curves are obtained. Respectively calculating the average response curve of the N ascending step response curves and the average response curve of the N descending step response curves, wherein the calculation rule is as follows:

is the state value of the controlled system at the kth sampling moment of the ith ascending (or descending) step response curve.

After the ascending step average response curve and the descending step average response curve are obtained through calculation, the error integral of the ascending step and the error integral of the descending step are respectively calculated through the ascending step average response curve and the descending step average response curve. The calculation rule is as follows:

wherein the content of the first and second substances,in order to integrate the time-by-square error,Δ t is the sampling time interval for the total number of data per step response curve. Obtaining the error integral of the corresponding ascending step and the error integral of the descending step, and finally obtaining the average error integral of the ascending step and the descending stepThe calculation formula is as follows:

the obtained error integral average valueAs the proportional gain k set this timepAnd a differential gain kdPID parameter combination (k) ofp,kd) Is the average error integral of

In another possible embodiment, regarding the determination of the N value, preferably, each time a round-trip step is completed, the average error integral is updated according to the above-mentioned relational expression, the obtained new average error integral is compared with the previous average error integral, the difference between the two is calculated, when the difference is smaller than a preset value, the relationship is recorded as a one-time trend stable relationship, if several consecutive new average error integrals satisfy the trend stable relationship and the number of times reaches the preset value, the setting is determined to be trend stable, the round-trip step is automatically stopped, and the final average error integral is output. For example, after 5 rounds of tuning are completed, the error integral average value is updated to the error integral average value of the first 5 roundsAfter 6 th round of setting, obtaining new average error integral of the first six roundsJudgment ofAndthe difference between the two is not more than the preset value and is recorded as a one-time stable relation, i.e. the difference is not more than the preset valueContinuously performing setting to obtainAnd the combination of (a) and (b),and judging that the 7 th and 8 th continuous rounds are both in a trend stable relationship, and when the continuous times reach a preset value, for example, when the trend stable relationship is preset for 3 continuous times, the system automatically finishes the new round of setting after the preset number of rounds to obtain an error integral average value. The system automatically sets the number of the setting wheels in an adaptive manner, and the intelligence of the system is improved.

Step S30: and taking the PID parameter combination as an optimization variable, taking the obtained minimum value of the average error integral as an optimization target to form a non-constrained optimization problem, judging whether the PID parameter combination meets the optimization convergence condition according to the existing solving algorithm of the non-constrained optimization problem, if not, updating the PID parameter combination according to the solving algorithm, and repeating the step S20 until the PID parameter combination meets the optimization convergence condition of the solving algorithm.

The commonly used solving algorithms are many, such as steepest descent method, gradient descent method, newton method, quasi-newton method and artificial intelligence method. In one possible implementation, this example illustrates a gradient descent method.

Specifically, in order to effectively evaluate the robustness of the control system, preferably, as shown in fig. 4, the minimum value of the average error integral is used as a non-constrained optimization problem, and whether the PID parameter combination satisfies the optimization convergence condition is determined according to the existing solution algorithm of the non-constrained optimization problem.

In one possible implementation, the unconstrained optimization problem is solved by using a gradient descent method, and the minimized average error integral and the optimal PID parameter combination are obtained by iteratively solving step by step through the gradient descent method. The iterative formula of the gradient descent method is that,

wherein, Kj=(kp,j,kd,j) Is the PID parameter combination adopted in the jth iteration, alphajIs the step size of the iteration and,is the integral of the mean error at KjThe gradient of (a). Wherein the content of the first and second substances,the expression of (a) is as follows,

in other words, to ask forWe also need to do experiments to find the average error integral under another four adjacent PID parameter combinations. And Δ kpAnd Δ kdDepending on the convergence condition. For example, if | kp,j+1-kp,j|<Δkp, convergenceAnd | kd,j+1-kd,j|<Δkd, convergenceIs a convergence condition, then Δ kp≈Δkp, convergenceAnd Δ kd≈Δkd, convergence

In a possible implementation manner, as shown in fig. 5, the PID parameter tuning system is applied to a magnetic levitation system, first, the sensor unit 10 obtains the control characteristics of the controlled system, sets the value of the hyper-parameter and the initial value of the PID parameter combination according to the characteristics and the control experience of the controlled system, and then, the controlled system is made to perform N round-trip steps according to the step amplitude and the step time interval to obtain step data of the controlled system each time; number of round trip stepsThe controlled system is formed according to the function relation between the state and the time from the step beginning to the error integration time; dividing N groups of round-trip step data into N ascending step response curves and N descending step response curves, wherein the reference set value of the ascending step response curve is X + delta X, and the reference set value of the descending step response curve is X-delta X; respectively calculating the average response curve of the ascending step response curve and the average response curve of the descending step response curve; and respectively calculating the error integral of the ascending step and the error integral of the descending step according to the ascending step average response curve and the descending step average response curve, and calculating the average value of the two as the average error integral of the N round-trip steps. Acquiring the convergence condition of the unconstrained optimization problem by a gradient descent method; calculating a correction value of the PID parameter combination according to a gradient descent method algorithm and a convergence condition; and updating the PID parameter combination according to the correction value. Repeating the above steps until the unconstrained optimization problem meets the convergence condition, and outputting the current time (k)p,kd) As the optimal parameter combination.

The embodiment of the present invention further provides a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to execute the PID parameter automatic tuning method described in any one of the above paragraphs.

Those skilled in the art will appreciate that all or part of the steps in the method for implementing the above embodiments may be implemented by a program, which is stored in a storage medium and includes several instructions to enable a single chip, a chip, or a processor (processor) to execute all or part of the steps in the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

While the embodiments of the present invention have been described in detail with reference to the accompanying drawings, the embodiments of the present invention are not limited to the details of the above embodiments, and various simple modifications can be made to the technical solution of the embodiments of the present invention within the technical idea of the embodiments of the present invention, and the simple modifications are within the scope of the embodiments of the present invention. It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, the embodiments of the present invention will not be described separately for the various possible combinations.

In addition, any combination of the various embodiments of the present invention is also possible, and the same should be considered as disclosed in the embodiments of the present invention as long as it does not depart from the spirit of the embodiments of the present invention.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种交叉耦合龙门控制系统及控制方法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!