An equipment and method for on-line detection of calcium and magnesium ions in oilfield sewage
Patent Information
- Application Number
- CN202611145788.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-20
AI Technical Summary
[0011]为了解决油田污水中高浊度、高悬浮物容易导致设备管路堵塞,以及钙镁离子浓度跨度大超出常规检测量程导致无法在线连续监测的问题,本发明提供了一种全新的集成化设备
[0021](1)首次将全自动反冲洗前处理、智能化自适应稀释、干粉指示剂自动投加及RGB智能终点判断技术集成为一体化在线检测系统,成功解决了高浊度、高矿化度油田压裂返排液的复杂水质在线检测难题。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention belongs to the field of oilfield water quality detection and intelligent analysis technology, specifically a device and method for online detection of calcium and magnesium ions in oilfield wastewater. Background Technology
[0002] Oilfield wastewater is characterized by high suspended solids content, large fluctuations in calcium and magnesium ion concentrations, high levels of organic matter, and strong corrosiveness. The presence of calcium and magnesium ions can lead to a series of problems, including scaling in pipelines and injection equipment, decreased efficiency of subsequent water treatment processes, pore blockage in reinjected formations, and reduced viscosity of reinjected fracturing fluids.
[0003] Currently, on-site detection of calcium and magnesium ions mainly relies on manual EDTA titration, a method that is cumbersome, time-consuming, dependent on manual endpoint determination, and prone to significant subjective errors. Atomic absorption spectrometry (AAS) or inductively coupled plasma atomic emission spectrometry (ICP-AES) are expensive, require specialized personnel, and cannot be performed online. Ion-selective electrode methods suffer from electrode failure, contamination, and poor stability.
[0004] [CN119881203B] discloses an online fully automatic calcium, magnesium, strontium, and barium ion concentration analyzer, which alleviates the technical problem of accurately controlling the amount and time of colorimetric reagent dripping. However, this solution cannot automatically sample, pre-treat, backwash, intelligently select dilution ratios, intelligently identify titration endpoints, or automatically clean oilfield wastewater. This results in a lack of instrument intelligence, unstable measurement values, and is not suitable for complex water qualities such as oilfield wastewater.
[0005] [CN112415132B] discloses a dual-element, dual-channel potentiometric titration analysis device, which uses a potentiometric electrode to indicate the endpoint and achieves the function of simultaneous automatic titration of two elements. However, this scheme uses a sedimentation tank as the only pretreatment method, which cannot automatically backwash and filter high-turbidity fracturing flowback fluid and perform filter element self-cleaning, causing the system to easily become clogged and fail in oilfield wastewater. At the same time, this scheme lacks an intelligent adaptive dilution system and cannot cope with the drastic fluctuations in calcium and magnesium ion concentrations in the range of tens to tens of thousands of mg / L, which exceeds its detection range. It uses the potentiometric method to determine the endpoint, and the electrode is easily contaminated and has poor stability in complex high-salinity water, making it unsuitable for complex water qualities such as oilfield flowback fluid.
[0006] [CN202121609480] discloses a multi-element automatic titration device for laboratory use, which achieves automatic selection and titration of various reagents through a transverse movement mechanism and liquid tube protrusion. However, this solution is a stand-alone laboratory device and does not have on-site automatic sampling capabilities; it lacks an automatic backwashing pretreatment module for high-turbidity wastewater, making it impossible to directly sample fracturing flowback fluid containing a large amount of suspended solids; at the same time, this solution does not integrate an intelligent adaptive dilution system and cannot automatically adjust the dilution ratio according to the sample hardness; in addition, it relies on manual sampling and does not have the capability for unattended continuous operation, making it unsuitable for the online automatic monitoring needs of oilfield sites.
[0007] [CN202222375453] discloses a manually operated fertilizer calcium and magnesium detection device, which determines the presence of calcium and magnesium ions by visually observing the degree of turbidity after centrifugation and mixing. However, this solution is a manually operated, semi-quantitative device, lacking functions such as automatic sampling, automatic pretreatment, automatic dosing, and automatic titration; its detection results are only qualitative or semi-quantitative, completely unable to achieve accurate quantitative concentration analysis; at the same time, this solution does not integrate any automated PLC control box and intelligent identification module, lacks online continuous detection capability, and is not suitable for industrial scenarios such as oilfield wastewater that require real-time and accurate monitoring of calcium and magnesium ion concentration.
[0008] [CN202323284923] discloses a peristaltic pump titration device for a calcium analyzer. By optimizing the pump casing structure and roller design, it reduces pressure fluctuations within the pump tube and improves titration accuracy. However, this solution is only a component-level improvement in the overall equipment and not a complete detection system. It lacks fully automated functions such as automatic sampling, automatic pretreatment, automatic dilution, intelligent endpoint judgment, and automatic cleaning. The device itself cannot independently complete the detection of calcium and magnesium ions in oilfield wastewater, nor can it solve the overall challenges posed by high-turbidity, high-salt, and high-hardness water samples to the detection system. Therefore, it is not suitable as a complete solution for online monitoring of oilfield wastewater.
[0009] [CN202222798502] discloses an online analyzer for trace calcium and magnesium, which calculates calcium and magnesium concentrations using photoelectric colorimetry and Lambert-Beer's law, enabling online detection of calcium and magnesium in trace amounts of water. However, this solution is designed for "trace" concentrations, has a limited measurement range, and is not equipped with an intelligent adaptive dilution system. It completely exceeds the detection limit for high-hardness (tens of thousands of mg / L) oilfield fracturing flowback fluid. Furthermore, the colorimetric method used in this solution is severely affected by the high turbidity and high color of oilfield wastewater, which can significantly interfere with absorbance measurements and lead to distorted results. Additionally, this solution lacks pretreatment modules such as automatic backwashing and filtration, making it unsuitable for the complex water quality conditions of oilfield wastewater.
[0010] In the field of online monitoring of oilfield wastewater, there has long been a technical bias that complex water quality cannot be accurately detected online using simple integrated equipment. This is because high suspended solids easily clog pipelines, ion concentrations vary widely beyond the conventional detection range, various interfering ions affect endpoint determination, and high-viscosity water samples tend to remain in the system. Therefore, existing technologies still have significant gaps in the intelligent and fully automated online monitoring of high-turbidity, high-salt, and high-hardness fracturing flowback fluids. There is still no online monitoring equipment or method that integrates core technologies such as automatic backflushing pretreatment, intelligent adaptive dilution, automatic dosing of dry powder indicators, and intelligent color recognition endpoint determination. Summary of the Invention
[0011] To address the problems of high turbidity and high suspended solids in oilfield wastewater leading to equipment and pipeline blockage, and the large range of calcium and magnesium ion concentrations exceeding conventional detection ranges, thus hindering continuous online monitoring, this invention provides a novel integrated device. Specifically, this invention proposes an online calcium and magnesium ion detection device for oilfield wastewater. This device is coordinated by a PLC control box and sequentially or in parallel connected to a fully automatic backwashing sampling and pretreatment module, an intelligent adaptive dilution system, a calcium ion detection module, and a magnesium ion detection module along the water path. By integrating a parallel detection structure in separate tanks, coupled with the system's overall automated sampling, dilution, titration, and cleaning logic, unattended continuous monitoring of samples directly from high-turbidity fracturing flowback fluid can be achieved. Its modular integration effectively ensures the overall stability and detection timeliness of the device when dealing with high-viscosity, high-mineralization wastewater.
[0012] To address the industrial pain point of high-turbidity wastewater easily clogging precision filters, leading to frequent equipment shutdowns and manual cleaning, this invention specifically configures a fully automatic backwashing sampling and pretreatment module as a component structure including a raw water pump, a buffer tank, an automatic backwashing filter, a raw water solenoid valve, a backwashing pump, a backwashing solenoid valve, a T-junction, and a drain solenoid valve. The inlet and outlet of the precision filter, the outlet of the backwashing pump, and the inlet of the raw water pump are connected together via a T-junction pipeline. When the differential pressure sensor built into the filter element detects a pressure difference exceeding a set threshold or reaching a preset time period, the PLC control box automatically closes the raw water solenoid valve and opens the backwashing solenoid valve and backwashing pump. The pure water source for backwashing is supplied by a pure water tank, and the cleaned contaminants are directly discharged to the wastewater tank through the drain solenoid valve. This pipeline layout combined with the automatic backwashing logic enables the equipment to stably sample high-turbidity water over a long period without frequent manual intervention or maintenance.
[0013] To overcome the technical challenge of accurately detecting both high and low concentrations of calcium and magnesium ions in oilfield fracturing flowback fluids, which fluctuate drastically between tens and tens of thousands of milligrams per liter, making fixed-ratio dilution impossible, this invention designs an intelligent adaptive dilution system. This system utilizes a high-precision feedstock pump, a pure water pump, a pure water tank, a dilution tank, and a first magnetic stirrer to achieve on-demand adjustment. The PLC control box automatically calculates and adjusts the dilution ratio based on the pre-detected hardness of the feedstock. The high-precision feedstock pump and pure water pump quantitatively pump the feedstock and pure water into the dilution tank for thorough mixing. This on-demand adjustment method precisely controls the ion concentration of the tested water sample within the optimal linear range of complexometric titration. This not only avoids detection errors caused by weak signals in low-hardness water samples but also prevents excessive titrant consumption due to exceeding the measurement range in high-hardness water samples. Through the close coordination of adaptive hardware and control logic, the detection range of the equipment is effectively expanded.
[0014] To avoid subjective errors in manual titration endpoint determination and address the issue of aging and deterioration of conventional liquid indicators, this invention incorporates an automatic dispensing machine and an RGB three-channel photoelectric sensor into the calcium ion detection module. By providing an independent inlet to the calcium ion detection vessel, which interfaces with the calcium ion water pump, sodium hydroxide dosing pump, first triethanolamine dosing pump, first EDTA dosing pump, and the automatic dispensing machine, independent and precise dosing of each reagent is achieved. In actual operation, the automatic dispensing machine precisely adds the calcium carboxylic acid dry powder indicator into the detection vessel. The system uses a high-frequency (≥10 Hz) RGB color sensor to collect real-time color changes in the solution. When the solution abruptly changes from purplish-red to bright blue, the built-in algorithm automatically determines the titration endpoint. The dry powder dosing method extends the indicator's shelf life, and combined with the rapid response of the high-frequency optical sensor, the endpoint identification accuracy is significantly superior to manual judgment, eliminating the influence of human error on the detection results.
[0015] To improve detection efficiency and ensure that calcium and magnesium ions are detected at the same dilution base, this invention sets the magnesium ion detection module and the calcium ion detection module to operate in parallel. The magnesium ion detection tank also has its own independent inlet, connected to the magnesium ion inlet pump, buffer solution dosing pump, second triethanolamine dosing pump, chrome black T dosing pump, and second EDTA dosing pump, respectively, to complete independent sample injection of each reagent. Its matching second color identifier also has high-frequency RGB color acquisition capabilities. During operation, both modules jointly extract the same first intermediate product prepared by the dilution tank, and simultaneously perform chemical masking, color development, and titration operations in their respective modules. This combination of parallel architecture and independent dosing pipelines not only significantly shortens the single complete detection cycle, meeting the timeliness requirements of real-time online monitoring in oilfields, but also reduces systematic errors through homologous dilution.
[0016] To achieve fully automated hardware control and closed-loop data processing, this invention includes a PLC control box comprising a PLC system, a touchscreen human-machine interface, and a data storage and remote transmission module. The PLC system has drive output interfaces electrically connected to each pump, solenoid valve, and magnetic stirrer, used for quasi-time-driven execution of component actions, and receives color signals from the color recognizer via the 485 communication protocol. Through the combination of this hardware channel and logic algorithm, the PLC can accurately determine the titration endpoint and instantly stop the EDTA dosing pump. Simultaneously, it automatically calculates the titration volume based on the pump's operating time and converts it to the actual concentration using the set dilution factor. The detection data is displayed in real-time on the touchscreen and uploaded to a remote terminal via Modbus, 4-20mA, and OPC UA protocols through the remote transmission module. This control architecture, from the underlying hardware driver to the top-level data processing, enables fully autonomous decision-making and unmanned operation of the equipment.
[0017] To address the online detection requirements of complex water quality in oilfields, this invention also provides a fully automated control method. The method includes the following steps: First, a homogeneous first intermediate product matching the hardness of the raw water is obtained through pre-filtration and intelligent adaptive dilution; then, calcium and magnesium ion detection pumps extract the intermediate product for rinsing, and extract it again for formal detection. After adding their respective masking agents and indicators, EDTA titrant is added dropwise at a constant rate. During the process, an RGB color reader monitors color abrupt changes to accurately determine the endpoint and record the consumption; after detection, the system automatically cleans the dilution tank and two detection tanks with pure water, drains the waste liquid, and finally automatically calculates and displays the remote transmission results based on the consumed volume and dilution factor. This process is automatically triggered, executed, and terminated by a PLC control box according to a predetermined sequence logic, requiring no manual intervention throughout. This ensures the equipment can adapt to the periodic cleaning requirements of high-viscosity water samples, guaranteeing the repeatability and accuracy of the equipment in continuous detection operations.
[0018] To ensure complete elimination of chemical interference between calcium and magnesium ions in the stepwise detection, this invention sets specific pH boundaries in the magnesium ion masking and calcium ion complexation stages. In the calcium ion detection step, sodium hydroxide solution is added to adjust the system pH to the alkaline range of 12-13, ensuring that magnesium ions in the water sample are completely converted into magnesium hydroxide precipitate, thus physically shielding the color interference of magnesium ions on the calcium ion detection endpoint. In the magnesium ion detection step, a buffer solution is added to stabilize the system pH around 10, providing the necessary chemical conditions for magnesium ions to form a stable complex with EDTA at this pH. This pH range and reagent combination ensure the accuracy and reliability of the endpoint determination by the colorimeter from the perspective of chemical reaction precision, further improving the detection accuracy of the equipment.
[0019] Based on the aforementioned equipment and methods, this invention is specifically designed for online, real-time, and automatic monitoring of high-turbidity, high-mineralization wastewater such as fracturing flowback fluid and produced water from oil and gas fields. Equipped with an adaptive dilution system and a powerful backwashing pretreatment module, this equipment can readily handle drastic fluctuations in calcium and magnesium ion concentrations ranging from tens of milligrams per liter to tens of thousands of milligrams per liter. Its closed-loop design, encompassing physical filtration, chemical reactions, and data processing, makes it a preferred technical solution for unattended continuous monitoring of highly polluted, highly corrosive, and wide-concentration-range water in oil fields and other similar environments.
[0020] This invention provides an apparatus and method for online detection of calcium and magnesium ions in oilfield wastewater, which has the following beneficial effects:
[0021] (1) For the first time, fully automatic backwashing pretreatment, intelligent adaptive dilution, automatic addition of dry powder indicator and RGB intelligent endpoint judgment technology were integrated into an integrated online detection system, which successfully solved the complex problem of online water quality detection of oilfield fracturing flowback fluid with high turbidity and high mineralization.
[0022] This invention utilizes an automatic backwash filter with a built-in differential pressure sensor to automatically switch flow channels and backwash when the filter element differential pressure exceeds the limit or reaches the timed cycle. This achieves long-term stable sample injection without manual intervention, completely solving the pain point of frequent shutdowns and maintenance caused by high suspended solids clogging the pipeline in traditional devices. It extends the equipment maintenance cycle by more than 80% and gives the equipment the ability to operate continuously without human intervention in harsh environments.
[0023] (2) It breaks through the bottleneck of limited detection range of traditional equipment.
[0024] This invention innovatively incorporates an intelligent adaptive dilution system. The PLC control box automatically adjusts the dilution factor within a range of 2 to 500 times based on the predicted total hardness of the raw water, ensuring that the concentration of the test solution remains stable within the optimal linear range for EDTA complexometric titration. This technology successfully solves the problem of simultaneously and accurately detecting high-hardness water samples (tens of thousands of mg / L) and low-hardness water samples (tens of mg / L) on the same device. The equipment can adapt to full-range water quality fluctuations without replacing core components.
[0025] (3) It realizes efficient parallel detection of calcium and magnesium ions in separate tanks, which significantly improves the timeliness of on-site real-time monitoring.
[0026] This invention achieves simultaneous titration detection of calcium and magnesium ions by using separate calcium and magnesium ion detection modules that share the same adaptively diluted intermediate product. This modular parallel structure significantly reduces the detection cycle, shortening a single complete detection cycle to less than 20 minutes, effectively meeting the real-time response requirements of oilfield sites to changes in water quality.
[0027] (4) It pioneered a titration endpoint determination mechanism that combines automatic dosing of dry powder indicator with high-frequency RGB photoelectric color recognition.
[0028] This invention abandons traditional, easily deteriorated liquid indicators and employs an automatic dispensing machine to quantitatively add dry powder indicators (with an accuracy of ±0.01g), significantly improving reagent stability. Simultaneously, it utilizes an RGB three-channel color sensor with a sampling frequency ≥10Hz and a resolution ≤1ΔE, with a built-in algorithm in the PLC control box automatically determining the endpoint of color abrupt changes in milliseconds. This collaborative design completely eliminates the subjective error of manually observing the endpoint, achieving an endpoint identification accuracy of ≤0.02ml of titrant. Verification data shows an average error rate of ≤0.96% for calcium ions and ≤1.45% for magnesium ions, far exceeding the accuracy of manual titration.
[0029] (5) A four-stage automatic cleaning mechanism for high-viscosity water samples was established.
[0030] This invention incorporates a four-step pure water cleaning process into the system's operational logic: pre-sample rinsing, post-detection evacuation, dilution tank system cleaning, and secondary cleaning of the detection tank. This fully automated rinsing process effectively suppresses chemical residues and physical scaling of high-mineralization, high-viscosity fracturing flowback fluid in precision pipelines and the detection tank, ensuring the repeatability and reliability of test results during continuous long-term operation. Attached Figure Description
[0031] Figure 1 This is a schematic diagram of the overall structure of an online detection device for calcium and magnesium ions in oilfield wastewater according to an embodiment of the present invention.
[0032] Figure 2 This is a schematic diagram of a pretreatment and backwashing module according to an embodiment of the present invention.
[0033] Figure 3 This is a flowchart of the overall equipment testing process according to an embodiment of the present invention.
[0034] Figure 4 This is a step-by-step flowchart of calcium ion detection according to an embodiment of the present invention.
[0035] Figure 5 This is a step-by-step flowchart of magnesium ion detection according to an embodiment of the present invention.
[0036] In the diagram: 1-Touchscreen HMI, 2-PLC control box, 3-Emergency stop button, 4-Dilution tank, 5-Buffer tank, 6-Stock solution pump, 7-First triethanolamine dosing pump, 8-First triethanolamine storage tank, 9-Sodium hydroxide storage tank, 10-Sodium hydroxide dosing pump, 11-Magnesium ion detection pump, 12-Second triethanolamine dosing pump, 13-Second EDTA storage tank, 14-Second triethanolamine storage tank, 15-Second EDTA dosing pump, 16-Magnesium ion detection tank, 17-Third drain pump, 18-Third magnetic stirrer knob, 19-Third magnetic stirrer, 20-Second color identifier, 21-Chrome Black T dosing pump, 22-Buffer solution storage tank, 23-Chrome Black T storage tank, 24-Buffer solution dosing pump, 25-Second drain pump. 26-Second magnetic stirrer knob, 27-Second magnetic stirrer, 28-Calcium ion detection tank, 29-First color identifier, 30-First EDTA dosing pump, 31-First EDTA storage tank, 32-Calcium ion detection pump, 33-Automatic feeder, 34-Carboxylic acid dry powder indicator storage tank, 35-First drain pump, 36-Pure water tank, 37-Pure water pump, 38-First magnetic stirrer, 39-Magnetic stirrer knob, 40-Fluoride water pipe, 41-Backwash pump, 42-Precision filter, 43-T-connector, 44-Raw water solenoid valve, 45-Raw water pump, 46-Wastewater tank, 47-Drain solenoid valve, 48-Pure water inlet, 49-Pure water tank, 50-Backwash solenoid valve. Detailed Implementation
[0037] 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.
[0038] Example 1
[0039] The following is in conjunction with the appendix Figure 1 To be continued Figure 5 This invention provides a more detailed description of the equipment and method for online detection of calcium and magnesium ions in oilfield wastewater.
[0040] I. Overall Equipment Structure and Piping Connections
[0041] like Figure 1 As shown, the device in this embodiment is integrated on a skid-mounted platform and consists of a three-layer structure distributed vertically.
[0042] The top layer is equipped with a PLC control box 2, a touch screen human-machine interface 1, and an emergency stop button 3;
[0043] The upper water sample treatment layer is equipped with a dilution tank 4, a buffer tank 5, a stock solution pump 6, a pure water pump 37, and a pure water tank 36;
[0044] The middle layer is a calcium ion detection layer, which houses a first EDTA storage tank 31, a first triethanolamine storage tank 8, a sodium hydroxide storage tank 9, an automatic feeder 33, and a calcium ion detection tank 28. A first color identifier 29 is arranged on the outside of the calcium ion detection tank 28, and its bottom is connected to a second drain pump 25.
[0045] The lower layer is a magnesium ion detection layer, which houses a second EDTA storage tank 13, a second triethanolamine storage tank 14, a buffer solution storage tank 22, a chrome black T storage tank 23, and a magnesium ion detection tank 16. A second color identifier 20 is arranged on the outside of the magnesium ion detection tank 16, and its bottom is connected to a third drain pump 17.
[0046] The raw water inlet pipe is connected to the precision filter 42. The outlet of the precision filter 42 is connected to one port of the tee 43; the second port of the tee 43 is connected to the outlet of the backwash solenoid valve 50; the third port of the tee 43 is connected to the inlet of the raw water solenoid valve 44. The outlet of the raw water solenoid valve 44 is connected to the inlet of the raw water pump 45, and the outlet of the raw water pump 45 is directly connected to the buffer tank 5.
[0047] In the pure water supply section, the pure water tank 49 is equipped with a pure water inlet 48, the outlet of which is connected to the backwash pump 41, and the outlet of the backwash pump 41 is connected to the backwash solenoid valve 50.
[0048] In the waste liquid discharge section, the bottom drain port of the buffer tank 5 is connected to the drain solenoid valve 47, and the outlet of the drain solenoid valve 47 is connected to the waste water tank 46 through the fluoride-containing water pipe 40.
[0049] In the dilution and injection section, pure water tank 36 is connected to pure water pump 37, and buffer tank 5 is connected to stock solution pump 6. The outlets of both are connected in parallel to dilution tank 4. The outlet of dilution tank 4 is divided into two paths, which are connected to calcium ion inlet pump 32 and magnesium ion inlet pump 11, respectively.
[0050] The inlet of the calcium ion detection tank 28 is independently connected to the calcium ion water pump 32, the sodium hydroxide dosing pump 10, the first triethanolamine dosing pump 7, and the first EDTA dosing pump 30, and its upper opening is directly opposite the discharge port of the automatic feeder 33.
[0051] The inlet of the magnesium ion detection tank 16 is independently connected to the magnesium ion water inlet pump 11, the buffer solution dosing pump 24, the second triethanolamine dosing pump 12, the chrome black T dosing pump 21, and the second EDTA dosing pump 15.
[0052] II. Electrical Control and Signal Connection Relationship
[0053] In this embodiment, the PLC control box 2 is equipped with drive output interfaces, which are electrically connected to the first magnetic stirrer 38, the second magnetic stirrer 27, the third magnetic stirrer 19, the raw water solenoid valve 44, the backwash solenoid valve 50, and the drain solenoid valve 47 via cables, and are also electrically connected to all the above-mentioned dosing pumps and water inlet pumps.
[0054] Both the first color recognizer 29 and the second color recognizer 20 are equipped with a 485 communication interface, which establishes a bidirectional communication connection with the signal input terminal of the PLC control box 2 through a communication cable.
[0055] Both the pure water tank 49 and the wastewater tank 46 are equipped with high and low liquid level sensors. The signal output terminals of the high and low liquid level sensors are connected to the PLC control box 2 for real-time monitoring of the capacity of pure water and wastewater.
[0056] The communication interface of PLC control box 2 is also connected to a data storage and remote transmission module that supports Modbus, 4-20mA and OPC UA protocols.
[0057] III. Testing Methods and Procedures
[0058] Taking the online detection of calcium and magnesium ion concentrations in fracturing flowback fluid from an oilfield as an example, the specific working process of this embodiment is as follows:
[0059] Step 1: Sample Pretreatment and Intelligent Adaptive Dilution. Raw water enters the equipment through the inlet, the raw water solenoid valve 44 is opened, and the raw water pump 45 is started. The raw water first passes through the precision filter 42 to remove large suspended particles, then flows through the three-way valve 43 and the raw water solenoid valve 44, and is then pumped by the raw water pump 45 to the buffer tank 5 for temporary storage. After the touch screen of the PLC control box 2 obtains the on-site hardness data, it automatically calculates and sets the dilution ratio to 30. Subsequently, the PLC control box 2 controls the raw liquid pump 6 to draw 8 ml of raw liquid from the buffer tank 5 and send it to the dilution tank 4, while simultaneously controlling the pure water pump 37 to draw 242 ml of pure water from the pure water tank 36 and send it to the dilution tank 4. The first magnetic stirrer 38 is started and stirred at a speed of 500 rpm for 2 minutes to ensure that the raw liquid and pure water are fully and evenly mixed to obtain the first intermediate product.
[0060] Step 2: Automatic Calcium Ion Detection. The PLC control box 2 controls the calcium ion inlet pump 32 to draw 50 ml of the first intermediate product from the dilution tank 4 and send it into the calcium ion detection tank 28. The second magnetic stirrer 27 is started to stir and rinse, and then the second drain pump 25 empties the solution. Then, the calcium ion inlet pump 32 draws another 50 ml of the first intermediate product and sends it into the calcium ion detection tank 28. Next, the PLC control box 2 sequentially starts the sodium hydroxide dosing pump 10 to add 2 ml of sodium hydroxide solution to the tank, bringing the system pH to 12-13; it then starts the first triethanolamine dosing pump 7 to add 1 ml of triethanolamine solution; subsequently, the automatic feeder 33 pushes 0.2 g of calcium carboxylic acid dry powder indicator into the calcium ion detection tank 28. The second magnetic stirrer 27 is started to continuously stir, and the solution turns purple-red. Then, the first EDTA dosing pump 30 is started to add disodium EDTA solution dropwise into the tank at a rate of 1 ml / min. During this process, the first color identifier 29 collects the RGB three-channel color values of the reaction solution in real time at a sampling frequency of no less than 10 Hz, and transmits the data to the PLC control box 2 in real time via the 485 communication bus. When the PLC control box 2 detects that the identified color changes abruptly from purplish-red to bright blue, it immediately controls the first EDTA dosing pump 30 to stop titration and records the volume of EDTA disodium consumed at this time as V1. Finally, the PLC control box 2 starts the second drain pump 25 to empty the waste liquid.
[0061] Step 3: Automatic Magnesium Ion Detection. The PLC control box 2 controls the magnesium ion feed pump 11 to draw 50 ml of the first intermediate product from the dilution tank 4 and send it to the magnesium ion detection tank 16. After rinsing with the third magnetic stirrer 19, the tank is emptied. Then, another 50 ml of the first intermediate product is drawn and sent to the magnesium ion detection tank 16. Next, the PLC control box 2 starts the buffer solution dosing pump 24 to add 5 ml of buffer solution, bringing the system pH to 10; it starts the second triethanolamine dosing pump 12 to add 1 ml of triethanolamine solution; it starts the chrome black T dosing pump 21 to add 2 ml of chrome black T indicator, and turns on the third magnetic stirrer 19 to stir, resulting in a purplish-red solution. Then, the second EDTA dosing pump 15 is started for dropwise addition. The second color identifier 20 monitors the color change in real time and transmits the RGB data back to the PLC control box 2. When the color abruptly changes from purplish-red to bright blue, the PLC control box 2 automatically stops the titration and records the volume of EDTA disodium consumed as V3. Finally, the third drain pump 17 is started to empty the waste liquid.
[0062] Step 4: Automatic Cleaning. After the test is completed, the PLC control box 2 first empties the remaining liquid in the dilution tank 4. Then, the pure water pump 37 is started to draw 150 ml of pure water from the pure water tank 36 into the dilution tank 4, and the first magnetic stirrer 38 is turned on to stir for 2 minutes to obtain the cleaning solution. Then, the calcium ion inlet pump 32 and the magnesium ion inlet pump 11 are started respectively to draw 50 ml of the cleaning solution into the corresponding calcium ion detection tank 28 and magnesium ion detection tank 16. The second magnetic stirrer 27 and the third magnetic stirrer 19 are turned on to stir for 2 minutes respectively. Then, the second drain pump 25 and the third drain pump 17 respectively discharge the waste liquid into the wastewater tank 46. At this point, a complete test cycle is completed.
[0063] Step 5: Concentration Calculation and Remote Data Transmission. Based on the titration volume V1 recorded in Step 2, the titration volume V3 recorded in Step 3, and the dilution factor 30 set in Step 1, the PLC control box 2 automatically calculates the actual concentrations of calcium and magnesium ions in the fracturing flowback fluid according to a preset stoichiometric algorithm. The calculation results are displayed in real-time on the touchscreen human-machine interface 1 and simultaneously uploaded to a remote server via the data storage and remote transmission module.
[0064] IV. Detection Results
[0065] The equipment and method of this embodiment were used to conduct five consecutive parallel testing experiments on the aforementioned oilfield fracturing flowback fluid. The experimental results showed that the true concentration of calcium ions in the original fluid was 388.23 mg / L, and the true concentration of magnesium ions was 397.76 mg / L. After five parallel tests, the calcium ion concentrations detected by the equipment were 386.32, 389.52, 388.23, 389.12, and 390.68 mg / L, with an average error rate of only 0.34%. The magnesium ion concentrations detected by the equipment were 398.14, 397.96, 398.12, 399.49, and 396.49 mg / L, with an average error rate of 0.81%.
[0066] Meanwhile, thanks to the design of automatically activating the backwash pump 41 and the backwash solenoid valve 50 to switch the flow channel during the backwashing process, as well as the synergistic effect of the four cleaning mechanisms (pre-sample rinsing, post-detection emptying, dilution tank cleaning, and secondary cleaning of the detection tank), the equipment has been operating for a long time in oilfield backflow fluid with high turbidity and high salinity without pipeline blockage or electrode contamination, achieving high-precision, fully automatic, unattended continuous online monitoring under complex water quality conditions.
[0067] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art can make various improvements and modifications without departing from the spirit and principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A device for online detection of calcium and magnesium ions in oilfield wastewater, characterized in that, include: The fully automatic backwashing sampling and pretreatment module is used for automatic sampling and filter self-cleaning of high-turbidity wastewater; An intelligent adaptive dilution system is located downstream of the fully automatic backwashing sampling and pretreatment module, and is used to automatically adjust the dilution ratio according to the raw water quality. A calcium ion detection module is located downstream of the intelligent adaptive dilution system and is used to automatically detect the calcium ion concentration in the diluted water sample. A magnesium ion detection module is located downstream of the intelligent adaptive dilution system and is set in parallel with the calcium ion detection module. It is used to automatically detect the magnesium ion concentration in the diluted water sample. And the PLC control box (2) is electrically connected to the fully automatic backwashing sampling and pretreatment module, the intelligent adaptive dilution system, the calcium ion detection module and the magnesium ion detection module respectively, for controlling the timing action of each module and calculating the ion concentration based on the detection signal; The fully automatic backwashing sampling and pretreatment module, intelligent adaptive dilution system, calcium ion detection module, and magnesium ion detection module are connected sequentially or in parallel along the water path to form a continuous online detection system.
2. The equipment for online detection of calcium and magnesium ions in oilfield wastewater according to claim 1, characterized in that, The fully automatic backwash sampling and pretreatment module includes a raw water pump (45), a buffer tank (5), an automatic backwash filter (42), a raw water solenoid valve (44), a backwash pump (41), a backwash solenoid valve (50), a three-way valve (43), and a drain solenoid valve (47); the automatic backwash filter (42) has an integrated differential pressure sensor and a filtration accuracy of 30-100μm. One port of the three-way valve (43) is connected to the outlet of the automatic backwash filter (42), the second port is connected to the outlet of the backwash solenoid valve (50), and the third port is connected to the inlet of the raw water solenoid valve (44); the outlet of the raw water solenoid valve (44) is connected to the inlet of the raw water pump (45), and the outlet of the raw water pump (45) is connected to the inlet of the buffer tank (5); the bottom drain port of the buffer tank (5) is connected to the inlet of the drain solenoid valve (47), and the outlet of the drain solenoid valve (47) is connected to the wastewater tank (46); When the differential pressure sensor detects that the pressure difference between the inside and outside of the filter element exceeds the set threshold or reaches the preset time period, the PLC control box (2) controls the closing of the raw water solenoid valve (44) and the opening of the backwash solenoid valve (50) and the backwash pump (41). Pure water is backwashed from the pure water tank (49) through the backwash pump (41), the backwash solenoid valve (50), and the three-way valve (43) to flush the filter element of the automatic backwash filter (42).
3. The equipment for online detection of calcium and magnesium ions in oilfield wastewater according to claim 1, characterized in that, The intelligent adaptive dilution system includes a pure water tank (36), a dilution tank (4), a high-precision stock solution pump (6), a pure water pump (37), a first magnetic stirrer (38), and a first drain pump (35). The PLC control box (2) automatically calculates and adjusts the dilution ratio based on the pre-detection hardness of the raw water, so that the concentration of the test liquid is in the optimal linear range of complex titration. The high-precision raw liquid pump (6) and pure water pump (37) respectively quantitatively extract the raw liquid and pure water into the dilution tank (4) for mixing and stirring.
4. The equipment for online detection of calcium and magnesium ions in oilfield wastewater according to claim 1, characterized in that, The calcium ion detection module includes a calcium ion detection tank (28), a calcium ion water inlet pump (32), a sodium hydroxide dosing pump (10), a first triethanolamine dosing pump (7), an automatic feeder (33), a first EDTA dosing pump (30), a second magnetic stirrer (27), a first color identifier (29), and a second drain pump (25). The automatic feeder (33) is used for the automatic quantitative addition of calcium carboxylic acid dry powder indicator, with a single addition amount of 0.1 to 0.5 g and an accuracy of ±0.01 g; The first color recognizer (29) is an RGB three-channel photoelectric sensor with a sampling frequency ≥10Hz, a color difference resolution ≤1ΔE, and a built-in automatic titration endpoint judgment algorithm; The calcium ion detection tank (28) is provided with an independent inlet, which is used to receive the diluted water sample from the calcium ion water pump (32), the alkaline solution from the sodium hydroxide dosing pump (10), the masking agent from the first triethanolamine dosing pump (7), the titrant from the first EDTA dosing pump (30), and the dry powder from the automatic feeder (33).
5. The equipment for online detection of calcium and magnesium ions in oilfield wastewater according to claim 1, characterized in that, The magnesium ion detection module includes a magnesium ion detection tank (16), a magnesium ion water inlet pump (11), a buffer solution dosing pump (24), a second triethanolamine dosing pump (12), a chrome black T dosing pump (21), a second EDTA dosing pump (15), a third magnetic stirrer (19), a second color identifier (20), and a third drain pump (17). The second color recognizer (20) is an RGB three-channel photoelectric sensor with a sampling frequency ≥10Hz, a color difference resolution ≤1ΔE, and a built-in automatic titration endpoint judgment algorithm; The magnesium ion detection tank (16) is provided with independent inlets, which are used to receive diluted water samples from the magnesium ion water pump (11), buffer solution from the buffer solution dosing pump (24), masking agent from the second triethanolamine dosing pump (12), indicator from the chrome black T dosing pump (21), and titrant from the second EDTA dosing pump (15).
6. The equipment for online detection of calcium and magnesium ions in oilfield wastewater according to claim 1, characterized in that, The PLC control box (2) includes a PLC system, a touch screen human-machine interface (1), and a data storage and remote transmission module; The PLC system is equipped with drive output interfaces that are electrically connected to each pump, each solenoid valve and each magnetic stirrer, respectively, for driving each actuator to operate in sequence; at the same time, the PLC system receives color signals fed back by the first color recognizer (29) and the second color recognizer (20) respectively through the 485 communication protocol, and automatically determines the titration endpoint and stops the corresponding EDTA dosing pump according to the preset algorithm, and calculates the concentration of calcium and magnesium ions in the water sample according to the working time of the pump and the dilution ratio; The touch screen human-machine interface (1) is used for parameter setting and local display of detection data. The data storage and remote transmission module supports Modbus, 4-20mA and OPC UA protocols and is used to upload the detection results to a remote terminal.
7. A method for online detection of calcium and magnesium ions in oilfield wastewater as described in any one of claims 1 to 6, characterized in that, Includes the following steps: (I) Sample pretreatment and intelligent adaptive dilution: After the stock solution is filtered by the automatic backwash filter (42), it enters the buffer tank (5). The PLC control box (2) automatically calculates the dilution factor F according to the pre-detection hardness of the raw water. The stock solution and pure water are quantitatively extracted by the stock solution pump (6) and the pure water pump (37) respectively and stirred and mixed in the dilution tank (4) to obtain the first intermediate product. (II) Automatic detection of calcium ions: The calcium ion inlet pump (32) extracts part of the first intermediate product into the calcium ion detection tank (28), rinses and then drains; the first intermediate product is extracted again in a quantitative manner, and sodium hydroxide solution, triethanolamine solution and calcium carboxylic acid dry powder indicator are added in sequence. After stirring, titration is performed through the first EDTA dosing pump (30). The first color identifier (29) monitors the color change in real time. When the solution changes from purple-red to bright blue, the PLC control box (2) determines that the endpoint has been reached and stops the titration, and records the volume of the first EDTA consumed, V1. (III) Automatic detection of magnesium ions: The magnesium ion inlet pump (11) extracts part of the first intermediate product into the magnesium ion detection tank (16), rinses it, and then drains it; the first intermediate product is extracted again in a quantitative manner, and buffer solution, triethanolamine solution and chrome black T indicator are added in sequence. After stirring, titration is performed through the second EDTA dosing pump (15). The second color identifier (20) monitors the color change in real time. When the solution changes from purple-red to bright blue, the PLC control box (2) determines that the endpoint has been reached and stops the titration, and records the volume of the second EDTA consumed, V3. (IV) Automatic cleaning: After the test is completed, the system automatically cleans the dilution tank (4), calcium ion detection tank (28) and magnesium ion detection tank (16) with pure water and discharges all waste liquid into the wastewater tank (46). (V) Concentration calculation: The PLC control box (2) automatically calculates and displays the concentration of calcium and magnesium ions in the water sample based on the recorded titration volumes V1 and V3 and the dilution factor F; Steps (I) to (V) are all automatically executed by the PLC control box (2) according to the preset timing control logic, and the washing, sample addition, titration and cleaning actions are completed in sequence.
8. The detection method according to claim 7, characterized in that, In step (II), sodium hydroxide solution is added to bring the pH of the system to 12-13 so that magnesium ions in the water sample precipitate as Mg(OH)2, thus eliminating their interference with the endpoint of calcium ion titration.
9. The detection method according to claim 7, characterized in that, In step (III), the added buffer solution brings the pH of the system to 10 to ensure that the Mg in the water sample is within acceptable limits. 2+ It forms a stable complex with EDTA.
10. The application of an equipment and method for online detection of calcium and magnesium ions in oilfield wastewater as described in any one of claims 1 to 6, characterized in that, The equipment and method described herein are used for online, real-time, and automatic detection of calcium and magnesium ion concentrations in high-turbidity, high-mineralization wastewater such as oil and gas field fracturing flowback fluid and produced water. They are particularly suitable for unattended continuous monitoring of complex water quality where calcium and magnesium ion concentrations fluctuate drastically in the range of tens to tens of thousands of mg / L.
Citation Information
Patent Citations
Dual-element dual-channel fully automatic potentiometric titration automatic analysis device and method
CN112415132B
An online fully automatic calcium, magnesium, strontium and barium ion concentration analyzer
CN119881203B
Full-automatic titration detection device for detecting various elements in laboratory
CN215894521U
Calcium and magnesium detection device for fertilizer
CN218412275U
Trace calcium and magnesium online analyzer
CN218629492U