An online PID self-tuning system based on error spectrum analysis

By using an online PID self-tuning system based on error spectrum analysis, the adjustment amount is directly extracted from the spectrum characteristics, which solves the problem that PID controller parameter tuning in the prior art depends on model identification. This enables efficient and online PID parameter optimization, adapting to system changes and optimizing control performance.

CN122194614APending Publication Date: 2026-06-12GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG UNIV OF TECH
Filing Date
2026-03-19
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing PID controller parameter tuning methods rely on complex model identification, which is difficult to adapt to high-order, nonlinear or time-varying systems. Furthermore, they are computationally complex, sensitive to noise, and cannot directly diagnose specific problems in control systems.

Method used

An online PID self-tuning system based on error spectrum analysis is adopted. Through data acquisition, frequency domain diagnosis and intelligent tuning modules, the adjustment amount is directly extracted from the spectrum characteristics of the error signal, and the PID parameters are automatically adjusted to achieve online self-tuning.

Benefits of technology

It achieves efficient PID parameter tuning without interrupting system operation and without relying on precise models. It can adapt to system changes, intuitively reveal control performance problems, and optimize PID performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The present application relates to a kind of online PID self-tuning system based on error spectrum analysis, system is while in closed loop control, frequency domain diagnosis engine and intelligent decision center are periodically operated in parallel. Every cycle, system will collect a period of error data, analyze its frequency domain characteristics by FFT, then according to characteristics intelligently fine-tune PID parameters. This process continues, so that PID controller can automatically, online optimize its performance, adapt to the changes of controlled object, ultimately make the control system tend to the best state. The present application can directly reveal the root of poor control performance through spectrum analysis, not dependent on the accurate mathematical model of controlled object, more general, according to the characteristic index extracted according to spectrum analysis, according to spectrum characteristics, automatically adjust PID parameters with pertinence, priority, realize accurate, efficient self-tuning, the whole process is online, undisturbed, without interrupting normal operation of system, and can adapt to the slow change of system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of PID control technology, and in particular to an online PID self-tuning system based on error spectrum analysis. Background Technology

[0002] In numerous fields such as industrial process control, motion control, and robotics, PID controllers are widely used due to their simple structure, robustness, and ease of engineering implementation. However, the performance of a PID controller is highly dependent on the settings of its proportional, integral, and derivative parameters. Traditional parameter tuning methods, such as the Ziegler-Nichols method, require specialized testing in closed-loop or open-loop conditions. This process is not only time-consuming and labor-intensive but also interrupts normal system operation and cannot adapt to situations where the dynamic characteristics of the controlled object change over time.

[0003] Although some self-tuning PID controllers exist in the prior art, most of them are still based on time-domain response characteristics for analysis and tuning. The prior art closest to this invention is a type of self-tuning method based on model identification. This type of method analyzes the system's input and output data to identify an approximate mathematical model online, and then calculates the PID parameters according to the model using specific rules.

[0004] However, such model-based online tuning methods have inherent drawbacks: Strong model dependence: The tuning effect is highly dependent on the accuracy of the identified model. For complex high-order, nonlinear, or time-varying systems, it is difficult to obtain an accurate simplified model, resulting in poor tuning performance.

[0005] Sensitive to noise: Measurement noise can contaminate input and output data, causing model identification to be distorted, and thus generating incorrect PID parameters.

[0006] Computational complexity: Online model identification and parameter calculation require significant computing resources, increasing the cost and implementation difficulty of the controller.

[0007] Insufficient insight: This method only yields an abstract model and cannot intuitively reveal specific problems existing in the control system, such as periodic disturbances, mechanical resonance, or sensor noise.

[0008] Therefore, there is an urgent need in this field for an online self-tuning method that can bypass complex model identification and directly diagnose and tune the essential control problems. Summary of the Invention

[0009] The purpose of this invention is to at least address one of the shortcomings of the prior art and provide an online PID self-tuning system based on error spectrum analysis.

