PID (Proportion Integration Differentiation) parameter adaptive algorithm, system and program based on multi-dimensional fuzzy rule

Through the PID parameter adaptive algorithm of multi-dimensional fuzzy rules, the PID parameters are dynamically adjusted, which solves the problem of traditional PID control's adaptability and parameter coupling conflict in dynamic process characteristics, and achieves more efficient PID control performance.

CN120406103AActive Publication Date: 2025-08-01SHENZHEN HUICHEN AUTOMATION TECH CO LTD

Patent Information

Application Number
CN202510912929.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-08-01
Estimated Expiration
2045-07-03

AI Technical Summary

Technical Problem

Traditional PID control has parameters fixed and difficult to adapt to dynamic process characteristics. The simple design of the fuzzy PID control rule base leads to parameter adjustment coupling conflicts, making it difficult to balance fast response and steady-state accuracy.

Method used

The PID parameter adaptive algorithm based on multi-dimensional fuzzy rules is adopted, and the error change rate is calculated through the dynamic sliding window, normalization and fuzzification process is performed, and the fuzzy rule library of dynamic coupling mechanism is constructed, and the PID parameters are optimized in combination with the limiting mechanism.

Benefits of technology

Improves the dynamic response performance of PID control, reduces overshoot, reduces adjustment time, improves anti-interference recovery ability, and enhances steady-state accuracy and anti-noise performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120406103A_ABST
    Figure CN120406103A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of PID control, and particularly relates to a PID parameter adaptive algorithm, system and program based on a multi-dimensional fuzzy rule. A PID parameter adaptive algorithm based on a multi-dimensional fuzzy rule comprises the following steps: normalizing system error data and an error change rate by taking a maximum change value as a normalization factor; performing fuzzification processing on the normalized error data and the normalized error change rate by adopting a triangular membership function of a plurality of linguistic variables to obtain fuzzy error data and a membership distribution matrix of the fuzzy error change rate; orthogonal design is carried out on the multiple linguistic variables, and a fuzzy rule base is constructed; and according to fuzzy error data in the membership degree distribution matrix and the distribution of the fuzzy error change rate, traversing the fuzzy rule base, forming a plurality of matched mapping results, performing weighted average calculation, and performing fixed amplitude limiting and dynamic amplitude limiting to obtain a final proportional gain # imgabs0 #, a final integral gain # imgabs1 # and a final differential gain # imgabs2 #.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of PID control, and particularly relates to a PID parameter adaptive algorithm, system, and program based on multi-dimensional fuzzy rules. Background Art

[0002] Traditional PID control realizes control through the linear combination of three links: proportional (P), integral (I), and derivative (D), but there are problems such as fixed parameters and difficulty in adapting to the characteristics of dynamic processes. Although fuzzy PID control improves some performance by introducing fuzzy logic, there are still the following deficiencies: static or semi-static adjustment strategies, which cannot perform adaptive optimization according to the real-time dynamic characteristics of the system.

[0003] Existing fuzzy PID control methods usually adopt single-input single-output (SISO) or double-input three-output (DITO) structures, but the rule base design is simple, and there are coupling conflicts in parameter adjustment, affecting the control accuracy. In addition, traditional methods do not combine dynamic amplitude limiting strategies, resulting in difficulty in balancing the system between fast response and steady-state accuracy.

[0004] Therefore, there is an urgent need for a PID parameter adaptive algorithm, system, and program based on multi-dimensional fuzzy rules. Summary of the Invention

[0005] Based on this, in order to solve the above technical problems, it is necessary to provide a PID parameter adaptive algorithm, system, and program based on multi-dimensional fuzzy rules.

[0006] In the first aspect, this application provides a PID parameter adaptive algorithm based on multi-dimensional fuzzy rules. The algorithm includes: Obtain system error data, and calculate the error change according to the average algorithm of the dynamic sliding window to obtain the error change rate; Use the maximum change value as the normalization factor to normalize the system error data and the error change rate to obtain the normalized error data and the normalized error change rate; Adopt the triangular membership function of multiple linguistic variables to perform fuzzy processing on the normalized error data and the normalized error change rate to obtain the fuzzy error data and the membership degree distribution matrix of the fuzzy error change rate; Perform orthogonal design on multiple linguistic variables to construct a fuzzy rule base; According to the distribution of the fuzzy error data and the fuzzy error change rate in the membership degree distribution matrix, traverse the fuzzy rule base to form multiple matching mapping results, and then perform weighted average calculation on multiple mapping results through the centroid method to obtain the proportional gain preset by the rule base , integral gain and derivative gain Adjustment amount; According to the clipping mechanism, for the proportional gain and the integral gain the adjustment amount is fixed-clipped, and for the adjustment amount of the derivative gain dynamic clipping is performed to obtain the final proportional gain , the final integral gain and the final derivative gain .

[0007] In some implementable ways, the steps of obtaining the system error data and calculating the error change based on the average algorithm of the dynamic sliding window to obtain the error change rate include: The calculation formula of the average algorithm of the dynamic sliding window is: ; where, represents the error change rate, represents the current time index, represents the sliding window size, represents the time index within the window, represents the moment weight, represents the moment system error, represents the system error data.

