A corrosion control adaptive method and system for chemical process equipment

CN123010434APending Publication Date: 2026-10-30ZHEJIANG JIANLI CHEM CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611439022.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-16
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]本发明提供了一种化工过程设备防腐控制自适应方法及系统,用于解决现有技术中化工设备腐蚀监测依赖离线检测且防腐控制缺乏闭环反馈的技术问题

Benefits of technology

1、通过在线采集电化学阻抗谱数据实现对化工反应设备腐蚀状态的连续实时感知,消除了传统离线检测模式中两次检测之间的监测盲区;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123010434A_ABST
    Figure CN123010434A_ABST
Patent Text Reader

Abstract

The application provides a chemical process equipment corrosion control adaptive method and system, and belongs to the technical field of chemical process control. The method comprises the following steps: injecting an excitation signal into a reaction liquid in a chemical reaction equipment, collecting electrochemical impedance spectrum data of the reaction liquid; performing parameter fitting on the electrochemical impedance spectrum data based on a first model to obtain a first corrosion state parameter; determining a first corrosion current density according to the first corrosion state parameter; inputting the first corrosion current density as a controlled variable into a model predictive controller to obtain a first process parameter adjustment amount by optimization solution; and adjusting process parameters of the chemical reaction equipment according to the first process parameter adjustment amount. The application realizes online real-time sensing and active closed-loop control of the corrosion state, and inhibits corrosion diffusion without damaging product quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of chemical process control technology, and in particular to an adaptive method and system for corrosion prevention control of chemical process equipment. Background Technology

[0002] During the operation of chemical process equipment, the corrosion of the internal walls by the reaction medium is a key factor affecting the safety and service life of the equipment. Especially in highly corrosive media environments, the corrosion rate is affected by the coupling of various process parameters such as temperature, fluid flow state, and medium concentration, and the corrosion process exhibits dynamic evolution characteristics.

[0003] In existing technologies, corrosion monitoring and control of chemical equipment generally adopts a combination of offline detection and manual, experience-based parameter adjustment. Specifically, the corrosion status of the equipment is assessed through periodic shutdowns for ultrasonic thickness measurement, plate testing, or visual inspection, and then process parameters are adjusted or corrosion inhibitors are added based on historical experience. However, this approach has the following shortcomings: First, the offline detection cycle is usually weekly to monthly, which is much longer than the actual time scale of corrosion state changes. This results in the corrosion process not being monitored during the interval between two detections, and the system has a structural blind spot in response to corrosion acceleration events. Secondly, existing online corrosion monitoring methods (such as the linear polarization resistance method) can only provide information on a single uniform corrosion rate and cannot distinguish between uniform corrosion and localized corrosion, which is the main form of equipment perforation failure. Third, there is a coupling contradiction between anti-corrosion measures and main production objectives, and manual experience-based parameter adjustment is difficult to achieve the optimal balance between corrosion inhibition and product quality assurance.

[0004] Therefore, how to achieve online real-time sensing of the corrosion status of chemical process equipment and to actively control the corrosion process in a closed loop without compromising product quality is an urgent technical problem to be solved. Summary of the Invention

[0005] This invention provides an adaptive method and system for corrosion prevention control of chemical process equipment, which solves the technical problems in the prior art where corrosion monitoring of chemical equipment relies on offline detection and corrosion prevention control lacks closed-loop feedback.

[0006] This invention provides an adaptive method for corrosion control of chemical process equipment, comprising the following steps: An excitation signal is injected into the reaction liquid inside the chemical reaction equipment, and the electrochemical impedance spectroscopy data of the reaction liquid are collected. The electrochemical impedance spectroscopy data are subjected to parameter fitting based on the first model to obtain the first corrosion state parameters; The first corrosion current density is determined based on the first corrosion state parameters; The first corrosion current density is input as the controlled variable into the model predictive controller, and the first process parameter adjustment amount is obtained by optimizing the solution based on the preset product quality constraints. The process parameters of the chemical reaction equipment are adjusted according to the first process parameter adjustment amount.

[0007] In one optional embodiment, injecting an excitation signal into the reaction liquid within the chemical reaction apparatus and acquiring electrochemical impedance spectroscopy data of the reaction liquid includes: The excitation signal is injected sequentially into each impedance probe; wherein, the excitation signal is a multi-frequency superimposed signal, and the multi-frequency superimposed signal includes several frequency components distributed logarithmically and equally; The current response signals of each impedance probe are demodulated in the frequency domain to obtain the electrochemical impedance spectral data at the corresponding position of each impedance probe.

[0008] In one optional implementation, the first model includes a constant phase angle element and a diffusion impedance element; the parameter fitting process of the electrochemical impedance spectroscopy data based on the first model includes: The real and imaginary parts of the electrochemical impedance spectroscopy data are simultaneously fitted on the complex plane to obtain the solution resistance, the parameters of the constant phase angle element, and the charge transfer resistance.

[0009] In one optional implementation, determining the first corrosion current density based on the first corrosion state parameter includes: The first corrosion state parameter is determined based on the coefficients of the charge transfer resistance and the diffusion impedance element; The conversion coefficient is determined based on the dispersion index of the constant phase angle element; The first corrosion current density is determined based on the conversion coefficient and the first corrosion state parameter.

[0010] In one optional implementation, the prediction model of the model prediction controller includes: The second model is used to predict the evolution trend of the first corrosion current density based on the reaction temperature and stirring shear rate. The third model is used to determine the thickness of the interfacial retention layer based on the stirring shear rate.

[0011] In an optional embodiment, before injecting the excitation signal into the reaction liquid within the chemical reaction apparatus, the method further includes: A full-band frequency sweep of the impedance probe is performed in a medium of known composition to obtain baseline impedance spectrum data; The baseline impedance spectrum data is subjected to nonlinear fitting to obtain the baseline parameters of each impedance probe, which are used as the initial values ​​for parameter fitting during online operation.

[0012] In an optional implementation, after parameter fitting the electrochemical impedance spectroscopy data based on the first model and before inputting the first corrosion current density as a controlled variable into the model prediction controller, the method further includes: Based on the spatial distribution of the first corrosion current density, the local corrosion factor is determined; The warning level is determined based on the time variation trend of the local corrosion factor and the first corrosion current density; The objective function weights of the model prediction controller are dynamically adjusted based on the warning level.

[0013] In an optional embodiment, after adjusting the process parameters of the chemical reaction equipment according to the first process parameter adjustment amount, the method further includes: Obtain the adjusted actual corrosion state parameters, and calculate the deviation between the actual corrosion state parameters and the predicted values ​​of the model prediction controller; When the deviation exceeds the preset tolerance band for multiple consecutive control cycles, the prediction model parameters of the model prediction controller are updated.

[0014] This application also provides an adaptive corrosion control system for chemical process equipment, comprising: The impedance spectroscopy acquisition module is used to inject an excitation signal into the reaction liquid in the chemical reaction equipment and acquire the electrochemical impedance spectroscopy data of the reaction liquid. The corrosion state inversion module is used to perform parameter fitting processing on the electrochemical impedance spectroscopy data based on the first model to obtain the first corrosion state parameters; and to determine the first corrosion current density based on the first corrosion state parameters. An adaptive control module is used to input the first corrosion current density as a controlled variable into the model predictive controller, and optimize the solution to obtain the first process parameter adjustment amount based on the preset product quality constraints; and adjust the process parameters of the chemical reaction equipment according to the first process parameter adjustment amount.

[0015] In one optional embodiment, injecting an excitation signal into the reaction liquid within the chemical reaction apparatus and acquiring electrochemical impedance spectroscopy data of the reaction liquid includes: The excitation signal is injected sequentially into each impedance probe; wherein, the excitation signal is a multi-frequency superimposed signal, and the multi-frequency superimposed signal includes several frequency components distributed logarithmically and equally; The current response signals of each impedance probe are demodulated in the frequency domain to obtain the electrochemical impedance spectral data at the corresponding position of each impedance probe.