[0010] To achieve the above objectives, the present invention adopts the following technical solution: Specifically, an online PID self-tuning system based on error spectrum analysis is proposed, including the following: The data acquisition module, electrically connected to the target PID control loop, is used to continuously acquire error signals from the target PID control loop within a fixed sliding time window. Time series data; The frequency domain diagnostic module, connected to the data acquisition module, is used to acquire error signals. Time series data, for The time-series data is preprocessed and then converted to the frequency domain to obtain the spectrum. After that, from Feature indicators are extracted, including low-frequency energy indicators. Resonance / Oscillation Indicators and high-frequency noise indicators ; The intelligent tuning module, connected to the frequency domain diagnostic module, is used to acquire the characteristic indicators, and then process the characteristic indicators according to a preset, priority-based rule base to obtain the adjustment amount of the PID parameters. And through the adjustment amount The PID parameters are adjusted to obtain a new set of PID parameters (Kp_new, Ki_new, Kd_new); The execution and interface layer, connected to the intelligent tuning module, includes a PID parameter updater. The PID parameter updater is used to receive new PID parameter sets and update the new PID parameter sets into the running target PID control loop.

[0011] Furthermore, specifically, the target PID control loop is a standard PID control loop, whose subtractor calculates the setpoint. Compared with actual output Real-time error between The PID controller uses this error and current parameters... Calculate the control signal Drive the controlled object.

[0012] Furthermore, specifically, the frequency domain diagnostic module includes a signal preprocessing unit, which is used to process... Preprocessing is performed, the preprocessing operations include, right The time-series data were detrended using a linear least squares algorithm, and then a Hanning window function was applied to make the main lobe energy more concentrated, thereby improving the identification accuracy of subsequent spectral peaks.

[0013] Furthermore, specifically, the frequency domain diagnostic module also includes a frequency domain analysis unit, which uses a fast Fourier transform algorithm to convert the preprocessed time-domain signal to the frequency domain to obtain the spectrum. .

[0014] Furthermore, specifically, the frequency domain diagnostic module also includes a spectral feature extractor, which is used to extract spectral features from... The feature indicators are extracted, and the extraction process includes: calculate middle The low-frequency energy index is obtained by integrating the spectral energy within the frequency band. ; calculate middle Within this range, the highest peak whose amplitude exceeds the threshold is found, and the spectral energy within the frequency band from the highest peak position - 5% of the system bandwidth to the highest peak position + 5% of the system bandwidth is calculated to obtain the resonance / oscillation index. Record its frequency and amplitude If the highest peak with an amplitude exceeding the threshold is not found, then Recorded as 0; calculate middle The energy integral within the frequency band yields the high-frequency noise index. ; in For the predefined low-frequency cutoff frequency position, For the predefined high-frequency cutoff frequency position, This refers to the Nyquist frequency position.

[0015] Furthermore, specifically, Located in the spectrum At a position 15% of the system bandwidth from the starting point. Located in the spectrum At a position 150% of the system bandwidth at the starting position, the system bandwidth is preset to 5.

[0016] Furthermore, specifically, the feature indicators are processed according to a preset, priority-based rule base to obtain the adjustment amount of the PID parameters. ,include, First, determine if there is any fluctuation. If the value exceeds the preset threshold TH_OSC, oscillation is determined to exist, and oscillation suppression is performed. The oscillation suppression process is as follows: At this time... Additionally, check if f_peak < 5.0 is true; if true, then... If not, then ,and ,like If the value is not greater than the preset threshold TH_OSC, it indicates that there is no oscillation suppression, and then a difference elimination judgment is performed; The process of error elimination judgment is as follows: judgment If the error exceeds a preset threshold TH_ERR, then steady-state error elimination is performed, and the error ratio is calculated. err_ratio = (I_LF - TH_ERR) / max(self.TH_ERR, 1e-6), but and judge Is the value greater than 1.0 true? If so, then... If this condition is not met, then Kp will not be adjusted. If the error is not greater than TH_ERR, then steady-state error elimination will not be performed. To perform high-frequency noise suppression, first determine if there exists a value of I_HF greater than the preset threshold TH_NOISE. If not, no high-frequency noise suppression is needed. If so, the following rules apply. Calculate noise_ratio = (I_HF - self.TH_NOISE) / max(self.TH_NOISE, 1e-6); Calculate Kd_reduction = min(0.4, 0.15 * noise_ratio); Next, determine whether there is simultaneous oscillation. If there is simultaneous oscillation, Calculate Kd_reduction_scaled = Kd_reduction * 0.3, At this time Updated to ; If there is no simultaneous oscillation, then ; Finally, the adjustment amount of the PID parameters is obtained. .