[0008] In some implementable ways, the steps of normalizing the system error data and the error change rate with the maximum change value as the normalization factor to obtain the normalized error data and the normalized error change rate include: Normalize the system error data according to the maximum steady-state error allowed by the system to obtain the normalized error data; Normalize the error change rate according to the maximum allowable change rate of the system to obtain the normalized error change rate.

[0009] In some implementable ways, the steps of performing fuzzy processing on the normalized error data and the normalized error change rate using the triangular membership function of multiple linguistic variables to obtain the membership degree distribution matrix of the fuzzy error data and the fuzzy error change rate include: Use the triangular membership function of 7 linguistic variables {NB, NM, NS, ZO, PS, PM, PB} to perform fuzzy processing on the normalized error data and the normalized error change rate to obtain the membership degrees of the error data and the error change rate belonging to the fuzzy set, where the calculation formula of the triangular membership function is: ; Among them, represents the input belonging to the fuzzy set membership degree, represents the normalized error data or the normalized error change rate of the input, represents the center point of the triangular membership function, represents half of the width of the base of the triangle; According to the membership degrees of the error data and the error change rate belonging to the fuzzy set, construct the fuzzy error data and the membership degree distribution matrix of the fuzzy error change rate.

[0010] In some implementable ways, the step of performing orthogonal design on the multiple language variables and constructing the fuzzy rule base includes: Taking the error state and the error change rate state as two factors, perform orthogonal experimental design to obtain the initial fuzzy rule base; Load the dynamic coupling rules into the initial fuzzy rule base to obtain the initial fuzzy rule base with a dynamic coupling mechanism; Construct a loss function, and according to the loss function, perform iterative optimization of the weight coefficients on the initial fuzzy rule base with the dynamic coupling mechanism to obtain the fuzzy rule base.

[0011] In some implementable ways, the step of constructing a loss function and, according to the loss function, performing iterative optimization of the weight coefficients on the initial fuzzy rule base with the dynamic coupling mechanism to obtain the fuzzy rule base includes: When the error data domain and the error change rate in the fuzzy rule base both belong to the positive domain or both belong to the negative domain, the corresponding rule output weight is the largest.

[0012] In some implementable ways, according to the fuzzy error data and the distribution of the fuzzy error change rate in the membership degree distribution matrix, traverse the fuzzy rule base to form multiple matching mapping results, and then perform weighted average calculation on the multiple mapping results by the centroid method to obtain the adjustment amounts of the proportional gain , integral gain and derivative gain preset in the rule base, the steps include: Traverse each rule in the fuzzy rule base, match the fuzzy error data and the data of the fuzzy error change rate in the current membership degree distribution matrix with the rule conditions to obtain multiple matching mapping results; Perform weighted average calculation on the multiple matching mapping results by the centroid method to obtain the proportional gain , integral gain And the adjustment amount of differential gain, where the formula for weighted average calculation by the centroid method is: ; Wherein, represents the membership degree of the th rule, represents the total number of activated fuzzy rules, represents the th rule's conclusion value.

[0013] In some implementable ways, according to the clipping mechanism, the adjustment amount of the proportional gain and the integral gain is fixed-clipped, and the adjustment amount of the differential gain is dynamically clipped to obtain the final proportional gain , the final integral gain and the final differential gain . The steps include: Through preset fixed clipping, the adjustment amounts of the proportional gain and the integral gain are limited to obtain the final proportional gain within the fixed clipping, the final integral gain ; Through dynamic clipping, the adjustment amount of the differential gain is adjusted to obtain the final differential gain within the dynamic clipping, where the formula for the dynamic clipping is: ; Wherein, represents the dynamically calculated clipping boundary value, represents the adjustment amount output by the centroid method, represents the current system error, represents the maximum allowable steady-state error of the system, represents the basic clipping coefficient, represents the dynamic expansion coefficient.

[0014] In a second aspect, the present application provides a PID parameter adaptive system based on multi-dimensional fuzzy rules, which is applied to the steps of the foregoing PID parameter adaptive algorithm based on multi-dimensional fuzzy rules. The system includes: An acquisition unit for acquiring system error data and calculating the error change rate according to the average algorithm of the dynamic sliding window; A normalization unit, configured to use the maximum change value as a normalization factor to normalize the system error data and the error change rate, so as to obtain normalized error data and a normalized error change rate; A processing unit, configured to perform a fuzzification process on the normalized error data and the normalized error change rate by using triangular membership functions of multiple linguistic variables, so as to obtain fuzzy error data and a membership degree distribution matrix of the fuzzy error change rate; A rule unit, configured to perform an orthogonal design on multiple said linguistic variables to construct a fuzzy rule base; An adjustment amount unit, configured to traverse the fuzzy rule base according to the distribution of the fuzzy error data and the fuzzy error change rate in the membership degree distribution matrix to form multiple matching mapping results, and then perform a weighted average calculation of the multiple mapping results by using the centroid method to obtain the proportional gain , integral gain and derivative gain adjustment amounts; A result unit, configured to perform fixed amplitude limiting on the adjustment amounts of the proportional gain and the integral gain according to a clipping mechanism, and perform dynamic amplitude limiting on the adjustment amount of the derivative gain to obtain a final proportional gain , a final integral gain and a final derivative gain .