[0016] The present invention has the following beneficial effects: 1. By acquiring electrochemical impedance spectroscopy data online, continuous real-time sensing of the corrosion status of chemical reaction equipment is achieved, eliminating the monitoring blind spot between two detections in the traditional offline detection mode; 2. By extracting multidimensional corrosion state parameters through the inversion of the first model, it is possible to distinguish between uniform corrosion and localized corrosion, and to achieve accurate identification of corrosion type; 3. By using corrosion state parameters as controlled variables and inputting them into a model predictive controller with product quality constraints, the synergistic optimization of corrosion inhibition and product quality assurance is achieved, avoiding the negative impact of traditional anti-corrosion methods on product quality. 4. Corrosion prevention is achieved simply by adjusting the existing process parameters of the chemical reaction equipment, without the need to introduce external corrosion inhibitors or other chemicals that may affect product purity. Attached Figure Description

[0017] Figure 1 A schematic diagram of the module architecture of an adaptive corrosion control system for chemical process equipment provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the overall process of an adaptive method for corrosion control of chemical process equipment provided in an embodiment of the present invention; Figure 3 A schematic diagram comparing the Nyquist impedance spectra under baseline conditions and online corrosion conditions provided for embodiments of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0020] In the description of this invention, the first corrosion state parameter refers to the polarization resistance, the first corrosion current density refers to the corrosion current density, and the first process parameter adjustment amount refers to the optimal temperature increment and optimal speed increment output by the model predictive controller. The ordinal numbers mentioned above are for distinction only and do not indicate a ranking of importance.

[0021] The adaptive corrosion control method for chemical process equipment provided in this invention can be applied to various chemical reaction equipment containing corrosive media. For example, the chemical reaction equipment includes, but is not limited to, stirred reactors, tubular reactors, distillation towers, etc., and the wall material can be corrosion-resistant metal materials such as Hastelloy, titanium alloy, duplex stainless steel, etc.

[0022] This embodiment uses a Hastelloy C-276 stirred reactor in a lithium hexafluorophosphate production facility as an example. The reactor has a volume of 5m³. 3 The reaction medium is an HF-LiF mixture, with an operating temperature range of 60 to 120°C and a stirring speed range of 50 to 300 rpm. HF and its derivative HF⁻ in the reaction solution continuously corrode the inner wall of the reactor, and the corrosion rate changes with fluctuations in process parameters. Without intervention, continuous corrosion will lead to thinning of the equipment wall. When the wall thickness falls below the design thickness, stress concentration and perforation failure will occur. Especially under conditions of increased temperature and insufficient stirring, a localized acidic retention layer will form on the inner wall surface of the reactor. The high concentration of HF in this retention layer causes a localized corrosion rate far exceeding the uniform corrosion rate, resulting in corrosion pits rather than uniform thinning. This localized corrosion is far more harmful than uniform corrosion.

[0023] Reference Figure 1 The corrosion control adaptive system in this embodiment includes an impedance spectrum acquisition module, a corrosion state inversion module, a situation assessment module, an adaptive control module, an actuator module, and an online correction module. The output of the impedance spectrum acquisition module is transmitted to the corrosion state inversion module via a high-speed serial bus. The output of the inversion module is transmitted to the situation assessment module and the adaptive control module via Ethernet. The output of the adaptive control module is transmitted to the actuator module via the Modbus TCP protocol.

[0024] Reference Figure 2 The adaptive method for corrosion control of chemical process equipment provided in this embodiment includes the following steps: S000: Perform a full-band frequency sweep on the impedance probe in a medium with known composition to obtain baseline impedance spectrum data, and perform nonlinear fitting on the baseline impedance spectrum data to obtain baseline parameters.

[0025] The impedance probe array comprises four miniature three-electrode electrochemical probes, evenly spaced circumferentially along the inner wall of the reactor in the submerged region. The probe placement was chosen based on the following considerations: circumferential spacing allows for the capture of localized corrosion differences caused by flow field inhomogeneity, particularly in the high-shear region directly below the agitator blades, the stagnant region near the baffles, and the low-velocity region at the bottom of the reactor; submersion ensures the probes are always submerged in the reaction solution, preventing measurement failure due to probe exposure to the gas phase during liquid level fluctuations. Each probe consists of a working electrode, a reference electrode, and an auxiliary electrode. The working and auxiliary electrodes are made of Hastelloy C-276, matching the reactor wall material to ensure consistent corrosion behavior on the probe surface. The reference electrode is a high-temperature resistant silver / silver chloride electrode, with a reference potential drift of less than 0.5 mV / °C within the operating temperature range. The effective area of ​​the working electrode is 1 cm². 2 The surface is mirror polished to a certain roughness. μm, ensuring consistent initial electrode surface condition. Each probe is installed into the probe seat hole pre-drilled in the vessel wall via a sealed flange, with the working electrode surface flush with the inner surface of the vessel wall. The lead wires are led out to the signal conditioning box outside the vessel through PTFE insulating sleeves.

[0026] The reactor was filled with deionized water, and a full-band frequency sweep was performed on each probe. The sweep range was 0.1Hz to 100kHz, with 5 frequency points per octave, totaling approximately 30 frequency points. A sinusoidal excitation signal with an amplitude of 10mV was applied at each frequency point, and the current response signal was continuously acquired for 3 complete cycles. The measurement time for each frequency sweep was approximately 5 minutes, suitable for the high signal-to-noise ratio requirements during the calibration phase. The reactor was designed to withstand a pressure of 0.6MPa and a temperature of 150℃, and the probes passed a helium leak test after installation.

[0027] The obtained baseline impedance spectrum data was then fitted to the Randles equivalent circuit model (i.e., the first model) using the Levenberg-Marquardt nonlinear fitting algorithm. The Randles equivalent circuit consists of solution resistance... Series charge transfer resistor With double-layer capacitance The parallel combination forms the impedance expression: In the formula, Resistance of the solution reflects the conductivity of the reaction solution itself, and its unit is Ω·cm. 2 , Electric double-layer capacitance reflects the charge storage capacity of the electrode surface, and its unit is F / cm. 2 , Charge transfer resistance reflects the resistance to electrochemical reactions occurring at the electrode surface, and its unit is Ω·cm. 2 , Angular frequency, Let be the frequency. A damping factor is introduced here. To balance convergence speed and stability, the initial damping factor is fitted. When the objective function value decreases in the current iteration, Shrink to To accelerate convergence, as the objective function value increases, Enlarged to To enhance stability, the convergence criterion is that the 2-norm of the parameter change in two consecutive iterations is less than 1. The maximum number of iterations is limited to 200.

[0028] Then, the baseline parameter vectors of each probe are extracted through fitting. ,in The fitting process employs a proportional weighting strategy, meaning that the weight of each frequency point is calculated proportionally. This weighting method balances the fitting quality between the high-frequency range (small impedance amplitude) and the low-frequency range (large impedance amplitude), preventing the absolute error in the low-frequency range from dominating the fitting process. The fitting quality is assessed by normalizing the weighted sum of squared residuals. determination: In the formula, For frequency points, The number of fitting parameters. Denominator For degrees of freedom, make The generalized value is unaffected by the number of frequency points and the number of parameters. When If the calibration is successful, the probe can be used for online monitoring; when... The probe is marked as abnormal and an inspection is triggered.

[0029] For example, the fitting result of probe #1 in deionized water at 25°C is: Ω·cm 2 , μF / cm 2 , Ω·cm 2 , The calibration results for probes #2 through #4 are similar, all meeting the requirements. The requirements. 4 probes. The values ​​are 5.01, 4.87, 5.12, and 4.95 Ω·cm, respectively. 2 The maximum deviation was 5.1%, which is considered acceptable in terms of consistency.

