Real-time monitoring and early warning method and system for alkali concentration in textile industry

CN122567570APending Publication Date: 2026-08-14YADONG (CHANGZHOU) SCI&TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-26
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0003]现有的离线化学滴定法虽然准确性相对较高,但存在显著的滞后性——从取样、滴定到得出结果通常需要数分钟乃至更长时间,期间碱液浓度可能因工艺消耗或补充而剧烈波动,无法满足实时反馈控制的需求

Benefits of technology

[0017]采用在线光谱实时监测与闭环控制相结合的模式,使碱液浓度得以连续动态跟踪,彻底消除传统离线取样检测的时间滞后。基于氢氧根特征吸收峰位识别及峰面积积分运算,有效排除纺织加工中其他组分的光谱干扰,检测精度高、重复性好,为后续精准调节提供可靠数据基础。整个监测过程非接触、无污染,适应高温、高碱等恶劣工况,保障系统长期稳定运行。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122567570A_ABST
    Figure CN122567570A_ABST
Patent Text Reader

Abstract

This invention relates to the field of textile industry technology, and in particular to a method and system for real-time monitoring and early warning of alkali concentration in textile industry. By acquiring the transmission spectrum of alkali solution online, identifying the characteristic absorption peak of hydroxide ions and calculating the peak area, the concentration detection value is obtained based on quantitative conversion, and the deviation value is compared with the target concentration. Based on this, an adjustment signal is generated to drive the dosing device, forming a closed-loop control. This method realizes real-time accurate monitoring and automatic adjustment of alkali concentration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of textile industry technology, and in particular to a method and system for real-time monitoring and early warning of alkali concentration in textile industry. Background Technology

[0002] In the alkali treatment process of the textile industry, the stable control of alkali concentration directly affects the quality of processes such as fiber mercerizing and desizing. Currently, conventional methods for monitoring alkali concentration mainly rely on offline sampling and analysis, such as determining the sodium hydroxide content in the alkali solution through chemical titration. Operators need to periodically sample the alkali tank and calculate the concentration using the acid-base titration principle, with phenolphthalein or methyl orange as indicators, based on the consumption of standard acid solution. In addition, the conductivity method is also used to a limited extent for online monitoring, indirectly reflecting the concentration by measuring the conductivity of the alkali solution, as there is a positive correlation between the ion concentration and conductivity in the alkali solution. The refractive index method is based on the physical property that the refractive index of the alkali solution changes with concentration, and uses a refractometer for real-time or semi-real-time detection.

[0003] While existing offline chemical titration methods offer relatively high accuracy, they suffer from significant lag—the process from sampling and titration to obtaining results typically takes several minutes or even longer. During this time, the alkali concentration may fluctuate dramatically due to process consumption or replenishment, failing to meet the requirements for real-time feedback control. This lag often results in concentration adjustment lagging behind process changes, leading to unstable fabric treatment effects, such as uneven mercerizing and localized excessive damage.

[0004] Although the conductivity method can achieve continuous online monitoring, its measurement results are easily affected by temperature fluctuations, other soluble impurities (such as additives and salts), and suspended matter. When fiber debris or impurities introduced from previous processes are mixed into the alkali circulation system, the correlation between the conductivity signal and the actual hydroxide ion concentration will be significantly degraded, resulting in a decrease in detection accuracy.

[0005] Similarly, the refractive index method is sensitive to bubbles, suspended particles, and temperature changes, and cannot distinguish the contributions of different solutes in the alkaline solution, resulting in insufficient reliability under complex operating conditions. Due to the lack of specific detection methods for the characteristic absorption of hydroxide ions, existing methods struggle to provide accurate and stable real-time concentration data for closed-loop control in dynamically changing process environments. Summary of the Invention

[0006] This invention provides a method and system for real-time monitoring and early warning of alkali concentration in the textile industry, which can solve the problems in the prior art.

[0007] A first aspect of the present invention provides a method for real-time monitoring and early warning of alkali concentration in textile industry, comprising: The transmission spectrum signal of the alkaline solution to be tested, which is in a circulating state in the alkaline solution tank during the textile processing, is collected online at a preset sampling period. The peak position of the collected transmission spectrum signal is identified, and at least one target peak position corresponding to the characteristic absorption peak of hydroxide ions in the alkaline solution is located from the spectrum. The peak area integral of the spectral absorbance at each target peak position is calculated to obtain the spectral peak area integral value corresponding to each target peak position. Based on the pre-defined quantitative conversion relationship between the spectral peak area integral value and the alkali concentration, the alkali concentration detection value is calculated by comprehensively calculating the spectral peak area integral value corresponding to each target peak position; The concentration deviation value is calculated by comparing the detected value of the alkali solution concentration with the preset target concentration value. The concentration deviation value is input into the regulating controller, which processes the concentration deviation value according to the preset regulating strategy and generates a concentration regulating control signal that includes the regulating direction and regulating amount. Based on the concentration adjustment control signal, the alkali solution dosing device is driven to quantitatively inject alkali solution or diluent into the alkali solution tank. After the injection is completed, a preset stabilization time is waited before returning to the step of collecting the transmission spectrum signal of the alkali solution to be tested, forming a closed-loop detection and control cycle until the concentration deviation value falls within the preset allowable deviation range.

[0008] The acquired transmission spectrum signal is subjected to spectral peak position identification to locate at least one target peak position corresponding to the characteristic absorption peak of hydroxide ions in the alkaline solution, including: Based on the known characteristic absorption wavelength positions of hydroxide ions in alkaline solution, a preset characteristic absorption wavelength range of hydroxide ions in alkaline solution is defined. Within the defined characteristic absorption wavelength range, the absorbance of the collected transmission spectrum signal is scanned point by point along the wavelength increasing direction. During point-by-point scanning, the absorbance value of the current scanning point is compared with the absorbance values ​​of its two adjacent scanning points. If the absorbance value of the current scanning point is greater than the absorbance values ​​of both its two adjacent scanning points and its two adjacent scanning points, and the absorbance value of the current scanning point exceeds the preset absorbance threshold, then the current scanning point is identified as a local maximum point. All identified local maxima points are aggregated to form a candidate peak set; For each candidate peak in the candidate peak set, extend along the wavelength direction from the candidate peak as the center to both sides until the absorbance drops back to half the absorbance value of the candidate peak. Record the wavelength of the left half peak and the wavelength of the right half peak. Calculate the ratio of the width of the left half peak to the width of the right half peak as the peak shape symmetry index. Candidate peaks whose peak shape symmetry index falls within the preset peak shape symmetry tolerance range are identified as target peaks corresponding to the characteristic absorption peaks of hydroxide ions in alkaline solutions, while candidate peaks whose peak shape symmetry index does not fall within the preset peak shape symmetry tolerance range are eliminated.

[0009] The peak area integral is calculated for the spectral absorbance at each target peak position to obtain the spectral peak area integral value corresponding to each target peak position, including: For each target peak position determined, the wavelength direction is gradually extended to both sides with the target peak position as the center. During each extension step, the spectral absorbance value at the corresponding wavelength position is continuously monitored. The wavelength positions corresponding to the gradual decay of the spectral absorbance from the peak level of the target peak position and the drop back to the preset baseline absorbance level are determined as the left and right boundary wavelengths of the integration interval of the target peak position. The preset baseline absorbance level is preset based on the spectral absorbance reference value of pure solvent under the condition of no alkali in the alkali tank. Within the integration interval bounded by the left and right boundary wavelengths, the spectral absorbance of the target peak is sampled at equal intervals with a preset wavelength step size. Starting from the left boundary wavelength, the samples are collected point by point until the right boundary wavelength, resulting in an absorbance sampling sequence consisting of multiple sampling points, where each sampling point contains the spectral absorbance value corresponding to the wavelength position. The trapezoidal numerical integration method is used to calculate the area of ​​the trapezoidal segment by multiplying the average absorbance of each pair of adjacent sampling points in the integration interval by the wavelength interval between the adjacent sampling points. The areas of each trapezoidal segment are then summed up segment by segment in the integration interval to calculate the spectral peak area integral value corresponding to the target peak position.

[0010] Based on the pre-defined quantitative conversion relationship between the spectral peak area integral value and the alkali concentration, the alkali concentration detection value is calculated by comprehensively considering the spectral peak area integral values ​​corresponding to each target peak position, including: Based on the mapping function represented by the pre-calibrated quantitative conversion relationship, the spectral peak area integral value of each target peak position is read and recorded one by one. The spectral peak area integral value corresponding to each target peak position is used as the input variable of the mapping function. After the mapping function calculates one by one, the intermediate calculated value of the alkali concentration corresponding to each target peak position is output and the intermediate calculated value of each alkali concentration is temporarily stored. Obtain the concentration conversion weight coefficients predetermined for each target peak position during the quantitative conversion relationship calibration process. The concentration conversion weight coefficients of each target peak position are negatively correlated with the concentration conversion deviation dispersion of the target peak position for each standard alkaline sample during the calibration process, and the sum of the concentration conversion weight coefficients of all target peak positions is the normalized value. Using the concentration conversion weighting coefficient corresponding to each target peak as a weighting factor, a weighted average is calculated on the intermediate calculated values ​​of the alkali concentration corresponding to each target peak. The product of each intermediate calculated value of the alkali concentration and its corresponding concentration conversion weighting coefficient is accumulated item by item, and the accumulated result is divided by the sum of the concentration conversion weighting coefficients. The resulting weighted average is output as the final detected value of the alkali concentration.

