Oil content detection method, device and equipment and storage medium
By employing a dual-wavelength ultraviolet differential detection method and Lambert-Beer's law, the accuracy problem of high-concentration tar detection was solved, enabling real-time control and efficient tar recovery, and improving the robustness of the detection system and the separation efficiency of the centrifuge.
Patent Information
- Application Number
- CN202511458847.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2026-01-23
AI Technical Summary
Existing oil detection technologies in water cannot accurately detect high concentrations of tar, resulting in low tar recovery efficiency. Furthermore, traditional sensors exhibit data distortion in high-concentration areas, making real-time control impossible and causing economic losses and environmental pollution risks.
The dual-wavelength ultraviolet differential detection method is adopted. By controlling the ultraviolet light source to emit dual-wavelength ultraviolet light to the water sample, the two transmitted light signals are acquired, amplified and converted, the absorbance difference is calculated, and combined with Lambert-Beer's law, the accurate detection of high-concentration tar is achieved, and the centrifuge speed is adjusted in real time.
It enables accurate detection of high-concentration tar, improves tar recovery efficiency, reduces economic losses and environmental pollution risks, ensures that centrifuge separation parameters are synchronized with water quality changes, and enhances the robustness and continuous operation capability of the detection system.
Smart Images

Figure CN121384855A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of water quality monitoring, and in particular to an oil content detection method, device, equipment and storage medium. BACKGROUND
[0002] In the production process of semi-coke and metallurgical coke, the quenching ammonia water contains high concentration of coal tar, and the ammonia water itself has color and turbidity interference, which poses a serious challenge to the detection of oil content in water. At present, the commercially available online water oil detection sensor is mostly based on optical principle (such as ultraviolet absorption method), but the range is usually limited to 0-2000ppm, which cannot cover the detection requirement of high concentration of tar, resulting in data distortion or inability to measure in the application of quenching ammonia water.
[0003] It is particularly important to note that the existing detection technology has serious deficiencies in tar recovery efficiency. Due to the lack of accurate and real-time tar concentration detection data, the tar recovery process (such as centrifugal separation) is often adjusted based on experience or lagging manual test data, which cannot achieve precise control. When high concentration of tar appears, the traditional sensor cannot effectively detect, resulting in that the centrifuge fails to speed up and increase efficiency in time, and a large amount of tar is not recovered but circulates or is discharged with ammonia water; manual sampling analysis has a long cycle (usually several hours to several days), and the data is seriously lagging, which cannot adapt to the real-time changes of ammonia water quality, and the centrifuge separation parameters (such as speed and feed amount) cannot be adjusted in time; under the existing technical conditions, the tar recovery rate is generally low, which not only causes economic loss, but also aggravates the burden of subsequent water treatment system and the risk of environmental pollution. SUMMARY
[0004] Therefore, it is necessary to provide an oil content detection method, device, equipment and storage medium to solve the technical problem of being unable to accurately detect the oil content in water.
[0005] To solve the above problems, the present application provides an oil content detection method, comprising: controlling a UV light source to emit a preset light intensity of double-wavelength UV light to a short-path cuvette containing a flowing water sample to be detected; acquiring two transmittance light signals, amplifying and signal converting the two transmittance light signals to obtain two digital signals; calculating the absorbance of the two transmittance light signals according to the two digital signals, and obtaining the oil content of the water sample to be detected according to the absorbance of the two transmittance light signals.
[0006] In a possible implementation manner, the acquiring two transmittance light signals, amplifying and signal converting the two transmittance light signals to obtain two digital signals comprises: acquiring two transmittance light signals, and converting the two transmittance light signals into two electric signals; Amplify the two electric signals to obtain amplified two electric signals; Analog-to-digital convert the amplified two electric signals to obtain two digital signals.
[0007] In a possible implementation, the analog-to-digital conversion of the amplified two electric signals to obtain two digital signals comprises: Sampling the amplified two electric signals to obtain a sampling signal, and identifying the voltage intensity of the sampling signal; When the voltage intensity belongs to a preset voltage intensity range, analog-to-digital converting the amplified two electric signals to obtain two digital signals.
[0008] In a possible implementation, after the analog-to-digital conversion of the amplified two electric signals to obtain two digital signals when the voltage intensity belongs to a preset voltage intensity range, the method further comprises: When the voltage intensity is lower than the preset voltage intensity range, enhancing the preset light intensity, and re-executing the step of controlling the ultraviolet light source to emit the preset light intensity of the dual-wavelength ultraviolet light to the short-path cuvette containing the flowing water sample to be detected; When the voltage intensity is higher than the preset voltage intensity range, reducing the preset light intensity, and re-executing the step of controlling the ultraviolet light source to emit the preset light intensity of the dual-wavelength ultraviolet light to the short-path cuvette containing the flowing water sample to be detected.
[0009] In a possible implementation, the calculation of the absorbance of the two transmitted light signals according to the two digital signals, and the obtaining of the oil content of the water sample to be detected according to the absorbance of the two transmitted light signals comprises: Obtaining the transmitted light intensity of the two transmitted light signals according to the two digital signals; Obtaining the absorbance of the two transmitted light signals according to the preset light intensity and the transmitted light intensity; Obtaining the oil content of the water sample to be detected according to the absorbance of the two transmitted light signals.
[0010] In a possible implementation, the obtaining of the oil content of the water sample to be detected according to the absorbance of the two transmitted light signals comprises: Subtracting the absorbance of the two transmitted light signals to obtain an absorbance difference of the two transmitted light signals; Calculating the oil content of the water sample to be detected through the Lambert-Beer law according to the absorbance difference.
[0011] In a possible implementation, after the calculation of the absorbance of the two transmitted light signals according to the two digital signals, and the obtaining of the oil content of the water sample to be detected according to the absorbance of the two transmitted light signals, the method further comprises: According to the oil content query centrifuge speed table, a target speed is obtained; The centrifuge speed is adjusted to the target speed to carry out tar recovery through the target speed.
[0012] In addition, to achieve the above object, the present application also provides an oil content detection device, which comprises: A control module is configured to control the ultraviolet light source to emit double-wavelength ultraviolet light with a preset light intensity to the short-path cuvette containing the flowing water sample to be detected; An acquisition module is configured to acquire two light transmission signals, amplify and convert the signals to obtain two digital signals; A detection module is configured to calculate the absorbance of the two light transmission signals according to the two digital signals, and obtain the oil content of the water sample to be detected according to the absorbance of the two light transmission signals.
[0013] In addition, to achieve the above object, the present application also provides an electronic device, which comprises a memory, a processor, a display, and an oil content detection program stored in the memory and executable on the processor, and the oil content detection program is configured to implement the steps of the oil content detection method as described above.
[0014] In addition, to achieve the above object, the present application also provides a storage medium, which stores an oil content detection program, and the oil content detection program implements the steps of the oil content detection method as described above when executed by a processor.
[0015] The beneficial effects of the above implementation manner are that: the double-wavelength ultraviolet light is used for differential detection of the water sample to be detected, the light signal amplification and signal conversion are used to maintain the wide-range detection capability, the interference of ammonia water coloration and turbidity on the detection result is effectively suppressed, the stable linear relationship between the oil concentration and the detection signal is realized through the combination of the absorbance difference and the Lambert-Beer law, and the oil content is accurately detected. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0017] Figure 1 The flowchart of the first embodiment of the oil content detection method of the present application; Figure 2 The structural schematic diagram of the oil content detection system of the first embodiment of the oil content detection method of the present application; Figure 3 The structure diagram of the program-controlled amplification circuit of the first embodiment of the oil content detection method of the present application; Figure 4 The flowchart of the second embodiment of the oil content detection method of the present application; Figure 5 The photoelectric conversion structure diagram of the two-way transmitted light of the second embodiment of the oil content detection method of the present application; Figure 6 The structure block diagram of the first embodiment of the oil content detection device of the present application; Figure 7 The structure diagram of the electronic device of the present application. DETAILED DESCRIPTION
[0018] The technical solutions in the embodiments of the present application will be clearly and completely described in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0019] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more than two.
[0020] In the embodiments of the present application, the terms "comprising" and "having" and any variations thereof are intended to cover the inclusions that are not exclusive, for example, the processes, methods, devices, products or equipment comprising a series of steps or modules do not have to be limited to the clearly listed steps or modules, but can include other steps or modules that are not clearly listed or inherent to these processes, methods, products or equipment.
[0021] The naming or numbering of the steps appearing in the embodiments of the present application does not mean that the steps in the method flow must be performed in the time / logical order indicated by the naming or numbering. The flow steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.
[0022] In this document, the reference to "embodiments" means that the specific features, structures or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase appears at various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily independent or alternative embodiments to other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0023] The execution subject of the embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone or the like, or an electronic device capable of realizing the above functions, an oil content detection device or the like. The embodiment and the following embodiments are described below by taking the oil content detection device as an example.
[0024] The embodiment of the present application provides an oil content detection method, which refers to Figure 1 , Figure 1 The embodiment of the present application provides an oil content detection method, which refers to
[0025] In the embodiment, the oil content detection method comprises steps S10-S40. Step S10: controlling the ultraviolet light source to emit double-wavelength ultraviolet light with a preset light intensity to the short-path cuvette containing the flowing water sample to be detected.
[0026] It should be noted that the control of the ultraviolet light source is an active and accurate regulation by the master control chip through a precision circuit, which ensures that the light intensity emitted by the light source is very stable (current fluctuation <±0.05%), and avoids introducing detection errors due to fluctuations of the light source itself.
[0027] It should be noted that double-wavelength ultraviolet light with a preset light intensity as a default light intensity is emitted each time the oil content is detected, and the preset light intensity is further adjusted if it is too strong or too weak.
[0028] It should be understood that the double-wavelength ultraviolet light refers to the use of two different wavelengths of ultraviolet light at the same time or in rapid alternation, including a main detection wavelength of 254 nm, which is the characteristic absorption wavelength of organic matter such as aromatic hydrocarbons in coal tar. When the light of this wavelength passes through the sample, it will be specifically absorbed by the tar molecules, and the light intensity will be weakened, and the degree of weakening is proportional to the tar concentration.
[0029] It also includes a reference wavelength of 400 nm, at which the coal tar has weak absorption of light of this wavelength, but it will be disturbed by the turbidity (such as suspended particulate matter) in the water sample and the color of the ammonia water itself to produce scattering or absorption.
[0030] It should be understood that the design of double-wavelength is mainly to calculate the difference in light intensity attenuation at two wavelengths, which can effectively eliminate the interference of turbidity and color, so as to obtain the true absorbance related only to the tar concentration, and significantly improve the detection accuracy.
[0031] It should be emphasized that the flowing water sample to be detected can be real-time ammonia water from the production line. This reflects the "online" and "real-time" characteristics of the device, and the sample is continuously flowing rather than static sampling, which can truly reflect the instantaneous changes of the process.
[0032] The short-path cuvette is a key innovation for realizing wide-range (200-50000 ppm) detection. The optical path refers to the distance that light travels in the sample, and in this case, it specifically refers to an extremely short distance of 1 mm ± 0.005 mm. In this case, fused quartz is used, which has excellent ultraviolet light transmittance and chemical stability.
[0033] It should be emphasized that, according to the Lambert-Beer law, absorbance is proportional to the optical path and concentration. For high-concentration samples up to 50000 ppm, if a traditional long optical path (such as tens of millimeters) is used, the light will be completely absorbed, the signal will be saturated, and it will not be possible to measure. Using a short optical path is like "peering at a leopard in a tube", only a very thin liquid layer is measured, even if the concentration is high, there will be enough light signal penetration to ensure accurate detection of the high-concentration region.
[0034] In specific implementation, through precise electronic control, a special light source is driven to emit ultraviolet light of two specific wavelengths and high-intensity stability towards the flowing micro sample cell of the ammonia water to be measured, providing an accurate light signal basis for subsequent concentration calculation.
[0035] It should be emphasized that the implementation of the present embodiment is based on an oil content detection system, and the structure of the oil content detection system can refer to Figure 2 , Figure 2 The oil content detection system mainly includes coke quenching ammonia water, a flow cuvette that can be flowed through at both ends to supply coke quenching ammonia water, i.e., a short-path cuvette, an optical detection waterway, and an ammonia water pool. The gear pump is used to drive the coke quenching ammonia water into the flow cuvette, and an electromagnetic valve is further included at the front end of the flow cuvette. The electromagnetic valve is a fluid passage switching unit, which controls the switching of the detection and cleaning channels through the electromagnetic valve to control whether the coke quenching ammonia water or the cleaning liquid enters the flow cuvette, thereby ensuring the automation of detection and cleaning.
[0036] It should be noted that the anti-pollution design is based on the electromagnetic valve, which reduces oil pollution adhesion through TiO2-SiO2 nano-oleophobic plating film (contact angle > 150°) and integrates a pulse-type high-pressure nitrogen micro-explosion gas system (0.5 MPa, 10 ms interval), which extends the maintenance period to 6 months (the traditional device needs to be cleaned every week).
[0037] It should be emphasized that the oleophobic plating film uses a magnetron sputtering process to deposit a 50 nm thick TiO2-SiO2 layer, which reduces the oil adhesion rate by 82%. The micro-explosion gas cleaning system controls the nitrogen passage through the electromagnetic valve and triggers pulse cleaning during detection intervals.
[0038] It should be noted that in the detection process of the oil content detection system, the electromagnetic valve is switched to the quenching ammonia water channel, the liquid flows through the cuvette, and then the optical detection circuit is used to realize the ammonia water concentration measurement, and then the ammonia water is returned to the pool; in the cleaning process, the electromagnetic valve is switched to the cleaning liquid channel, the blast cleaning liquid flows through the cuvette to remove the residual oil film, and after cleaning, the electromagnetic valve is automatically switched to the measurement channel; the switching of the two processes can be set to be switched at a fixed time, or can be set to be switched manually.
[0039] Step S20: Obtain two light transmission signals, amplify and convert the signals of the two light transmission signals to obtain two digital signals.
[0040] It should be understood that the two light transmission signals are the light signals of the double-wavelength ultraviolet light after passing through the water sample to be detected; It should be noted that the two light transmission signals are collected by the light receiving end of the middle detection circuit. Figure 2
[0041] Among them, the amplification of the two light transmission signals can be realized by the program-controlled amplification circuit included in the middle detection circuit, and the structure diagram of the program-controlled amplification circuit can refer to Figure 2 Figure 3 Figure 3 The middle includes a core chip (U1), the pin 1 (IN) of the core chip is connected to a +9V power supply to provide energy for the chip and the load (LED); a constant current flows out from the pin 2 (OUT), which is directly connected to the anode of the LED1, and is connected to the SET pin through a resistor R1; the pin 3 (SET) is connected to the OUT pin through a resistor R1, and is directly connected to the control voltage output end of the external DAC, and the voltage on this pin determines the size of the output current; the pin 4 (TAB) is connected to the internal heat sink (GND) to help the chip dissipate heat. The anode (+) of the ultraviolet LED (LED1) is connected to the OUT pin of U1; the cathode (-) is connected to the ground (GND). One end of the resistor (R1) is connected to the OUT pin of U1, and the other end is connected to the SET pin of U1. The output end of the control voltage source (DAC) is connected to the SET pin of U1, and one end of the filter capacitor (C1-100nF) is connected to the IN pin of U1 and the +9V power supply; the other end is connected to the ground (GND).
[0042] It should be noted that the signal conversion process refers to converting the optical signal into an electrical signal, and then forming a digital signal through amplification and analog-to-digital conversion. For example, a transimpedance amplifier is used for current-voltage conversion, and then a 16-bit ADC chip is used for signal digitization.
[0043] Step S30: Calculate the absorbance of the two light transmission signals according to the two digital signals, and obtain the oil content of the water sample to be detected according to the absorbance of the two light transmission signals.
[0044] It can be understood that the two digital signals can respectively represent the transmission light intensity at 254nm and 400nm wavelengths, the light intensity emitted by the ultraviolet light source is known, and the dual-wavelength ultraviolet light is absorbed by the substances in the water sample after passing through the water sample, resulting in a change in light intensity.
[0045] It should be understood that the original light intensity emitted is subtracted from the received light intensity to obtain the absorbance of the water sample to be detected, but because the concentration of ammonia in the water sample to be detected will affect the light intensity, other substances will also affect the absorbance, so the light of one wavelength reflects the absorbance of the interfering substances, and the light of one wavelength reflects the absorbance of the interfering substances and the substance to be detected. The absorbance of the pure substance to be detected can be obtained by comprehensively analyzing the absorbance, so that the concentration of the substance to be detected in the water sample to be detected can be obtained, that is, the oil content of the water sample to be detected can be obtained.
[0046] In a specific implementation, after the dual-wavelength light beams emitted by the ultraviolet light source penetrate the flowing water sample to be detected, the two transmission lights are received by the photoelectric sensors. The change in transmission light intensity forms a current signal through photoelectric conversion, and after amplification and digitization processing, the absorbance difference at two wavelengths is calculated, and then the linear relationship between the absorbance difference calibrated according to the Lambert-Beer law and the oil concentration is calculated to obtain the actual oil content.
[0047] It should be noted that after the two transmission light signals are calculated according to the two digital signals, the oil content of the water sample to be detected is obtained, and then the following steps are included: querying a centrifuge speed table according to the oil content to obtain a target speed; and adjusting the centrifuge speed to the target speed to recover the tar through the target speed.
[0048] It should be noted that the centrifuge speed table refers to a query table of the correspondence between the preset oil content and the centrifuge speed, which can be implemented by using a database or a mapping relationship table, and is used to convert the real-time detected oil content value into the corresponding centrifuge operating parameter.
[0049] The target speed refers to the speed value corresponding to the best separation efficiency of the centrifuge matched based on the current oil content level, which can be determined by experimentally calibrating the centrifuge separation efficiency curve at different oil contents, and is used to guide the real-time adjustment of the centrifuge operating parameter.
[0050] Further, the centrifuge speed adjustment refers to the speed regulation of the centrifuge driving motor through the frequency converter or servo control system, which can be implemented by using a closed-loop control algorithm, and is used to dynamically optimize the separation performance of the centrifuge according to the detection data.
[0051] In a specific implementation, when the oil content of the water sample is detected in real time, the optimal operating speed of the centrifuge at the current oil content level can be quickly determined by querying the pre-established correspondence table of oil content and centrifuge speed. After the speed value is transmitted to the centrifuge control system, the drive motor immediately executes the speed adjustment instruction, so that the centrifuge operates at the target speed. This dynamic adjustment mechanism based on real-time detection data ensures that the centrifuge separation parameters always match the current tar concentration, overcoming the hysteresis problem of traditional manual adjustment.
[0052] It is worth noting that through the real-time linkage of online detection and centrifuge control, a response speed of seconds can be achieved, ensuring that the centrifuge is always in the best working condition. Continuous detection and automatic control enable the speed parameter to form a closed-loop feedback with the real-time concentration, significantly improving the separation efficiency. The problem of improper centrifuge adjustment timing caused by missing or lagging detection data in traditional tar recovery processes is solved, and the waste of resources caused by the failure to recover high-concentration tar in time is avoided. The real-time linkage control mode ensures that the centrifuge separation efficiency and water quality changes are synchronized, effectively reducing the operating load of the subsequent water treatment system and reducing the risk of equipment pollution caused by tar residues.
[0053] In a feasible implementation, step S30 can include steps A31-A33: Step A31, obtaining the transmission light intensity of the two-way transmission light signals according to the two-way digital signals.
[0054] It should be understood that the transmission light intensity refers to the actual light energy value of the ultraviolet light after penetrating the flowing water sample to be detected. Specifically, a photoelectric sensor can be used to convert the light signal into an electrical signal to achieve this parameter, which directly reflects the degree of light attenuation in the water sample.
[0055] It should be noted that converting the two-way digital signals into the transmission light intensity of the two-way transmission light signals requires a series of steps, namely dark voltage compensation and gain normalization. The dark voltage compensation is used to subtract the background noise, and the gain normalization is used to eliminate the influence of the amplification multiple.
[0056] In a specific implementation, the PGA gain is set to x100; the MCU reads the ADC value at 254 nm wavelength as 3000. Given that the dark voltage offset ADC_Offset=100 and the total gain of the system Gain=100, the calculated transmission light intensity I_254=(3000-100) / 100=29.
[0057] Step A32, obtaining the absorbance of the two-way transmission light signals according to the preset light intensity and the transmission light intensity.
[0058] It should be understood that the absorbance refers to the degree of attenuation of ultraviolet light after being absorbed by oil substances in the water sample, which can be calculated by taking the logarithm of the ratio of the preset light intensity and the transmitted light intensity. The parameter is used to represent the absorption characteristics of oil substances to light of a specific wavelength.
[0059] It should be understood that the absorbance of the two transmitted light signals respectively refers to the transmitted light signals corresponding to two different wavelengths of ultraviolet light.
[0060] Step A33, obtaining the oil content of the water sample to be detected according to the absorbance of the two transmitted light signals.
[0061] It should be noted that the transmitted light intensity is converted into an electrical signal by a photoelectric conversion module, amplified and analog-digital converted to form a digital signal. The preset light intensity is used as an initial reference value, compared with the measured transmitted light intensity, and the Lambert-Beer law is used to establish the mathematical relationship between the absorbance and the oil concentration. The differential detection of dual-wavelength ultraviolet light can effectively eliminate the interference of ammonia water background color and turbidity. The difference between the two absorbances can eliminate the absorption interference of non-oil substances.
[0062] It should be understood that the traditional single-wavelength detection method is prone to baseline drift under the interference of ammonia water turbidity, resulting in failure of high-concentration oil detection.
[0063] It should be noted that the oil content of the water sample to be detected is obtained according to the absorbance of the two transmitted light signals, including: subtracting the absorbance of the two transmitted light signals to obtain the absorbance difference of the two transmitted light signals; and calculating the oil content of the water sample to be detected by the Lambert-Beer law.
[0064] Wherein, the absorbance difference refers to the difference in absorbance of two different wavelengths of ultraviolet light after passing through the water sample to be detected. The dual-wavelength differential algorithm can be used to achieve this. By selecting a specific wavelength combination, the absorbance difference of oil substances at two wavelengths is maximized, while the absorbance difference of other interfering substances in the water sample at two wavelengths approaches zero, thereby eliminating background interference.
[0065] Wherein, it should be noted that when the dual-wavelength ultraviolet light passes through the flowing water sample, the first wavelength is selected as the characteristic absorption peak of oil substances, and the second wavelength is selected as the baseline region of the oil substance absorption curve. The transmitted light intensity of the two channels is converted into absorbance after photoelectric conversion. By subtracting the absorbance, the interference signals of non-oil substances such as water sample turbidity and suspended particles are eliminated. The absorbance difference only reflects the light absorption characteristics of oil substances. Subsequently, based on the linear relationship of the Lambert-Beer law, the real-time detection value of the oil content in the water sample can be directly obtained according to the absorbance difference.
[0066] Specifically, the Lambert-Beer law refers to the proportional relationship between the light absorption amount and the concentration of the substance and the length of the light path, and the logarithmic conversion formula can be used to realize the proportional relationship, the absorbance difference is associated with the known molar absorption coefficient of the oil substance and the length of the light path for calculation, and a linear mapping relationship between the absorbance difference and the oil concentration is established.
[0067] It should be noted that when the dual-wavelength ultraviolet light passes through the flowing water sample, the first wavelength is selected as the characteristic absorption peak of the oil substance, and the second wavelength is selected as the baseline region of the oil substance absorption curve. The transmittance of the two light paths is converted into absorbance, and the absorbance is subtracted to eliminate the interference signals of non-oil substances such as water turbidity and suspended particles. The absorbance difference only reflects the light absorption characteristics of the oil substance, and then based on the linear relationship of the Lambert-Beer law, the absorbance difference is substituted into the preset concentration calculation model to directly output the real-time detection value of the oil content in the water sample.
[0068] It should be noted that the traditional single-wavelength detection method is easily disturbed by the background in the high-turbidity ammonia environment, which leads to signal saturation or baseline drift when detecting high-concentration oil content. The dual-wavelength differential detection method of the embodiment effectively eliminates the light absorption interference of non-oil substances and expands the upper limit of the detection range. At the same time, the linear calculation model based on the absorbance difference avoids the complex data correction process in the traditional method, and improves the detection accuracy in the high-concentration region.
[0069] Further, the high-concentration tar content of 50,000 ppm or more in ammonia water can be accurately detected, and the interference of ammonia color and turbidity on the detection result is eliminated, real-time data support is provided for centrifuge speed regulation, the stable linear relationship between oil concentration and detection signal is realized through the combination of absorbance difference and Lambert-Beer law, and the problem of data distortion of the traditional sensor in the high-concentration region is solved, so that the centrifuge can dynamically adjust the separation parameters according to the real-time concentration, and the tar recovery efficiency is improved.
[0070] In the embodiment, the dual-wavelength differential detection technology effectively suppresses the optical interference of complex water samples while maintaining the wide-range detection capability, and solves the problem of signal saturation when detecting high-concentration tar of 50,000 ppm or more with the existing sensor.
[0071] The above is only a feasible implementation manner of step S30 provided by the embodiment, and the embodiment does not specifically limit the specific implementation manner of step S30.
[0072] The embodiment provides an oil content detection method, which differentially detects the water sample to be detected by dual-wavelength ultraviolet light, maintains the wide-range detection capability based on light signal amplification and signal conversion, effectively suppresses the interference of ammonia color and turbidity on the detection result, realizes the stable linear relationship between the oil concentration and the detection signal through the combination of the absorbance difference and the Lambert-Beer law, and accurately detects the oil content.
[0073] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above embodiment one can refer to the above introduction, and the subsequent will not be described. On this basis, please refer to Figure 4 , step S20, the oil content detection method further comprises steps S21-S23: Step S21: obtaining two transmission light signals, converting the two transmission light signals into two electrical signals.
[0074] It should be noted that the conversion of the two transmission light signals into two electrical signals is a physical process based on photoelectric effect, which is completed by a photodiode and a transimpedance amplifier.
[0075] Among them, the photodiode is a kind of semiconductor material, when the photon of a certain wavelength irradiates on its PN junction, it will excite the electron-hole pair to move directionally under the action of reverse bias, thereby forming a weak photocurrent in the external circuit.
[0076] It should be emphasized that the magnitude of the photocurrent is proportional to the intensity of the light irradiated on the photodiode. The stronger the light, the greater the current generated. Thus, the intensity information of the light has been linearly converted into the intensity information of the current.
[0077] It should be noted that the transimpedance amplifier is a special operational amplifier circuit, its main function is to linearly convert current signal into voltage signal; because the photocurrent generated by the photodiode is very weak (usually nA to μA level), and is a current signal, it is not convenient to measure and process directly.
[0078] It can be understood that based on the photodiode and the transimpedance amplifier, the two transmission light signals are processed respectively, and a voltage signal proportional to the intensity of the transmission light and easy to process, i.e. an electrical signal, is obtained.
[0079] Step S22: signal amplification is performed on the two electrical signals to obtain two amplified electrical signals.
[0080] It should be noted that signal amplification refers to gain adjustment of weak electrical signals, which can be realized by using an operational amplifier or a programmable gain amplifier. This step can improve the signal strength to match the input range of the analog-to-digital converter.
[0081] In one possible implementation, step S22 can include steps A221-A222: Step A221, sampling the two amplified electrical signals to obtain a sampling signal, and identifying the voltage intensity of the sampling signal.
[0082] It should be noted that the sampling of the amplified two-way electrical signals to obtain the sampling signals can be that the sampling circuit of the analog-to-digital converter periodically acquires the voltage instantaneous value of the electrical signal, which can be implemented by using an analog-to-digital conversion chip with a fixed sampling rate, for example, collecting voltage data at a frequency of several thousand times per second.
[0083] It should be noted that identifying the voltage intensity of the sampling signal refers to comparing the voltage value obtained by sampling with the preset upper and lower threshold values, which can be implemented by a comparator of a microcontroller, for example, setting a voltage range of 0.5 volts to 4.5 volts as the effective range.
[0084] Step A222, when the voltage intensity belongs to the preset voltage intensity range, the amplified two-way electrical signals are analog-to-digital converted to obtain two-way digital signals.
[0085] It should be noted that the preset voltage intensity range refers to the voltage threshold interval preset according to the linear response interval of the photoelectric conversion device and the range of the analog-to-digital converter, and the preset voltage intensity range can also be understood as a voltage interval that is relatively easy to identify for analog-to-digital conversion.
[0086] It should be understood that if the signal is in the preset voltage intensity range, the analog-to-digital converter is started to convert the analog signal to a digital signal. If the voltage is detected to be lower than the lower threshold of the preset voltage intensity range, it indicates that the transmitted light signal is too weak, which can be caused by light source attenuation or light path pollution; if the voltage is higher than the upper threshold of the preset voltage intensity range, it indicates that the light intensity exceeds the linear response range of the detection system. This judgment mechanism ensures that only the effective signal is digitized to avoid measurement errors caused by signal overload or deficiency. This is also part of the reason why the traditional measurement range is not enough and the detection result is not accurate. Only the amplification circuit cannot guarantee that the voltage belongs to the voltage range required by the analog-to-digital conversion.
[0087] It should be noted that after the two-way digital signals are obtained by analog-to-digital conversion of the amplified two-way electrical signals when the voltage intensity belongs to the preset voltage intensity range, the method further comprises: when the voltage intensity is lower than the preset voltage intensity range, enhancing the preset light intensity and re-executing the step of controlling the ultraviolet light source to emit the preset light intensity of the dual-wavelength ultraviolet light to the short-path cuvette containing the flowing water sample to be detected; when the voltage intensity is higher than the preset voltage intensity range, reducing the preset light intensity and re-executing the step of controlling the ultraviolet light source to emit the preset light intensity of the dual-wavelength ultraviolet light to the short-path cuvette containing the flowing water sample to be detected.
[0088] It should be noted that the preset light intensity is increased by adjusting the driving current or pulse width of the ultraviolet light source to increase the light output power, which can be realized by using an adjustable constant current source, for example, the current is increased from 100 mA to 150 mA. Reducing the preset light intensity means reducing the light output power by reducing the driving current or shortening the pulse width, which can be realized by adjusting the driving circuit parameters using a digital potentiometer, for example, the current is reduced from 100 mA to 80 mA.
[0089] In specific implementation, when the amplified electrical signal voltage is detected to be lower than the preset range, it indicates that the transmitted light is too strong to cause the photoelectric conversion signal to be saturated, at which time the light flux is reduced by reducing the light source intensity; when the voltage is higher than the preset range, it indicates that the transmitted light is too weak to cause the signal-to-noise ratio to be insufficient, at which time the light flux is increased by increasing the light source intensity. The system automatically adjusts the light intensity and re-executes the detection process until the electrical signal falls within the effective conversion interval, ensuring the accuracy of subsequent absorbance calculation.
[0090] It should be noted that if the signal intensity of the electrical signal after amplification still does not belong to the required voltage range of the analog-to-digital conversion device, the intensity of the double-wavelength ultraviolet light emitted at the beginning can be adjusted to adjust the intensity of the transmitted light, thereby adjusting the voltage intensity corresponding to the transmitted light.
[0091] It should be understood that the measurement method with a wider range is realized by adjusting the programmable amplification circuit and the adjustable intensity of the ultraviolet light source in this embodiment, thereby obtaining more accurate measurement results.
[0092] In this embodiment, by establishing a closed-loop feedback mechanism, the light source output intensity is optimized in real time, so that the detection system can adapt to different turbidity and chroma of water samples, effectively expanding the upper limit of the detection range, solving the problem of measurement failure caused by signal exceeding the conversion range during detection of high-concentration tar water samples, avoiding the tedious operation of manual repeated adjustment of detection parameters, and significantly improving the robustness and continuous operation ability of the detection system., providing a reliable data basis for subsequent tar recovery process.
[0093] The above is only a feasible implementation manner of step S22 provided by the present embodiment, and the present embodiment does not specifically limit the specific implementation manner of step S22.
[0094] Step S23: performing analog-to-digital conversion on the amplified two-channel electrical signals to obtain two-channel digital signals.
[0095] It should be noted that analog-to-digital conversion means converting an analog electrical signal into a digital signal, which can be realized by using a successive approximation type or integral type analog-to-digital conversion chip to provide standardized digital input for subsequent absorbance calculation.
[0096] In specific implementation, the photoelectric conversion structure of the two-channel transmitted light can refer to the photoelectric conversion structure of the transmitted light in the first embodiment of the present applicationFigure 5 , Figure 5 The main control chip, constant current source, flow cuvette containing the measured liquid, photocell, photoelectric conversion module (IV conversion) and digital-analog conversion module (AD sampling module) are included in the device. The main control determines whether the intensity of the transmitted light signal meets the preset intensity requirement according to the AD sampling module. If not, the intensity of the ultraviolet light source is adjusted by the corresponding control current source, and the transmitted light is received again until the voltage intensity of the transmitted light meets the requirement of the digital-analog conversion module for the voltage intensity.
[0097] It should be noted that when the dual-wavelength ultraviolet light penetrates the flowing water sample, the two-way transmitted light of different wavelengths is captured by the photoelectric sensor and converted into an electric signal. Due to the strong absorption of high-concentration tar to ultraviolet light, the original electric signal may be in an extremely low intensity interval. At this time, the signal is linearly enhanced through a multi-stage amplification circuit, and the amplified electric signal is input into an analog-to-digital converter after anti-aliasing filtering processing to generate a digital signal sequence with a fixed bit width, providing an accurate data source for subsequent establishment of a mathematical model of absorbance and oil content.
[0098] The embodiment provides an oil content detection method, which effectively avoids the measurement failure problem caused by signal exceeding the range by dynamically judging the voltage intensity range, ensures that the analog-digital conversion process is always converted within the standard voltage range, maintains the detection system in the best working state, and significantly improves the reliability and data effectiveness of high-concentration tar detection.
[0099] In order to better implement the oil content detection method in the embodiment of the application, on the basis of the oil content detection method, as shown in Figure 6 The embodiment of the application also provides an oil content detection device, which comprises: A control module 601 is configured to control the ultraviolet light source to emit dual-wavelength ultraviolet light with a preset light intensity to a short-path cuvette containing flowing water sample to be detected. An acquisition module 602 is configured to acquire two-way transmitted light signals, amplify and perform signal conversion processing on the two-way transmitted light signals, and obtain two-way digital signals. A detection module 603 is configured to calculate the absorbance of the two-way transmitted light signals according to the two-way digital signals, and obtain the oil content of the water sample to be detected according to the absorbance of the two-way transmitted light signals.
[0100] The oil content detection device 600 provided in the above embodiment can realize the technical solutions described in the above oil content detection method embodiment. The principles of the specific implementation of the above modules or units can be referred to the corresponding content in the above oil content detection method embodiment, which will not be described here.
[0101] As shown in Figure 7As shown, the present application also provides an electronic device 700. The electronic device 700 comprises a processor 701, a memory 702 and a display 703. Figure 7 Only part of the components of the electronic device 700 are shown, but it should be understood that all the shown components are not required, and more or less components can be alternatively implemented.
[0102] The memory 702 can be an internal storage unit of the electronic device 700, such as a hard disk or a memory of the electronic device 700 in some embodiments. The memory 702 can also be an external storage device of the electronic device 700, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device 700 in other embodiments.
[0103] Further, the memory 702 can include both an internal storage unit and an external storage device of the electronic device 700. The memory 702 is used to store application software and various data installed on the electronic device 700.
[0104] The processor 701 can be a Central Processing Unit (CPU), a microprocessor or other data processing chip in some embodiments, used to run program codes or process data stored in the memory 702, such as the oil content detection method in the present application.
[0105] The display 703 can be an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, etc. in some embodiments. The display 703 is used to display information of the electronic device 700 and to display visual user interfaces. The components 701-703 of the electronic device 700 communicate with each other through a system bus.
[0106] In some embodiments of the present application, when the processor 701 executes the oil content detection program in the memory 702, the following steps can be implemented: controlling the ultraviolet light source to emit a preset light intensity of double-wavelength ultraviolet light to a short-path cuvette containing a flowing water sample to be detected; acquiring two light transmission signals, amplifying and signal converting the two light transmission signals to obtain two digital signals; calculating the absorbance of the two light transmission signals according to the two digital signals, and obtaining the oil content of the water sample to be detected according to the absorbance of the two light transmission signals.
[0107] It should be understood that, in addition to the above functions, the processor 701 can also implement other functions when executing the oil content detection program in the memory 702. For details, refer to the descriptions of the corresponding method embodiments.
[0108] Further, the embodiments of the present application do not specifically limit the type of the electronic device 700, and the electronic device 700 can be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop, and the like. Exemplary embodiments of the portable electronic device include, but are not limited to, a portable electronic device running an IOS, an android, a microsoft, or another operating system. The portable electronic device described above can also be another portable electronic device such as a laptop having a touch-sensitive surface (e.g., a touch panel). It should also be understood that, in some other embodiments of the present application, the electronic device 700 can not be a portable electronic device, but a desktop computer having a touch-sensitive surface (e.g., a touch panel).
[0109] In another aspect, the present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the oil content detection method provided by the above method, and the method comprises: controlling the ultraviolet light source to emit a preset light intensity of double-wavelength ultraviolet light to a short-path cuvette containing a flowing water sample to be detected; acquiring two light transmission signals, amplifying and signal converting the two light transmission signals to obtain two digital signals; calculating the absorbance of the two light transmission signals according to the two digital signals, and obtaining the oil content of the water sample to be detected according to the absorbance of the two light transmission signals.
[0110] Those skilled in the art can understand that all or part of the processes of the above-mentioned embodiments can be completed by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium includes a magnetic disk, an optical disk, a read-only memory, a random access memory, and the like.
[0111] The oil content detection method provided by the present application is described in detail above, and specific examples are applied to describe the principles and implementation modes of the present application. The above description of the embodiments is only used to help understand the method and core idea of the present application; meanwhile, for those skilled in the art, the specific implementation mode and application range can be changed according to the idea of the present application. In summary, the content of the present description should not be understood as a limitation of the present application.
Claims
1. An oil content detection method characterized by, The method comprises the following steps: controlling the ultraviolet light source to emit preset light intensity of double-wavelength ultraviolet light to a short-path cuvette containing flowing water sample to be detected; acquiring two light transmission signals, amplifying and signal converting the two light transmission signals to obtain two digital signals; calculating the absorbance of the two light transmission signals according to the two digital signals, and obtaining the oil content of the water sample to be detected according to the absorbance of the two light transmission signals.
2. The oil content detection method according to claim 1, wherein The method of acquiring two light transmission signals, amplifying and signal converting the two light transmission signals to obtain two digital signals comprises the following steps: acquiring two light transmission signals, and converting the two light transmission signals into two electric signals; amplifying the two electric signals to obtain amplified two electric signals; analog-digital converting the amplified two electric signals to obtain two digital signals.
3. The oil content detection method according to claim 2, wherein The method of analog-digital converting the amplified two electric signals to obtain two digital signals comprises the following steps: sampling the amplified two electric signals to obtain sampling signals, and identifying the voltage intensity of the sampling signals; when the voltage intensity belongs to a preset voltage intensity range, analog-digital converting the amplified two electric signals to obtain two digital signals.
4. The oil content detection method according to claim 3, wherein After the step of analog-digital converting the amplified two electric signals to obtain two digital signals when the voltage intensity belongs to a preset voltage intensity range, the method further comprises the following steps: when the voltage intensity is lower than the preset voltage intensity range, enhancing the preset light intensity, and re-executing the step of controlling the ultraviolet light source to emit preset light intensity of double-wavelength ultraviolet light to a short-path cuvette containing flowing water sample to be detected; when the voltage intensity is higher than the preset voltage intensity range, reducing the preset light intensity, and re-executing the step of controlling the ultraviolet light source to emit preset light intensity of double-wavelength ultraviolet light to a short-path cuvette containing flowing water sample to be detected.
5. The method of claim 1, wherein The method of calculating the absorbance of the two light transmission signals according to the two digital signals, and obtaining the oil content of the water sample to be detected according to the absorbance of the two light transmission signals comprises the following steps: obtaining the transmission light intensity of the two light transmission signals according to the two digital signals; obtaining the absorbance of the two light transmission signals according to the preset light intensity and the transmission light intensity; obtaining the oil content of the water sample to be detected according to the absorbance of the two light transmission signals.
6. The oil content detection method according to claim 5, wherein The method of obtaining the oil content of the water sample to be detected according to the absorbance of the two light transmission signals comprises the following steps: subtracting the absorbance of the two light transmission signals to obtain the absorbance difference of the two light transmission signals; calculating the oil content of the water sample to be detected through the Lambert-Beer law according to the absorbance difference.
7. The method of claim 1, wherein After the step of calculating the absorbance of the two light transmission signals according to the two digital signals, and obtaining the oil content of the water sample to be detected according to the absorbance of the two light transmission signals, the method further comprises the following steps: querying a centrifuge speed table according to the oil content to obtain a target speed; adjusting the centrifuge speed to the target speed to perform tar recovery through the target speed.
8. An oil content detection device characterized by comprising: The oil content detection device comprises: a control module configured to control the ultraviolet light source to emit preset light intensity of double-wavelength ultraviolet light to a short-path cuvette containing flowing water sample to be detected; The acquisition module is configured to acquire two light transmission signals, amplify and perform signal conversion processing on the two light transmission signals, and obtain two digital signals. The detection module is configured to calculate the absorbance of the two light transmission signals according to the two digital signals, and obtain the oil content of the water sample to be detected according to the absorbance of the two light transmission signals.
9. An electronic device, comprising: The device comprises a memory and a processor, wherein, The memory is configured to store a program. The processor, coupled to the memory, is configured to execute the program stored in the memory to implement the steps of the oil content detection method according to any one of claims 1 to 7. 10.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by the processor, implements the steps of the oil content detection method according to any one of claims 1 to 7.