[0030] The verification method for consistency among probes is as follows: under the same calibration conditions, the solution resistance obtained by fitting each probe is compared. The deviation between them should not exceed 10%; if the deviation exceeds this range, it indicates that a certain probe may be improperly installed or have poor electrode contact, which needs to be investigated and dealt with. No limit is set here.

[0031] After calibration, the current process parameters are read from the distributed control system to construct the initial state vector of the model predictive controller. ,in This is the current reaction temperature. This is the current stirring speed. and These are the initial values ​​of polarization resistance and corrosion current density under calibration conditions, respectively.

[0032] In another implementation, calibration can also be performed online incrementally. This involves using the reaction solution itself as a calibration medium during breaks in normal production operation to perform rapid single-frequency or dual-frequency calibration on a known reference impedance, correcting probe drift errors. Alternatively, an external standard method can be used, where a set of standard electrochemical test pieces of the same material are placed outside the reactor, and the measurements are periodically compared with those from the probe inside the reactor. Furthermore, the expected lifespan of the probe depends on the stability of the reference electrode. It is recommended to perform a potential calibration of the reference electrode every 6 months. The electrode needs to be replaced when the open-circuit potential drift exceeds ±5mV, and baseline calibration must be performed again after each probe or reference electrode replacement.

[0033] S100: Inject an excitation signal into the reaction liquid in the chemical reaction equipment and collect the electrochemical impedance spectroscopy data of the reaction liquid.

[0034] In this embodiment, the four probes of the impedance probe array operate in a time-division multiplexing mode. The multiplexer selects each probe sequentially according to a preset order, injects excitation signals into the selected probes, and acquires their response signals. The multiplexer uses solid-state relays to achieve channel switching, with a switching time of less than 1ms, an on-resistance of less than 0.1Ω, and an inter-channel isolation generally greater than 80dB. A 200ms stabilization waiting time is inserted after each probe switch. To eliminate transient interference caused by switching, the amplifiers and filters in the front-end conditioning circuit can complete the setup process. The front-end conditioning circuit usually includes a potentiostat and a transimpedance amplifier, whose transimpedance gain is automatically selected according to the current amplitude of the previous control cycle, which will not be elaborated here.

[0035] In addition, probes that are not selected during the switching period are in an open-circuit state, maintaining an open-circuit potential between their working electrode and the reference electrode, without any excitation applied. The single measurement time for each probe is approximately 30 seconds, and the total time for a complete scan of all four probes is 120 seconds, with 60 seconds reserved for data processing and communication, ensuring a complete measurement, analysis, and control cycle of 180 seconds.

[0036] In this embodiment, the excitation signal is a multi-frequency superimposed signal. The advantage of a multi-frequency superimposed signal compared to frequency-by-frequency sweep is that it simultaneously injects multiple frequency components and acquires full-band impedance information in a single excitation, thereby significantly shortening the measurement time. Electrochemical linearity requires that the amplitude of the excitation signal be sufficiently small to minimize the overpotential on the electrode surface. satisfy (Approximately 26mV at 0℃, approximately 30mV at 85℃). In this embodiment, the total excitation amplitude of 10mV is far less than the linear limit, ensuring that the electrochemical system remains within the linear response range. Among them, the multi-frequency superimposed signal includes The frequency components are distributed in a log-equal interval, and the frequency set is arranged according to... Sure, For common ratio, Hz, kHz, common ratio The amplitude of each frequency component is determined according to the principle of equal energy distribution. Total peak - peak amplitude Typically, the voltage range is 5mV to 20mV; in this embodiment, 10mV is used to ensure that the electrochemical system is within the linear response range. Compared to frequency sweeping, multi-frequency superposition is used here to inject multiple frequency components simultaneously and obtain full-band impedance information in a single excitation, thereby reducing the measurement time of a single probe from 5 minutes in the calibration phase to 30 seconds.

[0037] It should be noted that the initial phase of each frequency component here is determined by minimizing the peak value. The peak value is the ratio of the signal's peak value to its RMS value. A lower peak factor means a smaller signal peak value for the same effective value, thus allowing for a larger effective excitation amplitude without exceeding the electrochemical linear range. This embodiment uses the Schroeder phase optimization formula. This makes the peak factor of the composite signal close to In another implementation, an iterative random search method can be used to optimize the initial phase combination to obtain a lower peak factor; this is not limited here.

[0038] The acquired current response signal, after amplification and filtering, is converted into a digital signal by an analog-to-digital converter with a sampling rate of 500kHz. The analog-to-digital converter has a resolution of 16 bits and a quantization noise power of [missing information]. ,in This is the minimum quantization step size. Within the range and signal amplitude of this embodiment, the effect of quantization noise on impedance measurement is negligible. A Hanning window function is applied to the digitized current response signal to suppress spectral leakage. A Fast Fourier Transform is performed on the windowed signal to obtain the complex impedance at each frequency point: Complex impedance decomposed into real part and the virtual part Two components. The measured signal-to-noise ratio at each frequency point is obtained through a coherence function. The coherence function here is the ratio of the square of the modulus of the cross-power spectral density of the excitation signal and the response signal to the product of their respective power spectral densities, ranging from 0 to 1. When the coherence function value is below 0.95, it indicates that there is significant nonlinear distortion or external interference at that frequency point, and the weight of that frequency point in subsequent fitting needs to be reduced; conversely, the weight needs to be increased, and so on.

[0039] Reference Figure 3 Under baseline conditions, the Nyquist plot shows a large-diameter single capacitive arc, with a semicircular diameter corresponding to a larger... Value, approximately 498 Ω·cm 2 This indicates that the electrochemical reaction faces significant resistance and the corrosion rate is low. Under online corrosion conditions, the semicircular arc is significantly reduced to... Ω·cm 2 This indicates a decrease in charge transfer resistance and accelerated corrosion, with a 45° diffusion tail appearing in the low-frequency range. This suggests that the corrosion process has shifted from being purely charge transfer-controlled to being controlled by a mixture of charge transfer and diffusion. The identification methods for various abnormal modes at this point are as follows: When the dispersion index of the constant phase angle element When the capacitance drops sharply from 0.87 to below 0.72, the capacitive arc changes from a regular semicircle to a flattened, suppressed arc, indicating a significant increase in the non-uniformity of the electrode surface, possibly indicating the formation of corrosion pits. The physical meaning has shifted from the average polarization resistance of uniform corrosion to the apparent polarization resistance of local active points; when the low-frequency tail changes from a 45° slant line to a second capacitive arc, it indicates the existence of a finite diffusion layer. In this case, the semi-infinite Warburg element in the equivalent circuit should be replaced with a finite-length Warburg element; when inductive behavior (imaginary part is positive) occurs in the high-frequency band, it is usually not a real electrochemical phenomenon but a problem with the probe hardware connection. The probe leads should be checked for inductive coupling or poor contact, and so on.

[0040] S200, the electrochemical impedance spectroscopy data is fitted with parameters based on the equivalent circuit model to obtain the first corrosion state parameters, and the first corrosion current density is determined based on the first corrosion state parameters.

[0041] This embodiment uses a modified Randle equivalent circuit model, whose structure is a solution resistor. A series connection is used with a parallel connection, where one branch in the parallel connection is a constant phase angle element and the other branch is a charge transfer resistor. Series Warburg diffusion impedance .

[0042] The impedance expression for the constant phase angle element is: In the formula, The constant of the phase angle element is expressed in s·s. , The diffusion index ranges from 0 to 1. A value closer to 1 indicates a smoother and more uniform electrode surface, while a value closer to 0.5 indicates greater surface roughness or porosity. In this embodiment, It typically varies within the range of 0.75 to 0.95, when A hardware-level alarm is triggered at any time.

[0043] The Warburg diffusion impedance is used to describe the mass transfer process of corrosive species diffusing from the bulk reaction solution to the electrode surface. Under semi-infinite diffusion conditions, its impedance expression is: In the formula, This is the Warburg coefficient, with units of Ω·cm. 2 ·s , The size reflects the diffusion rate of corrosive species. A larger value indicates a stronger control effect of the diffusion process on the overall corrosion rate. In this embodiment... Typically between 10 and 50 Ω·cm 2 ·s Within the range. The corrected total impedance expression for the Randles equivalent circuit is: Complex nonlinear least squares fitting is performed on the electrochemical impedance spectroscopy data of each probe, simultaneously fitting the real and imaginary parts in the complex plane. The objective function is: In the formula, the weights A proportional weighting strategy is employed to minimize the relative error at each frequency point. Alternatively, a unit weighting strategy can also be used in another implementation. This approach is suitable for scenarios where low-frequency characteristics are more critical for corrosion diagnosis; in another implementation, a modulus-weighted strategy can be used. The specific choice can be made based on the actual usage scenario; no restrictions are set here.

[0044] The fitted parameter vector is There are 5 independent parameters. The fitting algorithm adopts the Levenberg-Marquardt method. The initial value is taken as the fitting result of the previous control cycle as the warm-start. The basis of this warm-start strategy is that the electrochemical corrosion process changes slowly on the time scale. The change of the equivalent circuit parameters between two adjacent control cycles (180s) is usually no more than 10%. Therefore, the solution of the previous cycle is very close to the true value as the initial guess. It usually converges in 3 to 5 iterations, which is much faster than starting from random initial values. If it fails to converge after more than 30 consecutive iterations, it indicates that the operating conditions have changed significantly (such as a sudden change in concentration caused by the feeding operation). The initial value is reset to the baseline calibration parameters and iterated again. This reset strategy ensures that it can still converge to a reasonable solution when the operating conditions change suddenly. If a parameter in the fitting result reaches the physical boundary (such as...), the initial value is reset to the baseline calibration parameters and iterated again. or If the probe data is marked as unreliable, then the data will be marked as unreliable, and so on.

[0045] The polarization resistance (i.e., the first corrosion state parameter) is then calculated from the fitted parameters. : In the formula, Rad / s is the lowest angular frequency actually measured. Polarization resistance is used to represent the total resistance to an electrochemical reaction under DC-limited conditions (frequency approaching zero), which includes charge transfer resistance. and diffusion mass transfer resistance Two components. A smaller polarization resistance indicates a more readily occurring electrochemical reaction, corresponding to a higher corrosion rate. In this embodiment, Typically between 50 and 500 Ω·cm 2 Variations within the range.

[0046] Subsequently, based on the dispersion index of the constant phase angle element Determine the conversion factor : In the formula, V is the Stern-Geary constant for the passivation state, corresponding to the case where the anodic Tafel slope is extremely large when a complete passivation film exists on the electrode surface. V is the active state Stern-Geary constant, corresponding to the case where there is no passivation film protecting the electrode surface. It represents the critical dispersion index value for the transition between the passivated and active states.

[0047] The value is typically in the range of 0.013V to 0.052V, usually determined by the Tafel slope. and according to Sure; This reflects changes in the electrode surface state through linear interpolation between the passivated and active states. The value is continuously and adaptively adjusted. In another implementation, The value can also be determined by looking up a table, that is, by pre-establishing different temperatures and... Combination Value lookup table.

[0048] According to the conversion factor and polarization resistance The ratio determines the corrosion current density (i.e., the first corrosion current density): For example, the fitting result of probe #1 under the condition of operating at 85°C is: Ω·cm 2 , S·s , , Ω·cm 2 , Ω·cm 2 ·s Polarization resistance Ω·cm 2 Adaptive conversion coefficients V, corrosion current density mA / cm 2 .

[0049] It should be noted that when fitting normalized residuals If the probe data is low quality, a previous value preservation strategy is activated, which uses the fitted result from the previous control cycle to replace the current value, preventing low-quality data from contaminating subsequent control decisions. If the data is low quality for three consecutive control cycles, the probe is marked as faulty and removed from the set of valid probes. Simultaneously, the denominator in the calculation of the spatial average corrosion current density is adjusted. .

[0050] A multi-probe corrosion state vector was constructed from the inversion results of four probes. .

[0051] For example, under operating conditions of 85℃ and 200rpm, the corrosion current densities of the four probes were 0.158, 0.224, 0.137, and 0.162 mA / cm², respectively. Probe #2 was located in the high-velocity region directly below the agitator blades, while probe #4 was located in the near-static region at the bottom of the vessel. The difference in corrosion rate at each probe location can be used to determine the influence of flow field non-uniformity on localized corrosion.

[0052] In another implementation, the equivalent circuit model can also be a Voigt circuit, i.e., a series structure of multiple parallel R-CPE elements, which is suitable for complex corrosion systems with multiple time constants. For example, for a passivation system with two oxide films, a series structure of two parallel R-CPE elements can be used to characterize the inner dense film and the outer porous film, respectively, without limitation here.

[0053] S300, determine the local corrosion factor based on the spatial distribution of the first corrosion current density, determine the warning level based on the time variation trend of the local corrosion factor and the first corrosion current density, and then dynamically adjust the objective function weight of the model prediction controller based on the warning level.

[0054] In this embodiment, the spatial average value of the corrosion current density of all probes in the effective probe set is calculated as follows: In the formula, For the effective number of probes, This is the set of valid probe indices. Then, the local corrosion factor is calculated: Local corrosion factors This is the ratio of the maximum corrosion current density to the spatial average density among all effective probes. When the value is close to 1, it indicates that the corrosion rate at each probe location is nearly uniform, which means that the corrosion is relatively evenly distributed on the inner wall of the reactor, mainly manifested as uniform thinning. The larger the value, the more severe the localized corrosion concentration, with the wall thickness reduction rate at certain locations significantly faster than at other locations, increasing the risk of forming localized corrosion pits; generally, The theoretical minimum value is 1 (completely uniform), with no upper bound.

[0055] This section presents a time series of spatially averaged corrosion current density over nearly 20 sampling periods. Performing equally spaced linear regression yields the corrosion acceleration. : In the formula, (Corresponding to an observation window of 20 × 180 s = 1 hour) s represents the control period. This is the observation window. The selection criteria are as follows: When the window is too short (less than 10 periods), measurement noise leads to a large deviation in the regression slope estimation; when the window is too long (more than 50 periods), the response to sudden changes in operating conditions is lagging. Here... A one-hour observation window allows for a balance between sensitivity and noise immunity in corrosion acceleration detection. The physical meaning of corrosion acceleration is the rate of change of corrosion current density over time. A positive acceleration indicates accelerated corrosion requiring stronger intervention, while a negative acceleration indicates decelerated corrosion where the current control strategy is effective. Further details are omitted here.

[0056] The warning level is then determined based on a dual-threshold mechanism: when or A·cm A red alert is triggered when the value is / s, indicating severe localized corrosion or rapidly accelerating corrosion, requiring immediate suppression. when or A·cm A time of / s indicates a yellow alert, suggesting the need for preventative intervention; otherwise, it indicates a green normal state.

[0057] It should be noted that, The corresponding physical scenario is that the corrosion rate at a certain location is three times the spatial average, and the wall thickness reduction rate in this local area will be significantly faster than in other areas, forming a perforation risk point.

[0058] Then, using Faraday's law, the wall thickness reduction rate was calculated. ,in This is the equivalent mass of the alloy. The number of electrons transferred in the reaction. C / mol is Faraday's constant. This represents the alloy density. A·cm / s corresponds to a wall thickness reduction acceleration of approximately 0.5 μm / h. 2 If left unattended, the corrosion rate will advance from the safe zone to the danger zone within a few hours.

[0059] Then, the objective function weight vector is dynamically adjusted according to the warning level. .

[0060] Generally, the green state is taken as , In this mode, the penalty weight for the manipulated variable is much greater than the corrosion weight, and the controller tends to maintain the current process parameters unchanged, making only minor adjustments when the corrosion current density deviates from the equilibrium state. (Yellow state is indicated.) , The controller seeks a balance between corrosion prevention and production efficiency. (Red status indicates...) , The corrosion inhibition priority is significantly improved, and the controller allows for a larger adjustment of process parameters.

[0061] For example, when the corrosion current densities of the three effective probes are 0.158, 0.224, and 0.137 mA / cm², respectively. 2 hour, mA / cm 2 , The corrosion acceleration is negative within the observation window, indicating a green normal state.

[0062] For example, when fluctuations in the reaction solution concentration caused changes in the corrosion current density of the three probes to be 0.285, 0.610, and 0.192 mA / cm², respectively. 2 hour, mA / cm 2 , But corrosion acceleration A·cm / s, triggered by the acceleration threshold, a yellow alert is issued.

[0063] For example, when probe #2 detects the formation of localized corrosion pits, its corrosion current density rises sharply to 1.15 mA / cm². 2 The other probes maintained a range of 0.15 to 0.20 mA / cm. 2 When within range, mA / cm 2 , But corrosion acceleration A·cm / s, triggered by an acceleration threshold, triggers a red alert. In red alert mode, the corrosion weight of the model predictive controller is increased by 20 times. When the corrosion acceleration falls below the yellow threshold for five consecutive cycles, the alert level is downgraded back to yellow; when... and It will revert to green status when all green conditions are met.

[0064] S400, the first corrosion current density is input into the model predictive controller as the controlled variable, and the product quality constraint is used as the hard constraint to optimize and solve for the first process parameter adjustment amount, and the process parameters of the chemical reaction equipment are adjusted according to the first process parameter adjustment amount.

[0065] In this embodiment, the model prediction controller includes a corrosion kinetic prediction model (i.e., the second model) and an acidic retention layer mass transfer model (i.e., the third model).

[0066] The state equation of the corrosion kinetics prediction model is: In the formula, the first term Used to describe the effect of temperature changes on corrosion rate, it originates from the chemical reaction rate constant in the Arrhenius equation. With temperature Relationship Its derivative with respect to temperature has a factor of production. ; K is the temperature sensitivity coefficient. kJ / mol is the apparent activation energy of the corrosion reaction of Hastelloy in HF medium, and this value is usually in the range of 40 to 60 kJ / mol. J / (mol·K) is the gas constant. The second term... This term describes the effect of changes in stirring shear rate on interfacial mass transfer, and originates from the diffusion boundary layer thickness on the rotating disk electrode in the Levich equation. Relationship, This power-law exponent is widely used as an averaged engineering approximation in stirred reactors. (The third term...) This is a relaxation term used to describe the corrosion rate of the system towards its equilibrium state under the current operating conditions. The trend of regression s This represents the relaxation rate constant, corresponding to a relaxation time constant of approximately 5 minutes. Usually in to s Within the range. Stirring shear rate With stirring speed The relationship is ,in s / rpm is the geometric constant of the impeller, which depends on the impeller blade profile and the vessel diameter ratio. This embodiment uses a six-bladed turbine impeller with a diameter-to-vessel ratio of 1:3. In another embodiment, if an anchor-type impeller is used... The value needs to be recalibrated based on the geometric parameters of the agitator, which will not be elaborated here.

[0067] It should be noted that the equilibrium corrosion current density Determined by the current temperature and shear rate: In the formula, mA / cm 2 The corrosion current density is the calibration value under reference conditions (80℃, 200rpm). K is the reference temperature. s The reference shear rate is used. The first term of the equation is the Arrhenius temperature factor, which increases the equilibrium corrosion rate exponentially with increasing temperature; the second term is the Levich mass transfer factor, which increases the mass transfer rate of corrosive species to the electrode surface with enhanced stirring, leading to an increase in the equilibrium corrosion rate. The physical effects of the two factors are in the same direction (both accelerate corrosion), but the effect of temperature is exponential (strong effect), while the effect of stirring is power-law (weak effect).

[0068] Furthermore, the acidic retention layer mass transfer model describes the relationship between the thickness of the acidic retention layer at the reaction solution-electrode interface and process parameters. Here, the acidic retention layer refers to a locally high-acidity region formed near the electrode surface due to the consumption of basic species and the generation of acidic products by electrochemical reactions. Its thickness determines the rate of mass transfer of corrosive species to the electrode surface; a larger thickness results in a longer mass transfer distance and a lower corrosion rate. The expression for the retention layer thickness is: In the formula, μm represents the retention layer thickness under reference conditions. Typically in the range of 100 to 500 μm. kJ / mol is a temperature-sensitive parameter for the thickness of the retained layer. This value is obtained by fitting experimental data on the mass transfer boundary layer thickness of HF on the surface of Hastelloy C-276 as a function of temperature. A negative value indicates that the molecular diffusion coefficient of HF increases with increasing temperature, leading to a thinner retained layer. Increasing the stirring shear rate can thin the retained layer and reduce local acidity, thereby inhibiting corrosion; lowering the reaction temperature slows down the corrosion reaction rate through the Arrhenius effect. The model predictive controller utilizes the above-mentioned influence relationship between temperature and stirring, two manipulated variables, on the corrosion rate and the thickness of the retained layer to find the optimal operating point while meeting product quality constraints.

[0069] The product quality constraints include crystallization supersaturation constraints: In the formula, supersaturation , This represents the actual concentration of LiPF6 in the reaction solution. This represents the saturated solubility at that temperature. The temperature relationship of solubility is calculated using the van't Hoff approximation: In the formula, mol / L represents the solubility at a reference temperature of 80℃. kJ / mol is the enthalpy of dissolution. A positive value indicates endothermic dissolution, meaning that the solubility increases with increasing temperature. This value is obtained by fitting the relationship between the solubility of LiPF6 in the HF-LiF mixed system and temperature using the van't Hoff equation. Corresponding crystal growth rate It has fallen below the minimum growth rate required to maintain production cycle, of which The growth rate constant is denoted by . This represents the growth stage. Below the critical supersaturation level for spontaneous nucleation A safety margin of 0.40 is provided to avoid instantaneous exceedance of the critical value due to process fluctuations.

[0070] It should be understood that in this field, the crystallization process requires the product particle size D50 to be in the range of 100 to 200 μm. However, excessive supersaturation causes the nucleation rate to exceed the growth rate, resulting in a large number of fine crystals with a particle size of less than 50 μm, which does not meet the particle size specification requirements of electrolyte-grade lithium hexafluorophosphate.

[0071] In this embodiment, the process parameters include the reaction temperature. and stirring speed The model predictive controller imposes constraints on the rate of change of both: the temperature increment within a single control cycle (180 s). ℃ (corresponding rate of change) ℃ / min (to prevent thermal shock from causing thermal stress on the equipment), speed increment within a single control cycle. rpm (corresponding rate of change) (rpm / min, to prevent mechanical impact on the stirring system). The stirring speed is also subject to an upper limit constrained by the crystallization process. rpm. This upper limit is set based on the following considerations: excessively high rotation speed will lead to intensified secondary nucleation, that is, collisions and breakage between crystals to generate new crystal nuclei, ultimately causing the product particle size D50 to be less than 100μm, which also does not meet the particle size specification requirements of electrolyte-grade lithium hexafluorophosphate. 250rpm is the critical rotation speed at which secondary nucleation in this medium system significantly affects the particle size distribution of the reactor.