[0011] The concentration conversion weighting coefficient for each target peak is negatively correlated with the concentration conversion deviation dispersion exhibited by that target peak during the calibration process, including: During the calibration of the quantitative conversion relationship, for each target peak position, the spectral peak area integral value obtained from each standard alkaline sample during the calibration stage is substituted into the mapping function represented by the quantitative conversion relationship for conversion. The individual concentration conversion result value of the target peak position for each standard alkaline sample is obtained. Each individual concentration conversion result value is compared with the known concentration value of the corresponding standard alkaline sample one by one, and the deviation value generated by each concentration conversion is recorded to form a set of deviation value records corresponding to the target peak position. Calculate the root mean square value of the concentration conversion deviation recorded for each target peak position, and use the calculated root mean square value as the concentration conversion deviation dispersion index corresponding to the target peak position. The magnitude of the deviation dispersion index characterizes the stability of the target peak position in the concentration conversion process. The reciprocal of the concentration conversion deviation dispersion index corresponding to each target peak position is taken to obtain the reciprocal value of the dispersion corresponding to each target peak position. The reciprocal values ​​of the dispersion corresponding to all target peak positions are normalized. The results obtained after normalization are used as the concentration conversion weight coefficients corresponding to each target peak position, so that the sum of the concentration conversion weight coefficients of each target peak position is equal to the normalized benchmark value.

[0012] The concentration deviation value is input to the regulating controller, which processes the concentration deviation value according to a preset regulating strategy to generate a concentration regulating control signal that includes the regulating direction and regulating amount, including: The absolute value of the concentration deviation is compared with the preset multi-level deviation thresholds step by step to determine the current deviation level of the absolute value of the concentration deviation. The multi-level deviation thresholds are set to at least three progressive levels of deviation threshold limits in order of increasing absolute value of concentration deviation. Each time the absolute value of the concentration deviation crosses a deviation threshold limit, it enters the next higher deviation level. The adjustment direction is determined based on the sign of the concentration deviation value. When the concentration deviation value is positive, it is determined that the concentration of alkali solution is higher than the target concentration and the adjustment direction is to add diluent. When the concentration deviation value is negative, it is determined that the concentration of alkali solution is lower than the target concentration and the adjustment direction is to add alkali solution. Based on the determined deviation level, the pre-calibrated adjustment parameter corresponding to the deviation level is retrieved from the preset adjustment parameter table. The preset adjustment parameter table stores the mapping relationship between each deviation level and the corresponding pre-calibrated adjustment parameter. The pre-calibrated adjustment parameter is pre-calibrated through the quantitative comparison relationship between the total amount of alkali in the alkali tank and the unit injection amount. The determined adjustment direction identifier is combined with the retrieved pre-calibrated adjustment parameters to form a concentration adjustment control signal that simultaneously contains the adjustment direction command and the adjustment value, and is output to the execution control port of the alkali dosing device.

[0013] Based on the concentration adjustment control signal, the alkali solution dosing device is driven to quantitatively inject alkali solution or diluent into the alkali solution tank. After injection, a preset stabilization time is waited before returning to the step of collecting the transmission spectrum signal of the alkali solution to be tested, forming a closed-loop detection and control cycle until the concentration deviation value falls within the preset allowable deviation range, including: After the alkali solution dosing device completes the quantitative injection operation, the stabilization waiting timer is started. After the stabilization waiting timer reaches the preset stabilization time, the transmission spectrum signal of the alkali solution to be tested in the alkali solution tank is collected again at the preset sampling cycle. The peak position identification, peak area integration calculation and concentration conversion are performed on the re-collected transmission spectrum signal in sequence to obtain the updated alkali solution concentration detection value. The updated alkaline solution concentration detection value is compared with the preset target concentration value again to calculate the updated concentration deviation value. The absolute value of the updated concentration deviation is compared with the upper limit of the preset allowable deviation range. If the absolute value of the updated concentration deviation is less than or equal to the upper limit of the preset allowable deviation range, the alkali concentration is determined to have met the standard, and the current closed-loop detection and control cycle is terminated. If the absolute value of the updated concentration deviation is greater than the upper limit of the preset allowable deviation range, a new concentration adjustment control signal is generated based on the updated concentration deviation, and the alkali dosing device is driven to perform the next quantitative injection operation. After waiting for the preset stabilization time, the spectral signal is re-acquired for the next round of concentration standard determination, forming a continuous closed-loop iteration until the absolute value of the concentration deviation falls within the preset allowable deviation range.

[0014] A second aspect of the present invention provides a real-time monitoring and early warning system for alkali concentration in the textile industry, comprising: The spectral detection unit is used to collect the transmission spectrum signal of the alkaline solution to be tested in the cyclic flow state in the alkaline solution tank during the textile processing process online at a preset sampling period. The unit identifies the spectral peak position of the collected transmission spectrum signal, locates at least one target peak position corresponding to the characteristic absorption peak of hydroxide ions in the alkaline solution from the spectrum, and performs peak area integration calculation on the spectral absorbance at each target peak position to obtain the spectral peak area integration value corresponding to each target peak position. The concentration calculation unit is used to calculate the alkaline concentration detection value by comprehensively calculating the spectral peak area integral value corresponding to each target peak position based on the pre-calibrated quantitative conversion relationship between the spectral peak area integral value and the alkaline concentration. The deviation calculation unit is used to compare the detected value of alkali concentration with the preset target concentration value and calculate the concentration deviation value. The control generation unit is used to input the concentration deviation value into the regulating controller, which processes the concentration deviation value according to the preset regulating strategy and generates a concentration regulating control signal containing the regulating direction and regulating amount. The closed-loop control unit is used to drive the alkali dosing device to quantitatively inject alkali or diluent into the alkali tank according to the concentration control signal. After the injection is completed, it waits for a preset stabilization time before returning to the step of collecting the transmission spectrum signal of the alkali to be tested, forming a closed-loop detection and control cycle until the concentration deviation value falls within the preset allowable deviation range.

[0015] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0016] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0017] This system employs a combination of online real-time spectral monitoring and closed-loop control, enabling continuous dynamic tracking of alkali concentration and completely eliminating the time lag of traditional offline sampling and detection. Based on the identification of the characteristic absorption peak position of hydroxide ions and peak area integration calculation, it effectively eliminates spectral interference from other components in textile processing, achieving high detection accuracy and good repeatability, providing a reliable data foundation for subsequent precise adjustments. The entire monitoring process is non-contact and pollution-free, adaptable to harsh operating conditions such as high temperature and high alkali, ensuring long-term stable operation of the system.

[0018] Based on the concentration deviation, the system automatically generates the adjustment direction and amount, driving the quantitative addition of alkali or diluent to achieve rapid correction of the concentration in the alkali tank. After injection, a stabilization period is set before returning to the detection, forming a closed-loop feedback control cycle until the deviation falls within the allowable range. This process requires no manual intervention, significantly reducing the workload of operators and avoiding concentration fluctuations caused by human error, ensuring that the alkali concentration is always within the optimal range required by the process.

[0019] By consistently stabilizing the concentration deviation within a preset range, the system significantly improves the consistency of processing effects in textile manufacturing processes such as desizing and scouring, reducing fabric damage or uneven processing caused by abnormal concentrations. Precise alkali dosing control also effectively reduces excessive alkali consumption, saving raw material and wastewater treatment costs. The overall system offers rapid response and easy maintenance, providing the textile industry with an efficient and intelligent alkali concentration control solution, facilitating automation and lean production processes. Attached Figure Description

[0020] Figure 1 A flowchart illustrating a method for real-time monitoring and early warning of alkali concentration in the textile industry; Figure 2 A flowchart illustrating the process for determining the concentration of alkali solution. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0023] Figure 1 This is a schematic flowchart of a method for real-time monitoring and early warning of alkali concentration in the textile industry, according to an embodiment of the present invention. The method includes: The transmission spectrum signal of the alkaline solution to be tested, which is in a circulating state in the alkaline solution tank during the textile processing, is collected online at a preset sampling period. The peak position of the collected transmission spectrum signal is identified, and at least one target peak position corresponding to the characteristic absorption peak of hydroxide ions in the alkaline solution is located from the spectrum. The peak area integral of the spectral absorbance at each target peak position is calculated to obtain the spectral peak area integral value corresponding to each target peak position. Based on the pre-defined quantitative conversion relationship between the spectral peak area integral value and the alkali concentration, the alkali concentration detection value is calculated by comprehensively calculating the spectral peak area integral value corresponding to each target peak position; The concentration deviation value is calculated by comparing the detected value of the alkali solution concentration with the preset target concentration value. The concentration deviation value is input into the regulating controller, which processes the concentration deviation value according to the preset regulating strategy and generates a concentration regulating control signal that includes the regulating direction and regulating amount. Based on the concentration adjustment control signal, the alkali solution dosing device is driven to quantitatively inject alkali solution or diluent into the alkali solution tank. After the injection is completed, a preset stabilization time is waited before returning to the step of collecting the transmission spectrum signal of the alkali solution to be tested, forming a closed-loop detection and control cycle until the concentration deviation value falls within the preset allowable deviation range.

[0024] The acquired transmission spectrum signal is subjected to spectral peak position identification to locate at least one target peak position corresponding to the characteristic absorption peak of hydroxide ions in the alkaline solution, including: Based on the known characteristic absorption wavelength positions of hydroxide ions in alkaline solution, a preset characteristic absorption wavelength range of hydroxide ions in alkaline solution is defined. Within the defined characteristic absorption wavelength range, the absorbance of the collected transmission spectrum signal is scanned point by point along the wavelength increasing direction. During point-by-point scanning, the absorbance value of the current scanning point is compared with the absorbance values ​​of its two adjacent scanning points. If the absorbance value of the current scanning point is greater than the absorbance values ​​of both its two adjacent scanning points and its two adjacent scanning points, and the absorbance value of the current scanning point exceeds the preset absorbance threshold, then the current scanning point is identified as a local maximum point. All identified local maxima points are aggregated to form a candidate peak set; For each candidate peak in the candidate peak set, extend along the wavelength direction from the candidate peak as the center to both sides until the absorbance drops back to half the absorbance value of the candidate peak. Record the wavelength of the left half peak and the wavelength of the right half peak. Calculate the ratio of the width of the left half peak to the width of the right half peak as the peak shape symmetry index. Candidate peaks whose peak shape symmetry index falls within the preset peak shape symmetry tolerance range are identified as target peaks corresponding to the characteristic absorption peaks of hydroxide ions in alkaline solutions, while candidate peaks whose peak shape symmetry index does not fall within the preset peak shape symmetry tolerance range are eliminated.

[0025] Before identifying peak positions in the acquired transmission spectrum signals, it is necessary to pre-determine the characteristic absorption wavelength range based on the known spectral characteristics of hydroxide ions in the alkaline solution. Hydroxide ions exhibit several characteristic absorption bands in the near-infrared to mid-infrared range. The center wavelength positions of these absorption bands are relatively stable in the alkaline solution system and can be used as a priori basis for peak position search. By consulting standard spectral databases for alkaline solutions or through laboratory calibration experiments, the wavelength range containing the characteristic absorption peaks of hydroxide ions is determined, and this range is set as the characteristic absorption wavelength range. ,in The wavelength is the left boundary of the interval. The wavelength represents the right boundary of the interval. Limiting the search range to this interval can effectively eliminate interference from irrelevant absorption peaks generated outside the interval by other components in the alkaline solution (such as water molecules, organic impurities, etc.), thus improving the specificity and accuracy of peak position identification.

[0026] After defining the characteristic absorption wavelength range, the absorbance of the transmission spectrum signal within the range is scanned point by point along the increasing wavelength direction. During the scan, the absorbance value is recorded for each current scan point. Compared with the absorbance value of the previous adjacent scan point and the absorbance values ​​of adjacent scan points Perform numerical comparisons separately. When and When both conditions are met, the scan point satisfies the basic conditions for a local maximum. However, merely satisfying the local maximum condition is insufficient to confirm that the point is a valid peak; further evaluation is needed to determine whether its absorbance value exceeds a preset absorbance threshold. The purpose of introducing an absorbance threshold is to filter out spurious maxima caused by noise, baseline drift, or weak impurity absorption, ensuring that the identified local maxima have sufficient signal intensity to correspond to true chemical absorption characteristics. Only when... Only when both conditions are met is the scan point recorded as a local maximum. Threshold The setting can be determined through offline experimental statistics based on the instrument noise level and the actual alkaline concentration range. Usually, the absorbance value corresponding to the signal intensity with a signal-to-noise ratio of not less than 3 is taken as the reference lower limit.

[0027] After completing a point-by-point scan of the entire characteristic absorption wavelength range, all local maxima points that satisfy the above dual judgment conditions are aggregated to form a candidate peak set. The number of candidate peaks in this set depends on the spectral complexity of the alkali solution system and the strictness of the threshold setting. In actual textile processing alkali solution testing scenarios, the candidate peak set usually contains several to more than ten candidate points, including peaks from the true characteristic absorption of hydroxide ions, and may also contain a small number of interfering peaks caused by coexisting components in the alkali solution or uneven spectral baselines, which need to be distinguished through subsequent peak shape symmetry screening.

[0028] For each candidate peak in the candidate peak set, the wavelength position of that candidate peak is... Centered on the target wavelength, the search extends towards both short-wavelength and long-wavelength directions to find the wavelength position where the absorbance value drops to half the peak absorbance of the candidate peak. Specifically, on the short-wavelength side, from... Towards Search point by point in the direction until the absorbance value first drops to a certain level. The wavelength is denoted as the wavelength of the left half-peak. ,in This represents the peak absorbance at the candidate peak position; on the longer wavelength side, from... Towards Search point by point in the direction until the absorbance value first drops to a certain level. The wavelength is denoted as the right half-peak wavelength. The width of the left half-peak is defined as... The right half-peak width is defined as Peak shape symmetry index Defined as the ratio of the width of the left half-peak to the width of the right half-peak, i.e. .

[0029] Peak shape symmetry index The physical meaning of symmetry lies in describing the degree of symmetry of the absorption peak shape on both sides of the central wavelength. For characteristic absorption peaks generated by a single chemical bond vibration mode, their peak shape is theoretically close to a symmetrical Gaussian or Lorentz line shape, and the symmetry index... The value should be close to 1. The characteristic absorption peak of hydroxide ions exhibits good peak shape symmetry in alkaline solutions. The values ​​typically fall within a narrow range centered at 1. Interference peaks caused by multi-component superposition, baseline tilting, or optical path scattering often exhibit significant asymmetry in their peak shape. The value deviates significantly from 1. Based on the experimental calibration results, a pre-set tolerance range for peak shape symmetry was established. For example, the range can be set to The specific values ​​can be adjusted according to the characteristics of the actual instrument and the alkaline solution system.

[0030] Calculate the peak shape symmetry index for each candidate peak in the candidate peak set. Afterwards, fall into Candidate peak positions within the range are identified as target peak positions corresponding to the characteristic absorption peak of hydroxide ions in the alkaline solution and are retained; Candidate peaks not falling within this range are considered interference peaks or spurious peaks and are discarded. After peak shape symmetry screening, the remaining set of target peaks has high chemical assignment reliability and can accurately reflect the concentration information of hydroxide ions in the alkaline solution, providing accurate peak position input for subsequent peak area integration calculations and quantitative concentration calculations.

[0031] At the engineering implementation level, the aforementioned peak position identification process is executed automatically within each sampling cycle, requiring no manual intervention. For cases where different batches of alkali solution or variations in alkali solution composition occur, the characteristic absorption wavelength range... absorbance threshold and the tolerance range of peak shape symmetry All parameters can be adjusted online through the parameter configuration interface to adapt to the detection requirements under different process conditions and ensure the stability and robustness of peak position identification results.

[0032] The peak area integral is calculated for the spectral absorbance at each target peak position to obtain the spectral peak area integral value corresponding to each target peak position, including: For each target peak position determined, the wavelength direction is gradually extended to both sides with the target peak position as the center. During each extension step, the spectral absorbance value at the corresponding wavelength position is continuously monitored. The wavelength positions corresponding to the gradual decay of the spectral absorbance from the peak level of the target peak position and the drop back to the preset baseline absorbance level are determined as the left and right boundary wavelengths of the integration interval of the target peak position. The preset baseline absorbance level is preset based on the spectral absorbance reference value of pure solvent under the condition of no alkali in the alkali tank. Within the integration interval bounded by the left and right boundary wavelengths, the spectral absorbance of the target peak is sampled at equal intervals with a preset wavelength step size. Starting from the left boundary wavelength, the samples are collected point by point until the right boundary wavelength, resulting in an absorbance sampling sequence consisting of multiple sampling points, where each sampling point contains the spectral absorbance value corresponding to the wavelength position. The trapezoidal numerical integration method is used to calculate the area of ​​the trapezoidal segment by multiplying the average absorbance of each pair of adjacent sampling points in the integration interval by the wavelength interval between the adjacent sampling points. The areas of each trapezoidal segment are then summed up segment by segment in the integration interval to calculate the spectral peak area integral value corresponding to the target peak position.

[0033] After identifying and confirming the target peak positions, it is necessary to quantitatively integrate the spectral absorbance distribution corresponding to each target peak position to obtain the peak area integral value that reflects the concentration information of the alkali solution. The accuracy of the peak area integral directly affects the reliability of the subsequent concentration conversion results; therefore, the method of determining the integration interval is crucial.

[0034] For each identified target peak, the scanning process extends progressively to both sides of the wavelength axis, starting from the wavelength position of that peak. During the leftward extension, the wavelength value is gradually decreased, and the spectral absorbance value at the corresponding wavelength is read at each step, continuously monitoring the attenuation trend of absorbance as the wavelength deviates from the peak center. During the rightward extension, the wavelength value is gradually increased, and absorbance is read at each wavelength. As the extension distance increases, the absorbance value gradually decreases from its maximum value at the peak. When the absorbance value drops and touches the preset baseline absorbance level, that wavelength position is determined as the boundary of the integration interval. The wavelength position corresponding to the termination of the leftward extension is recorded as the left boundary wavelength of the integration interval, and the wavelength position corresponding to the termination of the rightward extension is recorded as the right boundary wavelength of the integration interval. This dynamic boundary determination method allows the integration interval to adapt to changes in peak width under different concentration conditions, avoiding the introduction of invalid background noise due to an excessively wide fixed integration window, or the truncation of the peak tail due to an excessively narrow window, resulting in a low integration value.

[0035] The preset baseline absorbance level is determined based on the spectral absorbance reference value of pure solvent (usually water) when the alkali bath is empty. During system initialization, pure solvent is injected into the alkali bath and allowed to flow fully under the drive of a circulating pump. The transmission spectrum under this condition is collected, and the average absorbance within the wavelength range near each target peak is stored in the system parameter library as the baseline absorbance reference value. During actual testing, a small tolerance margin is added to this reference value to obtain the final preset baseline absorbance level, which compensates for minor baseline changes caused by factors such as temperature drift and fluctuations in light source intensity. This baseline setting method based on the measured pure solvent spectrum more accurately reflects the actual optical background than a fixed zero baseline, thus making the left and right boundaries of the integration interval closer to the true peak shape profile.

[0036] After determining the left and right boundary wavelengths of the integration interval, the spectral absorbance of the target peak is discretely sampled at equal intervals within this interval using a preset wavelength step size. Starting from the left boundary wavelength, the sampling proceeds point by point to the right according to a fixed wavelength step size until the right boundary wavelength is reached. The spectral absorbance value at each sampling point is collected sequentially, forming an ordered absorbance sampling sequence. Let the total absorbance collected within the integration interval be... There are 1 sampling points, and the wavelength positions of each sampling point are denoted as follows: The corresponding spectral absorbance values ​​are denoted as follows: ,in Corresponding to the left boundary wavelength, The wavelength corresponds to the right boundary. The selection of the preset wavelength step size needs to balance integration accuracy and computational efficiency. An excessively large step size will increase the discretization approximation error of the peak curve, while an excessively small step size will increase the number of sampling points, thereby increasing the computational burden. Typically, the wavelength step size is set to 1 to 2 times the resolution of the spectrometer to maintain a reasonable computational load without losing spectral details.

[0037] The peak area was calculated using the trapezoidal numerical integration method on the obtained absorbance sampling sequence. The basic idea of ​​trapezoidal integration is to divide the integration interval into several small trapezoids between adjacent sampling points. The area of ​​each small trapezoid is equal to the product of the average absorbance of two adjacent sampling points and the wavelength interval between those two sampling points. For the ... Section (i.e., the first) The sampling point and the first (the section between each sampling point), its trapezoidal area for: in For the first The absorbance values ​​at each sampling point For the first The absorbance values ​​at each sampling point For the first Wavelength position of each sampling point For the first The wavelength position of each sampling point. Because equal-interval sampling is used, the wavelength interval between adjacent sampling points is a fixed preset wavelength step size. The above formula can be simplified to: The trapezoidal areas corresponding to all adjacent sampling points within the integration interval are summed segment by segment to obtain the integral value of the spectral peak area of ​​the target peak position. : The trapezoidal integral method has higher numerical accuracy than the simple rectangular integral. For continuous and smooth absorption peak curves, the error of the trapezoidal integral is on the order of the square of the wavelength step, which can meet the accuracy requirements of quantitative concentration analysis in practical textile alkali testing applications.

[0038] When multiple target peaks exist in the alkali solution tank, the complete process of determining the integration interval, equal-interval sampling, and trapezoidal surface accumulation is independently executed for each target peak, yielding the spectral peak area integral value corresponding to each target peak. The integral values ​​of each peak are independent and do not interfere with each other. Subsequent concentration calculations will comprehensively utilize the integral values ​​of all target peaks, obtaining the final alkali solution concentration detection value through a pre-calibrated quantitative conversion relationship. This fully leverages multi-peak information to improve the robustness and accuracy of concentration detection.

[0039] In practical engineering implementation, before the spectral absorbance sampling sequence enters the trapezoidal integration calculation, a smoothing filter can be applied to eliminate random fluctuations in absorbance caused by light source jitter or detector noise, further improving the stability of the integrated value. Smoothing typically employs moving average or Savitzky-Golay polynomial fitting methods to reduce the impact of high-frequency noise on the integration result without significantly altering the peak shape. The absorbance sequence after smoothing is then calculated according to the aforementioned trapezoidal integration formula, effectively avoiding spurious deviations caused by noise spikes in the peak area integration value, thus ensuring the reliability of the concentration detection results.

[0040] like Figure 2 As shown, based on the pre-defined quantitative conversion relationship between the spectral peak area integral value and the alkali concentration, the alkali concentration detection value is calculated by comprehensively considering the spectral peak area integral values ​​corresponding to each target peak position, including: Based on the mapping function represented by the pre-calibrated quantitative conversion relationship, the spectral peak area integral value of each target peak position is read and recorded one by one. The spectral peak area integral value corresponding to each target peak position is used as the input variable of the mapping function. After the mapping function calculates one by one, the intermediate calculated value of the alkali concentration corresponding to each target peak position is output and the intermediate calculated value of each alkali concentration is temporarily stored. Obtain the concentration conversion weight coefficients predetermined for each target peak position during the quantitative conversion relationship calibration process. The concentration conversion weight coefficients of each target peak position are negatively correlated with the concentration conversion deviation dispersion of the target peak position for each standard alkaline sample during the calibration process, and the sum of the concentration conversion weight coefficients of all target peak positions is the normalized value. Using the concentration conversion weighting coefficient corresponding to each target peak as a weighting factor, a weighted average is calculated on the intermediate calculated values ​​of the alkali concentration corresponding to each target peak. The product of each intermediate calculated value of the alkali concentration and its corresponding concentration conversion weighting coefficient is accumulated item by item, and the accumulated result is divided by the sum of the concentration conversion weighting coefficients. The resulting weighted average is output as the final detected value of the alkali concentration.

[0041] After calculating the spectral peak area integral values ​​for each target peak, these integral values ​​need to be converted into specific alkali concentration values. The conversion process relies on the quantitative conversion relationship established during the pre-calibration phase, which is stored in the system as a mapping function. The mapping function describes the mathematical correspondence between the spectral peak area integral value and the alkali concentration for a specific target peak. Its functional form can be selected using either a linear regression model or a polynomial fitting model based on the distribution characteristics of the calibration data, ensuring sufficient fitting accuracy within the actual operating concentration range.

[0042] For each target peak, the integral value of the spectral peak area, which is associated with that peak, is read and used as the input variable of the mapping function corresponding to that peak. After calculation by the mapping function, the intermediate calculated value of the alkali concentration corresponding to that peak is output. Let a total of [number missing] peaks be identified. The target peak position, the first The integral value of the spectral peak area corresponding to each target peak position is The mapping function corresponding to this peak position is Then the first Intermediate calculated values ​​of alkali concentration at each target peak satisfy: in The range of values ​​is to , This represents the total number of target peak positions. After the calculation is completed, the data is temporarily stored sequentially, awaiting subsequent weighted fusion processing.

[0043] In the actual environment of textile processing, different target peak positions are affected to varying degrees by factors such as temperature fluctuations, dye residues, and interference from organic additives, resulting in differences in the accuracy and stability of concentration conversion results for different peak positions. To comprehensively utilize information from multiple peak positions and suppress errors potentially introduced by a single peak position, a concentration conversion weighting coefficient is introduced to weight and fuse the intermediate calculated values. This weighting coefficient is pre-determined for each target peak position during the calibration phase, based on the dispersion of concentration conversion deviation exhibited by that peak position for each standard alkali sample during the calibration process.

[0044] Concentration conversion deviation dispersion reflects the degree of dispersion of the concentration prediction error for each standard alkali sample when the mapping function of a target peak position covers the entire calibrated concentration range. A larger dispersion indicates stronger fluctuations and lower reliability in the conversion result for that peak position; a smaller dispersion indicates more stable and reliable conversion results. Based on this, the concentration conversion weighting coefficient is negatively correlated with the concentration conversion deviation dispersion; that is, peaks with larger dispersion are assigned lower weights, and peaks with smaller dispersion are assigned higher weights. Let the th... The dispersion of concentration conversion deviation for each target peak during the calibration process is: Then its corresponding concentration conversion weighting coefficient It can be determined as follows: The above formula ensures that the sum of the concentration conversion weighting coefficients for all target peaks is exactly equal to the normalization value of 1, satisfying the normalization constraint. After calibration, the parameters are stored as fixed parameters and can be directly called during each online test without recalculation.

[0045] Intermediate calculated values ​​of alkali concentration at each target peak position were obtained. Concentration conversion weighting factor Next, a weighted average is calculated on each intermediate calculated value to obtain the final alkali concentration value. The specific process of the weighted average calculation is as follows: For each intermediate calculated value of the alkali concentration... Its corresponding concentration conversion weighting coefficient Multiply the values ​​to obtain the weighted contribution of each peak position, then sum the weighted contributions of all peak positions one by one, and finally divide the sum by the sum of the concentration conversion weighting coefficients. Since the weighting coefficients have satisfied the normalization constraint, the sum of the weighting coefficients equals 1, and the final alkaline solution concentration detection value is obtained. The calculation expression is: Will The final alkaline concentration value for the current sampling period will be output for subsequent concentration deviation calculation and adjustment control.

[0046] This weighted fusion mechanism is of great significance in actual production in the textile industry. Taking the caustic soda desizing process as an example, the desizing liquid in the alkali tank contains various interfering substances such as starch hydrolysis products and fiber debris. The absorption peaks in different wavelength bands are affected by these interfering substances to varying degrees. By assigning higher weights to peaks with lower interference levels and smaller conversion deviation dispersion, the impact of interfering substances on concentration detection results can be effectively reduced, improving the accuracy and consistency of the detection values. Compared with schemes that rely solely on a single peak for concentration conversion, the multi-peak weighted fusion scheme significantly improves both concentration detection accuracy and anti-interference capability.

[0047] During the calibration phase, for multiple sets of standard alkali solution samples covering the actual production concentration range, the spectral peak area integral value of each target peak position was measured. The conversion deviation of each peak position was calculated by comparing it with the standard concentration value, and then the concentration conversion deviation dispersion of each peak position was statistically obtained. The calibration process must be conducted under temperature and liquid flow rate conditions as close as possible to actual production conditions to ensure that the calibration parameters accurately reflect the conversion performance differences of each peak position in the online detection scenario. After calibration, the mapping function... Function parameters and weighting coefficients All data are stored in a fixed format and periodically checked during subsequent online testing. When significant changes occur in the production process, the calibration process must be re-executed to update the relevant parameters.

[0048] The concentration conversion weighting coefficient for each target peak is negatively correlated with the concentration conversion deviation dispersion exhibited by that target peak during the calibration process, including: During the calibration of the quantitative conversion relationship, for each target peak position, the spectral peak area integral value obtained from each standard alkaline sample during the calibration stage is substituted into the mapping function represented by the quantitative conversion relationship for conversion. The individual concentration conversion result value of the target peak position for each standard alkaline sample is obtained. Each individual concentration conversion result value is compared with the known concentration value of the corresponding standard alkaline sample one by one, and the deviation value generated by each concentration conversion is recorded to form a set of deviation value records corresponding to the target peak position. Calculate the root mean square value of the concentration conversion deviation recorded for each target peak position, and use the calculated root mean square value as the concentration conversion deviation dispersion index corresponding to the target peak position. The magnitude of the deviation dispersion index characterizes the stability of the target peak position in the concentration conversion process. The reciprocal of the concentration conversion deviation dispersion index corresponding to each target peak position is taken to obtain the reciprocal value of the dispersion corresponding to each target peak position. The reciprocal values ​​of the dispersion corresponding to all target peak positions are normalized. The results obtained after normalization are used as the concentration conversion weight coefficients corresponding to each target peak position, so that the sum of the concentration conversion weight coefficients of each target peak position is equal to the normalized benchmark value.

[0049] In practical applications of alkali concentration detection in the textile industry, different target peaks exhibit varying sensitivity and conversion stability in response to alkali concentration. This difference primarily stems from the varying sensitivities of the molecular vibrational modes corresponding to each peak to temperature fluctuations, impurity interference, and optical path scattering noise. To rationally allocate the contribution weight of each peak when calculating the final concentration value by integrating multiple target peaks, it is necessary to systematically evaluate the conversion stability of each target peak during the calibration phase. Based on this, the concentration conversion weight coefficient corresponding to each peak should be determined, allowing peaks with higher stability to occupy a greater weight in the comprehensive calculation, thereby improving the reliability of the final detection results.

[0050] During the calibration of the quantitative conversion relationship, a set of standard alkali solution samples covering the actual production concentration range is prepared. The concentration of each sample is accurately determined by methods such as precision titration, serving as a known concentration reference value. For each target peak position, transmission spectra of each standard alkali solution sample are collected sequentially, and the peak area integral value corresponding to that peak position is obtained using the trapezoidal integral method. This integral value is then substituted into the mapping function corresponding to that peak position. The conversion is performed to obtain the individual concentration conversion result of that peak position for that standard sample. The emphasis here is on "individual," meaning that only the first [value] is used in the calibration and evaluation phase. The conversion is performed on the integral value of each target peak position without incorporating information from other peak positions. The purpose is to independently evaluate the conversion capability of each peak position. The conversion result of each individual concentration is compared with the known concentration value of the corresponding standard alkali sample one by one, and the deviation value generated by each conversion is recorded. All deviation values ​​together constitute a set of deviation value records corresponding to the target peak position.

[0051] Let the first The set of deviation value records corresponding to each target peak contains a total of [number] records. The deviation value corresponding to the nth standard sample, the th Each deviation value is recorded as follows (in The range of values ​​is to Then, the concentration conversion deviation dispersion index corresponding to the target peak position is... The root mean square value is obtained by calculating the root mean square value of all deviation values, i.e. The root mean square (RMS) value can more fully reflect the overall dispersion of the deviation than the simple average value because it assigns higher weight to larger deviations and can effectively identify cases where the conversion error is abnormally large in certain concentration ranges. The smaller the value, the more significant the digit. The higher the degree of agreement between the converted values ​​of a target peak position and the actual concentration on each standard sample, the higher the stability of that peak position in the concentration conversion process; conversely, The larger the value, the greater the fluctuation and the lower the stability of the calculated peak position.

[0052] In obtaining all The concentration conversion deviation dispersion index of each target peak position After that, for each Taking the reciprocal of each, we get the first... The reciprocal of the dispersion corresponding to each target peak position ,Right now Taking the reciprocal directly establishes the negative correlation between the weighting coefficients and the deviation dispersion: deviation dispersion The smaller the value, the more inverse the value. The larger the value, the higher the weight that peak will receive in subsequent weighting; deviation dispersion The larger the value, the greater the reciprocal value. The smaller the value, the lower the proportion of that peak in the overall calculation. This design conforms to the core idea of ​​"allocating weights based on stability," and can automatically complete the reasonable allocation of weights without human intervention.

[0053] The inverse of the dispersion value corresponding to all target peak positions is normalized. Specifically, the inverse of the dispersion value is normalized. The weighting coefficient of each target peak Defined as the reciprocal of its dispersion Divide by the sum of the inverse values ​​of the dispersion of all target peak positions, i.e. ,in The summation index has a range of values. to After normalization, the sum of the concentration conversion weighting coefficients for all target peaks is strictly equal to 1, i.e. This satisfies the requirement that the normalized baseline value be 1. This constraint ensures that the final alkali concentration detection value is calculated in the subsequent weighted comprehensive calculation. In this way, the sum of the contributions of each peak will not cause a scale shift, so that the overall calculation result is consistent with the conversion result of each individual peak in terms of dimensions and numerical range.

[0054] In actual calibration operations, the number of standard alkali solutions samples... It is recommended to have at least 10 samples, and the sample concentrations should be evenly distributed within the target working concentration range. This ensures that the set of deviation value records can fully represent the conversion error characteristics of each concentration range, and avoids errors caused by uneven sample distribution. The evaluation results may be biased. For certain target peaks, if they exhibit a strong nonlinear response within a specific concentration range, the corresponding set of deviation values ​​may contain several large deviation values, which will significantly increase the root mean square value. This results in a smaller weighting coefficient for the peak position. This automatically reduces the impact in the overall calculation, which is precisely the advantage of the root mean square value as an evaluation index of deviation dispersion.

[0055] It is important to note that in actual production environments, the temperature, flow rate, and impurity composition within the alkali solution tank may drift with changes in operating conditions, causing the conversion stability characteristics of each target peak position to also change over time. Therefore, it is recommended to periodically update the calibration data and recalculate the deviation dispersion index of each target peak position during long-term equipment operation. and the corresponding weighting coefficients This ensures that the weight allocation always matches the actual conversion performance of each peak under the current operating conditions. The update cycle can be flexibly set according to the stability of the production process and the frequency of changes in the alkali solution formula. Typically, a recalibration process should be triggered promptly when the alkali solution formula is changed or a significant increase in system error is detected, ensuring the alkali concentration detection value in the closed-loop detection and control cycle. Long-term accuracy.

[0056] The concentration deviation value is input to the regulating controller, which processes the concentration deviation value according to a preset regulating strategy to generate a concentration regulating control signal that includes the regulating direction and regulating amount, including: The absolute value of the concentration deviation is compared with the preset multi-level deviation thresholds step by step to determine the current deviation level of the absolute value of the concentration deviation. The multi-level deviation thresholds are set to at least three progressive levels of deviation threshold limits in order of increasing absolute value of concentration deviation. Each time the absolute value of the concentration deviation crosses a deviation threshold limit, it enters the next higher deviation level. The adjustment direction is determined based on the sign of the concentration deviation value. When the concentration deviation value is positive, it is determined that the concentration of alkali solution is higher than the target concentration and the adjustment direction is to add diluent. When the concentration deviation value is negative, it is determined that the concentration of alkali solution is lower than the target concentration and the adjustment direction is to add alkali solution. Based on the determined deviation level, the pre-calibrated adjustment parameter corresponding to the deviation level is retrieved from the preset adjustment parameter table. The preset adjustment parameter table stores the mapping relationship between each deviation level and the corresponding pre-calibrated adjustment parameter. The pre-calibrated adjustment parameter is pre-calibrated through the quantitative comparison relationship between the total amount of alkali in the alkali tank and the unit injection amount. The determined adjustment direction identifier is combined with the retrieved pre-calibrated adjustment parameters to form a concentration adjustment control signal that simultaneously contains the adjustment direction command and the adjustment value, and is output to the execution control port of the alkali dosing device.

[0057] After obtaining the measured concentration of the alkali solution, the difference between it and the preset target concentration value is calculated to obtain the concentration deviation value. This concentration deviation value carries two key pieces of information: first, its absolute value, reflecting the degree to which the current alkali solution concentration deviates from the target concentration; and second, its positive or negative sign, reflecting whether the current alkali solution concentration is higher or lower than the target concentration. The regulating controller processes these two types of information independently according to a preset regulation strategy, and finally combines them to form a complete concentration regulation control signal.

[0058] To address the handling of the absolute value of the deviation, a multi-level deviation threshold comparison mechanism is introduced. At least three progressively higher deviation threshold limits are pre-set, arranged in ascending order of the absolute value of the concentration deviation. For example, in practical applications, three levels of deviation threshold limits can be set, with the first-level deviation threshold limit denoted as... The second-level deviation threshold limit is The third-level deviation threshold limit is All three conditions are met. Let the absolute value of the current concentration deviation be... ,in This represents the concentration deviation value. When... When the deviation falls within the allowable deviation range, no adjustment action is needed, and the control loop continues to wait for the next sampling cycle; when When it is determined to be the first level of deviation, it belongs to the category of slight deviation; when When, it is judged as the second level of deviation, belonging to moderate deviation; when At this point, it is judged as the third deviation level, which is a severe deviation. Each time the absolute value of the deviation crosses a threshold, it enters the next higher deviation level. The higher the level, the more serious the concentration deviation, and the greater the amount of adjustment required.

[0059] When determining the adjustment direction, the concentration deviation value should be used as a reference. The sign of the value is used to determine the concentration deviation value. Defined as the detected alkaline concentration value minus the target concentration value. When the concentration of the alkali solution is higher than the target concentration, it indicates that the alkali solution is too concentrated. In this case, diluent needs to be added to the alkali solution tank to reduce the concentration, and the adjustment direction should be to add diluent. When the concentration of the alkali solution is below the target concentration, indicating that the solution is too dilute, it is necessary to inject alkali solution into the tank to increase the concentration. The adjustment direction is determined to be replenishing alkali solution. The logic for determining the adjustment direction is clear and unique, which can avoid the alkali concentration drifting in the direction of greater deviation due to misjudgment, thereby ensuring the stability of closed-loop control.

[0060] After determining the deviation level, the pre-calibrated adjustment parameter corresponding to that deviation level is retrieved from the preset adjustment parameter table. The preset adjustment parameter table is pre-stored within the controller in the form of a lookup table, recording the mapping relationship between each deviation level and its corresponding pre-calibrated adjustment parameter. The pre-calibrated adjustment parameter is obtained as follows: before the system is put into use, based on the quantitative comparison between the total amount of alkali in the alkali tank and the single injection volume, a reasonable injection volume value for each deviation level is determined through offline calibration experiments, and this value is written into the adjustment parameter table. Specifically, let the total amount of alkali in the alkali tank be... The pre-calibration adjustment parameter corresponding to the first deviation level is: The pre-calibration adjustment parameter corresponding to the second deviation level is: The pre-calibration adjustment parameter corresponding to the third deviation level is: All three conditions are met. And all adjustment parameters are based on The proportional relationship with the unit injection volume is calibrated to ensure that each injection volume is neither too large, causing over-adjustment of concentration, nor too small, leading to low adjustment efficiency. This hierarchical lookup table method avoids the complex calculations required for online real-time calculation of the injection volume, reduces the computational burden on the controller, and also makes the setting of adjustment parameters more intuitive and maintainable.

[0061] In actual textile processing scenarios, alkali baths are typically large in volume, and the circulation speed of the alkali solution is limited. A certain amount of time is required for thorough mixing after a single injection of alkali or diluent. Therefore, a tiered adjustment strategy is more advantageous than a continuous proportional adjustment strategy: small injections are used for minor deviations to avoid overshooting due to excessive injection volume; large injections are used for severe deviations to ensure the concentration quickly returns to the target range, thus achieving a balance between adjustment speed and accuracy.

[0062] After determining the deviation level and retrieving the pre-calibrated adjustment parameters, the adjustment direction indicator is combined with the pre-calibrated adjustment parameters to form a concentration adjustment control signal. This signal contains two components: an adjustment direction command component, which instructs the alkali dosing device to perform either alkali replenishment or diluent replenishment; and an adjustment value component, which indicates the specific amount injected. After the concentration adjustment control signal is output to the execution control port of the alkali dosing device, the device selects the corresponding dosing path according to the adjustment direction command and controls the running time or flow rate of the dosing pump according to the adjustment value to achieve quantitative injection. After injection, a preset stabilization time is waited for the injected alkali or diluent to fully mix with the alkali in the tank before triggering the next transmission spectrum signal acquisition, entering the next closed-loop detection and control cycle. This preset adjustment strategy, which organically combines deviation level judgment, adjustment direction identification, graded table lookup parameter retrieval, and signal combination output, achieves stable, efficient, and automated closed-loop control of alkali concentration, meeting the process requirements for precise maintenance of alkali concentration in continuous production processes in the textile industry.

[0063] Based on the concentration adjustment control signal, the alkali solution dosing device is driven to quantitatively inject alkali solution or diluent into the alkali solution tank. After injection, a preset stabilization time is waited before returning to the step of collecting the transmission spectrum signal of the alkali solution to be tested, forming a closed-loop detection and control cycle until the concentration deviation value falls within the preset allowable deviation range, including: After the alkali solution dosing device completes the quantitative injection operation, the stabilization waiting timer is started. After the stabilization waiting timer reaches the preset stabilization time, the transmission spectrum signal of the alkali solution to be tested in the alkali solution tank is collected again at the preset sampling cycle. The peak position identification, peak area integration calculation and concentration conversion are performed on the re-collected transmission spectrum signal in sequence to obtain the updated alkali solution concentration detection value. The updated alkaline solution concentration detection value is compared with the preset target concentration value again to calculate the updated concentration deviation value. The absolute value of the updated concentration deviation is compared with the upper limit of the preset allowable deviation range. If the absolute value of the updated concentration deviation is less than or equal to the upper limit of the preset allowable deviation range, the alkali concentration is determined to have met the standard, and the current closed-loop detection and control cycle is terminated. If the absolute value of the updated concentration deviation is greater than the upper limit of the preset allowable deviation range, a new concentration adjustment control signal is generated based on the updated concentration deviation, and the alkali dosing device is driven to perform the next quantitative injection operation. After waiting for the preset stabilization time, the spectral signal is re-acquired for the next round of concentration standard determination, forming a continuous closed-loop iteration until the absolute value of the concentration deviation falls within the preset allowable deviation range.

[0064] After a quantitative injection operation is completed by the alkali dosing device, the alkali concentration in the alkali tank does not immediately become uniform. The injected alkali or diluent needs a certain period of circulation, mixing, and diffusion before the liquid concentration in the tank tends to stabilize and become uniform. Therefore, acquiring spectral signals immediately after each injection operation cannot accurately reflect the true concentration state of the alkali in the tank. For this reason, a stabilization waiting timer is started immediately after each quantitative injection operation, and this timing process continues until the preset stabilization time expires. The specific value of the preset stabilization time is determined in advance based on process parameters such as the volume of the alkali tank, the flow rate of the circulating pump, and the pipeline structure, and is usually obtained through experimental calibration to ensure that the spatial non-uniformity of the alkali concentration in the tank is reduced to within an acceptable range after this time.

[0065] After the preset stabilization time is reached, the transmission spectrum signal acquisition process is restarted with a preset sampling period. The acquisition process is completely consistent with the initial detection process. The re-acquired transmission spectrum signal is processed sequentially, including peak position identification, peak area integration at each target peak, and concentration calculation based on quantitative conversion relationships, ultimately obtaining the updated alkali concentration detection value. This process ensures that the concentration data used in each iteration comes from the actual tank solution after injection and thorough mixing, avoiding misjudgments caused by uneven concentration.

[0066] After obtaining the updated alkali concentration detection value, it is compared with the preset target concentration value to calculate the updated concentration deviation value. The calculation method for this deviation value is exactly the same as in the initial round: it is the difference between the current alkali concentration detection value and the target concentration value. Its sign reflects the direction of the deviation, i.e., whether the concentration is too high or too low, and its absolute value reflects the magnitude of the deviation. The updated concentration deviation value will serve as the core judgment criterion for this iteration and will be used in subsequent compliance judgment logic.

[0067] The updated concentration deviation value is compared with the upper limit of the preset allowable deviation range. The upper limit of the preset allowable deviation range is pre-set during the process design phase based on the actual requirements of alkali concentration accuracy in textile processing, representing the maximum permissible deviation. If the absolute value of the updated concentration deviation value is less than or equal to the upper limit of the preset allowable deviation range, the current alkali concentration is determined to meet the standard, the closed-loop detection and control cycle is terminated, and the entire adjustment process is considered complete. This judgment logic uses absolute value comparison instead of signed comparison to simultaneously cover both high and low concentration cases, ensuring the universality and accuracy of the judgment.

[0068] If the absolute value of the updated concentration deviation is greater than the upper limit of the preset allowable deviation range, it indicates that the current alkali concentration still does not meet the process requirements, and further adjustment is needed. In this case, the updated concentration deviation value is re-input into the adjustment controller, which then regenerates a concentration adjustment control signal containing the adjustment direction and amount according to a preset adjustment strategy. The adjustment direction is determined by the sign of the updated concentration deviation value: if the detected alkali concentration is lower than the target concentration, the adjustment direction is to add alkali; if the detected alkali concentration is higher than the target concentration, the adjustment direction is to inject diluent. The adjustment amount is determined based on the absolute value of the deviation, according to a preset graded adjustment strategy or proportional relationship, ensuring that each injection amount matches the actual deviation level and avoiding over-adjustment or under-adjustment.

[0069] After regenerating the concentration adjustment control signal, the alkali dosing device is driven to perform the next quantitative injection operation. After injection, the stabilization waiting time is restarted. After the preset stabilization period expires, the spectral signal is reacquired, peak position identification, peak area integration, and concentration conversion are performed to obtain a new round of alkali concentration detection values. The concentration deviation value is then recalculated for compliance judgment. The above process forms a continuous closed-loop iteration. Each iteration includes six steps: injection operation, stabilization waiting, spectral acquisition, concentration calculation, deviation calculation, and compliance judgment. Each step is executed sequentially and interlocked until the absolute value of the concentration deviation value in a certain iteration falls within the preset allowable deviation range.

[0070] In practical engineering applications, to prevent the closed-loop iteration from failing to converge and falling into an infinite loop due to process anomalies or equipment failures, a maximum iteration limit or cumulative adjustment limit protection mechanism can be introduced into the closed-loop iteration logic. When the number of iterations exceeds the set limit or the cumulative injection amount exceeds the safety threshold, an alarm is automatically triggered and automatic adjustment is paused, awaiting manual intervention. This protection mechanism does not affect the convergence behavior of the closed-loop iteration under normal operating conditions; it serves only as a safety guarantee in abnormal situations, ensuring the safe and reliable management of alkali solutions throughout the entire textile processing process.

[0071] The appropriate setting of the preset stabilization time directly affects the convergence efficiency and adjustment accuracy of the closed-loop iteration. If the preset stabilization time is too short, the alkali solution in the tank will not mix sufficiently, and the collected spectral signal will not accurately represent the concentration under uniform conditions, which may lead to misjudgments in the adjustment direction or amount, causing oscillations or over-adjustment. If the preset stabilization time is too long, the time consumed in each iteration will increase, the overall adjustment response speed will decrease, and the continuity and efficiency of textile processing will be affected. Therefore, the preset stabilization time should be determined by experimental measurement or fluid simulation analysis, taking into account the actual hybrid dynamic characteristics of the alkali tank, to achieve a reasonable balance between adjustment accuracy and response speed. The design of the entire closed-loop detection and control cycle ensures that the alkali concentration is always maintained within the target range during textile processing, effectively guaranteeing the dyeing uniformity and consistency of the processing quality of the textiles.

[0072] A second aspect of the present invention provides a real-time monitoring and early warning system for alkali concentration in the textile industry, comprising: The spectral detection unit is used to collect the transmission spectrum signal of the alkaline solution to be tested in the cyclic flow state in the alkaline solution tank during the textile processing process online at a preset sampling period. The unit identifies the spectral peak position of the collected transmission spectrum signal, locates at least one target peak position corresponding to the characteristic absorption peak of hydroxide ions in the alkaline solution from the spectrum, and performs peak area integration calculation on the spectral absorbance at each target peak position to obtain the spectral peak area integration value corresponding to each target peak position. The concentration calculation unit is used to calculate the alkaline concentration detection value by comprehensively calculating the spectral peak area integral value corresponding to each target peak position based on the pre-calibrated quantitative conversion relationship between the spectral peak area integral value and the alkaline concentration. The deviation calculation unit is used to compare the detected value of alkali concentration with the preset target concentration value and calculate the concentration deviation value. The control generation unit is used to input the concentration deviation value into the regulating controller, which processes the concentration deviation value according to the preset regulating strategy and generates a concentration regulating control signal containing the regulating direction and regulating amount. The closed-loop control unit is used to drive the alkali dosing device to quantitatively inject alkali or diluent into the alkali tank according to the concentration control signal. After the injection is completed, it waits for a preset stabilization time before returning to the step of collecting the transmission spectrum signal of the alkali to be tested, forming a closed-loop detection and control cycle until the concentration deviation value falls within the preset allowable deviation range.

[0073] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0074] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0075] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.