[0017] Furthermore, the execution and interface layer also includes a human-machine interface, which is used to provide users with visual information on system status, spectrum, and tuning process.

[0018] The beneficial effects of this invention are as follows: This invention proposes an online PID self-tuning system based on error spectrum analysis, which uses the error signal in the target PID control loop... The time-series data is converted to spectrum analysis, which can intuitively reveal the root causes of poor control performance (such as steady-state error, low-frequency disturbance, mid-frequency oscillation, and high-frequency noise). It does not rely on the precise mathematical model of the controlled object, making it more versatile. After extracting the characteristic indicators based on the spectrum analysis, the PID parameters are automatically adjusted in a targeted and prioritized manner according to the spectrum characteristics, achieving accurate and efficient self-tuning. The entire tuning process is online and undisturbed, without interrupting the normal operation of the system, and can adapt to the slow changes in the system. Attached Figure Description

[0019] The above and other features of this disclosure will become more apparent from the detailed description of the embodiments illustrated in conjunction with the accompanying drawings. In the accompanying drawings, the same reference numerals denote the same or similar elements. Obviously, the drawings described below are merely some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without any creative effort. In the drawings: Figure 1 The diagram shown is the first part of the operation flowchart of an online PID self-tuning system based on error spectrum analysis according to the present invention. Figure 2 The diagram shown is the second part of the operation flowchart of an online PID self-tuning system based on error spectrum analysis according to the present invention. Figure 3 The image shown illustrates one embodiment of the present invention. A schematic diagram for extracting feature indicators; Figure 4 The image shown illustrates one embodiment of the present invention. A schematic diagram of the converted spectrum; Figure 5 The diagram shown is a schematic representation of the spectrum analysis results in one embodiment of the present invention. Detailed Implementation

[0020] The following will provide a clear and complete description of the concept, specific structure, and technical effects of the present invention in conjunction with embodiments and accompanying drawings, so as to fully understand the purpose, solution, and effects of the present invention. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The same reference numerals used throughout the accompanying drawings indicate the same or similar parts.

[0021] Example 1, referring to Figure 1 as well as Figure 2 This invention proposes an online PID self-tuning system based on error spectrum analysis, comprising the following: The data acquisition module, electrically connected to the target PID control loop, is used to continuously acquire error signals from the target PID control loop within a fixed sliding time window. Time series data; The frequency domain diagnostic module, connected to the data acquisition module, is used to acquire error signals. Time series data, for The time-series data is preprocessed and then converted to the frequency domain to obtain the spectrum. After that, from Feature indicators are extracted, including low-frequency energy indicators. Resonance / Oscillation Indicators and high-frequency noise indicators ; The intelligent tuning module, connected to the frequency domain diagnostic module, is used to acquire the characteristic indicators, and then process the characteristic indicators according to a preset, priority-based rule base to obtain the adjustment amount of the PID parameters. And through the adjustment amount The PID parameters are adjusted to obtain a new set of PID parameters (Kp_new, Ki_new, Kd_new); The execution and interface layer, connected to the intelligent tuning module, includes a PID parameter updater. The PID parameter updater is used to receive new PID parameter sets and update the new PID parameter sets into the running target PID control loop.

[0022] In this embodiment 1, the error signal in the target PID control loop is used... The time-series data is converted to spectrum analysis, which can intuitively reveal the root causes of poor control performance (such as steady-state error, low-frequency disturbance, mid-frequency oscillation, and high-frequency noise). It does not rely on the precise mathematical model of the controlled object, making it more versatile. After extracting the characteristic indicators based on the spectrum analysis, the PID parameters are automatically adjusted in a targeted and prioritized manner according to the spectrum characteristics, achieving accurate and efficient self-tuning. The entire tuning process is online and undisturbed, without interrupting the normal operation of the system, and can adapt to the slow changes in the system.

[0023] In a preferred embodiment of the present invention, the target PID control loop is a standard PID control loop, whose subtractor calculates the setpoint. Compared with actual output Real-time error between The PID controller uses this error and current parameters... Calculate the control signal Drive the controlled object.

[0024] In a preferred embodiment of the present invention, the frequency domain diagnostic module specifically includes a signal preprocessing unit, which is used for processing signals... Preprocessing is performed, the preprocessing operations include, right The time-series data were detrended using a linear least squares algorithm, and then a Hanning window function was applied to make the main lobe energy more concentrated, thereby improving the identification accuracy of subsequent spectral peaks.

[0025] Reference Figure 4 In a preferred embodiment of the present invention, the frequency domain diagnostic module further includes a frequency domain analysis unit, which uses a fast Fourier transform algorithm to convert the preprocessed time domain signal to the frequency domain to obtain the spectrum. .

[0026] Reference Figure 3 as well as Figure 5 In a preferred embodiment of the present invention, the frequency domain diagnostic module further includes a spectral feature extractor, which is used to extract spectral features from... The feature indicators are extracted, and the extraction process includes: calculate middle The low-frequency energy index is obtained by integrating the spectral energy within the frequency band. This indicator is directly related to the steady-state accuracy of the system; high energy indicates a large steady-state error. calculate middle Within this range, the highest peak whose amplitude exceeds the threshold is found, and the spectral energy within the frequency band from the highest peak position - 5% of the system bandwidth to the highest peak position + 5% of the system bandwidth is calculated to obtain the resonance / oscillation index. Record its frequency and amplitude If the highest peak with an amplitude exceeding the threshold is not found, then Recorded as 0, this indicator quantifies the system's oscillation tendency and frequency; calculate middle The energy integral within the frequency band yields the high-frequency noise index. This indicator reflects the measured noise level or the controller's excessive response to high-frequency dynamics; in For the predefined low-frequency cutoff frequency position, For the predefined high-frequency cutoff frequency position, This refers to the Nyquist frequency position.

[0027] In this preferred embodiment, peak search is performed only within the dynamic frequency band of the resonance / oscillation index, and integration is performed only in other intervals, because oscillation / resonance is characterized by sharp spectral peaks, and steady-state error and high-frequency noise are more concerned with the overall total energy.

[0028] As a preferred embodiment of the present invention, specifically... Located in the spectrum At a position 15% of the system bandwidth from the starting point. Located in the spectrum At a position 150% of the system bandwidth at the starting position, the system bandwidth is preset to 5.

[0029] The following is a preferred embodiment of the process of obtaining feature indicators based on peak search and numerical integration algorithms using Python. import numpy as np class SpectrumAnalyzer: "A concise spectral feature extractor" def __init__(self, fs, N=1024): """ Initialization parameters fs: Sampling frequency (Hz) N: FFT points """ self.fs = fs self.N = N self.freqs = np.fft.rfftfreq(N, 1 / fs) # Positive frequency part self.df = fs / N # Frequency resolution def extract_features(self, error_signal): """ Extracting spectral features from error signals parameter: error_signal: Time-domain error signal, length should be N return: dict: A dictionary containing all feature metrics. """ # 1. FFT calculation of spectrum spectrum = np.fft.rfft(error_signal) magnitude = np.abs(spectrum) # Amplitude spectrum # 2. Define frequency band boundaries (based on system characteristics) # Assume the system's expected bandwidth is 5Hz bw = 5.0 # System bandwidth f_cutoff_LF = bw * 0.15 # Low-frequency cutoff: 15% of bandwidth f_cutoff_HF = bw * 1.5 # High-frequency cutoff: 150% of bandwidth # 3. Low-frequency energy integral (0 ~ f_cutoff_LF) idx_LF = int(f_cutoff_LF / self.df) I_LF = np.sum(magnitude[:idx_LF]**2) * self.df # 4. Mid-frequency peak search (f_cutoff_LF ~ f_cutoff_HF) idx_start = idx_LF idx_end = min(int(f_cutoff_HF / self.df), len(magnitude)-1) # Finding peak values ​​within dynamic frequency bands peak_idx, A_peak, f_peak = self._find_peak( magnitude, idx_start, idx_end ) # Peak local energy integral (±5% bandwidth) if peak_idx > 0: bw_local = f_peak * 0.1 # ±5% idx_low = max(idx_start, int((f_peak - bw_local) / self.df)) idx_high = min(idx_end, int((f_peak + bw_local) / self.df)) I_OSC = np.sum(magnitude[idx_low:idx_high]**2) * self.df else: I_OSC = 0 # 5. High-frequency noise integration (f_cutoff_HF ~ Nyquist) f_nyquist = self.fs / 2 idx_HF_start = idx_end idx_HF_end = int(f_nyquist / self.df) I_HF = np.sum(magnitude[idx_HF_start:idx_HF_end]**2) *self.df return { 'I_LF': I_LF, 'I_OSC': I_OSC, 'f_peak': f_peak, 'A_peak': A_peak, 'I_HF': I_HF } def _find_peak(self, magnitude, idx_start, idx_end): Find the maximum peak value within the specified frequency band. # Extracting sub-bands sub_mag = magnitude[idx_start:idx_end+1] if len(sub_mag) < 3: return -1, 0, 0 # Finding local maxima peak_idx_local = -1 max_val = 0 for i in range(1, len(sub_mag)-1): if (sub_mag[i] > sub_mag[i-1] and sub_mag[i] > sub_mag[i+1] and sub_mag[i] > max_val): max_val = sub_mag[i] peak_idx_local = i if peak_idx_local == -1: return -1, 0, 0 # Precise Peak Estimation (Three-Point Parabolic Fitting) i = peak_idx_local y1 = sub_mag[i-1] y2 = sub_mag[i] y3 = sub_mag[i+1] # Parabola parameters p = 0.5 * (y1 - y3) / (y1 - 2*y2 + y3) # Subpixel precision A_peak = y2 - 0.25 * (y1 - y3) * p f_peak = (idx_start + i + p) * self.df return idx_start + i, A_peak, f_peak.

