CN110161342A - A kind of electric energy quality monitoring system and method - Google Patents

A kind of electric energy quality monitoring system and method Download PDF

Info

Publication number
CN110161342A
CN110161342A CN201910503192.0A CN201910503192A CN110161342A CN 110161342 A CN110161342 A CN 110161342A CN 201910503192 A CN201910503192 A CN 201910503192A CN 110161342 A CN110161342 A CN 110161342A
Authority
CN
China
Prior art keywords
voltage
value
frequency
calibration
signal
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
CN201910503192.0A
Other languages
Chinese (zh)
Other versions
CN110161342B (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.)
Harbin Institute of Technology
Original Assignee
Harbin Institute of Technology
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 Harbin Institute of Technology filed Critical Harbin Institute of Technology
Priority to CN201910503192.0A priority Critical patent/CN110161342B/en
Publication of CN110161342A publication Critical patent/CN110161342A/en
Application granted granted Critical
Publication of CN110161342B publication Critical patent/CN110161342B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere

Abstract

A kind of electric energy quality monitoring system and method, it is related to power quality monitoring field, to solve the problems, such as that power quality monitoring device is at high cost in the prior art, power consumption is big, lack data upload ability and is difficult to large-scale application, including signal conditioning circuit, STM32, raspberry pie and NB-IoT module;The output end of the signal conditioning circuit and the input terminal of STM32 connect, and the output end of the STM32 and the input terminal of raspberry pie connect, and the output end of the raspberry pie is connect with the input terminal of NB-IoT module;The signal conditioning circuit includes division module and signal isolation amplification module.The present invention has the advantages that low-power consumption, low cost, easy to use, can the power quality parameters such as voltage effective value, frequency and peak-to-peak value to high input voltage signal measure, and by real-time data transmission to platform, solve the problems, such as that current equipment for monitoring power quality is at high cost, power consumption is big, data can not upload to cloud and are managed collectively, be difficult to large-scale use.

Description

A kind of electric energy quality monitoring system and method
Technical field
The present invention relates to power quality monitoring field, specially a kind of electric energy quality monitoring system and method.
Background technique
Electric energy is required a kind of energy in the modern life, and the electric energy of high quality is the pass of many electrical equipment safe operations Key.And with the development of power electronics technology, the nonlinear-load and impact load in power grid are increasing, cause power grid The fluctuation of middle power quality.The power quality problem to take place frequently seriously affects the normal use of electric energy, to daily life and Industrial production brings inconvenience and even endangers, for example the voltage waveform to happen suddenly and flickering will lead to lighting apparatus and frequency occur It dodges;Voltage swells rapid drawdown repeatedly will lead to computer system and hardware damage, crash, exception, various digital automatic controls occurs Control equipment malfunction etc..In order to ensure that daily life based on electric energy sensitive equipment and industrial production activities can be normally carried out, The related parameter to power quality is needed, as voltage deviation, frequency departure, voltage fluctuation and flicker, waveform offsets, voltage are temporary Drop, interruption and temporary liter etc. are monitored, and the follow-up decision for safe operation and manager in relation to equipment provides foundation.
The power quality monitoring device unit price of commercialization is generally tens of thousands of to ten tens of thousands of on the market now, if necessary to multiple groups Net operation, cost but will rise significantly.And most of equipment volumes are big, and power consumption is high, while lacking and uploading the data to cloud The effective means being managed collectively, data are only stored in local, cannot achieve to test data it is long-term storage and at any time Call analysis.The cost and power consumption of power quality monitoring device are how reduced, how technology of Internet of things is utilized, by the electric energy of acquisition Quality initial data is quickly and effectively handled and is uploaded in cloud and is managed collectively, and is current power quality monitoring device The problem of urgent need to resolve.
Summary of the invention
The purpose of the present invention is: it is at high cost for power quality monitoring device in the prior art, power consumption is big, lacks in data Biography ability and the problem of be difficult to large-scale application provides a kind of electric energy quality monitoring system and method.
In order to solve the above-mentioned technical problem the present invention adopts the technical scheme that: a kind of electric energy quality monitoring system, including Signal conditioning circuit, STM32, raspberry pie and NB-IoT module;
The output end of the signal conditioning circuit and the input terminal of STM32 connect, the output end and raspberry pie of the STM32 Input terminal connection, the output end of the raspberry pie connect with the input terminal of NB-IoT module;
The signal conditioning circuit includes division module and signal isolation amplification module.
A kind of electric energy quality monitoring method, it is characterised in that the following steps are included:
Step 1: high-voltage signal is decayed to the input range for being suitable for isolation amplifier first with division module, then Isolation amplification is carried out to the signal after decaying using signal isolation amplification module;
Step 2: the signal that step 1 obtains is acquired using STM32, and converts the signal into 16 bit digitals Amount, then determines whether the data amount check of acquisition reaches a cycle of voltage, if reaching, is transferred to tree by spi bus In certain kind of berries group, if not up to, continuing to acquire;
Step 3: raspberry pie handles data, obtains power quality parameter, the power quality parameter that then will be obtained It is packaged and NB-IoT module is sent to by UART serial ports;
Step 4: the result of parameters of electric power is sent to cloud platform by NB-IoT module.
Further, the power quality parameter includes virtual value, frequency and the peak-to-peak value of voltage.
Further, the virtual value of the voltage is obtained by following formula:
In formula, Vrms is the voltage effective value of measured voltage, and Vk is to sample obtained voltage value every time, k=1,2,3,5, 6 ... n, n are the sampled points of complete cycle.
Further, the frequency of the voltage is obtained by following formula:
In formula, f is the frequency of measured voltage, NpIt is the sampling interval in p-th of period between two nearest zero crossings Number, p=1,2,3,4,5,6 ... m, m are sampling period numbers, and fs is the sample rate of ADC, are 16.6Ksps.
Further, the peak-to-peak value of the voltage is the peak-to-peak value of voltage in a cycle, and formula is as follows:
Vpp=Vmax-Vmin
In formula, Vpp is the peak-to-peak value of voltage in a cycle, and Vmax is the maximum value of voltage in a cycle, and Vmin is The minimum value of voltage in a cycle.
It further, further include data calibration in the step 3, the data calibration is at raspberry pie is to data It is carried out after reason.
Further, the data calibration includes voltage deviation calibration and frequency departure calibration.
Further, the voltage deviation calibration includes zero point correction and gain calibration.
Further, the zero point correction the following steps are included: measure ADC collected voltage when not accessing voltage first Data u0(n), the zero point offset amount X for obtaining voltage signal, then subtracts zero migration with collected raw voltage values u (n) X is measured, obtains the voltage value u after zero point correction1(n), specific formula is as follows:
u1(n)=u (n)-X
Wherein, X is the zero point offset amount of voltage signal, and k=1,2,3,4,5 ... N, N are the sampled point of complete cycle, u0 It (n) is the collected voltage value of ADC, u when not accessing voltage1It (n) is by the voltage value after zero point correction, u (n) is original Voltage value.
Further, the gain calibration is the following steps are included: five points chosen around voltage rating first carry out electricity Pressure measurement, five measurement points are respectively 0.6 times of voltage rating, 0.8 times, 1.0 times, 1.2 times, 1.4 times, are surveyed later to this five It measures result and carries out zero point correction, be then based on least square method and straight line fitting is carried out to five measurement points, obtain gain coefficient Y, The formula of gain calibration is as follows:
U=Y × u1(n)
Wherein, Y is voltage gain coefficient, u1It (n) is by the voltage value after zero point correction, after U is gain calibration Voltage value.
Further, the frequency departure calibration the following steps are included: choose the calibration point of five frequency departures, so first Five groups of measured value f of frequency are measured afterwardsa1、fa2、fa3、fa4、fa5, standard frequency value is fb1、fb2、fb3、fb4、fb5, utilize independent variable Zi=1,2,3,4,5 (i=1,2,3,4,5), least square method is based on to measured value and standard value respectively and carries out linear fit, The expression formula of fitting function is as follows:
fai=k1Zi+b1
fbi=k2Zi+b2
Wherein, faiIt is the actual measured value of frequency, fbiIt is the standard value of frequency, ZiIt is independent variable, i=1,2,3,4,5, k1、k2It is the slope of linear fit, b respectively1、b2It is the intercept of linear fit respectively;Frequency calibration is obtained by above formula Formula:
fb=kfa+b
Wherein, k=k2/k1, b=b1-k*b2, faIt is the measured value of frequency, fbIt is the frequency values after calibration.
Further, the data calibration is carried out based on control module, and the control module is arranged in raspberry pie, control Module executes following steps: recording the zero point offset amount of 5s first, then programmable calibration instrument output voltage signal, output voltage letter Number frequency remain unchanged, voltage value every 5s variation is primary, is taken as 0.6 times, 0.8 times, 1.0 times, 1.2 times of voltage rating respectively With 1.4 times, record the voltage measuring value u (n) at each moment, utilize formula U=Y × u1(n) and u1(n)=u (n)-X, according to Zero point offset amount X and 5 voltage measuring values, obtain gain offsets amount Y, are obtained accurately according to gain offsets amount and zero point offset amount Input voltage value, the voltage value for then controlling prover output voltage signal remains unchanged, and frequency values every 5s variation is primary, point 49Hz, 49.5Hz, 50Hz, 50.5Hz and 51Hz are not taken, records the frequency measurement at each moment, according to formula fb=kfa+ B obtains accurate frequency calibration coefficient k and b, is finally obtained accurately inputting frequency values according to frequency calibration coefficient,
Wherein, Y is voltage gain coefficient, and X is zero point offset amount, u1It (n) is by the voltage value after zero point correction, U It is voltage value or standard voltage value, u (n) after gain calibration is the measured value of voltage, k=k2/k1, b=b1-k*b2, fa It is the measured value of frequency, fbIt is the frequency values after calibration.
The beneficial effects of the present invention are: the present invention has the advantages that low-power consumption, low cost, easy to use, it can be to input The power quality parameters such as voltage effective value, frequency and the peak-to-peak value of high voltage signal measure, and real-time data transmission is arrived Platform, solve current equipment for monitoring power quality is at high cost, power consumption is big, data can not upload to cloud be managed collectively, The problem of being difficult to large-scale use.
Detailed description of the invention
Fig. 1 is entire block diagram of the invention.
Fig. 2 is the program flow diagram of data acquisition and transmission of the invention.
Fig. 3 is data receiver of the invention, processing and upload program flow chart.
Fig. 4 is to calibrate flow chart automatically in the present invention.
Specific embodiment
Specific embodiment 1: illustrating present embodiment, a kind of electric energy described in present embodiment referring to Fig. 1 Mass monitoring system, including signal conditioning circuit, STM32, raspberry pie and NB-IoT module;
The output end of the signal conditioning circuit and the input terminal of STM32 connect, the output end and raspberry pie of the STM32 Input terminal connection, the output end of the raspberry pie connect with the input terminal of NB-IoT module;
The signal conditioning circuit includes division module and signal isolation amplification module.
Signal conditioning circuit includes division module and signal isolation amplification module.
The composition of division module is one 2M ohm of resistance and one 1K ohm of resistance, and function is by voltage point Pressure decays high input voltage 2000 times.
Signal isolation amplification module is made of isolation operational amplifier and two single order frequency overlapped-resistable filters.Isolation operation is put The model of big device is AMC1100.The function of entire module is to carry out isolation amplification to the signal after partial pressure, and it is dry to filter out high frequency It disturbs, eliminates signal aliasing.
The single-chip microcontroller model STM32F373CCT6 that STM32 chooses mainly is carried out using 16 ADC of such single-chip microcontroller Analog voltage signal, can be converted to 16 digital quantity signals, and be sent in raspberry pie by data acquisition.
The processor model that raspberry pie is chosen is raspberry pie Zero, and major function is to receive the digital quantity letter from STM32 Number;Then signal is handled, obtains the power quality parameter of needs;Finally processing result is packaged, carries out next step Upload process.
The module model BC95 module that NB-IoT module is chosen, minimum system plate have chosen grain rains Internet of Things company and are based on The NB101 of BC95 production.Major function is to receive the packaged data from raspberry pie, then passes through data in NB-IoT agreement Cloud platform is passed to, realizes wireless communication work of the invention.
The function of present apparatus signal conditioning circuit is the conversion realized to tested high-voltage electricity to low-voltage, and STM32 is responsible for reality Now the effective, stable of energy data is acquired;Raspberry pie is responsible for receiving data from STM32 and then carries out the processing of data, beats Packet and upload;NB-IoT module, it is responsible for the data from raspberry pie uploading to cloud platform.The present apparatus solves current electric energy Quality monitoring device is at high cost, power consumption is big, data can not upload to cloud and are managed collectively, be difficult to asking for large-scale use Topic has the advantages that low-power consumption, low cost, easy to use, can survey to a variety of power quality parameters of high input voltage It measures and measurement result is real-time transmitted to platform.
Specific embodiment 2: present embodiment is illustrated referring to Fig. 2 and Fig. 3, one described in present embodiment Kind electric energy quality monitoring method, comprising the following steps:
Step 1: to the decaying of original signal, isolation, amplification and filtering.
Using the signal conditioning circuit of design, input signal is improved, makes it suitable for the input range of ADC.It is first Bleeder circuit is first passed through, high-voltage signal is decayed to the input range for being suitable for isolation amplifier.Then it is transported using full isolating difference Calculate amplifier, isolation amplification will be carried out to the signal after decaying, make signal be suitable for the ADC of STM32 range and meanwhile can be to prevent Only the noise current of high voltage transmission line road enters local ground connection formation interference.At the same time, in the input terminal of isolation amplifier and defeated Outlet all uses the passive frequency overlapped-resistable filter of single order to be filtered, for eliminate decaying after voltage signal aliasing, filter Except the High-frequency Interference in voltage signal.Hardly become by the waveform of the voltage signal handled above, frequency, waveform Change, only voltage value is attenuated to the input range of suitable ADC.
Step 2: carrying out A/D conversion and storage to analog signal
The original analog obtained by step 1 will be acquired by 16 ADC of STM32, be converted to 16 bit digitals Amount.Sample rate of the ADC when multichannel is multiplexed is 16.6KHz, and sample rate is significantly larger than the frequency of voltage in current power supply system Rate obtains a data samples up to a hundred so a points up to a hundred can be acquired in one cycle.The present invention is provided with one in STM32 Length is the buffer circle of four element spaces, and the capacity of each element space is arranged to the data sample acquired in each period This number.Primary data sample can be stored in this buffer circle, whenever one of element space has been filled with data, number According to that will be automatically stored into next element space, until four element spaces are all filled with data.New number to be written at this time According to the element space that will override storage data at first.It loops back and forth like this, is thus avoided as much as possible due to operating not The problem of causing freshly harvested data to fall original data cover in time.
It should be noted that a cycle of voltage produces at present depending on the sample frequency of ADC and the frequency of input voltage The sample rate of product is 16600Hz, and electric voltage frequency is 50Hz, and the two is divided by obtain 332, and ADC sample frequency is fixed at present, but It is that the frequency of input voltage may change, but the voltage in CONTINENTAL AREA OF CHINA is typically all 50Hz, the present invention is also to be directed to The circuit of 220V, 50Hz.
Step 3: sending primary data sample in raspberry pie
This step is realized by the spi bus of raspberry pie and STM32.It is to configure SPI protocol first, in master slave mode Setting raspberry pie is main equipment, and STM32 is from equipment, and the data volume transmitted every time is provided that collected data in each cycle Sample size.Then setting signal transmits flag bit, and whenever being filled with an element space, the ARM kernel of STM32 will be to raspberry It distributes and send a signal, it is notified to carry out reading data, data just pass through spi bus and are transferred in raspberry pie from STM32.
Initial data is transferred to after raspberry pie, can be handled in local data.The present invention is directed to current stable state The voltage deviation and frequency departure of power quality problem most critical carry out data processing, obtain virtual value, the frequency of input voltage And peak-to-peak value.Data handling procedure strictly observes the regulation of concerned countries standard, and the basic time interval of measurement is chosen for 10 Cycle calculates related parameters of electric power according to the data of 10 cycles.The formula that wherein voltage effective value calculates is as follows:
In formula, Vrms is the voltage effective value of measured voltage, and Vk is to sample obtained voltage value every time, k=1,2,3,5, 6 ... n, n are the sampled points of complete cycle.The formula that frequency calculates is as follows:
In formula, f is the frequency of measured voltage, NpIt is the sampling interval in p-th of period between two nearest zero crossings Number, p=1,2,3,4,5,6 ... m, m are sampling period numbers, and fs is the sample rate of ADC, are 16.6Ksps.It is electric in a cycle The formula of voltage crest peak computational is as follows:
Vpp=Vmax-Vmin
In formula, Vpp is the peak-to-peak value of voltage in a cycle, and Vmax is the maximum value of voltage in a cycle, and Vmin is The minimum value of voltage in a cycle.The present invention chooses survey of the average value of ten periodic voltage peak-to-peak values as voltage peak-to-peak value Measure result.It needs to retain floating number data into certain significant figure after calculating power quality parameter by three above formula Word, conversion is packaged into the format of corresponding AT instruction, for being sent to the cloud platform of Internet of Things by NB-IoT module.
It should be noted that further including data calibration in this step, data calibration works after data processing, and data are beaten Before packet and transmission, i.e., among step 3, specific implementation method is as follows:
Data calibration step is divided into the progress of two steps, and the first step is the calibration to voltage deviation, it is only necessary to carry out zero to voltage Point calibration and gain calibration.
Zero point correction needs first to measure the collected voltage data u of the ADC when not accessing voltage0(n), voltage is calculated The zero point offset amount X of signal, then subtracts zero point offset amount X with collected raw voltage values u (n), obtain zero point correction it Voltage value u afterwards1(n), specific formula is as follows:
u1(n)=u (n) (2)-X
Wherein, X is the zero point offset amount of voltage signal, and k=1,2,3,4,5 ... N, N are the sampled point of complete cycle, u0 It (n) is the collected voltage value of ADC, u when not accessing voltage1It (n) is by the voltage value after zero point correction, u (n) is original Voltage value.
Gain calibration needs carry out on the basis of zero point correction.First have to gain coefficient Y, the calculating of gain coefficient It needs to choose five points around voltage rating and carries out voltage measurement.Five measurement points are respectively 0.6 times of voltage rating, 0.8 Again, 1.0 times, 1.2 times, 1.4 times carry out zero point corrections to this five measurement results later, are then based on least square method to five A measurement point carries out straight line fitting, obtains gain coefficient Y.The formula for carrying out gain calibration by gain coefficient Y is as follows:
U=Y × u1(n) (3)
Wherein, Y is voltage gain coefficient, u1It (n) is by the voltage value after zero point correction, after U is gain calibration Voltage value.
Second step is the calibration to frequency departure.The calibration point of frequency departure choose 49Hz, 49.5Hz, 50Hz, 50.5Hz, 51Hz, specific calibration method are as follows:
The calibration point for choosing five frequency departures first, then measures five groups of measured value f of frequencya1、fa2、fa3、fa4、 fa5, standard frequency value is fb1、fb2、fb3、fb4、fb5, utilize independent variable Zi=1,2,3,4,5 (i=1,2,3,4,5), it is right respectively Measured value and standard value are based on least square method and carry out linear fit, and the expression formula of fitting function is as follows:
fai=k1Zi+b1
fbi=k2Zi+b2
Wherein, faiIt is the actual measured value of frequency, fbiIt is the standard value of frequency, ZiIt is independent variable, i=1,2,3,4,5, k1、k2It is the slope of linear fit, b respectively1、b2It is the intercept of linear fit respectively;Frequency calibration is obtained by above formula Formula:
fb=kfa+b
Wherein, k=k2/k1, b=b1-k*b2, faIt is the measured value of frequency, fbIt is the frequency values after calibration.
For the present invention in practical application, a kind of automatic calibration procedure can be used, automatic calibration procedure is based on voltage calibration With the method for frequency calibration, entire automatic calibration process is controlled based on the control module in raspberry pie, can be certainly after starting The dynamic calibration completed to voltage deviation and frequency departure, is applicable not only to be readily applicable to other surveys to calibration of the invention Measure the device of signal voltage and frequency.Calibration process needs a program-controlled high precision calibrator.
Calibrate process description: as shown in figure 4, first connecting prover with the input terminal of measuring device or system, then Press automatic calibration knob.Voltage calibration is first carried out at this time, and control module automatically records the zero point offset amount of this 5s first, so Control module can control prover and start output voltage signal afterwards.The frequency of output voltage signal remains unchanged, the every 5s of voltage value Variation is primary, is taken as 0.6 times, 0.8 times, 1.0 times, 1.2 times and 1.4 times of voltage rating respectively, records the electricity at each moment Press measured value.Accurate increasing can be calculated according to zero point offset amount and 5 voltage measuring values using the formula of gain calibration Beneficial offset finally can calculate accurate input voltage value according to gain offsets amount and zero point offset amount, to complete electricity Pressure calibration.Frequency calibration is carried out later, and the voltage value of output voltage signal remains unchanged, and the every 5s variation of frequency values is primary, respectively 49Hz, 49.5Hz, 50Hz, 50.5Hz and 51Hz are taken, the frequency measurement at each moment is recorded, then according to frequency calibration public affairs Formula calculates accurate frequency calibration coefficient, finally can calculate accurate input frequency values according to frequency calibration coefficient, complete At frequency calibration.Wherein, the formula of gain calibration is U=Y × u1(n) and u1(n)=u (n)-X, frequency calibration formula are fb= kfa+ b, wherein Y is voltage gain coefficient, and X is zero point offset amount, u1It (n) is by the voltage value after zero point correction, U is to increase Voltage value or standard voltage value, u (n) after benefit calibration are the measured value of voltage, k=k2/k1, b=b1-k*b2, faIt is frequency The measured value of rate, fbIt is the frequency values after calibration.
Control module in raspberry pie starts when needing automatic calibration, while being also responsible for the acquisition of control raspberry pie and calculating Various calibration factors control entire automatic calibration, because prover output voltage synchronous must be carried out with the acquisition of whole device, Control module controls two parts collaborative work.
Step 4: realizing the wireless communication with cloud
This step passes through the external data communication module of raspberry pie-NB-IoT module mainly to realize.What the present invention used The model of NB-IoT module is to move remote BC95 module, and minimum system plate has chosen what grain rains Internet of Things company was made based on BC95 NB101.BC95 using when data transmit-receive format be AT instruct, the communication with raspberry pie is realized by serial ports.Channel radio Specific step is as follows for letter:
The serial ports of raspberry pie extended pin is connected with power supply with the corresponding pin of NB101 first, guarantees NB101 just It often works on power, test is then created that according to the type of the IMEI of BC95 number and Internet of Things private communication card in cloud platform Equipment, it is instruction morphing at readable that test equipment is responsible for the AT that receives the data from slave computer while can automatically send slave computer Character string, finally send the data processed result of AT instruction type packed in step 4 to by the serial ports of raspberry pie NB-IoT module, then the calculated result of parameters of electric power is sent cloud platform by the module, and can monitor at any time from cloud The instruction that platform issues.
Embodiment:
The present embodiment, the standard of 220V, 50Hz that the present invention exports prover are illustrated in conjunction with Fig. 1, Fig. 2 and Fig. 3 Sine wave is measured, and is realized expectation function, is specifically followed the steps below to implement:
Step 1: to the decaying of original signal, isolation, amplification and filtering.
Using the signal conditioning circuit of design, the 220V high-voltage signal of input is improved, the defeated of ADC is made it suitable for Enter range.First by bleeder circuit, signal decaying is carried out according to the intrinsic standoff ratio of 2000:1, then to will be to the signal after decaying Isolation amplification is carried out, so that signal is amplified to the AC signal that virtual value is about 830mV, is suitable for the range of the ADC of STM32. At the same time, the passive frequency overlapped-resistable filter of single order is all used to be filtered in the input terminal of isolation amplifier and output end, for disappearing Except the aliasing of voltage signal after decaying, the High-frequency Interference in voltage signal is filtered out.Pass through the voltage signal handled above Waveform, frequency, waveform hardly change, only voltage value is attenuated to the input range of suitable ADC.
Step 2: carrying out A/D conversion and storage to analog signal
The original analog obtained by step 1 will be acquired by 16 ADC of STM32, be converted to 16 bit digitals Amount.Sample rate of the ADC when multichannel is multiplexed is 16.6KHz, and measured voltage frequency is 50Hz, so can be in one cycle Acquire 332 points.The present invention is provided with the buffer circle that a length is four element spaces in STM32, and each element is empty Between capacity be arranged to the data sample number acquired in each period.Primary data sample can be stored in this buffer circle Interior, whenever one of element space has been filled with data, data will be automatically stored into next element space, until four members Plain space is all filled with data.New data to be written at this time will override the element space for storing data at first.So follow Ring is reciprocal, is thus avoided as much as possible since operation causes freshly harvested data to be asked what original data cover fell not in time Topic.
Step 3: sending primary data sample in raspberry pie
This step is realized by the spi bus of raspberry pie and STM32.It is to configure SPI protocol first, in master slave mode Setting raspberry pie is main equipment, and STM32 is from equipment, and the data volume transmitted every time is provided that collected data in each cycle Sample size.Then setting signal transmits flag bit, and whenever being filled with an element space, the ARM kernel of STM32 will be to raspberry It distributes and send a signal, it is notified to carry out reading data, data just pass through spi bus and are transferred in raspberry pie from STM32.
Need to carry out the calibration of data before data transmit, the automatic calibration of data is based on the control journey in raspberry pie Sequence carries out, and control module records the zero point offset amount of 5s first in raspberry pie, then programmable calibration instrument output voltage signal, output The frequency of voltage signal remains unchanged, and the every 5s variation of voltage value is primary, is taken as 0.6 times, 0.8 times, 1.0 of voltage rating respectively Again, 1.2 times and 1.4 times, the voltage measuring value u (n) at each moment is recorded, formula U=Y × u is utilized1(n) and u1(n)=u (n)-X obtains gain offsets amount Y, according to gain offsets amount and zero migration according to zero point offset amount X and 5 voltage measuring values Accurate input voltage value is measured, the voltage value for then controlling prover output voltage signal remains unchanged, the every 5s of frequency values Variation is primary, takes 49Hz, 49.5Hz, 50Hz, 50.5Hz and 51Hz respectively, records the frequency measurement at each moment, according to Formula fb=kfa+ b obtains accurate frequency calibration coefficient k and b, is finally obtained accurately inputting frequency according to frequency calibration coefficient Rate value completes voltage deviation calibration and frequency departure calibration.
Initial data is transferred to after raspberry pie, can be handled in local data.The present invention is directed to current stable state The voltage deviation and frequency departure of power quality problem most critical carry out data processing, obtain virtual value, the frequency of input voltage And peak-to-peak value.Data handling procedure strictly observes the regulation of concerned countries standard, and the basic time interval of measurement is chosen for 10 Cycle calculates related parameters of electric power according to the data of 10 cycles.Pass through three of step 4 in Part IV summary of the invention Formula calculates power quality parameter, and floating number data are retained to certain effective digital later, and conversion is packaged into corresponding AT The format of instruction, for being sent to the cloud platform of Internet of Things by NB-IoT module.
Step 4: realizing the wireless communication with cloud
This step passes through the external data communication module of raspberry pie-NB-IoT module mainly to realize.What the present invention used The model of NB-IoT module is to move remote BC95 module, and minimum system plate has chosen what grain rains Internet of Things company was made based on BC95 NB101.BC95 using when data transmit-receive format be AT instruct, the communication with raspberry pie is realized by serial ports.Channel radio Specific step is as follows for letter:
The serial ports of raspberry pie extended pin is connected with power supply with the corresponding pin of NB101 first, guarantees NB101 just It often works on power, test is then created that according to the type of the IMEI of BC95 number and Internet of Things private communication card in cloud platform Equipment finally sends NB- by the serial ports of raspberry pie for the data processed result of AT instruction type packed in step 4 IoT module, then the calculated result of parameters of electric power is sent cloud platform by the module, and can monitor at any time from cloud platform The instruction issued.
It should be noted that specific embodiment is only the explanation and illustration to technical solution of the present invention, it cannot be with this Limit rights protection scope.What all claims according to the present invention and specification were made is only locally to change, Reng Yingluo Enter in protection scope of the present invention.

