CN109270016A - Automatic water quality monitoring system and monitoring method under a kind of multifunctional water based on clustering algorithm - Google Patents

Automatic water quality monitoring system and monitoring method under a kind of multifunctional water based on clustering algorithm Download PDF

Info

Publication number
CN109270016A
CN109270016A CN201811138395.6A CN201811138395A CN109270016A CN 109270016 A CN109270016 A CN 109270016A CN 201811138395 A CN201811138395 A CN 201811138395A CN 109270016 A CN109270016 A CN 109270016A
Authority
CN
China
Prior art keywords
water
water quality
box body
data
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811138395.6A
Other languages
Chinese (zh)
Other versions
CN109270016B (en
Inventor
严如强
杨建勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southeast University
Original Assignee
Southeast University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southeast University filed Critical Southeast University
Priority to CN201811138395.6A priority Critical patent/CN109270016B/en
Publication of CN109270016A publication Critical patent/CN109270016A/en
Application granted granted Critical
Publication of CN109270016B publication Critical patent/CN109270016B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • G01N21/33Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using ultraviolet light
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/18Water
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/18Water
    • G01N33/1806Biological oxygen demand [BOD] or chemical oxygen demand [COD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering

Landscapes

  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Pathology (AREA)
  • Data Mining & Analysis (AREA)
  • Immunology (AREA)
  • General Health & Medical Sciences (AREA)
  • Biochemistry (AREA)
  • Analytical Chemistry (AREA)
  • Medicinal Chemistry (AREA)
  • Food Science & Technology (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Biology (AREA)
  • Emergency Medicine (AREA)
  • Molecular Biology (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Probability & Statistics with Applications (AREA)
  • General Engineering & Computer Science (AREA)
  • Sampling And Sample Adjustment (AREA)

Abstract

The invention discloses automatic water quality monitoring system and monitoring methods under a kind of multifunctional water based on clustering algorithm, monitoring system includes host computer and monitor, host computer includes Labview interface part and Python data processing section, and monitor includes scalable fixed bracket, box body, slave computer, sliding block and power module.When monitor works, current water sample is titrated with different reagents, and control ultraviolet source and issue different light to monitor different water quality parameters;Slave computer controls sliding block simultaneously, moves up and down box body in vertical direction, and then acquires multiple water quality parameters of different water depth.The present invention can measure COD, nitrogen content and the pH value at different water depth, host computer is upload the data to by data access module and carries out the data processing based on clustering algorithm, and system realizes water quality monitoring multifunction, automates, avoids secondary pollution, save the cost, raising water quality monitoring accuracy and Data Management Analysis comprehensive.

Description

Automatic water quality monitoring system and monitoring under a kind of multifunctional water based on clustering algorithm Method
Technical field
The present invention relates to water monitoring devices and method, are lauched more particularly, to a kind of multifunctional water based on clustering algorithm Matter automatic monitoring system and monitoring method.
Background technique
With the development of industry, water pollution is increasingly severe, and COD (COD) and nitrogen content, pH value can be anti- The degree polluted in water by reducing substances is reflected, is the major criterion for measuring environmental quality, currently, the measurement conventional method of water quality Generally use chemical method, mainly use potassium dichromate standard method, coulometric titration, according to water quality chlorine ion concentration it is different its Monitoring method is also different, and fresh water generally uses potassium dichromate method, acidic potassium permanganate method, and seawater uses basic potassium permanganate method. But these conventional methods all have that reagent dosage is big, and secondary pollution is serious, the testing time is long, operating procedure is many and diverse, measurement object Disadvantage single, the degree of automation is low has been not suitable with the market demand of modernization.
The spectrophotometry de termination of water quality measurement is carried out in the Fundamentals of Measurement of titration, and absorption spectrum original is used Reason, according to after the completion of being titrated in solution in reagent ion concentration how much, the ultraviolet source measurement that different wave length is respectively adopted is different The absorbance of the water quality of concentration solution to be measured, therefore according to gained absorbance working curve, can represent chemistry in water sample needs Oxygen amount, nitrogen content, pH value.Spectrophotometry de termination is a kind of improvement of titration, saves reagent, easy to operate.But it is existing Instrument can only measure a kind of parameter of water quality mostly, and cannot complete the unified measurement of multi-parameter, this also results in water quality measurement As a result one-sidedness and inaccuracy, therefore how to study a kind of water quality monitoring instrument of novel support multi parameter simultaneous measuring It is extremely urgent.
The existing water quality monitor based on spectrophotometry in market generally requires the dedicated examination of mating corresponding production company Agent, and artificial titer reagent is had to, manual sampling is needed, manual operation completes each water quality monitoring step, therefore wastes A large amount of manpower, material resources and financial resources, and the water sample obtained is single, cannot embody the water quality situation under the water environment of different depth, Monitoring result is undesirable, and compatibility of the water quality monitoring instrument under different measurement environment is very poor, for water environment Actual measurement is unilateral, and measuring speed and precision are to be improved, and instrument price is expensive, bulky operating procedure complexity is not easy to Practical application.Therefore how to realize collect multi-functional, cheap, data dynamic access and processed offline, in-site measurement at a distance Monitoring, manual measurement and automatic measurement, different water depth water quality measurement, measurement are simple accurately and fast portable in being integrally water quality One of the pressing issues that monitoring instrument is faced.
Summary of the invention
Goal of the invention: a purpose be to provide under a kind of multifunctional water based on clustering algorithm automatic water quality monitoring system and Monitoring method extends water quality monitor function, improves water quality monitor to solve the prior art and apply the existing above problem To the automatic measurement function and field measurement function of the multiple parameters under different water depth.
Technical solution: for achieving the above object, the invention adopts the following technical scheme:
Automatic water quality monitoring system under a kind of multifunctional water based on clustering algorithm, including host computer and monitor, it is upper Machine includes Labview interface part and Python data processing section, and host computer designs gui interface by Labview, borrows Help internal interface function call Python function using clustering algorithm completed sample according to processing, monitor includes scalable fixation Bracket, box body, slave computer, sliding block and power module.Wherein:
Scalable fixed pedestal lower end is fixed in water, for fixing entire monitor;
Box body sealing, top are provided with a hole, and box portion outside is equipped with a measurement switch, and inboard wall of cartridge is equipped with waterproof layer, and Slave computer and power module are located inside waterproof layer;
Slave computer is built in box body, for controlling sliding block and acquisition water quality parameter data, and by the water quality of acquisition Supplemental characteristic is uploaded to host computer;
Sliding block is for connecting box body and scalable fixed bracket;
Power module is built in box body, including DC power supply drive module and voltage amplification module, DC power supply driving Module output is connected with the input of voltage amplification module, and voltage amplification module output end is connect with each modular power source input terminal respectively, For each module for power supply of monitor;
Slave computer controls sliding block, moves up and down box body in vertical direction, and then acquires the multiple of different water depth Water quality parameter.
Optionally, scalable fixed bracket includes upper and lower two sections stainless steel iron pipe, and upper section is telescopic joint, and lower section is to fix Section, telescopic joint lower end have a night bolt, multiple fixation holes with night bolt cooperation are distributed on fixed knot, when bullet When spring bolt is inserted into different fixation holes, entire scalable fixed bracket has different height, and telescopic joint and fixed knot pass through Night bolt is fixedly connected with fixation hole.
Optionally, slave computer includes single-chip microcontroller, multichannel spectrophotometry water quality module and data access module, multi-pass Road spectrophotometry water quality module measurement water quality information is converted to electric signal, then exports to single-chip microcontroller and is handled, monolithic Data are exported to data access module after machine processing, read data from data access module by host computer.
Optionally, single-chip microcontroller includes control unit, outside RTC, external crystal-controlled oscillation, signal condition amplifying circuit and multichannel ADC conversion module, multichannel spectrophotometry water quality module include that firm banking, binary channels spectrophotometric device, test tube are fixed Device, silicon photocell sensor 1, silicon photocell sensor 2, ultraviolet source 1, ultraviolet source 2, titration slot and water valve, binary channels Spectrophotometric device is fixed on the fixed base, is equipped with optical path on-off switch in test tube fixing device inner wall, to be tested for holding The test tube of agent is placed in test tube fixing device, and test tube opening face box body top drilling, and water valve is set to the fixed dress of test tube Upper end is set, when water quality to be measured is filled to liquid level more than water valve, control unit controls water valve closure, opens titration slot titration and works as Preceding invisible spectro water quality;External RTC and external crystal-controlled oscillation are connect with control unit, and control unit passes through output PWM wave control two A ultraviolet source issues the ultraviolet light of varying strength and frequency, and ultraviolet light passes through spectrophotometric device inner passage respectively and is irradiated to pair In the silicon photocell sensor answered, then optical signal is converted to electric signal, and input signal conditioning by silicon photocell sensor Amplifying circuit amplifies processing to the electric signal, finally passes through multichannel ADC conversion module input control cell processing.
Optionally, data access module includes SD card data dynamic access module and EEPROM data cache module, SD card Data dynamic access module is bi-directionally connected with control unit and host computer respectively, and EEPROM data cache module and control unit connect It connects.
Optionally, sliding block includes stepper motor, fixed pulley and movable pulley, and fixed pulley is fixed on scalable fixed bracket Upper end, movable pulley is fixed on box body on the lateral wall of scalable fixed bracket side, and with scalable fixed bracket phase Connection, stepper motor are fixed on box body top, are socketed on stepper motor output shaft by the draught line that fixed pulley is drawn, single-chip microcontroller Control stepper motor rotates clockwise or counterclockwise, and drives box body to move up and down in vertical direction, and movable pulley is with box body It moves up and down.
In another embodiment of the present invention, the monitoring of automatic water quality monitoring system under a kind of multifunctional water based on clustering algorithm Method, comprising the following steps:
(1) monitor is first debugged before starting measurement: scalable fixed stent length being adjusted to adapt to the height of current level Scalable fixed bracket is inserted under water by degree, and it is firm fixed to insert;
(2) judge whether measurement switch is opened, if measurement switch has been opened, to control unit input the current depth of water and Box body declines unit height value every time, and executes step (3);If it is not, then continuing to execute step (2);
(3) before starting monitoring, whether the current falling head of judgement is more than or equal to the water depth value of input, if starting to monitor Before find that current falling head is more than or equal to the water depth value of input, then illustrate that step (2) input is wrong, need return step (2) the current depth of water and box body are re-entered and declines unit height value every time;If it is not, thening follow the steps (4);
(4) control unit control stepper motor rotates forward, and so that box body is declined a unit height value, and monitor current depth of water position The different quality parameter value set;
(5) one-shot measurement terminates, and control unit recalculates and judges currently whether falling head has been more than or equal to input Water depth value, if not, then it represents that instrument reaches the bottom not yet, and return step (4) executes;If so, thening follow the steps (6);
(6) control unit control stepper motor reversion, makes box body rise a unit height value;
(7) control unit calculates and judges currently to have gone up the water depth value whether height is more than or equal to input, if it is not, then table Show that instrument reaches the water surface or more not yet, return step (6) executes;If so, indicating that box body has arrived at the water surface or more, control Measurement result is stored in data access module by unit, this measurement terminates;
(8) after to be measured, data access module is connected on host computer, Labview passes through intrinsic function interface The data of data access module storage inside are read as sample data set to be processed, Labview passes through internal interface function It calls Python function using clustering algorithm completed sample according to processing, and gui interface is designed by Labview and is shown.
Further, the method for multiple water quality parameter values of current depth of water position is monitored in step (4) are as follows:
(1) after box body reaches commitment positions, water valve is opened in control unit control, allows extraneous water quality above box body Water inlet flows into test tube, if the priming charge matter water surface reaches water valve or more, control unit controls water valve and closes, and reaches water sampling Purpose;
(2) control unit is according to currently needing the water quality parameter measured the control titration slot current water of different reagent titration Sample closes titration slot after the completion of titration;
(3) control unit output frequency be i PWM wave to ultraviolet source, make its sending corresponding frequencies and intensity it is ultraviolet Light measures current water quality parameter α using spectrophotometry, surveys n times respectively with two silicon photocell sensors, remove maximum value and Its average value is taken after minimum value, and current water quality parameter result is respectively stored in SD card;Wherein water quality parameter α is water quality COD concentration, nitrogen content or pH value, i indicate to get the frequency of PWM wave required for current water quality parameter α.
Further, host computer is handled sample data using clustering algorithm in step (8), is specifically included:
System calls directly Python interface function by Labview and opens Python console, by built in Python Scikit-learn packet in KMeans function encode clustering algorithm program, when interface normally connects, open Pyhon console Afterwards, it needs first to be directed through data access module and is input to the different location of epigynous computer section, the water quality monitoring at different water depth Data set is as sample data set D, the k value inputted by user, k sample is randomly choosed from D as initial mean value vector, The distance between each sample data in data set and each subvector in mean vector are calculated, distance metric function uses Gaussian function calculates: dij=| | xj-ui||2, 1≤i≤k, 1≤j≤m, wherein dijIt indicates between sample data and mean vector Gauss distance, xjIndicate ground to be divided sample data, uiThe sample cluster formed by cluster is indicated, by sample xjBe divided into away from From in nearest cluster, then recalculating new mean vector, and judge it is whether consistent with mean vector before, if unanimously Cluster is completed, and sample data set is divided into k cluster, calculating step above is repeated if inconsistent, until mean vector not Until changing again.
The utility model has the advantages that compared with prior art, present invention employs at the spectrophotometry of multi-path measurement different water depth COD, nitrogen content, pH value, realize automation equipment, avoid secondary pollution, save the cost, improve water quality monitoring accuracy and complete While the property of face, a large amount of manpower, material resources and financial resources are saved, meanwhile, instrument supports in-site measurement, long-range monitoring, is particularly suitable for open country Outer water quality measurement;Instrument is effectively reduced irrelevant factor and water quality is surveyed by using multi-channel measurement different quality parameter The interference of amount makes to measure more accurate quick;SD card data dynamic access function is introduced, makes to operate simpler convenience.
Meanwhile existing water quality monitoring instrument has only completed single data acquisition function, the data processing for the later period It is related to there is no too many, and since the parameter of water quality monitoring is numerous, it is difficult to which suitable label is added to assess to sample data The quality of water quality, classification and data processing work of the clustering algorithm in machine learning field suitable for no label data collection, passes through Explain the study of Non-labeled Training Sample data inwardness and rule, both can be used for finding in data distribution knot Structure also can be used as the forerunner of other learning tasks such as classification.Equipment instrument is small simultaneously is convenient for carrying, and cheap, more sticks on It is bordering on practical application, industry and demands of individuals is met to a certain extent, helps further to improve problem of environmental pollution, have Very high social utility's value and the value of environmental protection.
Detailed description of the invention
Fig. 1 is monitor structural schematic diagram of the present invention;
Fig. 2 is monitor circuit connection diagram of the present invention;
Fig. 3 is measurement flow chart of the invention;
Fig. 4 is the method flow diagram of measurement different quality parameter of the invention;
Fig. 5 is clustering algorithm schematic diagram of the invention.
Specific embodiment
Technical solution of the present invention is described in detail in the following with reference to the drawings and specific embodiments.
The present invention implements automatic water quality monitoring system and monitoring method under a kind of multifunctional water based on clustering algorithm, can It realizes water-quality COD concentration, nitrogen content, pH value at multichannel spectrophotometry measurement different water depth, automatically completes different water depth Sampling of water quality, titration, parameter measurement, SD card data dynamic access, in-site measurement and the off-line monitoring and data processing function at place. Wherein STM32F103RBT6 is master chip (i.e. control unit, similarly hereinafter), coordinates each module and orderly works.
Automatic water quality monitoring system under a kind of multifunctional water based on clustering algorithm, including host computer and monitor, it is upper Machine includes Labview interface part and Python data processing section, and host computer designs gui interface by Labview, borrows Help internal interface function call Python completed sample according to processing, the sample data is read from data access module Position machine, by multiple data sets for measuring obtained water quality parameter and forming, and with the increase of new water quality parameter, this data set It is dynamically changeable.Monitor includes scalable fixed bracket, box body, slave computer, sliding block and power module.Apparatus measures Automation, measurement parameter is comprehensive, and measurement result is simply accurate, is particularly suitable for water at offline water quality monitoring and field different water depth Quality supervision is surveyed.Wherein, scalable fixed pedestal lower end is fixed in water, for fixing entire monitor;Box body sealing, top is provided with One hole, box portion outside are equipped with a measurement switch, and inboard wall of cartridge is equipped with waterproof layer, and slave computer and power module are located at waterproof layer The inside;Slave computer is built in box body, for controlling sliding block and acquisition water quality parameter data, and by the water quality parameter of acquisition Data are uploaded to host computer;Sliding block is for connecting box body and scalable fixed bracket;Power module is built in box body, packet DC power supply drive module and voltage amplification module are included, the output of DC power supply drive module is connected with the input of voltage amplification module, Voltage amplification module output end is connect with each modular power source input terminal respectively, is each module for power supply of monitor.
As depicted in figs. 1 and 2, water quality automonitor under the multifunctional water based on clustering algorithm, wherein scalable fixation Bracket is made of the height-adjustable stainless steel iron pipe of two sections, its length, the scalable fixed bracket can be adjusted according to the depth of water Adjustable length long enough and guarantee highest point are more than the distance of at least one box body height of the water surface, to guarantee box body initial It is on the water surface when position;Scalable fixed bracket is divided into two sections up and down, and upper section is telescopic joint, and lower section is fixed knot, stretches Casing coupling lower end has a night bolt, and multiple fixation holes are distributed with every same distance on fixed knot, night bolt is inserted into When different fixation hole, entire scalable fixed bracket has different height, only needs to insert on spring when needing to adjust height Pin, which is pressed, then can move up and down telescopic joint in fixation hole, adjust scalable fixed support height.When box body needs to decline, only Need to control stepper motor rotation, then box body can by fixed pulley and movable pulley along scalable fixed bracket decline one section away from From.
The box body only has water inlet to have opening, remaining four sides seals, and prevents instrument in box body built-in water Waterlogged damage circuit is provided with slave computer and power module in box body, and box body top is additionally provided with measurement switch, for starting and Close monitor;Box body is connected by sliding block with adjustable stationary barrier.
The slave computer includes single-chip microcontroller, multichannel spectrophotometry water quality module and data access module, single-chip microcontroller As the core board of instrument, it is placed in box body bottom, is connected respectively with other modules, data processing is completed and order controls, it is described Single-chip microcontroller includes control unit, outside RTC, external crystal-controlled oscillation, signal condition amplifying circuit and multichannel ADC conversion module, described Multichannel spectrophotometry water quality module includes firm banking, binary channels spectrophotometric device, test tube fixing device, silicon photocell Sensor 1, silicon photocell sensor 2, ultraviolet source 1, ultraviolet source 2, titration slot and water valve, binary channels spectrophotometric device are fixed On the fixed base, it is equipped with optical path on-off switch in test tube fixing device inner wall, the test tube for holding test agent is placed on In test tube fixing device, and its face box body water inlet that is open, water valve are set to test tube fixing device upper end, when water quality to be measured fills When completely to liquid level more than water valve, control unit controls water valve closure, opens the current invisible spectro water quality of titration slot titration;It is external RTC and external crystal-controlled oscillation are connect with control unit, and control unit is issued different strong by output PWM wave two ultraviolet sources of control It spends and the ultraviolet light of frequency, binary channels spectrophotometric device middle part is opened there are two the optical channel placed is intersected, the both ends of optical channel are divided Not Fang Zhi ultraviolet source and silicon photocell sensor, ultraviolet light pass through respectively spectrophotometric device inner passage be irradiated to it is corresponding In silicon photocell sensor, then optical signal is converted to electric signal by silicon photocell sensor, and then input signal conditioning is put Big circuit amplifies processing to the electric signal, finally passes through multichannel ADC conversion module input control cell processing;Using two A ultraviolet source can measure the water quality parameter of different data range respectively, titrate in slot and be placed with different enough titer reagents, Test agent is formed for titrating water quality stoste, the pin of water valve and control unit is connected directly and is directly controlled by control unit It is opened and closed.Described control unit using ARM handle chip STM32F103RBT6, the signal condition amplifying circuit include by The voltage amplifier circuit and rc filter circuit of OPA2336UA chip composition, amplification and filtering for analog signal;It is described Multichannel ADC conversion module is equipped with AD7705 high precision analogue conversion chip, and acquisition precision is up to 16, using SPI mode It is communicated with control unit, and uses dma mode, realize that multi channel signals acquire simultaneously.
The data access module includes SD card data dynamic access module and EEPROM data cache module, SD card data Dynamic access module is bi-directionally connected with control unit and host computer respectively, and the EEPROM data cache module and control unit connect It connects;Complete the offline storage of data.The power module is built in box body, including DC power supply drive module and voltage amplification Module, DC power supply drive module output with voltage amplification module input connect, voltage amplification module output end respectively with each mould The connection of block power input is each module for power supply of instrument.The voltage amplification module is powered by DC power supply drive module, according to Multiple PT1301 chips separately design amplifying circuit, and respectively disparate modules provide operating voltage.The DC power supply drives mould Block by two section 1.5v dry cell batteries at.
The sliding block includes stepper motor, fixed pulley and movable pulley, and fixed pulley is fixed on scalable support bracket fastened Top, movable pulley are fixed on box body on the lateral wall of scalable fixed bracket side, and close with scalable fixed bracket Fitting, stepper motor are fixed on box body top, are socketed on stepper motor output shaft by the draught line that fixed pulley is drawn, if stepping Motor rotates clockwise or counter-clockwise, and will drive box body and moves in vertical direction, and movable pulley moves down in vertical direction Dynamic, movable pulley plays the movement of lubrication box body and box body is fixed to scalable fixation and prop up while moving up and down with box body Effect on frame.Wherein, stepper motor fixing end is welded on above box portion left, and box body passes through sliding block and scalable fixation Bracket connection, by control stepper motor rotation, reach adjustment oneself height, measurement different water depth at water quality situation mesh 's.
As shown in figure 3, the method for water quality automonitor whole monitoring water quality is such as under the multifunctional water based on clustering algorithm Under:
(1) monitor is first debugged before starting measurement: scalable fixed stent length being adjusted to adapt to the height of current level Scalable fixed bracket is inserted under water by degree, and it is firm fixed to insert;
(2) judge whether measurement switch is opened, if measurement switch has been opened, to control unit input the current depth of water and Box body declines unit height value every time, and executes step (3);If it is not, then continuing to execute step (2);
(3) before starting monitoring, whether the current falling head of judgement is more than or equal to the water depth value of input, if starting to monitor Before find that current falling head is more than or equal to the water depth value of input, then illustrate that step (2) input is wrong, need return step (2) the current depth of water and box body are re-entered and declines unit height value every time;If it is not, thening follow the steps (4);
(4) control unit control stepper motor rotates forward, and so that box body is declined a unit height value, and monitor current depth of water position The different quality parameter value set;
(5) one-shot measurement terminates, and control unit recalculates and judges currently whether falling head has been more than or equal to input Water depth value, if not, then it represents that instrument reaches the bottom not yet, and return step (4) executes;If so, thening follow the steps (6);
(6) control unit control stepper motor reversion, makes box body rise a unit height value;
(7) control unit calculates and judges currently to have gone up the water depth value whether height is more than or equal to input, if it is not, then table Show that instrument reaches the water surface or more not yet, return step (6) executes;If so, indicate that box body has arrived at the water surface or more, this Measurement terminates;
(8) after to be measured, data access module is connected on host computer, Labview passes through intrinsic function interface The data of data access module storage inside are read as sample data set to be processed, Labview passes through internal interface function It calls Python function using clustering algorithm completed sample according to processing, and gui interface is designed by Labview and is shown.
Referring to fig. 4, the specific method and step of different quality parameter are measured in the step (4) are as follows:
(41) after box body reaches commitment positions, water valve is opened in control unit control, allows extraneous water quality above box body Water inlet flow into test tube in, if the priming charge matter water surface reach water valve more than, control unit control water valve close, reach water intaking The purpose of sample;
(42) control unit is current according to currently needing the different reagent of the water quality parameter measured control titration slot to titrate Water sample closes titration slot after the completion of titration;
(43) control unit output frequency be i PWM wave to ultraviolet source, make its sending corresponding frequencies and intensity it is ultraviolet Light measures current water quality parameter α using spectrophotometry, surveys n times respectively with two silicon photocell sensors, remove maximum value and Its average value is taken after minimum value, and current water quality parameter result is respectively stored in SD card;Wherein water quality parameter α is water quality COD concentration, nitrogen content or pH value, i indicate to get the frequency of PWM wave required for current water quality parameter α.
Referring to Fig. 5, clustering algorithm is a kind of common unsupervised learning algorithm in machine learning field, is suitable for training sample Label when unknown situation, target be inwardness by disclosing sample data to the study of Non-labeled Training Sample and Rule is prepared for the analysis of further data, and essence is that sample data set is divided into several mutually disjoint subsets, i.e., Sample cluster, cluster result quality are equal using k-means in such a system by the way that similarity is judged between similarity and cluster in cluster Value-based algorithm completes cluster, and sample data is divided into several clusters, and classification results are shown by Labview user interface, by cluster Sample data after algorithm process can get together automatically according to water quality inner parameter characteristic, form k sample cluster, user The water quality of different location different depth can be divided according to the sample cluster of generation, distinguishing judgement different quality pollutes feelings Condition can also be analyzed by the sample cluster to the poor region of water quality or the depth of water, it is found that this region water pollution is main Influence factor is that the more serious region of which kind of parameter (COD, PH, nitrogen content etc.), the water pollution of water quality is generally present in water Which layer depth position, k value are inputted specified by user oneself.
In above-mentioned steps (8), host computer is handled sample data using clustering algorithm, is specifically included:
System calls directly Python interface function by Labview and opens Python console, by built in Python Scikit-learn packet in KMeans function encode clustering algorithm program, when interface normally connects, open Pyhon console Afterwards, it needs first to be directed through data access module and is input to the different location of epigynous computer section, the water quality monitoring at different water depth Data set is as sample data set D, the k value inputted by user, k sample is randomly choosed from D as initial mean value vector, The distance between each sample data in data set and each subvector in mean vector are calculated, distance metric function uses Gaussian function calculates: dij=| | xj-ui||2, 1≤i≤k, 1≤j≤m, wherein dijIt indicates between sample data and mean vector Gauss distance, xjIndicate ground to be divided sample data, uiThe sample cluster formed by cluster is indicated, by sample xjBe divided into away from From in nearest cluster, then recalculating new mean vector, and judge it is whether consistent with mean vector before, if unanimously Cluster is completed, and sample data set is divided into k cluster, calculating step above is repeated if inconsistent, until mean vector not Until changing again, directly calculating step above can be replaced to complete cluster task with KMeans function in practical operation.
In short, the present invention realizes the COD, nitrogenous at the spectrophotometry measurement different water depth of multi-path using STM32 Amount, pH value realize automation equipment, avoid secondary pollution, save the cost, improve water quality monitoring accuracy and comprehensive same When, a large amount of manpower, material resources and financial resources are saved, meanwhile, instrument supports in-site measurement, long-range monitoring, is particularly suitable for field water survey Amount;Instrument is effectively reduced irrelevant factor for the interference of water quality measurement by using multi-channel measurement different quality parameter, Make to measure more accurate quick;SD card data dynamic access function is introduced, makes to operate simpler convenience while equipment instrument is small It is convenient for carrying, and cheap, is more close to practical application, meet industry and demands of individuals to a certain extent, facilitate Further improve problem of environmental pollution, there is very high social utility value and the value of environmental protection.

Claims (9)

1. automatic water quality monitoring system under a kind of multifunctional water based on clustering algorithm, it is characterised in that: including host computer and prison Instrument is surveyed, host computer includes Labview interface part and Python data processing section, and host computer is designed by Labview Gui interface, by internal interface function call Python function using clustering algorithm completed sample according to processing, monitor includes Scalable fixed bracket, box body, slave computer, sliding block and power module.Wherein:
Scalable fixed pedestal lower end is fixed in water, for fixing entire monitor;
Box body sealing, top are provided with a hole, and box portion outside is equipped with a measurement switch, and inboard wall of cartridge is equipped with waterproof layer, and the next Machine and power module are located inside waterproof layer;
Slave computer is built in box body, for controlling sliding block and acquisition water quality parameter data, and by the water quality parameter of acquisition Data are uploaded to host computer;
Sliding block is for connecting box body and scalable fixed bracket;
Power module is built in box body, including DC power supply drive module and voltage amplification module, DC power supply drive module Output is connected with the input of voltage amplification module, and voltage amplification module output end is connect with each modular power source input terminal respectively, for prison Survey each module for power supply of instrument;
Slave computer controls sliding block, moves up and down box body in vertical direction, and then acquires multiple water quality of different water depth Parameter.
2. monitor according to claim 1, it is characterised in that: scalable fixed bracket includes upper and lower two sections stainless steel and iron Pipe, upper section are telescopic joint, and lower section is fixed knot, and telescopic joint lower end has a night bolt, be distributed on fixed knot it is multiple with The fixation hole of night bolt cooperation, when night bolt is inserted into different fixation holes, entire scalable fixed bracket has not Same height, telescopic joint are fixedly connected by night bolt with fixation hole with fixed knot.
3. monitor according to claim 1, it is characterised in that: slave computer includes single-chip microcontroller, the survey of multichannel spectrophotometric Water quality module and data access module are measured, multichannel spectrophotometry water quality module measurement water quality information is converted to electric signal, Then it exports to single-chip microcontroller and is handled, exported data to data access module after single-chip microcontroller processing, by host computer from data Access module reads data.
4. monitor according to claim 3, it is characterised in that: single-chip microcontroller includes control unit, outside RTC, external crystalline substance Vibration, signal condition amplifying circuit and multichannel ADC conversion module, multichannel spectrophotometry water quality module include fixed bottom Seat, binary channels spectrophotometric device, test tube fixing device, silicon photocell sensor 1, silicon photocell sensor 2, ultraviolet source 1, purple Outer light source 2, titration slot and water valve, binary channels spectrophotometric device is fixed on the fixed base, is equipped in test tube fixing device inner wall Optical path on-off switch, the test tube for holding test agent are placed in test tube fixing device, and test tube opening face box body top Portion's aperture, water valve are set to test tube fixing device upper end, when water quality to be measured is filled to liquid level more than water valve, control unit control Gate valve closure opens titration slot and titrates current invisible spectro water quality;External RTC and external crystal-controlled oscillation are connect with control unit, Control unit controls the ultraviolet light that two ultraviolet sources issue varying strength and frequency by output PWM wave, and ultraviolet light passes through respectively It crosses spectrophotometric device inner passage to be irradiated in corresponding silicon photocell sensor, then optical signal passes through silicon photocell sensor Electric signal is converted to, and input signal conditioning amplifying circuit amplifies processing to the electric signal, finally turned by multichannel ADC Change the mold block input control cell processing.
5. monitor according to claim 1, it is characterised in that: data access module includes SD card data dynamic access mould Block and EEPROM data cache module, SD card data dynamic access module are bi-directionally connected with control unit and host computer respectively, EEPROM data cache module is connect with control unit.
6. monitor according to claim 1, it is characterised in that: sliding block includes stepper motor, fixed pulley and dynamic cunning Wheel, fixed pulley are fixed on scalable support bracket fastened upper end, and movable pulley is fixed on box body close to scalable fixed bracket side On lateral wall, and it is connected with scalable fixed bracket, stepper motor is fixed on box body top, the draught line drawn by fixed pulley It is socketed on stepper motor output shaft, single-chip microcontroller control stepper motor rotates clockwise or counterclockwise, and drives box body vertical It is moved up and down on direction, and movable pulley is moved up and down with box body.
7. the prison of automatic water quality monitoring system under a kind of multifunctional water based on clustering algorithm described in any one of claims 1-6 Survey method, which comprises the following steps:
(1) monitor is first debugged before starting measurement: scalable fixed stent length being adjusted to adapt to the height of current level, it will Scalable fixed bracket insertion is underwater, and it is firm fixed to insert;
(2) judge whether measurement switch is opened, if measurement switch has been opened, input the current depth of water and box body to control unit Decline unit height value every time, and execute step (3);If it is not, then continuing to execute step (2);
(3) before starting monitoring, whether the current falling head of judgement is more than or equal to the water depth value of input, if before starting monitoring just It was found that current falling head is more than or equal to the water depth value of input, then illustrates that step (2) input is wrong, need return step (2) It re-enters the current depth of water and box body and declines unit height value every time;If it is not, thening follow the steps (4);
(4) control unit control stepper motor rotates forward, and so that box body is declined a unit height value, and monitor current depth of water position Different quality parameter value;
(5) one-shot measurement terminates, and control unit recalculates and judges whether current falling head is more than or equal to the water of input Deep value, if not, then it represents that instrument reaches the bottom not yet, and return step (4) executes;If so, thening follow the steps (6);
(6) control unit control stepper motor reversion, makes box body rise a unit height value;
(7) control unit calculates and judges currently to have gone up the water depth value whether height is more than or equal to input, if not, then it represents that instrument Device reaches the water surface or more not yet, and return step (6) executes;If so, indicating that box body has arrived at the water surface or more, control unit Measurement result is stored in data access module, this measurement terminates;
(8) after to be measured, data access module is connected on host computer, Labview is read by intrinsic function interface The data of data access module storage inside pass through internal interface function call as sample data set to be processed, Labview Python function is shown using clustering algorithm completed sample according to processing, and by Labview design gui interface.
8. the monitoring side of automatic water quality monitoring system under a kind of multifunctional water based on clustering algorithm according to claim 7 Method, which is characterized in that the method for multiple water quality parameter values of the current depth of water position of monitoring in step (4) are as follows:
(1) after box body reaches commitment positions, water valve is opened in control unit control, allows water inlet of the extraneous water quality above box body Mouth flows into test tube, if the priming charge matter water surface reaches water valve or more, control unit controls water valve and closes, and reaches the mesh of water sampling 's;
(2) control unit is according to currently needing the water quality parameter measured the control titration slot current water sample of different reagent titration, Titration slot is closed after the completion of titration;
(3) PWM wave that control unit output frequency is i makes it issue the ultraviolet light of corresponding frequencies and intensity, adopts to ultraviolet source Current water quality parameter α is measured with spectrophotometry, n times is surveyed respectively with two silicon photocell sensors, removes maximum value and minimum Its average value is taken after value, and current water quality parameter result is respectively stored in SD card;Wherein water quality parameter α is the COD of water quality Concentration, nitrogen content or pH value, i indicate to get the frequency of PWM wave required for current water quality parameter α.
9. the monitoring side of automatic water quality monitoring system under a kind of multifunctional water based on clustering algorithm according to claim 7 Method, which is characterized in that host computer is handled sample data using clustering algorithm in step (8), is specifically included:
System calls directly Python interface function by Labview and opens Python console, by built in Python KMeans function encodes clustering algorithm program in scikit-learn packet, when interface normally connects, after opening Pyhon console, It needs first to be directed through data access module and is input to the different location of epigynous computer section, the water monitoring data at different water depth Collection is used as sample data set D, the k value inputted by user, and k sample is randomly choosed from D as initial mean value vector, is calculated The distance between each subvector in each sample data and mean vector in data set, distance metric function uses Gauss Function calculates: dij=| | xj-ui||2, 1≤i≤k, 1≤j≤m, wherein dijIndicate the height between sample data and mean vector This distance, xjIndicate ground to be divided sample data, uiThe sample cluster formed by cluster is indicated, by sample xjIt is divided into distance most In close cluster, new mean vector is then recalculated, and whether judgement is consistent with mean vector before, clustered if consistent It completes, sample data set is divided into k cluster, calculating step above is repeated if inconsistent, until mean vector no longer becomes It turns to only.
CN201811138395.6A 2018-09-28 2018-09-28 Multifunctional underwater water quality automatic monitoring system and method based on clustering algorithm Active CN109270016B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811138395.6A CN109270016B (en) 2018-09-28 2018-09-28 Multifunctional underwater water quality automatic monitoring system and method based on clustering algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811138395.6A CN109270016B (en) 2018-09-28 2018-09-28 Multifunctional underwater water quality automatic monitoring system and method based on clustering algorithm

Publications (2)

Publication Number Publication Date
CN109270016A true CN109270016A (en) 2019-01-25
CN109270016B CN109270016B (en) 2020-11-03

Family

ID=65198729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811138395.6A Active CN109270016B (en) 2018-09-28 2018-09-28 Multifunctional underwater water quality automatic monitoring system and method based on clustering algorithm

Country Status (1)

Country Link
CN (1) CN109270016B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109975215A (en) * 2019-04-30 2019-07-05 水利部交通运输部国家能源局南京水利科学研究院 A kind of water transparency monitoring device
WO2023040310A1 (en) * 2021-09-14 2023-03-23 河北地质大学 Fluorescence sensing technology-based planktonic algae concentration monitor

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08201283A (en) * 1995-01-23 1996-08-09 Toho Keisoku Kenkyusho:Kk Water-quality measuring apparatus
CN102331485A (en) * 2011-07-12 2012-01-25 华东理工大学 Portable water quality monitor
CN103020642A (en) * 2012-10-08 2013-04-03 江苏省环境监测中心 Water environment monitoring and quality-control data analysis method
CN202996001U (en) * 2012-12-16 2013-06-12 宋婷婷 Wireless transmission device for monitoring water quality in real time
CN203758777U (en) * 2014-01-08 2014-08-06 中国人民解放军疾病预防控制所 Portable water quality sampler
CN104849424A (en) * 2015-04-29 2015-08-19 福州福光水务科技有限公司 Water quality vertical section monitoring system
CN105628433A (en) * 2014-11-04 2016-06-01 青岛清泉生物科技有限公司 Portable water quality sampler
CN107024366A (en) * 2016-12-22 2017-08-08 中国科学院遥感与数字地球研究所 A kind of Portable water sampler
CN206470077U (en) * 2016-10-11 2017-09-05 苏州工业园区清源华衍水务有限公司 A kind of water sampler
CN107655722A (en) * 2017-11-07 2018-02-02 刘剑锐 A kind of water quality sample-taking box
CN207295272U (en) * 2017-08-08 2018-05-01 惠州市德康兴家居用品有限公司 A kind of flexible clothes hanger
CN108267337A (en) * 2018-01-17 2018-07-10 南开大学 A kind of water quality detection sampling apparatus
CN108562711A (en) * 2018-07-11 2018-09-21 合肥苍旻自动化有限公司 A kind of device for water quality monitoring

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08201283A (en) * 1995-01-23 1996-08-09 Toho Keisoku Kenkyusho:Kk Water-quality measuring apparatus
CN102331485A (en) * 2011-07-12 2012-01-25 华东理工大学 Portable water quality monitor
CN103020642A (en) * 2012-10-08 2013-04-03 江苏省环境监测中心 Water environment monitoring and quality-control data analysis method
CN202996001U (en) * 2012-12-16 2013-06-12 宋婷婷 Wireless transmission device for monitoring water quality in real time
CN203758777U (en) * 2014-01-08 2014-08-06 中国人民解放军疾病预防控制所 Portable water quality sampler
CN105628433A (en) * 2014-11-04 2016-06-01 青岛清泉生物科技有限公司 Portable water quality sampler
CN104849424A (en) * 2015-04-29 2015-08-19 福州福光水务科技有限公司 Water quality vertical section monitoring system
CN206470077U (en) * 2016-10-11 2017-09-05 苏州工业园区清源华衍水务有限公司 A kind of water sampler
CN107024366A (en) * 2016-12-22 2017-08-08 中国科学院遥感与数字地球研究所 A kind of Portable water sampler
CN207295272U (en) * 2017-08-08 2018-05-01 惠州市德康兴家居用品有限公司 A kind of flexible clothes hanger
CN107655722A (en) * 2017-11-07 2018-02-02 刘剑锐 A kind of water quality sample-taking box
CN108267337A (en) * 2018-01-17 2018-07-10 南开大学 A kind of water quality detection sampling apparatus
CN108562711A (en) * 2018-07-11 2018-09-21 合肥苍旻自动化有限公司 A kind of device for water quality monitoring

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
宦娟 等: ""基于K-means聚类和ELM神经网络的养殖水质溶解氧预测"", 《农业工程学报》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109975215A (en) * 2019-04-30 2019-07-05 水利部交通运输部国家能源局南京水利科学研究院 A kind of water transparency monitoring device
CN109975215B (en) * 2019-04-30 2021-07-13 水利部交通运输部国家能源局南京水利科学研究院 Water transparency monitoring devices
WO2023040310A1 (en) * 2021-09-14 2023-03-23 河北地质大学 Fluorescence sensing technology-based planktonic algae concentration monitor

Also Published As

Publication number Publication date
CN109270016B (en) 2020-11-03

Similar Documents

Publication Publication Date Title
CN101183071B (en) Novel water quality analysis meter
CN207147973U (en) Heavy metal in water enrichment and measurement apparatus based on LIBS
CN203365316U (en) Multi-parameter water quality analyzer
CN203275288U (en) Online automatic water quality multiple parameter monitor gathering spectrum and sensor technologies
CN105388309B (en) The automatic quick determination method of trace iron ions and system and application in Power Plant Water Vapor
CN206192967U (en) Hydrolysising nature of soil apparatus for nitrogen examination
CN205426779U (en) On --spot autoanalyzer of sulphion
CN109270016A (en) Automatic water quality monitoring system and monitoring method under a kind of multifunctional water based on clustering algorithm
CN104483164A (en) On-site multi-spot water-sample sampling device and COD (chemical oxygen demand) content detection method
CN103149166A (en) Dual-wavelength ultraviolet method organic wastewater chemical oxygen demand (COD) detection device and method
CN1176372C (en) A potentiometric titration instrument
CN101556240A (en) Chlorophyll measuring apparatus based on RGB (red, green and blue) digital signal
CN104677827A (en) Deducting device and deducting method for visible near-infrared diffuse reflection base signal and based on portable optical fiber spectrometer
CN206248652U (en) Real-time in-situ water quality monitor
CN204128953U (en) Auto injection gas phase molecular absorption spectrometer
CN105784419A (en) Device and method for sampling suspended matters based on LabVIEW upper computer
CN205449792U (en) Water sampling device and monitoring system thereof
CN109191819B (en) Multi-point water quality monitoring and analyzing system and method based on clustering algorithm
CN101556245A (en) Chlorophyll measurement method based on RGB digital signal
CN204479564U (en) Based on the semisubmersible Water Test Kits of wireless telecommunications
CN109270014A (en) Water quality automonitor and monitoring method under a kind of multifunctional water
CN206020330U (en) A kind of intelligent water quality trace heavy metal on-line monitoring of internet of things oriented and early warning system
CN204479565U (en) Portable water-quality analysis instrument
CN204008454U (en) Portable near infrared spectrometer for detection of mould index in storage paddy
CN109270017A (en) Automatic water quality monitoring system and monitoring method under a kind of multifunctional water based on improved RBFNN algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant