CN109270016B - Multifunctional underwater water quality automatic monitoring system and method based on clustering algorithm - Google Patents

Multifunctional underwater water quality automatic monitoring system and method based on clustering algorithm Download PDF

Info

Publication number
CN109270016B
CN109270016B CN201811138395.6A CN201811138395A CN109270016B CN 109270016 B CN109270016 B CN 109270016B CN 201811138395 A CN201811138395 A CN 201811138395A CN 109270016 B CN109270016 B CN 109270016B
Authority
CN
China
Prior art keywords
water quality
module
box body
water
data
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.)
Active
Application number
CN201811138395.6A
Other languages
Chinese (zh)
Other versions
CN109270016A (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

Images

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 a multifunctional underwater water quality automatic monitoring system and a monitoring method based on a clustering algorithm. When the monitor works, different reagents are used for titrating the current water sample, and the ultraviolet light source is controlled to emit different lights to monitor different water quality parameters; and meanwhile, the lower computer controls the sliding module to enable the box body to move up and down in the vertical direction, so that a plurality of water quality parameters of different water depths are collected. The system can measure COD, nitrogen content and PH value in different water depths, and upload data to the upper computer through the data access module for data processing based on the clustering algorithm, thereby realizing multifunction and automation of water quality monitoring, avoiding secondary pollution, saving cost, improving water quality monitoring accuracy and data processing and analyzing comprehensiveness.

Description

Multifunctional underwater water quality automatic monitoring system and method based on clustering algorithm
Technical Field
The invention relates to a water quality monitoring device and a method, in particular to a multifunctional underwater water quality automatic monitoring system and a monitoring method based on a clustering algorithm.
Background
Along with the development of industry, the water quality pollution is more and more serious, the Chemical Oxygen Demand (COD), the nitrogen content and the PH value can reflect the degree of pollution of reducing substances in water, and are important standards for measuring the environmental quality. However, the traditional methods have the defects of large reagent dosage, serious secondary pollution, long testing time, complicated operation steps, single measuring object and low automation degree, and are not suitable for the modern market demand.
The spectrophotometric method for measuring water quality is carried out on the basis of a titration method, and by using an absorption spectrum principle, ultraviolet light sources with different wavelengths are respectively adopted to measure the absorbance of water quality solutions to be measured with different concentrations according to the content of ions in a reagent after titration is completed in the solution, so that the chemical oxygen demand, the nitrogen content and the PH value in a water sample can be shown according to an obtained absorbance working curve. The spectrophotometry is an improvement of the titration method, saves reagents and is convenient to operate. However, most existing instruments can only measure one parameter of water quality, but cannot perform unified measurement of multiple parameters, which also results in one-sidedness and inaccuracy of water quality measurement results, and therefore, how to research a novel water quality monitoring instrument supporting simultaneous measurement of multiple parameters is urgent.
The existing water quality monitoring instrument based on the spectrophotometry in the market generally needs a special reagent matched with a corresponding production company, and a reagent must be artificially titrated, manual sampling is needed, each water quality monitoring step is completed through manual operation, a large amount of manpower, material resources and financial resources are wasted, the obtained water sample is single, the water quality condition under the water area environments with different depths cannot be reflected, the monitoring result is unsatisfactory, the compatibility of the water quality monitoring instrument under different measuring environments is poor, the actual measuring area of the water area environment is large, the measuring speed and the measuring precision are required to be improved, the instrument is expensive, the huge operation step is complex, and the practical application is inconvenient. Therefore, how to realize integration of multiple functions, low price, dynamic data access and offline processing, field measurement and remote monitoring, manual measurement and automatic measurement, water quality measurement in different water depths, simple and accurate measurement, and rapidness and portability is one of the urgent problems of water quality monitoring instruments.
Disclosure of Invention
The purpose of the invention is as follows: one purpose is to provide a multifunctional underwater water quality automatic monitoring system and a monitoring method based on a clustering algorithm, so as to solve the problems existing in the prior art and the application, expand the functions of a water quality monitor, and improve the automatic measurement function and the field measurement function of the water quality monitor on a plurality of parameters under different water depths.
The technical scheme is as follows: in order to realize the purpose, the invention adopts the following technical scheme:
the utility model provides a multi-functional automatic monitoring system of quality of water under water based on clustering algorithm, includes host computer and monitor, and the host computer includes Labview interface design part and Python data processing part, and the host computer designs the GUI interface through Labview, calls the Python function with the help of internal interface function and adopts the clustering algorithm to accomplish sample data and handle, and the monitor includes scalable fixed bolster, box body, next machine, sliding module and power module. Wherein:
the lower end of the telescopic fixing bracket is fixed in water and used for fixing the whole monitor;
the box body is sealed, a hole is formed in the top end of the box body, a measuring switch is arranged outside the box body, a waterproof layer is arranged on the inner wall of the box body, and the lower computer and the power supply module are located in the waterproof layer;
the lower computer is arranged in the box body and is used for controlling the sliding module, collecting water quality parameter data and uploading the collected water quality parameter data to the upper computer;
the sliding module is used for connecting the box body and the telescopic fixing bracket;
the power module is arranged in the box body and comprises a direct current power supply driving module and a voltage amplifying module, the output end of the direct current power supply driving module is connected with the input end of the voltage amplifying module, and the output end of the voltage amplifying module is respectively connected with the power input end of each module to supply power for each module of the monitor;
the lower computer controls the sliding module to enable the box body to move up and down in the vertical direction, and then a plurality of water quality parameters of different water depths are collected.
Optionally, scalable fixed bolster includes two sections upper and lower stainless steel iron pipes, and the upper segment is the telescopic joint, and the lower section is the fixed knot, and the telescopic joint lower extreme has a spring bolt, and it has a plurality ofly and spring bolt complex fixed orifices to distribute on the fixed knot, and when inserting the spring bolt to different fixed orifices, whole scalable fixed bolster has different heights, and telescopic joint and fixed knot pass through spring bolt and fixed orifices fixed connection.
Optionally, the lower computer comprises a single chip microcomputer, a multi-channel spectrophotometry water quality measuring module and a data access module, wherein water quality information measured by the multi-channel spectrophotometry water quality measuring module is converted into an electric signal and then output to the single chip microcomputer for processing, the data is output to the data access module after being processed by the single chip microcomputer, and the data is read from the data access module by the upper computer.
Optionally, the single chip microcomputer comprises a control unit, an external RTC, an external crystal oscillator, a signal conditioning and amplifying circuit and a multi-channel ADC conversion module, the multi-channel spectrophotometric water quality measuring module comprises a fixed base, a two-channel spectrophotometric device, a test tube fixing device, a silicon photocell sensor 1, a silicon photocell sensor 2, an ultraviolet light source 1, an ultraviolet light source 2, a titration tank and a water valve, the two-channel spectrophotometric device is fixed on the fixed base, an optical path on-off switch is arranged on the inner wall of the test tube fixing device, a test tube for containing a test agent to be tested is placed in the test tube fixing device, an opening of the test tube is right opposite to an opening at the top of the box body, the water valve is arranged at the upper end of the test tube fixing device, when the water quality to be tested is filled to a liquid level; the external RTC and the external crystal oscillator are connected with the control unit, the control unit controls the two ultraviolet light sources to emit ultraviolet light with different intensities and frequencies through outputting PWM (pulse width modulation) waves, the ultraviolet light irradiates to the corresponding silicon photocell sensors through internal channels of the spectrometer respectively, then optical signals are converted into electric signals through the silicon photocell sensors, the electric signals are amplified by the input signal conditioning and amplifying circuit, and finally the electric signals are input into the control unit through the multi-channel ADC conversion module for processing.
Optionally, the data access module includes an SD card data dynamic access module and an EEPROM data cache module, the SD card data dynamic access module is respectively connected with the control unit and the upper computer in a bidirectional manner, and the EEPROM data cache module is connected with the control unit.
Optionally, the sliding module comprises a stepping motor, a fixed pulley and a movable pulley, the fixed pulley is fixed at the upper end of the telescopic fixing support, the movable pulley is fixed on the outer side wall of the box body close to one side of the telescopic fixing support and is connected with the telescopic fixing support, the stepping motor is fixed on the upper portion of the box body, a traction wire led out by the fixed pulley is sleeved on an output shaft of the stepping motor, the stepping motor is controlled by the single chip microcomputer to rotate clockwise or anticlockwise, the box body is driven to move up and down in the vertical direction, and the movable pulley moves up and down along.
In another embodiment of the invention, a monitoring method of a multifunctional underwater water quality automatic monitoring system based on a clustering algorithm comprises the following steps:
(1) debugging the monitor before starting to measure: adjusting the length of the telescopic fixed support to a height suitable for the current water level, inserting the telescopic fixed support underwater, and stably fixing the telescopic fixed support;
(2) judging whether the measurement switch is turned on, if so, inputting the current water depth and the height value of each descending unit of the box body to the control unit, and executing the step (3); if not, continuing to execute the step (2);
(3) before monitoring is started, judging whether the current lowered height is larger than or equal to an input water depth value or not, if the current lowered height is found to be larger than or equal to the input water depth value before monitoring is started, indicating that the input in the step (2) is wrong, and returning to the step (2) to input the current water depth and the height value of each time that the box body is lowered; if not, executing the step (4);
(4) the control unit controls the stepping motor to rotate forwards, so that the box body descends by a unit height value, and different water quality parameter values of the current water depth position are monitored;
(5) after one measurement is finished, the control unit recalculates and judges whether the current lowered height is larger than or equal to the input water depth value, if not, the instrument does not reach the water bottom, and the step (4) is returned to execute; if yes, executing the step (6);
(6) the control unit controls the stepping motor to rotate reversely, so that the box body rises by a unit height value;
(7) the control unit calculates and judges whether the current raised height is larger than or equal to the input water depth value, if not, the instrument does not reach the water surface, and the step (6) is returned to execute; if so, the box body is indicated to reach the water level, the control unit stores the measurement result into the data access module, and the measurement is finished;
(8) after the measurement is finished, the data access module is connected to an upper computer, the Labview reads data stored in the data access module through an internal function interface to serve as a sample data set to be processed, calls a Python function through an internal interface function to complete sample data processing through a clustering algorithm, and displays the sample data through a GUI interface designed by the Labview.
Further, the method for monitoring a plurality of water quality parameter values of the current water depth position in the step (4) comprises the following steps:
(1) when the box body reaches the preset position, the control unit controls the water valve to be opened, so that external water quality flows into the test tube along the water inlet above the box body, and if the water level of the poured water quality reaches above the water valve, the control unit controls the water valve to be closed, so that the purpose of taking a water sample is achieved;
(2) the control unit controls the titration tank to titrate the current water sample by using different reagents according to the water quality parameters needing to be measured currently, and closes the titration tank after titration is finished;
(3) the control unit outputs PWM waves with frequency i to an ultraviolet light source to enable the ultraviolet light source to emit ultraviolet light with corresponding frequency and intensity, a spectrophotometry method is adopted to measure a current water quality parameter alpha, two silicon photocell sensors are used for measuring N times respectively, an average value of the two silicon photocell sensors is taken after the maximum value and the minimum value are removed, and current water quality parameter results are stored in an SD card respectively; wherein the water quality parameter alpha is COD concentration, nitrogen content or PH value of the water quality, and i represents the frequency of PWM wave required for obtaining the current water quality parameter alpha.
Further, the upper computer in the step (8) processes the sample data by adopting a clustering algorithm, and the method specifically comprises the following steps:
the system directly calls a Python interface function to open a Python control console by means of Labview, a KMeans function coding clustering algorithm program in a scinit-spare packet built in the Python is used for opening the Python control console, when the interfaces are normally connected, a water quality monitoring data set which is input to different positions and different depths of an upper computer part through a data access module is required to be firstly led in as a sample data set D, k samples are randomly selected from the D as an initial mean value vector through a k value input by a user, the distance between each sample data in the data set and each sub-vector in the mean value vector is calculated, and a distance measurement function adopts a Gaussian function to calculate: dij=||xj-ui||2I is more than or equal to 1 and less than or equal to k, j is more than or equal to 1 and less than or equal to m, wherein dijRepresenting the Gaussian distance, x, between the sample data and the mean vectorjRepresents the sample data to be divided, uiRepresenting the cluster of samples formed by clustering, and sampling xjDividing the data into clusters with the nearest distance, then recalculating a new mean vector, judging whether the mean vector is consistent with the previous mean vector or not, if so, finishing clustering, dividing the sample data set into k clusters, and if not, repeating the above calculation steps until the mean vector is not changed any more.
Has the advantages that: compared with the prior art, the invention adopts a multi-channel spectrophotometry to measure COD, nitrogen content and PH value in different water depths, realizes the automation of the instrument, avoids secondary pollution, saves cost, improves the accuracy and comprehensiveness of water quality monitoring, saves a large amount of manpower, material resources and financial resources, simultaneously supports field measurement and remote monitoring by the instrument, and is particularly suitable for field water quality measurement; the instrument effectively reduces the interference of irrelevant factors on water quality measurement by adopting multiple channels to measure different water quality parameters, so that the measurement is more accurate and rapid; the SD card data dynamic access function is introduced, so that the operation is simpler and more convenient.
Meanwhile, the existing water quality monitoring instrument only completes a single data acquisition function, the later-stage data processing is not related too much, and due to the fact that parameters of water quality monitoring are numerous, a proper label is difficult to be added to sample data to evaluate the quality of water quality. Meanwhile, the instrument is small in size, convenient to carry, low in price and close to practical application, industrial and personal requirements are met to a certain extent, the environment pollution problem is further improved, and the instrument has high social practical value and environmental protection value.
Drawings
FIG. 1 is a schematic view of the monitor of the present invention;
FIG. 2 is a schematic diagram of the monitor circuit connection of the present invention;
FIG. 3 is a measurement flow diagram of the present invention;
FIG. 4 is a flow chart of a method of measuring different water quality parameters according to the present invention;
fig. 5 is a schematic diagram of the clustering algorithm of the present invention.
Detailed Description
The technical solution of the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
The invention implements the multifunctional underwater water quality automatic monitoring system and the monitoring method based on the clustering algorithm, can realize the measurement of COD concentration, nitrogen content and PH value of water quality at different water depths by a multi-channel spectrophotometry, and automatically complete the functions of water quality sampling, titration, parameter measurement, SD card data dynamic access, field measurement, off-line monitoring and data processing at different water depths. Wherein, STM32F103RBT6 is a main chip (namely a control unit, the same below), and coordinates orderly work of each module.
The utility model provides a multi-functional underwater water quality automatic monitoring system based on clustering algorithm, includes host computer and monitor, and the host computer includes Labview interface design part and Python data processing part, and the host computer designs the GUI interface through Labview, calls Python with the help of internal interface function and accomplishes sample data processing, sample data are read the data set that the host computer, constitute by a plurality of water quality parameters that obtain of measuring from data access module to along with the increase of new water quality parameter, this data set is the dynamic variable. The monitor comprises a telescopic fixing support, a box body, a lower computer, a sliding module and a power supply module. The instrument measurement is automatic, the measurement parameters are comprehensive, the measurement result is simple and accurate, and the method is particularly suitable for offline water quality monitoring and water quality monitoring at different water depths in the field. The lower end of the telescopic fixing support is fixed in water and used for fixing the whole monitor; the box body is sealed, a hole is formed in the top end of the box body, a measuring switch is arranged outside the box body, a waterproof layer is arranged on the inner wall of the box body, and the lower computer and the power supply module are located in the waterproof layer; the lower computer is arranged in the box body and is used for controlling the sliding module, collecting water quality parameter data and uploading the collected water quality parameter data to the upper computer; the sliding module is used for connecting the box body and the telescopic fixing bracket; the power module is arranged in the box body and comprises a direct current power supply driving module and a voltage amplification module, the output end of the direct current power supply driving module is connected with the input end of the voltage amplification module, and the output end of the voltage amplification module is connected with the power input end of each module respectively to supply power for each module of the monitor.
As shown in fig. 1 and 2, the multifunctional underwater water quality automatic monitor based on the clustering algorithm is characterized in that a telescopic fixing support is composed of two sections of stainless steel pipes with adjustable heights, the length of the telescopic fixing support can be adjusted according to the water depth, the adjustable length of the telescopic fixing support is long enough, and the highest point is ensured to exceed the height of at least one box body on the water surface, so that the box body is ensured to be above the water surface at the initial position; the telescopic fixing support is divided into an upper section and a lower section, the upper section is a telescopic section, the lower section is a fixing section, the lower end of the telescopic section is provided with a spring bolt, a plurality of fixing holes are distributed on the fixing section at the same distance, when the spring bolt is inserted into different fixing holes, the whole telescopic fixing support has different heights, and when the height needs to be adjusted, the telescopic section can move up and down only by pressing the spring bolt into the fixing holes, so that the height of the telescopic fixing support can be adjusted. When the box body needs to descend, only the stepping motor needs to be controlled to rotate, and then the box body can descend for a certain distance along the telescopic fixing support through the fixed pulley and the movable pulley.
The box body is provided with an opening only at a water inlet, the other four sides are sealed, a waterproof layer is arranged in the box body to prevent the instrument from water inlet and damaging a circuit, a lower computer and a power supply module are arranged in the box body, and a measuring switch is further arranged at the upper part of the box body and used for starting and closing the monitor; the box body is connected with the adjustable fixed support through the sliding module.
The lower computer comprises a single chip microcomputer, a multi-channel spectrophotometric water quality measuring module and a data access module, the single chip microcomputer is used as a core plate of the instrument, is arranged at the bottom of the box body and is respectively connected with other modules to complete data processing and command control, the single chip microcomputer comprises a control unit, an external RTC (real time clock), an external crystal oscillator, a signal conditioning and amplifying circuit and a multi-channel ADC (analog to digital converter) conversion module, the multi-channel spectrophotometric water quality measuring module comprises a fixed base, a two-channel spectrophotometer, a test tube fixing device, a silicon photocell sensor 1, a silicon photocell sensor 2, an ultraviolet light source 1, an ultraviolet light source 2, a titration tank and a water valve, the two-channel spectrophotometric is fixed on the fixed base, an optical path on-off switch is arranged on the inner wall of the test tube fixing device and is used for containing a test agent to be tested and is arranged, when the water to be measured is filled to the liquid level above the water valve, the control unit controls the water valve to be closed, and the titration tank is opened to titrate the water quality in the current test tube; the external RTC and the external crystal oscillator are both connected with the control unit, the control unit controls two ultraviolet light sources to emit ultraviolet light with different intensities and frequencies by outputting PWM (pulse width modulation) waves, the middle part of the dual-channel spectrometer is provided with two optical channels which are arranged in a crossed manner, the two ends of each optical channel are respectively provided with the ultraviolet light source and the silicon photocell sensor, the ultraviolet light respectively irradiates the corresponding silicon photocell sensor through the internal channel of the spectrometer, then the optical signal is converted into an electric signal through the silicon photocell sensor, then the electric signal is amplified by the input signal conditioning and amplifying circuit, and finally the electric signal is input into the control unit for processing through the multi-channel ADC (analog to digital converter) module; two ultraviolet light sources are adopted to respectively measure water quality parameters in different data ranges, different sufficient titration reagents are placed in the titration tank and are used for titrating water quality stock solution to form a to-be-tested reagent, and the water valve is directly connected with a pin of the control unit and is directly controlled to be opened and closed by the control unit. The control unit adopts an ARM processing chip STM32F103RBT6, and the signal conditioning and amplifying circuit comprises a voltage amplifying circuit and a resistance-capacitance filtering circuit which are composed of an OPA2336UA chip and are used for amplifying and filtering analog signals; the multichannel ADC conversion module is provided with an AD7705 high-precision analog-to-digital conversion chip, the acquisition precision can reach 16 bits, the SPI mode is adopted to communicate with the control unit, and the DMA mode is adopted to realize the simultaneous acquisition of multichannel signals.
The data access module comprises an SD card data dynamic access module and an EEPROM data cache module, the SD card data dynamic access module is respectively in bidirectional connection with the control unit and the upper computer, and the EEPROM data cache module is connected with the control unit; and finishing off-line storage of the data. The power module is arranged in the box body and comprises a direct-current power supply driving module and a voltage amplification module, the output of the direct-current power supply driving module is connected with the input of the voltage amplification module, and the output end of the voltage amplification module is connected with the power input end of each module respectively to supply power for each module of the instrument. The voltage amplification module is powered by the direct-current power supply driving module, and amplification circuits are respectively designed according to the PT1301 chips and respectively provide working voltages for different modules. The direct-current power supply driving module consists of two 1.5v dry batteries.
The slip module includes step motor, fixed pulley and movable pulley, the fixed pulley is fixed on the top of scalable fixed bolster, the movable pulley is fixed in the lateral wall that the box body is close to scalable fixed bolster one side, and closely laminate with scalable fixed bolster, step motor fixes on box body upper portion, the pull wire of drawing forth by the fixed pulley cup joints on the step motor output shaft, if step motor clockwise or anticlockwise rotation then can drive the box body and move on the vertical direction, the movable pulley reciprocates in the vertical direction, the movable pulley is when reciprocating along with the box body, play lubricated box body and remove and fix the effect on scalable fixed bolster with the box body. Wherein, step motor stiff end is welded in box body upper left side, and the box body passes through the slip module to be connected with scalable fixed bolster, rotates through control step motor, reaches the purpose of the quality of water condition of adjustment self height, the different water depths of measurement.
As shown in fig. 3, the method for integrally monitoring the water quality of the multifunctional underwater water quality automatic monitor based on the clustering algorithm comprises the following steps:
(1) debugging the monitor before starting to measure: adjusting the length of the telescopic fixed support to a height suitable for the current water level, inserting the telescopic fixed support underwater, and stably fixing the telescopic fixed support;
(2) judging whether the measurement switch is turned on, if so, inputting the current water depth and the height value of each descending unit of the box body to the control unit, and executing the step (3); if not, continuing to execute the step (2);
(3) before monitoring is started, judging whether the current lowered height is larger than or equal to an input water depth value or not, if the current lowered height is found to be larger than or equal to the input water depth value before monitoring is started, indicating that the input in the step (2) is wrong, and returning to the step (2) to input the current water depth and the height value of each time that the box body is lowered; if not, executing the step (4);
(4) the control unit controls the stepping motor to rotate forwards, so that the box body descends by a unit height value, and different water quality parameter values of the current water depth position are monitored;
(5) after one measurement is finished, the control unit recalculates and judges whether the current lowered height is larger than or equal to the input water depth value, if not, the instrument does not reach the water bottom, and the step (4) is returned to execute; if yes, executing the step (6);
(6) the control unit controls the stepping motor to rotate reversely, so that the box body rises by a unit height value;
(7) the control unit calculates and judges whether the current raised height is larger than or equal to the input water depth value, if not, the instrument does not reach the water surface, and the step (6) is returned to execute; if so, indicating that the box body reaches the position above the water surface, and finishing the measurement;
(8) after the measurement is finished, the data access module is connected to an upper computer, the Labview reads data stored in the data access module through an internal function interface to serve as a sample data set to be processed, calls a Python function through an internal interface function to complete sample data processing through a clustering algorithm, and displays the sample data through a GUI interface designed by the Labview.
Referring to fig. 4, the specific method and steps for measuring different water quality parameters in step (4) are as follows:
(41) when the box body reaches the preset position, the control unit controls the water valve to be opened, so that external water quality flows into the test tube along the water inlet above the box body, and if the water level of the poured water quality reaches above the water valve, the control unit controls the water valve to be closed, so that the purpose of taking a water sample is achieved;
(42) the control unit controls the titration tank to titrate the current water sample by using different reagents according to the water quality parameters needing to be measured currently, and closes the titration tank after titration is finished;
(43) the control unit outputs PWM waves with frequency i to an ultraviolet light source to enable the ultraviolet light source to emit ultraviolet light with corresponding frequency and intensity, a spectrophotometry method is adopted to measure a current water quality parameter alpha, two silicon photocell sensors are used for measuring N times respectively, an average value of the two silicon photocell sensors is taken after the maximum value and the minimum value are removed, and current water quality parameter results are stored in an SD card respectively; wherein the water quality parameter alpha is COD concentration, nitrogen content or PH value of the water quality, and i represents the frequency of PWM wave required for obtaining the current water quality parameter alpha.
Referring to fig. 5, a clustering algorithm is a common unsupervised learning algorithm in the field of machine learning, and is suitable for unknown conditions when a training sample is marked, the objective is to disclose the intrinsic properties and rules of sample data through learning of a non-marked training sample, and prepare for further data analysis, the essence of the algorithm is to divide a sample data set into a plurality of mutually disjoint subsets, namely sample clusters, and the quality of a clustering result is judged through intra-cluster similarity and inter-cluster similarity, in the system, a k-means mean algorithm is adopted to complete clustering, the sample data is divided into a plurality of clusters, a classification result is displayed through a Labview user interface, the sample data processed by the clustering algorithm are automatically clustered together according to the internal parameter characteristics of water quality to form k sample clusters, and a user can divide the water quality of different depths in different places according to the generated sample clusters, different water quality pollution conditions can be judged distinctively, and areas with poor water quality or water depth sample clusters can be analyzed, so that the main influencing factors of water quality pollution in the areas are found to be which parameters (COD, PH, nitrogen content and the like) of water quality, which depth position of water layer is generally existed in the areas with serious water quality pollution, and the k value is input and designated by a user.
In the step (8), the upper computer processes the sample data by using a clustering algorithm, and the method specifically includes:
the system directly calls a Python interface function to open a Python control console by means of Labview, a KMeans function coding clustering algorithm program in a scinit-spare packet built in the Python is used, when the interfaces are normally connected, the Python control console is opened, and the Python control console needs to be firstly led in to be input to different positions of an upper computer part through a data access module and at different depths of waterThe water quality monitoring data set is used as a sample data set D, k samples are randomly selected from the data set D through a k value input by a user to serve as an initial mean vector, the distance between each sample data in the data set and each sub-vector in the mean vector is calculated, and a distance measurement function is calculated by adopting a Gaussian function: dij=||xj-ui||2I is more than or equal to 1 and less than or equal to k, j is more than or equal to 1 and less than or equal to m, wherein dijRepresenting the Gaussian distance, x, between the sample data and the mean vectorjRepresents the sample data to be divided, uiRepresenting the cluster of samples formed by clustering, and sampling xjDividing the data into clusters with the nearest distance, then recalculating a new mean vector, judging whether the mean vector is consistent with the previous mean vector or not, if so, finishing clustering, dividing the sample data set into k clusters, and if not, repeating the above calculation steps until the mean vector is not changed any more, wherein a KMeans function is directly used for replacing the above calculation steps to finish clustering tasks in actual operation.
In a word, the invention adopts STM32 to realize that the multichannel spectrophotometry measures COD, nitrogen content and PH value in different water depths, realizes the automation of the instrument, avoids secondary pollution, saves cost, improves the accuracy and comprehensiveness of water quality monitoring, saves a large amount of manpower, material resources and financial resources, simultaneously, the instrument supports field measurement and remote monitoring, and is particularly suitable for field water quality measurement; the instrument effectively reduces the interference of irrelevant factors on water quality measurement by adopting multiple channels to measure different water quality parameters, so that the measurement is more accurate and rapid; the SD card data dynamic access function is introduced, so that the operation is simpler and more convenient, meanwhile, the instrument is small in size and convenient to carry, the price is low, the SD card data dynamic access function is closer to practical application, industrial and personal requirements are met to a certain extent, the environmental pollution problem is further improved, and the SD card data dynamic access function has very high social practical value and environmental protection value.

Claims (7)

1. The multifunctional underwater water quality automatic monitoring system based on the clustering algorithm is characterized in that: the monitoring system comprises an upper computer and a monitor, wherein the upper computer comprises a Labview interface design part and a Python data processing part, the upper computer designs a GUI interface through the Labview, calls a Python function by means of an internal interface function and adopts a clustering algorithm to complete sample data processing, and the monitor comprises a telescopic fixed support, a box body, a lower computer, a sliding module and a power supply module; wherein:
the lower end of the telescopic fixing bracket is fixed in water and used for fixing the whole monitor;
the box body is sealed, a hole is formed in the top end of the box body, a measuring switch is arranged outside the box body, a waterproof layer is arranged on the inner wall of the box body, and the lower computer and the power supply module are located in the waterproof layer;
the lower computer is arranged in the box body and is used for controlling the sliding module, collecting water quality parameter data and uploading the collected water quality parameter data to the upper computer;
the sliding module is used for connecting the box body and the telescopic fixing bracket;
the power module is arranged in the box body and comprises a direct current power supply driving module and a voltage amplifying module, the output end of the direct current power supply driving module is connected with the input end of the voltage amplifying module, and the output end of the voltage amplifying module is respectively connected with the power input end of each module to supply power for each module of the monitor;
the lower computer controls the sliding module to enable the box body to move up and down in the vertical direction, and then a plurality of water quality parameters of different water depths are collected;
the lower computer comprises a single chip microcomputer, a multi-channel spectrophotometric water quality measuring module and a data access module, wherein water quality information measured by the multi-channel spectrophotometric water quality measuring module is converted into an electric signal and then is output to the single chip microcomputer for processing, the data is output to the data access module after being processed by the single chip microcomputer, and the data is read from the data access module by the upper computer;
the single chip microcomputer comprises a control unit, an external RTC (real time clock), an external crystal oscillator, a signal conditioning amplifying circuit and a multi-channel ADC (analog to digital converter) conversion module, the multi-channel spectrophotometric water quality measuring module comprises a fixed base, a two-channel spectrophotometric device, a test tube fixing device, a silicon photocell sensor 1, a silicon photocell sensor 2, an ultraviolet light source 1, an ultraviolet light source 2, a titration tank and a water valve, the two-channel spectrophotometric device is fixed on the fixed base, a light path on-off switch is arranged on the inner wall of the test tube fixing device, a test tube for containing a to-be-tested agent is placed in the test tube fixing device, the opening of the test tube is right opposite to the top of a box body, the water valve is arranged at the upper end of the test tube fixing device, when the to-be-; the external RTC and the external crystal oscillator are connected with the control unit, the control unit controls the two ultraviolet light sources to emit ultraviolet light with different intensities and frequencies through outputting PWM (pulse width modulation) waves, the ultraviolet light irradiates to the corresponding silicon photocell sensors through internal channels of the spectrometer respectively, then optical signals are converted into electric signals through the silicon photocell sensors, the electric signals are amplified by the input signal conditioning and amplifying circuit, and finally the electric signals are input into the control unit through the multi-channel ADC conversion module for processing.
2. The multifunctional underwater water quality automatic monitoring system based on the clustering algorithm as claimed in claim 1, wherein: scalable fixed bolster includes two sections upper and lower stainless steel iron pipes, and the upper segment is the telescopic joint, and the lower section is the fixed knot, and the telescopic joint lower extreme has a spring bolt, and it has a plurality ofly and spring bolt complex fixed orifices to distribute on the fixed knot, and when inserting the spring bolt different fixed orifices, whole scalable fixed bolster has different heights, and telescopic joint and fixed knot pass through spring bolt and fixed orifices fixed connection.
3. The multifunctional underwater water quality automatic monitoring system based on the clustering algorithm as claimed in claim 1, wherein: the data access module comprises an SD card data dynamic access module and an EEPROM data cache module, the SD card data dynamic access module is respectively in bidirectional connection with the control unit and the upper computer, and the EEPROM data cache module is connected with the control unit.
4. The multifunctional underwater water quality automatic monitoring system based on the clustering algorithm as claimed in claim 1, wherein: the sliding module comprises a stepping motor, a fixed pulley and a movable pulley, the fixed pulley is fixed at the upper end of the telescopic fixing support, the movable pulley is fixed on the outer side wall of one side, close to the telescopic fixing support, of the box body and is connected with the telescopic fixing support, the stepping motor is fixed on the upper portion of the box body, a traction wire led out by the fixed pulley is sleeved on an output shaft of the stepping motor, the stepping motor is controlled by the single chip microcomputer to rotate clockwise or anticlockwise, the box body is driven to move up and down in the vertical direction, and the movable pulley moves up and.
5. The monitoring method of the multifunctional underwater water quality automatic monitoring system based on the clustering algorithm as claimed in any one of claims 1 to 4, characterized by comprising the following steps:
(1) debugging the monitor before starting to measure: adjusting the length of the telescopic fixed support to a height suitable for the current water level, inserting the telescopic fixed support underwater, and stably fixing the telescopic fixed support;
(2) judging whether the measurement switch is turned on, if so, inputting the current water depth and the height value of each descending unit of the box body to the control unit, and executing the step (3); if not, continuing to execute the step (2);
(3) before monitoring is started, judging whether the current lowered height is larger than or equal to an input water depth value or not, if the current lowered height is found to be larger than or equal to the input water depth value before monitoring is started, indicating that the input in the step (2) is wrong, and returning to the step (2) to input the current water depth and the height value of each time that the box body is lowered; if not, executing the step (4);
(4) the control unit controls the stepping motor to rotate forwards, so that the box body descends by a unit height value, and different water quality parameter values of the current water depth position are monitored;
(5) after one measurement is finished, the control unit recalculates and judges whether the current lowered height is larger than or equal to the input water depth value, if not, the instrument does not reach the water bottom, and the step (4) is returned to execute; if yes, executing the step (6);
(6) the control unit controls the stepping motor to rotate reversely, so that the box body rises by a unit height value;
(7) the control unit calculates and judges whether the current raised height is larger than or equal to the input water depth value, if not, the instrument does not reach the water surface, and the step (6) is returned to execute; if so, the box body is indicated to reach the water level, the control unit stores the measurement result into the data access module, and the measurement is finished;
(8) after the measurement is finished, the data access module is connected to an upper computer, the Labview reads data stored in the data access module through an internal function interface to serve as a sample data set to be processed, calls a Python function through an internal interface function to complete sample data processing through a clustering algorithm, and displays the sample data through a GUI interface designed by the Labview.
6. The method for monitoring the multifunctional underwater water quality automatic monitoring system based on the clustering algorithm as claimed in claim 5, wherein the method for monitoring the plurality of water quality parameter values of the current water depth position in the step (4) comprises the following steps:
(1) when the box body reaches the preset position, the control unit controls the water valve to be opened, so that external water quality flows into the test tube along the water inlet above the box body, and if the water level of the poured water quality reaches above the water valve, the control unit controls the water valve to be closed, so that the purpose of taking a water sample is achieved;
(2) the control unit controls the titration tank to titrate the current water sample by using different reagents according to the water quality parameters needing to be measured currently, and closes the titration tank after titration is finished;
(3) the control unit outputs PWM waves with frequency i to an ultraviolet light source to enable the ultraviolet light source to emit ultraviolet light with corresponding frequency and intensity, a spectrophotometry method is adopted to measure a current water quality parameter alpha, two silicon photocell sensors are used for measuring N times respectively, an average value of the two silicon photocell sensors is taken after the maximum value and the minimum value are removed, and current water quality parameter results are stored in an SD card respectively; wherein the water quality parameter alpha is COD concentration, nitrogen content or PH value of the water quality, and i represents the frequency of PWM wave required for obtaining the current water quality parameter alpha.
7. The monitoring method of the multifunctional underwater water quality automatic monitoring system based on the clustering algorithm according to claim 5, wherein the upper computer in the step (8) processes the sample data by adopting the clustering algorithm, and specifically comprises the following steps:
the system directly calls a Python interface function to open a Python console by means of Labview and opens the Python console by means of LabviewThe KMeans function coding clustering algorithm program in the Python built-in scimit-spare packet needs to be firstly imported into water quality monitoring data sets which are input to different positions and different water depths of an upper computer part through a data access module as a sample data set D after an interface is normally connected and a Python control console is opened, k samples are randomly selected from the D as an initial mean vector through a k value input by a user, the distance between each sample data in the data set and each sub-vector in the mean vector is calculated, and a distance measurement function adopts a Gaussian function to calculate: dij=||xj-ui||2I is more than or equal to 1 and less than or equal to k, j is more than or equal to 1 and less than or equal to m, wherein dijRepresenting the Gaussian distance, x, between the sample data and the mean vectorjRepresents the sample data to be divided, uiRepresenting the cluster of samples formed by clustering, and sampling xjDividing the data into clusters with the nearest distance, then recalculating a new mean vector, judging whether the mean vector is consistent with the previous mean vector or not, if so, finishing clustering, dividing the sample data set into k clusters, and if not, repeating the above calculation steps until the mean vector is not changed any more.
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 CN109270016A (en) 2019-01-25
CN109270016B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

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神经网络的养殖水质溶解氧预测";宦娟 等;《农业工程学报》;20160930;第32卷(第17期);第174-181页 *

Also Published As

Publication number Publication date
CN109270016A (en) 2019-01-25

Similar Documents

Publication Publication Date Title
CN104730054B (en) A kind of integrated probe formula photoelectricity multi-parameter water-quality on-line measurement system
CN101183071B (en) Novel water quality analysis meter
CN202057579U (en) Optical system capable of on-line detecting internal quality of fruits
EP2955499B1 (en) Automatic measuring instrument and measuring method for measuring a natural gas content contained in an unconventional natural gas reservoir sample
CN105259358A (en) Multi-channel rotary type Raman spectroscopy detection sample pool device and detecting method thereof
CN109270016B (en) Multifunctional underwater water quality automatic monitoring system and method based on clustering algorithm
CN101625314B (en) Advanced plant biochemical parameter non-contact monitoring device
CN203365316U (en) Multi-parameter water quality analyzer
CN104483164A (en) On-site multi-spot water-sample sampling device and COD (chemical oxygen demand) content detection method
CN205426779U (en) On --spot autoanalyzer of sulphion
CN106442515B (en) A kind of visual quantitative detecting method of simple silver ion
CN101556240A (en) Chlorophyll measuring apparatus based on RGB (red, green and blue) digital signal
CN106959350A (en) A kind of QPQ technologies base salt cyanic acid radical content fully-automated synthesis analytical instrument
CN109191819B (en) Multi-point water quality monitoring and analyzing system and method based on clustering algorithm
CN101556245B (en) Chlorophyll measurement method based on RGB digital signal
CN105842178A (en) Non-intrusive mode online detection device for pH value of cell culture fluid and detection method
CN104569112A (en) Continuous on-line water ion concentration detection method based on ion selective electrode
CN204479565U (en) Portable water-quality analysis instrument
CN205426953U (en) Engine gas detection capability test platform
CN215413828U (en) Swimming pool water quality multi-parameter combination on-line monitoring appearance
CN201955299U (en) Sampling measurement device for micro-spectrophotometer
CN2739640Y (en) Urine analytic instrument
CN2741042Y (en) On-line multi-channel near-infrared spectrograph for measuring total nitrogen and acid content in soy sauce
CN209764717U (en) Miniature near-infrared spectrometer transflectance survey appearance device
CN109270014A (en) Water quality automonitor and monitoring method under a kind of multifunctional water

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