Claims (13)

1. a kind of electric energy quality monitoring system, it is characterised in that: including signal conditioning circuit, STM32, raspberry pie and NB-IoT mould Block;
The input terminal of the output end of the signal conditioning circuit and STM32 connect, the output end of the STM32 and raspberry pie it is defeated Enter end connection, the output end of the raspberry pie is connect with the input terminal of NB-IoT module;
The signal conditioning circuit includes division module and signal isolation amplification module.
2. a kind of electric energy quality monitoring method, it is characterised in that the following steps are included:
Step 1: high-voltage signal is decayed to the input range for being suitable for isolation amplifier first with division module, is then utilized Signal isolation amplification module carries out isolation amplification to the signal after decaying;
Step 2: the signal that step 1 obtains is acquired using STM32, and converts the signal into 16 bit digital quantities, so Determine whether the data amount check of acquisition reaches a cycle of voltage afterwards, if reaching, raspberry pie is transferred to by spi bus In, if not up to, continuing to acquire;
Step 3: raspberry pie handles data, obtains power quality parameter, is then packaged obtained power quality parameter NB-IoT module is sent to by UART serial ports;
Step 4: the result of parameters of electric power is sent to cloud platform by NB-IoT module.
3. a kind of electric energy quality monitoring method according to claim 2, it is characterised in that: the power quality parameter includes Virtual value, frequency and the peak-to-peak value of voltage.
4. a kind of electric energy quality monitoring method according to claim 3, it is characterised in that: the virtual value of the voltage passes through Following formula obtains:
In formula, Vrms is the voltage effective value of measured voltage, and Vk is to sample obtained voltage value every time, k=1,2,3,5,6 ... N, n are the sampled points of complete cycle.
5. a kind of electric energy quality monitoring method according to claim 3, it is characterised in that: the frequency of the voltage is by such as Lower formula obtains:
In formula, f is the frequency of measured voltage, NpIt is the sampling interval number in p-th of period between two nearest zero crossings, p= 1,2,3,4,5,6 ... m, m are sampling period numbers, and fs is the sample rate of ADC, are 16.6Ksps.
6. a kind of electric energy quality monitoring method according to claim 3, it is characterised in that: the peak-to-peak value of the voltage is one The peak-to-peak value of voltage, formula are as follows in a period:
Vpp=Vmax-Vmin
In formula, Vpp is the peak-to-peak value of voltage in a cycle, and Vmax is the maximum value of voltage in a cycle, and Vmin is one The minimum value of voltage in period.
7. a kind of electric energy quality monitoring method according to claim 2, it is characterised in that: further include number in the step 3 According to calibration, the data calibration carries out after raspberry pie handles data.
8. a kind of electric energy quality monitoring method according to claim 7, it is characterised in that: the data calibration includes voltage Deviation calibration and frequency departure calibration.
9. a kind of electric energy quality monitoring method according to claim 8, it is characterised in that: the voltage deviation, which is calibrated, includes Zero point correction and gain calibration.
10. a kind of electric energy quality monitoring method according to claim 9, it is characterised in that the zero point correction includes following Step: the collected voltage data u of ADC when not accessing voltage is measured first0(n), the zero point offset amount X of voltage signal is obtained, Then zero point offset amount X is subtracted with collected raw voltage values u (n), obtains the voltage value u after zero point correction1(n), have Body formula is as follows:
u1(n)=u (n)-X
Wherein, X is the zero point offset amount of voltage signal, and k=1,2,3,4,5 ... N, N are the sampled point of complete cycle, u0It (n) is not ADC collected voltage value when accessing voltage, u1It (n) is by the voltage value after zero point correction, u (n) is raw voltage values.
11. a kind of electric energy quality monitoring method according to claim 10, it is characterised in that the gain calibration include with Lower step: five points first around selection voltage rating carry out voltage measurement, and five measurement points are respectively the 0.6 of voltage rating Again, 0.8 times, 1.0 times, 1.2 times, 1.4 times carry out zero point corrections to this five measurement results later, are then based on least square Method carries out straight line fitting to five measurement points, obtains gain coefficient Y, the formula of gain calibration is as follows:
U=Y × u1(n)
Wherein, Y is voltage gain coefficient, u1It (n) is by the voltage value after zero point correction, U is the voltage after gain calibration Value.
12. a kind of electric energy quality monitoring method according to claim 8, it is characterised in that the frequency departure, which is calibrated, includes Following steps: the calibration point of five frequency departures is chosen first, then measures five groups of measured value f of frequencya1、fa2、fa3、fa4、 fa5, standard frequency value is fb1、fb2、fb3、fb4、fb5, utilize independent variable Zi=1,2,3,4,5 (i=1,2,3,4,5), it is right respectively Measured value and standard value are based on least square method and carry out linear fit, and the expression formula of fitting function is as follows:
fai=k1Zi+b1
fbi=k2Zi+b2
Wherein, faiIt is the actual measured value of frequency, fbiIt is the standard value of frequency, ZiIt is independent variable, i=1,2,3,4,5, k1、k2Point It is not the slope of linear fit, b1、b2It is the intercept of linear fit respectively;Frequency calibration formula is obtained by above formula:
fb=kfa+b
Wherein, k=k2/k1, b=b1-k*b2, faIt is the measured value of frequency, fbIt is the frequency values after calibration.
13. a kind of electric energy quality monitoring method according to claim 7, it is characterised in that the data calibration is based on control Module carries out, and the control module is arranged in raspberry pie, and control module executes following steps: recording the zero migration of 5s first Amount, then programmable calibration instrument output voltage signal, the frequency of output voltage signal remain unchanged, and the every 5s variation of voltage value is primary, It is taken as 0.6 times, 0.8 times, 1.0 times, 1.2 times and 1.4 times of voltage rating respectively, records the voltage measuring value u at each moment (n), formula U=Y × u is utilized1(n) and u1(n)=u (n)-X obtains gain according to zero point offset amount X and 5 voltage measuring values Offset Y obtains accurate input voltage value according to gain offsets amount and zero point offset amount, then controls prover output voltage The voltage value of signal remains unchanged, and the every 5s variation of frequency values is primary, takes 49Hz, 49.5Hz, 50Hz, 50.5Hz and 51Hz respectively, The frequency measurement for recording each moment, according to formula fb=kfa+ b obtains accurate frequency calibration coefficient k and b, last root It obtains accurately inputting frequency values according to frequency calibration coefficient,
Wherein, Y is voltage gain coefficient, and X is zero point offset amount, u1It (n) is by the voltage value after zero point correction, U is gain Voltage value or standard voltage value after calibration, u (n) are the measured value of voltage, k=k2/k1, b=b1-k*b2, faIt is frequency Measured value, fbIt is the frequency values after calibration.
CN201910503192.0A 2019-06-11 2019-06-11 Electric energy quality monitoring system and method Active CN110161342B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910503192.0A CN110161342B (en) 2019-06-11 2019-06-11 Electric energy quality monitoring system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910503192.0A CN110161342B (en) 2019-06-11 2019-06-11 Electric energy quality monitoring system and method

Publications (2)

Publication Number Publication Date
CN110161342A true CN110161342A (en) 2019-08-23
CN110161342B CN110161342B (en) 2021-03-23

Family

ID=67628240

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910503192.0A Active CN110161342B (en) 2019-06-11 2019-06-11 Electric energy quality monitoring system and method

Country Status (1)

Country Link
CN (1) CN110161342B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110658410A (en) * 2019-10-18 2020-01-07 宁波恒晨电力建设有限公司 Electric energy quality monitoring device
CN113092908A (en) * 2021-04-02 2021-07-09 宁夏凯晨电气集团有限公司 Novel alternating electrical rapid measurement device and method based on least square algorithm
CN113311223A (en) * 2021-06-03 2021-08-27 上海市计量测试技术研究院 Voltage drop detector and detection method
CN116184100A (en) * 2023-04-27 2023-05-30 广东电网有限责任公司 Calibration method and device for power quality of power grid

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203324412U (en) * 2013-07-24 2013-12-04 河北工业大学 Electric energy quality monitoring device based on virtual instrument
CN204945273U (en) * 2015-09-02 2016-01-06 西南交通大学 A kind of power quality data harvester of self-adaptation mains frequency
CN205608103U (en) * 2016-03-03 2016-09-28 浙江大学 Portable electric energy quality monitoring appearance of full touch screen
CN205920167U (en) * 2016-03-03 2017-02-01 浙江大学 Multinode electric energy quality real -time monitoring system based on embedded wireless network
CN107993570A (en) * 2017-12-29 2018-05-04 佛山市幻云科技有限公司 A kind of remote controlled advertisement screen and advertisement screen tele-control system
CN208672718U (en) * 2018-05-24 2019-03-29 国网辽宁省电力有限公司电力科学研究院 Power quality analysis device based on short-distance wireless communication technology

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203324412U (en) * 2013-07-24 2013-12-04 河北工业大学 Electric energy quality monitoring device based on virtual instrument
CN204945273U (en) * 2015-09-02 2016-01-06 西南交通大学 A kind of power quality data harvester of self-adaptation mains frequency
CN205608103U (en) * 2016-03-03 2016-09-28 浙江大学 Portable electric energy quality monitoring appearance of full touch screen
CN205920167U (en) * 2016-03-03 2017-02-01 浙江大学 Multinode electric energy quality real -time monitoring system based on embedded wireless network
CN107993570A (en) * 2017-12-29 2018-05-04 佛山市幻云科技有限公司 A kind of remote controlled advertisement screen and advertisement screen tele-control system
CN208672718U (en) * 2018-05-24 2019-03-29 国网辽宁省电力有限公司电力科学研究院 Power quality analysis device based on short-distance wireless communication technology

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110658410A (en) * 2019-10-18 2020-01-07 宁波恒晨电力建设有限公司 Electric energy quality monitoring device
CN113092908A (en) * 2021-04-02 2021-07-09 宁夏凯晨电气集团有限公司 Novel alternating electrical rapid measurement device and method based on least square algorithm
CN113311223A (en) * 2021-06-03 2021-08-27 上海市计量测试技术研究院 Voltage drop detector and detection method
CN116184100A (en) * 2023-04-27 2023-05-30 广东电网有限责任公司 Calibration method and device for power quality of power grid
CN116184100B (en) * 2023-04-27 2023-07-21 广东电网有限责任公司 Calibration method and device for power quality of power grid