[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for real-time monitoring and early warning of alkali concentration in textile industry, characterized in that, include: The transmission spectrum signal of the alkaline solution to be tested, which is in a circulating state in the alkaline solution tank during the textile processing, is collected online at a preset sampling period. The peak position of the collected transmission spectrum signal is identified, and at least one target peak position corresponding to the characteristic absorption peak of hydroxide ions in the alkaline solution is located from the spectrum. The peak area integral of the spectral absorbance at each target peak position is calculated to obtain the spectral peak area integral value corresponding to each target peak position. Based on the pre-defined quantitative conversion relationship between the spectral peak area integral value and the alkali concentration, the alkali concentration detection value is calculated by comprehensively calculating the spectral peak area integral value corresponding to each target peak position; The concentration deviation value is calculated by comparing the detected value of the alkali solution concentration with the preset target concentration value. The concentration deviation value is input into the regulating controller, which processes the concentration deviation value according to the preset regulating strategy and generates a concentration regulating control signal that includes the regulating direction and regulating amount. Based on the concentration adjustment control signal, the alkali solution dosing device is driven to quantitatively inject alkali solution or diluent into the alkali solution tank. After the injection is completed, a preset stabilization time is waited before returning to the step of collecting the transmission spectrum signal of the alkali solution to be tested, forming a closed-loop detection and control cycle until the concentration deviation value falls within the preset allowable deviation range.

2. The method according to claim 1, characterized in that, The acquired transmission spectrum signal is subjected to spectral peak position identification to locate at least one target peak position corresponding to the characteristic absorption peak of hydroxide ions in the alkaline solution, including: Based on the known characteristic absorption wavelength positions of hydroxide ions in alkaline solution, a preset characteristic absorption wavelength range of hydroxide ions in alkaline solution is defined. Within the defined characteristic absorption wavelength range, the absorbance of the collected transmission spectrum signal is scanned point by point along the wavelength increasing direction. During point-by-point scanning, the absorbance value of the current scanning point is compared with the absorbance values ​​of its two adjacent scanning points. If the absorbance value of the current scanning point is greater than the absorbance values ​​of both its two adjacent scanning points and its two adjacent scanning points, and the absorbance value of the current scanning point exceeds the preset absorbance threshold, then the current scanning point is identified as a local maximum point. All identified local maxima points are aggregated to form a candidate peak set; For each candidate peak in the candidate peak set, extend along the wavelength direction from the candidate peak as the center to both sides until the absorbance drops back to half the absorbance value of the candidate peak. Record the wavelength of the left half peak and the wavelength of the right half peak. Calculate the ratio of the width of the left half peak to the width of the right half peak as the peak shape symmetry index. Candidate peaks whose peak shape symmetry index falls within the preset peak shape symmetry tolerance range are identified as target peaks corresponding to the characteristic absorption peaks of hydroxide ions in alkaline solutions, while candidate peaks whose peak shape symmetry index does not fall within the preset peak shape symmetry tolerance range are eliminated.

3. The method according to claim 2, characterized in that, The peak area integral is calculated for the spectral absorbance at each target peak position to obtain the spectral peak area integral value corresponding to each target peak position, including: For each target peak position determined, the wavelength direction is gradually extended to both sides with the target peak position as the center. During each extension step, the spectral absorbance value at the corresponding wavelength position is continuously monitored. The wavelength positions corresponding to the gradual decay of the spectral absorbance from the peak level of the target peak position and the drop back to the preset baseline absorbance level are determined as the left and right boundary wavelengths of the integration interval of the target peak position. The preset baseline absorbance level is preset based on the spectral absorbance reference value of pure solvent under the condition of no alkali in the alkali tank. Within the integration interval bounded by the left and right boundary wavelengths, the spectral absorbance of the target peak is sampled at equal intervals with a preset wavelength step size. Starting from the left boundary wavelength, the samples are collected point by point until the right boundary wavelength, resulting in an absorbance sampling sequence consisting of multiple sampling points, where each sampling point contains the spectral absorbance value corresponding to the wavelength position. The trapezoidal numerical integration method is used to calculate the area of ​​the trapezoidal segment by multiplying the average absorbance of each pair of adjacent sampling points in the integration interval by the wavelength interval between the adjacent sampling points. The areas of each trapezoidal segment are then summed up segment by segment in the integration interval to calculate the spectral peak area integral value corresponding to the target peak position.

4. The method according to claim 1, characterized in that, Based on the pre-defined quantitative conversion relationship between the spectral peak area integral value and the alkali concentration, the alkali concentration detection value is calculated by comprehensively considering the spectral peak area integral values ​​corresponding to each target peak position, including: Based on the mapping function represented by the pre-calibrated quantitative conversion relationship, the spectral peak area integral value of each target peak position is read and recorded one by one. The spectral peak area integral value corresponding to each target peak position is used as the input variable of the mapping function. After the mapping function calculates one by one, the intermediate calculated value of the alkali concentration corresponding to each target peak position is output and the intermediate calculated value of each alkali concentration is temporarily stored. Obtain the concentration conversion weight coefficients predetermined for each target peak position during the quantitative conversion relationship calibration process. The concentration conversion weight coefficients of each target peak position are negatively correlated with the concentration conversion deviation dispersion of the target peak position for each standard alkaline sample during the calibration process, and the sum of the concentration conversion weight coefficients of all target peak positions is the normalized value. Using the concentration conversion weighting coefficient corresponding to each target peak as a weighting factor, a weighted average is calculated on the intermediate calculated values ​​of the alkali concentration corresponding to each target peak. The product of each intermediate calculated value of the alkali concentration and its corresponding concentration conversion weighting coefficient is accumulated item by item, and the accumulated result is divided by the sum of the concentration conversion weighting coefficients. The resulting weighted average is output as the final detected value of the alkali concentration.

5. The method according to claim 4, characterized in that, The concentration conversion weighting coefficient for each target peak is negatively correlated with the concentration conversion deviation dispersion exhibited by that target peak during the calibration process, including: During the calibration of the quantitative conversion relationship, for each target peak position, the spectral peak area integral value obtained from each standard alkaline sample during the calibration stage is substituted into the mapping function represented by the quantitative conversion relationship for conversion. The individual concentration conversion result value of the target peak position for each standard alkaline sample is obtained. Each individual concentration conversion result value is compared with the known concentration value of the corresponding standard alkaline sample one by one, and the deviation value generated by each concentration conversion is recorded to form a set of deviation value records corresponding to the target peak position. Calculate the root mean square value of the concentration conversion deviation recorded for each target peak position, and use the calculated root mean square value as the concentration conversion deviation dispersion index corresponding to the target peak position. The magnitude of the deviation dispersion index characterizes the stability of the target peak position in the concentration conversion process. The reciprocal of the concentration conversion deviation dispersion index corresponding to each target peak position is taken to obtain the reciprocal value of the dispersion corresponding to each target peak position. The reciprocal values ​​of the dispersion corresponding to all target peak positions are normalized. The results obtained after normalization are used as the concentration conversion weight coefficients corresponding to each target peak position, so that the sum of the concentration conversion weight coefficients of each target peak position is equal to the normalized benchmark value.

6. The method according to claim 1, characterized in that, The concentration deviation value is input to the regulating controller, which processes the concentration deviation value according to a preset regulating strategy to generate a concentration regulating control signal that includes the regulating direction and regulating amount, including: The absolute value of the concentration deviation is compared with the preset multi-level deviation thresholds step by step to determine the current deviation level of the absolute value of the concentration deviation. The multi-level deviation thresholds are set to at least three progressive levels of deviation threshold limits in order of increasing absolute value of concentration deviation. Each time the absolute value of the concentration deviation crosses a deviation threshold limit, it enters the next higher deviation level. The adjustment direction is determined based on the sign of the concentration deviation value. When the concentration deviation value is positive, it is determined that the concentration of alkali solution is higher than the target concentration and the adjustment direction is to add diluent. When the concentration deviation value is negative, it is determined that the concentration of alkali solution is lower than the target concentration and the adjustment direction is to add alkali solution. Based on the determined deviation level, the pre-calibrated adjustment parameter corresponding to the deviation level is retrieved from the preset adjustment parameter table. The preset adjustment parameter table stores the mapping relationship between each deviation level and the corresponding pre-calibrated adjustment parameter. The pre-calibrated adjustment parameter is pre-calibrated through the quantitative comparison relationship between the total amount of alkali in the alkali tank and the unit injection amount. The determined adjustment direction identifier is combined with the retrieved pre-calibrated adjustment parameters to form a concentration adjustment control signal that simultaneously contains the adjustment direction command and the adjustment value, and is output to the execution control port of the alkali dosing device.

7. The method according to claim 1, characterized in that, Based on the concentration adjustment control signal, the alkali solution dosing device is driven to quantitatively inject alkali solution or diluent into the alkali solution tank. After injection, a preset stabilization time is waited before returning to the step of collecting the transmission spectrum signal of the alkali solution to be tested, forming a closed-loop detection and control cycle until the concentration deviation value falls within the preset allowable deviation range, including: After the alkali solution dosing device completes the quantitative injection operation, the stabilization waiting timer is started. After the stabilization waiting timer reaches the preset stabilization time, the transmission spectrum signal of the alkali solution to be tested in the alkali solution tank is collected again at the preset sampling cycle. The peak position identification, peak area integration calculation and concentration conversion are performed on the re-collected transmission spectrum signal in sequence to obtain the updated alkali solution concentration detection value. The updated alkaline solution concentration detection value is compared with the preset target concentration value again to calculate the updated concentration deviation value. The absolute value of the updated concentration deviation is compared with the upper limit of the preset allowable deviation range. If the absolute value of the updated concentration deviation is less than or equal to the upper limit of the preset allowable deviation range, the alkali concentration is determined to have met the standard, and the current closed-loop detection and control cycle is terminated. If the absolute value of the updated concentration deviation is greater than the upper limit of the preset allowable deviation range, a new concentration adjustment control signal is generated based on the updated concentration deviation, and the alkali dosing device is driven to perform the next quantitative injection operation. After waiting for the preset stabilization time, the spectral signal is re-acquired for the next round of concentration standard determination, forming a continuous closed-loop iteration until the absolute value of the concentration deviation falls within the preset allowable deviation range.

8. A real-time monitoring and early warning system for alkali concentration in the textile industry, used to implement the method as described in any one of claims 1-7, characterized in that, include: The spectral detection unit is used to collect the transmission spectrum signal of the alkaline solution to be tested in the cyclic flow state in the alkaline solution tank during the textile processing process online at a preset sampling period. The unit identifies the spectral peak position of the collected transmission spectrum signal, locates at least one target peak position corresponding to the characteristic absorption peak of hydroxide ions in the alkaline solution from the spectrum, and performs peak area integration calculation on the spectral absorbance at each target peak position to obtain the spectral peak area integration value corresponding to each target peak position. The concentration calculation unit is used to calculate the alkaline concentration detection value by comprehensively calculating the spectral peak area integral value corresponding to each target peak position based on the pre-calibrated quantitative conversion relationship between the spectral peak area integral value and the alkaline concentration. The deviation calculation unit is used to compare the detected value of alkali concentration with the preset target concentration value and calculate the concentration deviation value. The control generation unit is used to input the concentration deviation value into the regulating controller, which processes the concentration deviation value according to the preset regulating strategy and generates a concentration regulating control signal containing the regulating direction and regulating amount. The closed-loop control unit is used to drive the alkali dosing device to quantitatively inject alkali or diluent into the alkali tank according to the concentration control signal. After the injection is completed, it waits for a preset stabilization time before returning to the step of collecting the transmission spectrum signal of the alkali to be tested, forming a closed-loop detection and control cycle until the concentration deviation value falls within the preset allowable deviation range.

9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.