[0015] In a third aspect, the present application provides a computer program, and the computer program is executed by a processor to perform the steps of the foregoing PID parameter adaptive algorithm based on multi-dimensional fuzzy rules.

[0016] Beneficial effects: A PID parameter adaptive algorithm based on multi-dimensional fuzzy rules, which acquires system error data, and performs error change calculation according to an average algorithm of a dynamic sliding window to obtain an error change rate; uses the maximum change value as a normalization factor to normalize the system error data and the error change rate to obtain normalized error data and a normalized error change rate; performs a fuzzification process on the normalized error data and the normalized error change rate by using triangular membership functions of multiple linguistic variables to obtain fuzzy error data and a membership degree distribution matrix of the fuzzy error change rate; performs an orthogonal design on multiple linguistic variables to construct a fuzzy rule base; traverses the fuzzy rule base according to the distribution of the fuzzy error data and the fuzzy error change rate in the membership degree distribution matrix to form multiple matching mapping results, and then performs a weighted average calculation of the multiple mapping results by using the centroid method to obtain the proportional gain , integral gain and differential gain Adjustment amount; according to the clipping mechanism, for the proportional gain and integral gain The adjustment amount is fixed-clipped, and for the differential gain The adjustment amount is dynamically clipped to obtain the final proportional gain Final integral gain and final differential gain . Through the above algorithm, the overall control performance is quantitatively improved. Compared with the traditional PID, the overshoot is reduced, the adjustment time is decreased, and the anti-interference recovery time is increased. The dynamic response, steady-state accuracy, and anti-noise of the PID control algorithm are all significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or in the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0018] Figure 1 It is a flowchart of a PID parameter adaptive algorithm based on multi-dimensional fuzzy rules in an embodiment.

[0019] Figure 2 It is a schematic diagram of a PID parameter adaptive algorithm based on multi-dimensional fuzzy rules in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0020] To facilitate the understanding of the present application, the following will describe the present application more comprehensively with reference to the relevant drawings. Embodiments of the present application are shown in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided to make the disclosure of the present application more thorough and comprehensive.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used in the description of the present application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0022] It can be understood that the terms "first", "second", etc. used in the present application can be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.

[0023] Glossary Lyapunov's stability theory determines whether a system can automatically return to the equilibrium state after being perturbed by constructing an "energy function" (Lyapunov function).

[0024] The dynamic sliding window average algorithm is a statistical calculation method for real-time data stream processing. It calculates the moving average of data by dynamically adjusting the window size (time or data volume), and is applicable to smoothing filtering in non-stationary signals, time-varying systems, or noisy environments. Its core feature is that the window size can adaptively change to balance the response speed and smoothing effect.

[0025] Such as Figure 1 And Figure 2 As shown, in the first aspect, the present application provides a PID parameter adaptive algorithm based on multi-dimensional fuzzy rules. S100, Obtain the system error data, and calculate the error change according to the average algorithm of the dynamic sliding window to obtain the error change rate.

[0026] Specifically, the system error data e(t) = set value - measured value, which represents the real-time acquisition of the output of the controlled object (such as temperature, rotation speed, etc.) and subtracts it from the target value.

[0027] The calculation formula of the average algorithm of the dynamic sliding window is:[[]] ; Wherein, represents the error change rate, represents the current time index, represents the sliding window size, represents the time index within the window, represents the moment weight, represents the moment system error, represents the system error data.

[0028] Specifically, is the ratio of the integral time constant to the sampling period ( = integral time constant / sampling period). This design can effectively smooth the measurement noise and adapt to controlled objects with different dynamic characteristics. is an optional exponentially decaying weight, , enhancing the contribution of recent data.

[0029] The algorithm solves the contradiction between noise suppression and dynamic response in the traditional difference method through the dynamic window length and exponentially decaying weight.

[0030] S200, using the maximum change value as the normalization factor, normalize the system error data and the error change rate to obtain the normalized error data and the normalized error change rate.

[0031] Specifically, obtaining the normalized error data and the normalized error change rate may include the following steps: S201, according to the maximum steady-state error allowed by the system, normalize the system error data to obtain the normalized error data.

[0032] Specifically, since the triangular membership function is needed in the subsequent steps, when normalizing, it is necessary to multiply by the constant 3.

[0033] Divide the system error data by the maximum steady-state error allowed by the system, and then multiply by the constant 3 to obtain the normalized error data.

[0034] S202, according to the maximum allowable change rate of the system, normalize the error change rate to obtain the normalized error change rate.

[0035] Similarly, divide the error change rate by the maximum allowable change rate of the system, and then multiply by the constant 3 to obtain the normalized error change rate.