[0030] In the preferred embodiment described above, the peak value with sub-pixel precision can be accurately found by using a three-point parabolic fitting method.

[0031] In a preferred embodiment of the present invention, specifically, the adjustment amount of the PID parameter is obtained by processing the feature index according to a preset, priority-based rule base. ,include, First, determine if there is any fluctuation. If the value exceeds the preset threshold TH_OSC, oscillation is determined to exist, and oscillation suppression is performed. The oscillation suppression process is as follows: At this time... Additionally, check if f_peak < 5.0 is true; if true, then... If not, then ,and ,like If the value is not greater than the preset threshold TH_OSC, it indicates that there is no oscillation suppression, and then a difference elimination judgment is performed; The process of error elimination judgment is as follows: judgment If the error exceeds a preset threshold TH_ERR, then steady-state error elimination is performed, and the error ratio is calculated. err_ratio = (I_LF - TH_ERR) / max(self.TH_ERR, 1e-6), but and judge Is the value greater than 1.0 true? If so, then... If this condition is not met, then Kp will not be adjusted. If the error is not greater than TH_ERR, then steady-state error elimination will not be performed. To perform high-frequency noise suppression, first determine if there exists a value of I_HF greater than the preset threshold TH_NOISE. If not, no high-frequency noise suppression is needed. If so, the following rules apply. Calculate noise_ratio = (I_HF - self.TH_NOISE) / max(self.TH_NOISE, 1e-6) (in computer language, this is 1× ); Calculate Kd_reduction = min(0.4, 0.15 * noise_ratio); Next, determine whether there is simultaneous oscillation. If there is simultaneous oscillation, Calculate Kd_reduction_scaled = Kd_reduction * 0.3, At this time Updated to ; If there is no simultaneous oscillation, then ; Finally, the adjustment amount of the PID parameters is obtained. .

[0032] In this preferred embodiment, the above method enables intelligent adjustment based on the PID parameters. Fine-tuning the PID parameters Kp, Ki, and Kd yields a new set of PID parameters (Kp_new, Ki_new, Kd_new), enabling the PID controller to automatically and online optimize its performance, adapt to changes in the controlled object, and ultimately bring the control system to its optimal state.