Also Published As

Publication number Publication date
CN110161342B (en) 2021-03-23

Similar Documents

Publication Publication Date Title
CN110161342A (en) A kind of electric energy quality monitoring system and method
CN102981083B (en) Self calibration equipment for monitoring power quality
CN106501745A (en) A kind of self-checking device and calibration steps
CN103336255B (en) A kind of calibration steps of high-precision failure indicator
CN202903926U (en) Portable electronic transformer time characteristic tester
CN203241817U (en) On-line intelligent analysis and control system for operation parameters of oil pumping machine
CN109164404A (en) The system and method that sample circuit in circuit board is calibrated automatically
CN106772208A (en) A kind of integrated reliability testing platform of single three-phase meter
CN205139355U (en) Leading collection system suitable for system is compared to total mark electric quantity
CN104330621A (en) Electric appliance energy consumption tester
CN203324412U (en) Electric energy quality monitoring device based on virtual instrument
CN106526365A (en) Single-live-wire power consumption data measurement method and single-live-wire intelligent breaker
CN111650548A (en) Intelligent electric energy meter metering data remote online monitoring system and method
CN204807615U (en) Leakage current of an arrester signal pickup assembly
CN103912260A (en) Automatic remote acquisition system for individual well data of oilfield
CN212363301U (en) Data acquisition device for on-line monitoring of capacitive equipment
CN207181515U (en) A kind of transformer station's over-voltage monitoring system based on wireless collection technology
CN208636387U (en) A kind of PT secondary circuit on-line condition monitoring device
CN204216846U (en) Based on the photovoltaic combiner box measure and control device of sample resistance
CN104977465A (en) Remote electric parameter measurement system
CN206523556U (en) Dc power sampling system
CN111505557A (en) On-site calibration device and method for portable lightning arrester on-line monitoring device
CN218099564U (en) Precision detection device for electric energy quality monitoring device
CN110470963A (en) A kind of high voltage capacitive apparatus insulated performance on-line monitoring device based on DSP
CN205880030U (en) Take power output's electric capacity partial -voltage type zero sequence voltage transformer

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