[0036] In this way, the values of the normalized error data and the normalized error change rate are constrained within the standard interval of [-3, 3]. Through the dynamic range adaptive mechanism, it is ensured that the control system can maintain consistent adjustment sensitivity under different working conditions.

[0037] Exemplarily, if the system working condition changes (such as the device switches from high speed to precision mode), the maximum steady-state error allowed by the system and the maximum allowable change rate of the system can be adjusted in real time to make the control more sensitive and / or the anti-disturbance smoother.

[0038] S300, using the triangular membership functions of multiple linguistic variables, perform fuzzy processing on the normalized error data and the normalized error change rate to obtain the fuzzy error data and the membership degree distribution matrix of the fuzzy error change rate.

[0039] Specifically, obtaining the fuzzy error data and the membership degree distribution matrix of the fuzzy error change rate may include the following steps: S301, using the triangular membership functions of 7 linguistic variables {NB, NM, NS, ZO, PS, PM, PB}, perform fuzzy processing on the normalized error data and the normalized error change rate to obtain the membership degrees of the error data and the error change rate belonging to the fuzzy sets, where the fuzzy set A refers to the set of linguistic variables of the error or the error change rate.

[0040] Among them, the calculation formula of the triangular membership function is as follows: ; Among them, represents the membership degree that the input belongs to the fuzzy set , represents the normalized error data or the normalized error change rate of the input, represents the center point of the triangular membership function, represents half of the width of the base of the triangle.

[0041] The center point is the most typical value of each linguistic variable, uniformly distributed on [-3, 3]; the width controls the coverage range of the triangle. The closer the input value is to the center point, the higher the membership degree. When the distance exceeds the width, the membership degree becomes zero.

[0042] Specifically, in the triangular membership functions of the 7 linguistic variables {NB, NM, NS, ZO, PS, PM, PB}, NB, NM, NS, ZO, PS, PM, PB represent negative large, negative medium, negative small, zero, positive small, positive medium, and positive large in sequence.

[0043] Exemplarily, the center point of NB is -3 and the support set width is 1.5. The mathematical form is: .

[0044] S302. Construct a fuzzy error data and a membership degree distribution matrix of the fuzzy error change rate according to the membership degrees that the error data and the error change rate belong to the fuzzy sets.

[0045] Package the output of S301 into a machine - decidable state description to provide a standardized input for the rule base.

[0046] Specifically, in subsequent rule - base matching, the system does not directly match the linguistic variables of the error vector with those of the change - rate vector. Instead, according to the conditions of each rule, it extracts the membership degrees from the error vector and the change - rate vector respectively, and then calculates the minimum value of the two as the rule activation strength.

[0047] S400. Conduct an orthogonal design for multiple said linguistic variables to construct a fuzzy rule base.

[0048] Specifically, constructing a fuzzy rule base may include the following steps: S401. Use the error state and the error change - rate state as two factors to conduct an orthogonal experimental design to obtain an initial fuzzy rule base.

[0049] Specifically, in the process of constructing the fuzzy rule base, it is first necessary to establish an initial rule base through orthogonal experimental design. The design principle of orthogonal experiments is to take the error state and the error change rate state as two key factors, and by arranging experimental combinations, ensure that all possible state combinations are covered with the least number of experiments.

[0050] Specifically, for the 7 linguistic variables of error data and the 7 linguistic variables of error change rate, a standard orthogonal table can be used to design the experimental scheme. In this way, the huge workload of full-combination experiments can be avoided, and at the same time, the comprehensiveness of the fuzzy rule base can be ensured.

[0051] Through experimental testing of the control effects under different combinations of errors and error change rates, record the optimal PID parameter adjustment amounts to form an initial fuzzy rule base. [[ID=८]]

[0052] ; Among them, represents the th fuzzy rule, represents the system error data, represents the error change rate, represents the error belonging to the membership degree of the fuzzy set , represents the error change rate , belonging to the membership degree of the fuzzy set , represents that the output is the adjustment amount of the three PID parameters, represents the PID parameter increment vector of the rule conclusion.

[0053] In one embodiment, the fuzzy rule base introduces a second-order difference term.

[0054] Based on the fuzzy rule base, for the differential gain the rule base adds a second-order difference term as an input variable.

[0055] The calculation formula for the second-order difference term is: ; Among them, is the sampling period, is the error change rate at the current moment (calculated by the dynamic sliding window average algorithm), and the second-order difference term is normalized to the interval [-3, 3] and used as the third input dimension of the rule base.

[0056] Update The rule form of the rule base is: ; Among them, The linguistic variables for the second-order difference terms (also using 7 linguistic variables {NB, NM, NS, ZO, PS, PM, PB}).

[0057] S402: Load the dynamic coupling rules into the initial fuzzy rule base to obtain the initial fuzzy rule base with a dynamic coupling mechanism.

[0058] Specifically, the dynamic coupling rules can be preset rules. The purpose of dynamic coupling is to enable the rule base to dynamically adjust the weight control strategy according to the real-time relationship between the error and the error change rate. For example, when the error and the error change rate have the same sign (the error is increasing), the control strength needs to be enhanced; when approaching the steady state, the control strength needs to be reduced to avoid oscillation. These dynamic strategies are encoded into specific rules and embedded in the initial rule base to make the rule base have the ability of dynamic response.

[0059] Exemplarily, the dynamic coupling rules include an overshoot suppression mechanism, a steady-state oscillation suppression mechanism, and an integral acceleration mechanism.

[0060] Among them, for the overshoot suppression mechanism, when the system error and the error change rate change in the same direction (that is, the error increases and the change rate is positive, or the error decreases and the change rate is negative), the adjustment amplitude of the differential action is automatically enhanced. This mechanism is triggered by monitoring the sign of the product of the error and the error change rate, and the enhancement degree of the differential gain is dynamically adjusted according to the amplitude of the error change rate.

[0061] For the steady-state oscillation suppression mechanism, when the system approaches the steady state (that is, the absolute value of the error change rate is lower than the preset threshold), the adjustment amplitude of the proportional action is automatically reduced. This mechanism is triggered by real-time monitoring of the magnitude of the error change rate, and effectively suppresses the small-amplitude oscillation of the system near the steady state by means of proportional attenuation.

[0062] For the integral acceleration mechanism, when the system is in a small deviation state and the change rate is in a medium range, the adjustment amplitude of the integral action is automatically enhanced. This mechanism is triggered by jointly judging the intervals where the error and the error change rate are located, and accelerates the process of eliminating the steady-state error in the case of small deviations.

[0063] The strength coefficients and trigger thresholds of each mechanism can be adjusted according to needs to ensure the optimization of control performance. Without changing the structure of the basic fuzzy rule base, this coupling mechanism realizes the intelligent coordinated adjustment among PID parameters through real-time state analysis.

[0064] S403: Construct a loss function, and based on this loss function, perform iterative optimization of the weight coefficients of the initial fuzzy rule base with the dynamic coupling mechanism to obtain a fuzzy rule base.

[0065] Specifically, a loss function reflecting the control performance is constructed. The loss function can comprehensively consider indicators such as overshoot, settling time, and steady-state error. By using the iterative optimization method, the weight coefficients of each rule in the rule base are continuously adjusted to make the overall control performance reach the optimal. Among them, the loss function can be set as needed, and the specific content of the loss function in this application is not limited. The best parameter combination is found through repeated trial and error. The optimized fuzzy rule base not only retains the comprehensiveness of the orthogonal experiment but also has the flexibility of dynamic coupling, and at the same time achieves the best control effect through optimization. The entire construction process ensures the excellent performance of the fuzzy rule base in terms of control accuracy, response speed, and stability.

[0066] It should be noted that when the error data domain and the error change rate in the fuzzy rule base belong to the positive domain or the negative domain at the same time, the corresponding rule output weight is the largest.

[0067] Specifically, the rule table in the finally obtained fuzzy rule base shows an obvious diagonal dominance characteristic, which meets the requirements of the Lyapunov stability principle and shows good robustness and dynamic adjustment performance in practical applications. The key implementation of engineering the Lyapunov stability principle is that when the system detects that the error and its change trend are in the same direction (for example, the error is positive and still increasing continuously, or the error is negative and continuously decreasing), it means that the system is accelerating away from the target state, and at this time, a strong correction action must be applied to avoid losing control. This design is achieved through the structured construction of the fuzzy rule base. That is to say, in the orthogonal experiment stage, the output weight of the diagonal rules (that is, the rule combination where the error and the error change rate have the same sign) is strengthened, that is, the weight is increased. In the dynamic coupling mechanism stage, this characteristic is further amplified. For example, when the product of the error and the change rate is greater than zero, the preset differential gain weight is increased, such as 20%.

[0068] S500, according to the fuzzy error data in the membership degree distribution matrix and the distribution of the fuzzy error change rate, traverse the fuzzy rule base to form multiple matching mapping results, and then perform weighted average calculation of the multiple mapping results by the centroid method to obtain the adjustment amounts of the proportional gain , integral gain and differential gain preset in the rule base.

[0069] Specifically, the obtained adjustment amounts may include the following steps: S501, traverse each rule in the fuzzy rule base, match the fuzzy error data and the fuzzy error change rate data in the current membership degree distribution matrix with the rule conditions to obtain multiple matching mapping results.

[0070] Specifically, after obtaining the fuzzy error data and the membership degree distribution matrix of the fuzzy error change rate in the foregoing step S302, for the rules in the fuzzy rule base, the membership degrees of the linguistic variables are extracted from the fuzzy error vector , and the linguistic variables are extracted from the error change rate vector, and the matching degree is calculated: take the minimum value of the matching degrees of the error state and the change trend.

[0071] It should be noted that each rule in the fuzzy rule base is respectively matched with the fuzzy error data and the data of the fuzzy error change rate in the current membership degree distribution matrix and the rule conditions, and among the obtained multiple matching mapping results, the results include the matching degree and the weight, so as to generate a parameter adjustment amount through weighted average in the subsequent centroid method calculation, where the weight is the preset weight of the fuzzy rule base.