[0033] The following is a code implementation process of the above preferred embodiment, using Python as an example: def _compute_adjustments(self, I_LF, I_OSC, f_peak, A_peak, I_HF): """ Calculate parameter adjustment amount """ delta_Kp = delta_Ki = delta_Kd = 0.0 # 1. Oscillation Suppression (Highest Priority) if I_OSC > self.TH_OSC: self.oscillation_detected = True self.oscillation_count += 1 # Kp Adjustment: Based on oscillation amplitude and frequency Kp_reduction = min(0.5, 0.2 * A_peak * min(f_peak / 10,2.0)) delta_Kp = -self.Kp * Kp_reduction # Kd Adjustment: Increase Damping if f_peak < 5.0: # Low-frequency oscillation Kd_increase = 0.3 * A_peak else: # High-frequency oscillation Kd_increase = 0.1 * A_peak / max(1, f_peak / 10) delta_Kd = self.Kd * Kd_increase # Ki adjustment: Reduce integral action during oscillation. delta_Ki = -self.Ki * 0.5 # 2. Steady-state error elimination (second priority) elif I_LF > self.TH_ERR and not self.oscillation_detected: # Calculate the error ratio err_ratio = (I_LF - self.TH_ERR) / max(self.TH_ERR, 1e-6) Ki_increase = min(0.3, 0.1 * err_ratio) delta_Ki = self.Ki * Ki_increase # Assist in fine-tuning Kp (when the error is large) if err_ratio > 1.0: delta_Kp = self.Kp * 0.05 # 3. High-frequency noise suppression (always check, but lowest priority) if I_HF > self.TH_NOISE: noise_ratio = (I_HF - self.TH_NOISE) / max(self.TH_NOISE,1e-6) Kd_reduction = min(0.4, 0.15 * noise_ratio) # If both increasing Kd (oscillation) and decreasing Kd (noise) are needed simultaneously, then take the weighted average. if self.oscillation_detected and delta_Kd > 0: # Oscillation preferred, but noise considered Kd_reduction_scaled = Kd_reduction * 0.3 # Reduce the adjustment range delta_Kd = delta_Kd * 0.7 - self.Kd * Kd_reduction_scaled else: delta_Kd = -self.Kd * Kd_reduction return delta_Kp, delta_Ki, delta_Kd.

[0034] In a preferred embodiment of the present invention, the execution and interface layer further includes a human-machine interface, which is used to provide users with visual information on system status, spectrum diagrams, and tuning process.

[0035] In this preferred embodiment, a human-machine interface is added to facilitate users in accessing information for subsequent analysis and processing.

[0036] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0037] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or system capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0038] Although the description of the invention has been quite detailed and particularly of several described embodiments, it is not intended to limit it to any of these details or embodiments or any particular embodiment, but should be considered as providing a broad possible interpretation of the claims by referring to the appended claims and taking into account the prior art, thereby effectively covering the intended scope of the invention. Furthermore, the invention has been described above with respect to embodiments foreseeable by the inventors in order to provide a useful description, and non-substantial modifications to the invention that have not yet been foreseen may still represent equivalent modifications.

[0039] The above description is merely a preferred embodiment of the present invention. The present invention is not limited to the above-described embodiments. Any embodiment that achieves the technical effects of the present invention using the same means should fall within the protection scope of the present invention. Within the protection scope of the present invention, various modifications and variations can be made to the technical solutions and / or implementation methods.

Claims

1. An online PID self-tuning system based on error spectrum analysis, characterized in that, Including the following: The data acquisition module, electrically connected to the target PID control loop, is used to continuously acquire error signals from the target PID control loop within a fixed sliding time window. Time series data; The frequency domain diagnostic module, connected to the data acquisition module, is used to acquire error signals. Time series data, for The time-series data is preprocessed and then converted to the frequency domain to obtain the spectrum. After that, from Feature indicators are extracted, including low-frequency energy indicators. Resonance / Oscillation Indicators and high-frequency noise indicators ; The intelligent tuning module, connected to the frequency domain diagnostic module, is used to acquire the characteristic indicators, and then process the characteristic indicators according to a preset, priority-based rule base to obtain the adjustment amount of the PID parameters. And through the adjustment amount The PID parameters are adjusted to obtain a new set of PID parameters (Kp_new, Ki_new, Kd_new); The execution and interface layer, connected to the intelligent tuning module, includes a PID parameter updater. The PID parameter updater is used to receive new PID parameter sets and update the new PID parameter sets into the running target PID control loop.