[0072] The objective function of the model predictive controller is: Prediction Time Domain (correspond A prediction window of s = 30 minutes covers approximately 6 times the 5-minute relaxation time constant of the corrosion process, ensuring that the prediction window can fully observe the complete response process of the corrosion rate after the manipulated variables are adjusted. (Control time domain) The control cycle is 180 seconds, synchronized with the impedance measurement cycle. The manipulated variable is the change in reaction temperature. and the change in stirring speed (i.e., the adjustment amount of the first process parameter), decision variable vector Its dimensions are .

[0073] The nonlinear state equation is applied at the current operating point in each control cycle. Performing a first-order Taylor expansion at the given point, the linearized state equation is: ,in and The state matrix and input matrix are time-varying and are recalculated in each control cycle based on the analytical Jacobian algorithm at the current operating point. Input matrix The elements are determined by the partial derivatives of the corrosion kinetic equations with respect to the manipulated variables. The partial derivative with respect to the temperature manipulated variable is: For example, at the current work point ℃ K, mA / cm 2 When, the partial derivative is A / (cm 2 ·K). The partial derivative with respect to the stirring speed manipulator is: At the current work point At rpm, the partial derivative is A / (cm 2 (·rpm). The partial derivative of temperature is much smaller than that of rotational speed, indicating that near the current operating point, the immediate effect of speed adjustment on corrosion current density is about two orders of magnitude greater than that of temperature adjustment. However, the exponential effect of temperature outweighs the linear effect of rotational speed over a large temperature range.

[0074] After linearization Step-by-step prediction expansion, the objective function and constraints are rearranged into a standard quadratic programming form. , constraint is ,in It is a positive definite Hessian matrix. The constraints here consist of 6 decision variables and approximately 30 inequality constraints (oversaturation upper and lower bounds). Bars, upper and lower temperature limits Bar, upper and lower limits of rotation speed Rule, rate of change constraint of manipulated variable (Item). The OSQP quadratic programming solver is employed to support warm-start (using the solution from the previous cycle as an initial guess) to accelerate convergence, with a typical solution time of less than 10ms. After solving, only the first step of the optimal sequence is executed. and (Rolling time domain principle). If the quadratic programming problem is infeasible (no feasible solution that satisfies all constraints), then a degradation strategy is employed, i.e., the oversaturation upper limit constraint is relaxed. Alternatively, freeze the manipulated variable to keep its current value unchanged.

[0075] The temperature setting was then updated to The stirring speed setting has been updated to... Perform a security check on the set values ​​before execution: The temperature must not be lower than the freezing point of the reaction solution by 45°C and must not be higher than the maximum allowable operating temperature of the equipment by 120°C. The rotational speed must not be lower than the minimum speed required to maintain solid suspension (80 rpm) and must not exceed the upper limit of the crystallization process constraint (250 rpm). If the output of the model predictive controller causes the setpoint to exceed the limit, the setpoint will be truncated to the nearest boundary value.

[0076] The energy balance for temperature control is as follows: the heat capacity of the reactor is... The density of the reaction liquid kg / m 3 volume m 3 Specific heat capacity kJ / (kg·℃), then kJ / ℃.

[0077] For example, the amount of heat required to lower the temperature by 0.12°C kJ. At a jacket cooling water flow rate of approximately 10m³ / h. 3 Under conditions of / h and an inlet-outlet temperature difference of about 5℃, the heat exchange power of the cooling water is about 58kW, and it takes about 31s to remove 1800kJ of heat. Therefore, the underlying PID loop has sufficient time to complete the temperature fine-tuning within one control cycle (180s).

[0078] It should be noted that temperature control is achieved through an incremental PID loop: In the formula, For temperature deviation, % / ℃ represents the proportional gain. s is the integration time constant. s is the differential time constant. s is the PID sampling period. Proportional gain. % / ℃ indicates that the valve opening changes by approximately 2% when the temperature deviation is 1℃. This value avoids temperature oscillations caused by excessive gain. Integral time s is set to approximately twice the thermal inertia time constant of the reactor to ensure no steady-state error. Differential time. s provides advance quantity to compensate for the delay in heat transfer of cooling water from the jacket inlet to the vessel interior. The speed is much faster than the 180s control cycle of the model predictive controller, ensuring that the lower-level loop can accurately track changes in the upper-level setpoint.

[0079] The temperature actuator is an electrically operated regulating valve installed on the jacket cooling water pipeline. The valve opening is limited to the range of 0% to 100%, and the rate of change is limited to no more than 5% per second to prevent water hammer caused by rapid valve action. The stirring speed is controlled by a frequency converter, with a frequency setpoint. The frequency resolution of the inverter is 0.01 Hz (based on the synchronous speed relationship of a 4-pole motor), which corresponds to a speed resolution of approximately 0.29 rpm.

[0080] For example, under green conditions, the current operating temperature is 85°C, the rotation speed is 200 rpm, and the space-average corrosion current density is 0.173 mA / cm². 2 At that time, the adjustment amount of the first process parameter output by the model predictive controller optimization solution is: ℃ The controller recommends a slight temperature reduction of 0.12°C to mitigate the accelerated corrosion caused by the Arrhenius thermal activation effect, while simultaneously increasing the stirring speed by 2.3 rpm to thin the acidic residue layer at the interface. The adjustments are minimal, consistent with the near-non-intervention strategy of green mode.

[0081] Next, the adjusted supersaturation constraint was verified: adjusted temperature ℃ K. Solubility is calculated using the van't Hoff formula: .in , , mol / L.

[0082] For example, when the operating condition is in an oversaturated state mol / L, supersaturation The product quality constraints are met. Conversely, when... At mol / L (undersaturated state), The supersaturation constraint will limit the model predictive controller from further cooling (because cooling will decrease solubility and increase supersaturation), thereby preventing the crystallization process from deviating from the normal range.

[0083] In another implementation, a nonlinear model predictive control method can be used to directly solve the nonlinear model. In yet another implementation, if an anchor-type agitator is used... It needs to be recalibrated based on the agitator geometry parameters, but this is not specified here.

[0084] S600: Obtain the adjusted actual corrosion state parameters, calculate the deviation between the actual corrosion state parameters and the predicted value of the model prediction controller, and update the prediction model parameters of the model prediction controller when the deviation exceeds the preset tolerance zone for multiple consecutive control cycles.

[0085] After each control cycle, the adjusted actual corrosion state parameters are obtained. (Obtained from step S200 inversion), compared with the model predictive controller's prediction of the current time in the previous cycle. Compare them. The prediction bias is... .when continuous One control cycle exceeds the tolerance zone mA / cm 2 At this point, a systematic deviation is determined between the prediction model and the actual operating conditions, triggering a model parameter update. Tolerance zone. mA / cm 2 The value is based on the fact that it is approximately equal to the corrosion current density under normal operating conditions (0.1 to 0.3 mA / cm²). 2 The accuracy ranges from 20% to 50%, enabling the differentiation between random deviations caused by measurement noise and systematic deviations caused by changes in operating conditions. The continuous three-step triggering condition avoids false triggering caused by a single abnormal measurement.

[0086] The update process employs a recursive least squares algorithm with a forgetting factor: In the formula, For the gain vector, Let covariance matrix be the variance matrix. The regression vector consists of the current state and the manipulated variables: The three components correspond to the regression factors of the temperature activation term, shear mass transfer term, and relaxation regression term in the corrosion kinetic equation, respectively, and are the model parameter vectors to be identified. That is, the coefficients before the three terms. For observation purposes. Forgetting factor, Typically in the range of 0.95 to 0.99, here The corresponding equivalent data window length is approximately One control cycle, i.e. s The window length is sufficient to cover the typical transition time (approximately 1 to 2 hours) of a single batch feed of lithium hexafluorophosphate reaction solution, while also being long enough to filter out random noise from impedance measurements. Initial covariance matrix. Larger initial values ​​give the algorithm strong learning ability in the early stages. Parameter update increments are limited to no more than 20% of the current parameter value per update to prevent drastic parameter changes due to outlier data. When the trace of the covariance matrix... Decay to below When the gain approaches zero and the algorithm loses its learning ability, it should be reset. To restore adaptability.

[0087] The model health index uses an exponentially weighted moving average method to continuously track prediction accuracy. In the formula, For smoothing coefficients, To normalize prediction bias, This represents the upper limit of the normalization bias. The value ranges from 0 to 1, with values ​​closer to 1 indicating higher model prediction accuracy. It should be noted that when... If the value remains below 0.8 for more than 50 control cycles (approximately 2.5 hours), the operator should be alerted that the predictive model may need to be recalibrated offline. This usually occurs when there is a fundamental change in operating conditions (such as changing the reaction liquid system or changing the impeller type) rather than a gradual drift.

[0088] For example, when the predicted value mA / cm 2 Actual value mA / cm 2 At that time, deviation mA / cm 2 , If the tolerance zone is not exceeded, parameter updates will not be triggered. The model is in good condition.

[0089] For example, when the feeding operation increases the HF concentration in the reaction solution from 12% to 15%, the corrosion rate increases accordingly. The predicted and actual values ​​for three consecutive control cycles are compared as follows: No. cycle , mA / cm 2 ,deviation ; No. cycle , mA / cm 2 ,deviation ; No. cycle , mA / cm 2 ,deviation .

[0090] Three consecutive steps exceeding the tolerance trigger a parameter update. The recursive least squares algorithm then updates the reference corrosion current density in the corrosion kinetic model. From 0.15 mA / cm 2Updated to 0.18 mA / cm 2 (The 20% increase, exactly reaching the upper limit of the single update range,) reflects the new equilibrium state following the increase in corrosive species concentration. The updated model predictive controller will be based on the new... The higher predicted corrosion trajectory allows for more aggressive adjustment of process parameters to suppress corrosion acceleration. After the update, the model health index recovered to above 0.9 within 3 to 5 control cycles.

[0091] Updated model parameters The predictive model fed back to the model predictive controller is used for optimization in the next control cycle, thus forming a complete adaptive closed loop. The entire closed-loop control cycle is 180s, and within each cycle, impedance spectrum acquisition (120s), equivalent circuit inversion (less than 100ms), situation assessment (less than 10ms), model predictive control optimization (less than 10ms), and actuator action (tracked by PID control in the next cycle) are completed sequentially. In another implementation, an extended Kalman filter can also be used to simultaneously estimate the state and parameters.

[0092] Reference Figure 3 This application also provides an adaptive corrosion control system for chemical process equipment, the system comprising: The impedance spectrum acquisition module is used to inject excitation signals into the reaction liquid and acquire electrochemical impedance spectroscopy data through a miniature impedance probe array set on the inner wall of the chemical reaction equipment. The module includes a signal generator, a multiplexer, a front-end conditioning circuit and a frequency domain demodulation engine. The signal generator includes a direct digital synthesis chip for generating multi-frequency superimposed signals, and the frequency domain demodulation engine includes a microcontroller for performing fast Fourier transform and coherence function calculation. The corrosion state inversion module is used to perform parameter fitting on the electrochemical impedance spectroscopy data based on the equivalent circuit model to obtain the polarization resistance (i.e., the first corrosion state parameter), and to determine the corrosion current density (i.e., the first corrosion current density) based on the polarization resistance and the adaptively determined conversion coefficient. This module is deployed in the edge computing unit, which uses an ARM Cortex-A72 processor with a main frequency of 1.8 GHz and 2 GB of running memory to meet the calculation requirements of real-time Levenberg-Marquardt fitting. An adaptive control module is used to take corrosion current density as the controlled variable and crystallization supersaturation constraint as the hard constraint. It obtains the process parameter adjustment amount (i.e., the first process parameter adjustment amount) through optimization solution by model predictive controller, and adjusts the process parameters of the chemical reaction equipment according to the first process parameter adjustment amount. This module runs in an industrial control computer with an Intel Core i5 processor and 8GB of RAM, and includes a model linearization engine and an OSQP quadratic programming solver.

[0093] The system also includes a situation assessment module, an execution mechanism module, and an online correction module.

[0094] The situation assessment module is used to calculate the local corrosion factor based on the spatial distribution of corrosion current density from multiple probes, calculate the corrosion acceleration based on the time variation trend, and determine the early warning level to dynamically adjust the weight of the model prediction controller.

[0095] The actuator module includes an electric regulating valve installed on the jacket cooling water pipeline and a frequency converter that drives the stirring motor, which is used to achieve fine adjustment of temperature and stirring speed through the underlying PID control loop and frequency setting.

[0096] The online correction module compares the deviation between the predicted value of the model prediction controller and the actual inversion value. When the deviation continuously exceeds the tolerance band, the prediction model parameters are updated online using a recursive least squares algorithm with a forgetting factor.

[0097] The frame format and communication cycle of each data interface are as follows: The data frame sent from the impedance spectrum acquisition module to the inversion module includes the probe number, timestamp, complex impedance data at 30 frequency points (both real and imaginary parts are double-precision floating-point numbers), and data quality flag. Each frame contains approximately 500 bytes of data, sent immediately after each probe completes a measurement, with a communication cycle of approximately 30 seconds. The state vector frame sent from the inversion module to the adaptive control module includes the polarization resistance, corrosion current density, dispersion index, fitting residual, and valid flag for each probe. It contains approximately 100 bytes of data, with a communication cycle of 180 seconds (synchronized with the control cycle). The control command frame sent from the adaptive control module to the actuator module includes the temperature setpoint, stirring speed setpoint, and emergency stop flag. It contains approximately 20 bytes of data, with a communication cycle of 180 seconds.

[0098] The system's fault tolerance mechanism includes the following aspects: At the communication level, data transmission between modules adopts a timeout retransmission strategy. If no response frame is received within the preset timeout period (3s), it will be automatically retransmitted. If three consecutive retransmissions fail, a communication fault alarm will be triggered and the output of the corresponding module will be frozen to the most recent valid value.

[0099] At the hardware level, the four probes in the impedance probe array form a redundant configuration. Even if two probes fail simultaneously, the system can still continue to operate using the remaining two effective probes (number of effective probes). (This represents the minimum operating conditions for the system). At the control level, when the adaptive control module itself malfunctions, the actuator module automatically switches to local PID mode (directly controlling valve opening based on temperature deviation) to ensure the reactor temperature remains within a safe range.

[0100] Once the system recovers from the fault state, the model predictive controller restarts with the current operating condition as the initial state. During the first three control cycles, the rate of change of the manipulated variable is limited to 50% of the normal value, achieving a disturbance-free switching.

[0101] Example 2 The difference between this embodiment and embodiment 1 is that in S300 and S400, the continuous three-level early warning weight adjustment is replaced by a variable structure control strategy based on the spatial partitioning of corrosion state, and different control modes and control cycles are switched according to the region where the corrosion state is located.

[0102] This embodiment still uses the Hastelloy C-276 stirred reactor in the lithium hexafluorophosphate production equipment as an example. The S000 calibration steps, the S100 online impedance spectrum acquisition steps, and the S200 equivalent circuit model inversion steps are the same as in Embodiment 1.

[0103] The controller structure in Example 1 (control cycle 180s, prediction time domain) (Dual manipulated variable joint solution) remains unchanged under all warning levels. In the green normal state, MPC still runs the complete optimization solution with a 180s cycle, outputting an increment close to zero, and computing resources are idle. In the red emergency state, the 180s control cycle is too long. The equivalent time constant of the stirring channel is about 10s. Waiting 180s after a sudden increase in corrosion before executing the control action will cause a response lag.

[0104] This embodiment uses the space-average corrosion current density. and localized corrosion factors Using the coordinate axes, the two-dimensional corrosion state space is divided into four regions.

[0105] The first area is the safe zone. mA / cm² and ).

[0106] Instead of initiating MPC optimization here, an event-triggered monitoring mode is used. The system still acquires impedance spectra and inverts the corrosion state every 180 seconds, recording the data only in the operation log. When the change in corrosion state exceeds the dead zone threshold... MPC is only triggered once per mA / cm², significantly reducing the computational load.

[0107] The second area is the prevention zone ( mA / cm² or ).

[0108] Here, the MPC runs on a 180s cycle, but the manipulated variable is simplified to only the stirring speed. The temperature remains constant at the freeze point. At the corrosion level in the prevention zone, stirring (fast path) is sufficient to suppress corrosion, eliminating the need for temperature control (slow path). The number of decision variables is reduced from 6 to 3, decreasing the solution size. The weights are... , .

[0109] The third region is the inhibition zone ( mA / cm² or ).

[0110] The MPC is exactly the same as in Example 1: a 180s control cycle, with temperature and stirring as dual manipulated variables solved jointly. Weights are based on... and The location within the region is determined by linear interpolation.

[0111] The fourth zone is the emergency zone. mA / cm² or ).

[0112] Three emergency measures were taken: First, the control cycle of the stirring channel was shortened from 180s to 60s, and inversion and decision-making were performed only on the probe that had most recently completed measurement, sacrificing spatial resolution for response speed. Second, a feedforward compensation term was superimposed on the MPC feedback control quantity. ,in rpm / (mA·cm ·s This allows the stirring speed to provide advance compensation at the instant of corrosion acceleration. The actual stirring increment... Third, it sends alarm requests to the distributed control system.

[0113] Meanwhile, a hysteresis band is set at the region boundary to prevent frequent switching: the threshold for entering a more severe region is the value defined above, the exit threshold is 15% lower than the entry threshold, and switching is only performed if the conditions are consistent for two consecutive control cycles. Simultaneously, in step S600, model updates are paused within the safe zone, and the tolerance band within the emergency zone is widened to 0.08 mA / cm².

[0114] For example, under normal operating conditions ( mA / cm² The system is in a safe zone, collecting data and performing inversion every 180 seconds but not executing MPC. When a feeding operation causes... When the speed reaches 0.12 mA / cm², switch to the prevention zone; MPC activates to adjust only the stirring speed and output. rpm. After approximately 15 control cycles. The voltage dropped to 0.083 mA / cm², below the fallback threshold of 0.085 mA / cm², and the system returned to the safe zone. When probe #2 detected a sudden localized corrosion outbreak... When the speed reaches mA / cm², the system switches to the emergency zone, the stirring control cycle is shortened to 60s, the feedforward compensation term is superimposed on the MPC output, and an alarm is sent to the DCS.

[0115] In another implementation, the state space partitioning can also be extended to three dimensions to increase corrosion acceleration. As a third coordinate axis. In another embodiment, the region boundary threshold can also be adaptively adjusted according to the equipment operating time and wall thickness allowance, which is not limited here.

[0116] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0117] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware.

[0118] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An adaptive method for corrosion control of chemical process equipment, characterized in that, include: An excitation signal is injected into the reaction liquid inside the chemical reaction equipment, and the electrochemical impedance spectroscopy data of the reaction liquid are collected. The electrochemical impedance spectroscopy data are subjected to parameter fitting based on the first model to obtain the first corrosion state parameters; The first corrosion current density is determined based on the first corrosion state parameters; The first corrosion current density is input as the controlled variable into the model predictive controller, and the first process parameter adjustment amount is obtained by optimizing the solution based on the preset product quality constraints. The process parameters of the chemical reaction equipment are adjusted according to the first process parameter adjustment amount.

2. The method according to claim 1, characterized in that, Injecting an excitation signal into the reaction liquid within the chemical reaction equipment and collecting electrochemical impedance spectroscopy data of the reaction liquid includes: The excitation signal is injected sequentially into each impedance probe; wherein, the excitation signal is a multi-frequency superimposed signal, and the multi-frequency superimposed signal includes several frequency components distributed logarithmically and equally; The current response signals of each impedance probe are demodulated in the frequency domain to obtain the electrochemical impedance spectral data at the corresponding position of each impedance probe.

3. The method according to claim 1, characterized in that, The first model includes constant phase angle elements and diffusion impedance elements; the parameter fitting process of the electrochemical impedance spectroscopy data based on the first model includes: The real and imaginary parts of the electrochemical impedance spectroscopy data are simultaneously fitted on the complex plane to obtain the solution resistance, the parameters of the constant phase angle element, and the charge transfer resistance.

4. The method according to claim 3, characterized in that, Determining the first corrosion current density based on the first corrosion state parameter includes: The first corrosion state parameter is determined based on the coefficients of the charge transfer resistance and the diffusion impedance element; The conversion coefficient is determined based on the dispersion index of the constant phase angle element; The first corrosion current density is determined based on the conversion coefficient and the first corrosion state parameter.

5. The method according to claim 1, characterized in that, The prediction model of the model prediction controller includes: The second model is used to predict the evolution trend of the first corrosion current density based on the reaction temperature and stirring shear rate. The third model is used to determine the thickness of the interfacial retention layer based on the stirring shear rate.

6. The method according to claim 1, characterized in that, Before injecting the excitation signal into the reaction liquid within the chemical reaction equipment, the method further includes: A full-band frequency sweep of the impedance probe is performed in a medium of known composition to obtain baseline impedance spectrum data; The baseline impedance spectrum data is subjected to nonlinear fitting to obtain the baseline parameters of each impedance probe, which are used as the initial values ​​for parameter fitting during online operation.

7. The method according to claim 1, characterized in that, After fitting the electrochemical impedance spectroscopy data to the parameters based on the first model and before inputting the first corrosion current density as the controlled variable into the model prediction controller, the method further includes: Based on the spatial distribution of the first corrosion current density, the local corrosion factor is determined; The warning level is determined based on the time variation trend of the local corrosion factor and the first corrosion current density; The objective function weights of the model prediction controller are dynamically adjusted based on the warning level.

8. The method according to claim 1, characterized in that, After adjusting the process parameters of the chemical reaction equipment according to the first process parameter adjustment amount, the method further includes: Obtain the adjusted actual corrosion state parameters, and calculate the deviation between the actual corrosion state parameters and the predicted values ​​of the model prediction controller; When the deviation exceeds the preset tolerance band for multiple consecutive control cycles, the prediction model parameters of the model prediction controller are updated.

9. An adaptive corrosion control system for chemical process equipment, characterized in that, The impedance spectroscopy acquisition module is used to inject an excitation signal into the reaction liquid in the chemical reaction equipment and acquire the electrochemical impedance spectroscopy data of the reaction liquid. The corrosion state inversion module is used to perform parameter fitting processing on the electrochemical impedance spectroscopy data based on the first model to obtain the first corrosion state parameters; and to determine the first corrosion current density based on the first corrosion state parameters. An adaptive control module is used to input the first corrosion current density as a controlled variable into the model predictive controller, and optimize the solution to obtain the first process parameter adjustment amount based on the preset product quality constraints. The process parameters of the chemical reaction equipment are adjusted according to the first process parameter adjustment amount.

10. The system according to claim 9, characterized in that, Injecting an excitation signal into the reaction liquid within the chemical reaction equipment and collecting electrochemical impedance spectroscopy data of the reaction liquid includes: The excitation signal is injected sequentially into each impedance probe; wherein, the excitation signal is a multi-frequency superimposed signal, and the multi-frequency superimposed signal includes several frequency components distributed logarithmically and equally; The current response signals of each impedance probe are demodulated in the frequency domain to obtain the electrochemical impedance spectral data at the corresponding position of each impedance probe.