[0072] S502, perform weighted average calculation on the multiple matching mapping results through the centroid method to obtain the proportional gain , integral gain and derivative gain adjustment amounts.

[0073] Among them, the formula for weighted average calculation by the centroid method is: ; Among them, represents the membership degree of the th rule, represents the total number of activated fuzzy rules, represents the rule preset weight value of the th rule.

[0074] In the formula of , represents the adjustment direction and strength of the proportional action recommended by this rule, when it is greater than 0, it is recommended to enhance the proportional action, otherwise the proportional action is weakened. and are the same and will not be elaborated.

[0075] Specifically, by synthesizing the suggestions of multiple rules, a final parameter adjustment plan is generated. That is to say, calculate the sum of the matching degrees of all rules, and then weight the preset weights for each rule according to the matching degree, that is, weight according to the matching degree, and use the weighted value as the adjustment amount, then the proportional gain , integral gain and derivative gain adjustment amounts can be obtained.

[0076] S600, according to the clipping mechanism, for the proportional gain and the integral gain The adjustment amount is fixed-limited, and the differential gain The adjustment amount is dynamically limited to obtain the final proportional gain , the final integral gain and the final differential gain .

[0077] Specifically, obtaining the final proportional gain , the final integral gain and the final differential gain may include the following steps: S601, through a preset fixed limit, limit the adjustment amounts of the proportional gain and the integral gain to obtain the final proportional gain within the fixed limit, the final integral gain .

[0078] Specifically, the proportional gain adjustment amount output by the fuzzy rule and the integral gain adjustment amount are constrained within a preset safe range to prevent system oscillation or out-of-control caused by parameter overshoot.

[0079] Set fixed boundaries, the proportional gain limit range and the integral gain limit range. If exceeds the proportional gain limit range, truncate it to the nearest boundary value; if exceeds the integral gain limit range, truncate it to the nearest boundary value; otherwise, retain the original value and output the final proportional gain and the final integral gain .

[0080] S602, through dynamic limiting, adjust the adjustment amount of the differential gain to obtain the final differential gain within the dynamic limit.

[0081] Among them, taking output by the centroid method as a reference, combined with the absolute value of the error , calculate the boundary value pair value in real time. The calculation formula for the dynamic limit is: ; Among them, represents the nominal differential gain, represents the adjustment amount of output by the centroid method, represents the current system error, represents the maximum allowable steady-state error of the system, represents the basic limit coefficient, Represents the dynamic expansion coefficient.

[0082] Specifically, is the base clipping coefficient (such as 0.5) to ensure it is not too small at steady state; is the dynamic expansion coefficient (such as 2.5), which controls the slope of the clipping as the error grows.

[0083] When is large (far from the target): The clipping value increases, allowing stronger differential action to quickly suppress overshoot. It improves the dynamic response speed of the system and reduces the adjustment time.

[0084] When is small (close to steady state): The clipping value shrinks to , weakens the differential gain to avoid amplifying high-frequency noise. Constrains within the range of . If exceeds the boundary, it is truncated to the boundary value; otherwise, the original value is retained. The final differential gain is output .

[0085] Enhances system stability and prevents steady-state jitter.

[0086] Dynamically adjusts the allowable range of the differential gain according to the current system error: relaxes the clipping when the error is large to accelerate the response, and shrinks the clipping when the error is small to suppress noise.

[0087] In summary, the present application provides a PID parameter adaptive algorithm based on multi-dimensional fuzzy rules, with the following effects: The present invention first proposes a Dynamic Window Moving Average (DWMA) algorithm for calculating the error change rate (Δe / Δt). This algorithm adjusts the size of the sliding window in real time (n = , where is the integral time constant, is the sampling period), ensuring that the normalized error change rate is always within a reasonable range (such as [-3, 3]), thus significantly improving the adaptability of the algorithm in different dynamic characteristic environments.

[0088] The present invention breaks through the limitation of the single-dimensional rule table of traditional fuzzy PID and proposes a composite control architecture of a three-dimensional decoupled rule base + dual-input collaborative decision-making + dynamic weight allocation: 1. Three-dimensional independent rule base (Decoupled 3D Rule Base) Parameter decoupling design: Each PID parameter is optimized independently to avoid parameter conflicts caused by rule coupling in traditional methods; High-order differential observation: The rule base introduces the second-order difference term (Δ²e / Δt²) to enhance the sensitivity to acceleration disturbances.

[0089] 2. Dual-Input Cooperative Decision Phase lead compensation: When e(t)· > 0 (the error continues to increase), automatically enhance the weight to suppress overshoot in advance; Chattering suppression design: When | | is close to 0 (close to the steady state), reduce the weight to avoid high-frequency oscillations.

[0090] 3. Direction-Sensitive Weighting An adaptive strategy based on real-time process variables.

[0091] Compared with the traditional PID, the overshoot is reduced by 62%, the adjustment time is reduced by 35%, and the anti-interference recovery time is increased by 40%. This significantly improves the dynamic response, steady-state accuracy, and anti-noise performance of the PID control algorithm.