2. The online PID self-tuning system based on error spectrum analysis according to claim 1, characterized in that, Specifically, the target PID control loop is a standard PID control loop, whose subtractor calculates the setpoint. Compared with actual output Real-time error between The PID controller uses this error and current parameters... Calculate the control signal Drive the controlled object.

3. The online PID self-tuning system based on error spectrum analysis according to claim 1, characterized in that, Specifically, the frequency domain diagnostic module includes a signal preprocessing unit, which is used to process... Preprocessing is performed, the preprocessing operations include, right The time-series data were detrended using a linear least squares algorithm, and then a Hanning window function was applied to make the main lobe energy more concentrated, thereby improving the identification accuracy of subsequent spectral peaks.

4. The online PID self-tuning system based on error spectrum analysis according to claim 1, characterized in that, Specifically, the frequency domain diagnostic module further includes a frequency domain analysis unit, which uses a fast Fourier transform algorithm to convert the preprocessed time-domain signal to the frequency domain to obtain the spectrum. .

5. The online PID self-tuning system based on error spectrum analysis according to claim 1, characterized in that, Specifically, the frequency domain diagnostic module further includes a spectral feature extractor, which is used to extract spectral features from... The feature indicators are extracted, and the extraction process includes: calculate middle The low-frequency energy index is obtained by integrating the spectral energy within the frequency band. ; calculate middle Within this range, the highest peak whose amplitude exceeds the threshold is found, and the spectral energy within the frequency band from the highest peak position - 5% of the system bandwidth to the highest peak position + 5% of the system bandwidth is calculated to obtain the resonance / oscillation index. Record its frequency and amplitude If the highest peak with an amplitude exceeding the threshold is not found, then Recorded as 0; calculate middle The energy integral within the frequency band yields the high-frequency noise index. ; in For the predefined low-frequency cutoff frequency position, For the predefined high-frequency cutoff frequency position, This refers to the Nyquist frequency position.

6. The online PID self-tuning system based on error spectrum analysis according to claim 5, characterized in that, Specifically, Located in the spectrum At a position 15% of the system bandwidth from the starting point. Located in the spectrum At a position 150% of the system bandwidth at the starting position, the system bandwidth is preset to 5.

7. The online PID self-tuning system based on error spectrum analysis according to claim 6, characterized in that, Specifically, the feature indicators are processed according to a preset, priority-based rule base to obtain the adjustment amount of the PID parameters. ,include, First, determine if there is any fluctuation. If the value exceeds the preset threshold TH_OSC, oscillation is determined to exist, and oscillation suppression is performed. The oscillation suppression process is as follows: At this time... Additionally, check if f_peak < 5.0 is true; if true, then... If not, then ,and ,like If the value is not greater than the preset threshold TH_OSC, it indicates that there is no oscillation suppression, and then a difference elimination judgment is performed; The process of error elimination judgment is as follows: judgment If the error exceeds a preset threshold TH_ERR, then steady-state error elimination is performed, and the error ratio is calculated. err_ratio = (I_LF - TH_ERR) / max(self.TH_ERR, 1e-6), but and judge Is the value greater than 1.0 true? If so, then... If this condition is not met, then Kp will not be adjusted. If the error is not greater than TH_ERR, then steady-state error elimination will not be performed. To perform high-frequency noise suppression, first determine if there exists a value of I_HF greater than the preset threshold TH_NOISE. If not, no high-frequency noise suppression is needed. If so, the following rules apply. Calculate noise_ratio = (I_HF - self.TH_NOISE) / max(self.TH_NOISE, 1e-6); Calculate Kd_reduction = min(0.4, 0.15 * noise_ratio); Next, determine whether there is simultaneous oscillation. If there is simultaneous oscillation, Calculate Kd_reduction_scaled = Kd_reduction * 0.3, At this time Updated to ; If there is no simultaneous oscillation, then ; Finally, the adjustment amount of the PID parameters is obtained. .

8. The online PID self-tuning system based on error spectrum analysis according to claim 1, characterized in that, The execution and interface layer also includes a human-machine interface, which is used to provide users with visual information on system status, spectrum, and tuning process.