[0092] In a second aspect, the present application provides a PID parameter adaptive system based on multi-dimensional fuzzy rules, which is applied to the steps of the PID parameter adaptive algorithm based on multi-dimensional fuzzy rules. The system includes: An acquisition unit, configured to acquire system error data and calculate the error change rate according to the average algorithm of a dynamic sliding window; A normalization unit, configured to normalize the system error data and the error change rate with the maximum change value as the normalization factor to obtain normalized error data and a normalized error change rate; A processing unit, configured to perform fuzzy processing on the normalized error data and the normalized error change rate by using the triangular membership function of multiple linguistic variables to obtain fuzzy error data and a membership degree distribution matrix of the fuzzy error change rate; A rule unit, configured to perform orthogonal design on multiple said linguistic variables to construct a fuzzy rule base; An adjustment amount unit is used to traverse the fuzzy rule base according to the fuzzy error data in the membership degree distribution matrix and the distribution of the change rate of the fuzzy error, form multiple matching mapping results, and then perform weighted average calculation on the multiple mapping results by the centroid method to obtain the proportional gain preset in the rule base. , integral gain and differential gain adjustment amounts; A result unit is used to perform fixed amplitude limiting on the adjustment amounts of the proportional gain and the integral gain according to the amplitude limiting mechanism, and perform dynamic amplitude limiting on the adjustment amount of the differential gain to obtain the final proportional gain , final integral gain and final differential gain .

[0093] In a third aspect, the present application provides a computer program, and the computer program is executed by a processor to perform the steps of the foregoing PID parameter adaptive algorithm based on multi-dimensional fuzzy rules.

[0094] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided by the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0095] The various embodiments in the present disclosure are described in a progressive manner. The same or similar parts among the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments.

[0096] The protection scope of the present disclosure is not limited to the above embodiments. Obviously, those skilled in the art can make various changes and deformations to the present disclosure without departing from the scope and spirit of the present disclosure. If these changes and deformations fall within the scope of the claims of the present disclosure and equivalent technologies, the intention of the present disclosure also includes these changes and deformations.

Claims

1. A PID parameter self-adaptive algorithm based on multi-dimensional fuzzy rules, characterized in that the algorithm Including: Obtaining system error data, and calculating the error change according to the average algorithm of the dynamic sliding window to obtain the error change rate; Using the maximum change value as the normalization factor to normalize the system error data and the error change rate to obtain the normalized error data and the normalized error change rate; Using the triangular membership function of multiple linguistic variables to fuzzify the normalized error data and the normalized error change rate to obtain the fuzzy error data and the membership degree distribution matrix of the fuzzy error change rate; Conducting an orthogonal design for multiple said linguistic variables to construct a fuzzy rule base; According to the fuzzy error data in the membership degree distribution matrix and the distribution of the change rate of the fuzzy error, traverse the fuzzy rule base to form multiple matching mapping results, and then perform weighted average calculation on the multiple mapping results by the centroid method to obtain the proportional gain preset by the rule base , integral gain and differential gain adjustment amount; According to the clipping mechanism, the adjustment amounts of the proportional gain and the integral gain are subject to fixed clipping, and the adjustment amount of the derivative gain is subject to dynamic clipping to obtain the final proportional gain , the final integral gain and the final derivative gain .

2. The PID parameter self-adaptive algorithm based on multi-dimensional fuzzy rules according to claim 1, characterized in that The step of obtaining system error data, and calculating the error change according to the average algorithm of the dynamic sliding window to obtain the error change rate includes: The calculation formula of the average algorithm of the dynamic sliding window is: ; Among them, represents the error change rate, represents the current time index, represents the sliding window size, represents the time index within the window, represents the moment weight of, represents the moment system error of, represents the system error data.

3. The PID parameter adaptive algorithm based on multi-dimensional fuzzy rules according to claim 1, characterized in that, The step of using the maximum change value as the normalization factor to normalize the system error data and the error change rate to obtain the normalized error data and the normalized error change rate includes: Normalizing the system error data according to the maximum allowable steady-state error of the system to obtain the normalized error data; Normalizing the error change rate according to the maximum allowable change rate of the system to obtain the normalized error change rate.

4. The PID parameter adaptive algorithm based on multi-dimensional fuzzy rules according to claim 1, characterized in that The step of using the triangular membership function of multiple linguistic variables to fuzzify the normalized error data and the normalized error change rate to obtain the fuzzy error data and the membership degree distribution matrix of the fuzzy error change rate includes: Using the triangular membership function of 7 linguistic variables {NB, NM, NS, ZO, PS, PM, PB} to fuzzify the normalized error data and the normalized error change rate to obtain the membership degrees of the error data and the error change rate belonging to the fuzzy set, where the calculation formula of the triangular membership function is: ; Among them, represents the input belonging to the fuzzy set membership degree, represents the normalized error data or the normalized error change rate of the input, represents the center point of the triangular membership function, represents half of the base width of the triangle; Constructing the fuzzy error data and the membership degree distribution matrix of the fuzzy error change rate according to the membership degrees of the error data and the error change rate belonging to the fuzzy set.

5. The PID parameter self-adaptive algorithm based on multi-dimensional fuzzy rules according to claim 1, characterized in that The step of conducting an orthogonal design for multiple said linguistic variables to construct a fuzzy rule base includes: Taking the error state and the error change rate state as two factors to conduct an orthogonal experimental design to obtain an initial fuzzy rule base; Loading the dynamic coupling rule into the initial fuzzy rule base to obtain the initial fuzzy rule base with a dynamic coupling mechanism; Constructing a loss function, and iteratively optimizing the weight coefficients of the initial fuzzy rule base with the dynamic coupling mechanism according to the loss function to obtain a fuzzy rule base.

6. The PID parameter self - adaptive algorithm based on multi - dimensional fuzzy rules according to claim 5, characterized in that The step of constructing a loss function, and iteratively optimizing the weight coefficients of the initial fuzzy rule base with the dynamic coupling mechanism according to the loss function to obtain a fuzzy rule base includes: In the fuzzy rule base, when the error data domain error change rate belongs to the positive domain or the negative domain at the same time, the corresponding rule output weight is the largest.

7. The PID parameter adaptive algorithm based on multi-dimensional fuzzy rules according to claim 1, characterized in that, According to the fuzzy error data in the membership degree distribution matrix and the distribution of the fuzzy error change rate, traverse the fuzzy rule base to form multiple matching mapping results, and then perform weighted average calculation of the multiple mapping results by the centroid method. Obtain the proportional gain preset in the rule base , integral gain and differential gain The steps of the adjustment amount include: Traverse each rule in the fuzzy rule base, match the fuzzy error data and the data of the fuzzy error change rate in the current membership degree distribution matrix with the rule conditions, and obtain multiple matching mapping results. For the mapping results of multiple matches, weighted average calculation is performed by the centroid method to obtain the proportional gain preset in the rule base , integral gain and derivative gain adjustment amounts, where the formula for weighted average calculation by the centroid method is: ; Among them, represents the membership degree of the th rule, represents the total number of activated fuzzy rules, represents the conclusion value of the th rule.

8. The PID parameter adaptive algorithm based on multi-dimensional fuzzy rules according to claim 1, characterized in that According to the clipping mechanism, the adjustment amounts of the proportional gain and the integral gain are subject to fixed clipping, and the adjustment amount of the derivative gain is subject to dynamic clipping to obtain the final proportional gain , the final integral gain and the final derivative gain . The steps include: By means of a preset fixed amplitude limiting, the adjustment amounts of the proportional gain and the integral gain are limited to obtain the final proportional gain and the final integral gain within the fixed amplitude limiting; Through dynamic amplitude limiting, the adjustment amount of the differential gain is adjusted to obtain the final differential gain within the dynamic amplitude limiting , where the calculation formula for the dynamic amplitude limiting is: ; Among them, represents the amplitude limiting boundary value calculated dynamically, represents the adjustment amount output by the centroid method, represents the current system error, represents the maximum steady-state error allowed by the system, represents the basic amplitude limiting coefficient, represents the dynamic expansion coefficient.

9. A PID parameter adaptive system based on multi-dimensional fuzzy rules, characterized in that, Applied to the steps of the PID parameter adaptive algorithm based on multi-dimensional fuzzy rules according to any one of claims 1 to 8, the system includes: An acquisition unit for acquiring system error data and calculating the error change according to the average algorithm of the dynamic sliding window to obtain the error change rate. A normalization unit for normalizing the system error data and the error change rate with the maximum change value as the normalization factor to obtain the normalized error data and the normalized error change rate. A processing unit for performing fuzzy processing on the normalized error data and the normalized error change rate by using the triangular membership function of multiple linguistic variables to obtain the membership degree distribution matrix of the fuzzy error data and the fuzzy error change rate. A rule unit for performing orthogonal design on multiple linguistic variables to construct a fuzzy rule base. An adjustment amount unit is configured to traverse the fuzzy rule base according to the fuzzy error data in the membership degree distribution matrix and the distribution of the fuzzy error change rate, form a plurality of matching mapping results, and then perform weighted average calculation on the plurality of mapping results by the centroid method to obtain the proportional gain preset in the rule base , integral gain and derivative gain adjustment amounts; A result unit for performing fixed clipping on the adjustment amounts of the proportional gain and the integral gain according to a clipping mechanism, and performing dynamic clipping on the adjustment amount of the derivative gain to obtain a final proportional gain , a final integral gain and a final derivative gain .

10. A computer program, characterized in that, When the computer program is executed by a processor, it realizes the steps of the PID parameter adaptive algorithm based on multi-dimensional fuzzy rules according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • PID temperature control method and device, equipment and storage medium

    CN118034023A

  • Motion control system based on PID (Proportion Integration Differentiation) control algorithm

    CN118363297A

  • Fuzzy feedback controller and method

    US5479567A

Cited By

  • Control load friction force simulation method, system and equipment based on change rate feedback adjustment and medium

    CN121051874A

  • Feeding control method and system of synthesis kettle

    CN121142961A