CN100385207C - Low cost intelligent vortex shedding flowmeter signal processing system based on DSP - Google Patents

Low cost intelligent vortex shedding flowmeter signal processing system based on DSP Download PDF

Info

Publication number
CN100385207C
CN100385207C CNB2005100410581A CN200510041058A CN100385207C CN 100385207 C CN100385207 C CN 100385207C CN B2005100410581 A CNB2005100410581 A CN B2005100410581A CN 200510041058 A CN200510041058 A CN 200510041058A CN 100385207 C CN100385207 C CN 100385207C
Authority
CN
China
Prior art keywords
signal
dsp
flow
circuit
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2005100410581A
Other languages
Chinese (zh)
Other versions
CN1737506A (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.)
Hefei University of Technology
Original Assignee
Hefei University 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 Hefei University of Technology filed Critical Hefei University of Technology
Priority to CNB2005100410581A priority Critical patent/CN100385207C/en
Publication of CN1737506A publication Critical patent/CN1737506A/en
Application granted granted Critical
Publication of CN100385207C publication Critical patent/CN100385207C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measuring Volume Flow (AREA)

Abstract

The present invention relates to low cost intelligent vortex street flowmeter signal processing system based on DSP. The present invention is characterized in that the present invention is composed of an analog signal conditioning module, a DSP chip, an expanding RAM, an expanding EEPROM, a low voltage supervisory circuit, an LCD display module, a keyboard input module, an analog quantity output module, a pulse output module and a power management module. The system of the present invention adopts a combination method of periodical atlas analysis and digital filter to process an output signal of a vortex street flow transducer. Under the conditions of vibration of pipes and an unsteady liquid flow field in situ, the flow of liquid can be accurately measured. The system has the advantages of small volume, low cost and complete functions.

Description

Low cost intelligent vortex shedding flowmeter signal processing system based on DSP
Technical field:
The present invention relates to a kind of flow measurement instrument, particularly a kind of is the vortex shedding flowmeter signal processing system cheaply that core, power spectrum analysis combine with digital filtering with digital signal processor (DSP).
Background technology:
Vortex shedding flow meter does not have movable member because of its measure portion, and wearing and tearing, crushing is little, and desirable range ratio is big, and the measurable flow body medium is many, is widely used in the measurement of fluid flow field.But vortex flow sensors is subject to the influence of fluid pulsation, pipeline or other vibration source, traditional signal processing method, i.e. and amplification, shaping, filtering, counting can not suppress noise effectively, so measuring accuracy is not high; Can influence range ratio in order to suppress the set threshold level of noise, cause to measure low discharge; For different ranges, different detected fluid, traditional signal processing system need be changed different treatment circuits and parameter.For this reason, many researchers handle vortex shedding flowmeter signal and have done many researchs both at home and abroad, and develop corresponding system.
External SCHLATTER, Gerald, L. the vortex street sensor output signal under the very noisy situation is studied, find that noise signal is different with the vortex signal spectral characteristic, can set up different templates to noise and signal, thereby propose to utilize frequency domain conversion and simple crosscorrelation power spectrum result, according to noise masterplate and the very noisy in the vortex signal template erasure signal (" Signal processing method and apparatus for flowmeter " set up, WO 90/04230,19 April1990).But the noise situations complexity is set up template and is difficult for the practical application difficulty.
U.S. Foxboro company adopts two groups of wave filters to handle the vortex street sensor signal: one group is instant adaptive bandpass filter, another group is non-instant variable band-pass filter (" Adaptive filter with sweep filteranalyzer for a vortex flowmeter ", US6212975,10 April 2001).For the vortex flow sensors signal that is mixed with noise, be divided into two-way simultaneously and handle.One the tunnel follows the tracks of its vortex street frequency with adaptive bandpass filter, filters noise, obtains flow; Fluid flow state is observed with noise situations in the variable band-pass filter detection signal in another road, if unusual circumstance is just reported to the police.When handling vortex signal with adaptive bandpass filter, must to know the concrete scope of current vortex street frequency earlier, could determine the parameter of wave filter, and wider range of vortex street frequency change, when fluctuations in discharge is big, the configuration of filter parameter needs long period or mis-arrange, causes measuring error.
The analysis of spectrum method processing vortex signal of bandpass filtering is again done in the research of Japan Yokogawa (Yokogawa) company earlier, promptly earlier vortex signal is carried out analysis of spectrum, determines the approximate location of current vortex street frequency; Select corresponding bandpass filter to carry out filtering (" VORTEX FLOWMETER ", JP2001153698,08 June 2001) again.Do not consider that when gas flow is big pipe vibration causes sensor signal stronger low frequency noises to occur, this will make the analysis of spectrum result make mistakes.
Domestic University Of Chongqing covers introduction employings such as building ripple and handles flow signal (robotization journal, 1992,18 (3): 362-366 " application of adaptive frequency measuring method (AMF) in vortex shedding flow meter ") based on the modern spectrum analysis of lms adaptive algorithm.Constitute measuring system by eddy generator, hot wire probe, preposing signal process circuit and APPLE microcomputer, verified that spectral analysis method is used for the feasibility of the processing of vortex shedding flowmeter signal.But the key technical problems such as precision, real-time and miniaturization of research calculating are not applied in the actual flowmeter.In addition, we studies show that this method is relatively poor to the inhibition ability of harmonic interference.
Xu Ke army of HeFei University of Technology etc. adopts power spectrum analysis method, the modern spectrum analysis method based on Burg, adaptive trap filter method and small wave converting method that the signal of vortex flow sensors is handled (instrumental technique and sensor respectively, 1995, (5): 22-25 " software approach that vortex shedding flowmeter signal is handled "; Chinese journal of scientific instrument, 2000,21 (2): 222-224 " the adaptive resistance-trap wave method that vortex shedding flowmeter signal is estimated "; Chinese journal of scientific instrument, 2001,22 (3): 255-260 " vortex shedding flowmeter signal processing system that has the analysis of spectrum function based on DSP "; Chinese journal of scientific instrument, 2001,22 (6): 636-639 " based on the vortex shedding flowmeter signal disposal route of wavelet transformation "), and selecting for use ADSP2181 as microprocessor, is core algorithm with the power spectrum analysis, has developed digital signal processing system of vortex street flowmeter (" digital signal processing system of vortex street flowmeter ", Chinese invention patent, the patent No.: ZL99101209.7, the applying date: 1999.1.8, Granted publication day: 2003.4.2).This system has passed through the test at flow instrument measurement verification station, Anhui Province, and the result proves that spectral analysis method can improve ability and the range extension ratio that suppresses noise.But this system device is more, and control is complicated, and volume is bigger than normal, also has certain gap with actual applying.
Zhang Tao of University Of Tianjin and Duan Ruifeng etc. adopt lax trap periodogram spectral method to analyze vortex shedding flowmeter signal, expand flowmeter range lower limit, and with this algorithm is core, developed the dual-core architecture digital information processing system (" low power consumption digital formula vortex shedding flow meter " that combines based on DSP and MSP430, Chinese patent, application number: 200410019008.9, the applying date: 2004.4.14).The digital signal processing system of vortex street flowmeter of dual-core architecture utilizes the control ability of MSP430 single-chip microcomputer, realizes the sampling of data and the control of system peripheral; DSP utilizes its HPI mouth to receive the data that MSP430 gathers, and carries out signal Processing, sends the result back to MSP430 again.This system architecture is complicated, and cost is higher.
Central South University explains extra large cleer and peaceful Li Yalong and adopts the adaptive trap filter method to estimate the vortex street frequency, selecting TMS320LF2407A for use is processor, hardware block diagram and software flow pattern (computing technique and the robotization of digital signal processing system of vortex street flowmeter have been designed, 2001,20 (3): 159-162 " based on the design of the vortex shedding flowmeter signal processing system of DSP ").But, do not provide the performance index of specific implementation, experiment test result and system of result of calculation, the system of algorithm in the paper.
Summary of the invention:
The present invention is for avoiding above-mentioned existing in prior technology weak point, the low cost intelligent vortex shedding flowmeter signal processing system based on DSP that a kind of volume is little, cost is low, multiple functional is provided, with the digital signal processor be core, adopt power spectrum analysis to combine with digital filtering, handle the output signal of vortex street sensor and the signal of temperature and pressure sensor, have at the scene under the unsettled situation of pipe vibration and fluid flow fields, accurately measure the flow of fluid.
System of the present invention is by analog signal conditioner module, dsp chip and extend out that RAM, EEPROM, low-voltage observation circuit, LCD show, keyboard input, analog quantity output, pulse output and power management module form;
The characteristics of system of the present invention are to include temperature signal regulation circuit, pressure signal conditioning circuit and flow sensor signal modulate circuit in the described analog signal conditioner module, described temperature signal regulation circuit is made up of electric bridge and differential amplifier circuit, described pressure signal conditioning circuit is made up of the I/V translation circuit, and described flow sensor signal modulate circuit is made up of the active bandwidth-limited circuit of charge amplifying circuit, band amplitude limit function and low-pass filter circuit with fixed gain; Described system accepts temperature, pressure and the flow detecting signal of sensing unit output and deliver to described DSP after described analog signal conditioner resume module; Utilize its inner integrated A/D modular converter and annular data buffer that described three road electric signal are carried out timing sampling, regularly calculating, the calculating of sampling edge limit by described DSP; Described DSP carries out digital filtering to the flow sensor signal that may be mixed with the noise that is caused by interference that its sampling obtains, and adopts the power spectrum analysis method that filtered data are carried out analysis of spectrum and frequency spectrum correction again; Average according to result of calculation repeatedly, determine peak power spectrum value, obtain its pairing frequency, be the frequency of signal; According to instrument coefficient with by temperature, pressure compensation, calculate instantaneous delivery and integrated flux in real time again; Described DSP utilizes its timer internal to compare output function the instantaneous delivery data is exported by the pulse output unit with impulse form; Described DSP utilizes its inner integrated SPI module that the instantaneous delivery data are sent to described analog quantity output unit, with the analog quantity form output of 4~20mA electric current; Described DSP is presented at instantaneous delivery, integrated flux, temperature and pressure on the described LCD; Include instrument coefficient, systematic sampling frequency, sampling number, repeatedly average time, the digital filter coefficient of analysis of spectrum by what keyboard was provided with; Preserve the instrument coefficient of described keyboard input and the integrated flux that calculates by described EEPROM; Described low-voltage observation circuit is responsible for proposing interrupt request to described DSP when system's power down, and before the complete power down of system measurement result is stored among the described EEPROM.
System of the present invention characteristics also are to utilize the cycle interruption of described dsp chip timer internal, realization is to the timing sampling of described temperature, pressure and flow signal, the data that sampling obtains are put into annular data buffer, and regularly the flow signal that sampling is obtained carries out described power spectrumanalysis, sampling edge is calculated on the limit, the covering of overlapping of the data on flows of adjacent twice analyzing and processing.
System of the present invention characteristics are that also described dsp chip is TMS320LF2407A, and its inside is integrated with FLASH, the A/D conversion functional module of 32K, 2 task managers, house dog, serial peripheral equipment interface SPI, serial communication interface SCI, CAN functional module.
System of the present invention characteristics also are the range ability according to described vortex shedding flow meter, by described keyboard sample frequency and sampling number are set, to control the computational accuracy of described power spectrumanalysis; Described dsp chip adopts the computational accuracy of center of gravity spectrum correcting method with further raising frequency; According to described flow sensor characteristic, by described keyboard segment instrument coefficient is set, improve the measuring accuracy of flow; Form by the temperature and pressure compensation carries out gamma correction to flow result of calculation, improves the measuring accuracy of overheated gas and saturated vapour flow.
System of the present invention characteristics also are to utilize described dsp chip timer internal, export pulse with mode relatively, and by interrupting that relatively the recurrence interval of output is carried out dynamic compensation.
Compared with the prior art, beneficial effect of the present invention is embodied in:
1, to adopt power spectrum analysis be the signal processing algorithm of core for system of the present invention, cooperates digital filtering, eliminated the influence that measurement result is caused by interference such as strong low frequency pipe vibrations, improved instrument inhibition noise ability, the expanded range ratio;
2, system of the present invention timing sampling regularly calculates, and calculate on the sampling edge limit, utilizes annular data buffer, and the oldest data of last samples Refresh Data realize the real-time measurement to flow; At different bore instrumentation characteristics, by panel algorithm parameter is carried out best configuration, simultaneously, frequency spectrum is proofreaied and correct, and segmentation is provided with instrument coefficient, temperature and pressure compensation, the accuracy that improves instrument measurement; According to the analysis of spectrum algorithm characteristic, adopt amplitude limit to amplify rather than program control amplification to the vortex street sensor signal, thereby solve the very big problem that needs to revise circuit parameter of vortex street sensor change in signal strength.
3, system of the present invention can be by selecting resourceful dsp chip TMS320LF2407A in the sheet for use, the required external device of minimizing system, and the reduction system volume reduces cost, and realizes many-sided function that digital instrument is required simultaneously.
Description of drawings:
Fig. 1 is the hardware block diagram of system of the present invention.
Fig. 2 is a flow sensor signal modulate circuit schematic diagram in the system of the present invention.
Fig. 3 is the electric bridge and the amplifying circuit schematic diagram of temperature sensor signal in the system of the present invention.
Fig. 4 is the I/V translation circuit schematic diagram of processing pressure transmitter output signal in the system of the present invention.
Fig. 5 is a dsp chip pin wiring schematic diagram in the system of the present invention.
Fig. 6 be in the system of the present invention dsp chip extend out RAM pin wiring schematic diagram.
Fig. 7 is an EEPROM pin wiring schematic diagram in the system of the present invention.
Fig. 8 is a low-voltage observation circuit principle in the system of the present invention.
Fig. 9 is a keyboard circuit schematic diagram in the system of the present invention.
Figure 10 is a segmentation liquid crystal floor map in the system of the present invention.
Figure 11 is dsp chip and a LCD display circuit connecting circuit in the system of the present invention.
Figure 12 is an impulse output circuit schematic diagram in the system of the present invention.
Figure 13 is 4~20mA current output circuit schematic diagram in the system of the present invention.
Figure 14 is system power supply circuit theory of the present invention road.
Figure 15 is a system of the present invention control block diagram.
Figure 16 is the signal processing algorithm basic flow sheet of system of the present invention.
Figure 17 is the keyboard scan process flow diagram of system of the present invention.
Figure 18 is the master monitor process flow diagram of system of the present invention.
Embodiment:
Referring to Fig. 1, present embodiment is by analog signal conditioner module, TMS320LF2407A (dsp chip of TI company) and extend out RAM, E2PROM, low-voltage observation circuit, LCD demonstration, keyboard input, analogue quantity output circuit, impulse output circuit and power management module and form.
Vortex shedding flow meter is to utilize in the fluid dynamics toll bar whirlpool principle to make.Put into eddy generator in fluid line, will show the whirlpool of rule in its both sides, downstream generation two, whirlpool release frequency and fluid flow are linear, that is:
Q=k*f
In the formula, Q is a fluid volume flow, and k is an instrument coefficient, and f is that whirlpool discharges frequency, i.e. vortex street frequency.
On behalf of the picking up signal of vortex street frequency, the sensor (as: piezoelectric sensor) that is installed in the eddy generator will, and convert electric signal output to.Be characterized in amplitude little (millivolt level), with the flow size square become approximate ratio to concern, and internal resistance is very big.In the ideal case, sensor output signal is sinusoidal wave, but owing to be subjected to the influence of factors such as instrument mounting condition, fluid pulsation, pipe vibration, is mixed with various noises in the signal.Be provided with the analog signal conditioner module in the present embodiment, as shown in Figure 1.The vortex street sensor signal conditioning circuit is wherein arranged, and its circuit theory adopts the output signal of charge amplifier U1A flow sensor to carry out impedance conversion earlier as shown in Figure 2, amplifies in advance simultaneously.Charge amplifier is selected the MOS type amplifier of high input impedance for use, and C1, C2 are capacitance, and C8 is a feedback capacity, and R2 is a feedback resistance, prevents that feedback capacity C8 is saturated.C9, R3 are balancing capacitance, resistance.Resistance R 1 is a build-out resistor, prevents that sensor output signal is saturated.The signal of sensor line should shield, the shell of a termination instrument of screen layer, and the other end is being connected with the ground of signal processing system.The amplitude of charge amplifier output signal alters a great deal.For signal being amplified to full scale near A/D converter, make full use of its conversion accuracy, after charge amplifier, again signal is carried out suitable amplification.In order to eliminate or to reduce the influence of circuit noise, fluid pulsation noise and pipe vibration, also need to use low pass and high-pass filtering circuit to measuring.So, adopt two operational amplifiers of U2B and U2C to form the active amplification filtering circuit of two-stage.The first order is an active band-pass filter with amplitude limit function.This bandpass filter is made up of the low-pass filter of a Hi-pass filter and a second order, and high pass cut off frequency is by C10, R4 and R5 decision, and the cutoff frequency of low-pass filter is by R4, C11, R5, R7, R8 and C12 decision.When signal amplitude hour, the gain of whole active filter in passband is (R7+R8)/(R4+R5): when input signal amplitude increases, behind the diode current flow, output voltage amplitude is Vd+Vin * (R7)/(R4+R5), the Vd here is the diode forward pressure drop, and Vin is the charge amplifier output voltage.The second level is the low-pass filter of a fixed gain, has adopted the active filter circuit of a unlimited gain negative feedback structure here, mainly is made up of operational amplifier U2C, further reduces the influence of high frequency noise.Through two-stage filtering, signal is sent into the A/D modular converter in the dsp chip by a buffer circuit of being made up of U2A.
Consider when measuring steam and need carry out the compensation of temperature and pressure, so, in simulating signal input and conditioning unit, be provided with the modulate circuit that receives temperature sensor and pressure unit signal.Temperature sensor adopts the Pt100 platinum resistance, and signal conditioning circuit adopts the three-wire system bridge arrangement, re-uses a slice meter specially amplifier U3 and amplifies two voltage differences between the brachium pontis, as shown in Figure 3.Adopted an I/V translation circuit that the 4-20mA current signal of pressure unit output is converted to voltage signal, as shown in Figure 4.This two paths of signals is also sent into the A/D modular converter in the dsp chip.
The dsp chip TMS320LF2407A (hereinafter to be referred as 2407A) of the TI company that system of the present invention selects for use is for handling core, as shown in Figure 5.This dsp chip arithmetic capability is strong, and the highest arithmetic speed is 40MIPS, instruction cycle 25ns, and inside has the hardware multiplier of a 16*16 position, is enough to the real-time implementation fft algorithm.The more important thing is that the 2407A chip integration becomes peripheral hardware on the abundant sheet is arranged, for example, inner integrated A/D module can be supported the conversion of signals of 16 passages at most, and the change-over period reaches 375ns the soonest, 10 conversion accuracy.What the system that considers extracted is the frequency of vortex signal, so these 10 A/D can meet the demands.This chip also is integrated with the FLASH of 32k, 2 task managers (comprise 4 general purpose timers, support that comparison, PWM take place, catch, orthogonal coding and 2 functions such as external interrupt), house dog, serial peripheral equipment interface SPI, serial communication interface SCI, CAN and multifunctional multiplexing I/O mouth etc., so not only realize and expand the function of instrument easily, and the crucial external devices that can reduce system, reduce the system circuit board design area, can improve system reliability.The integrated functional module of 2407A is arranged as follows: timer 1 cycle interruption starts the A/D conversion; The cycle interruption of timer 3 is used for the timing scan keyboard, regularly LCD is operated; Utilize the comparing function output pulse of timer 2, use it relatively to interrupt dynamic compensation is carried out in the pulse of output simultaneously, reduce work clock sending the influence of pulse precision; Watchdog module moves disposal system and monitors, if program " race flies ", with regard to resetting system; The SPI module transmits control signal and data to the analogue quantity output circuit of system, output 4~20mA current signal.
Because 2407A inside only is integrated with the dual port RAM of 544 bytes and the single port RAM of 2K, can't satisfy the needs of algorithm computing, therefore utilize outside 16 address wires of 2407A and 16 data lines, extended out the RAM of 64k, as shown in Figure 6.
An EEPROM has selected in system of the present invention, preserves measurement result and instrument coefficient, as shown in Figure 7.Utilization 2407A multifunctional multiplexing mouth is controlled and reading and writing data EEPROM, and wherein the PBO sheet that meets EEPROM selects CS, PB1 to meet CLK, PB2 to meet input data line DI, PB3 and meet output data line DO.
System design of the present invention a low pressure detection module, as shown in Figure 8.When this module detects voltage and is lower than setting value, drag down the level of the PDPINTA pin of 2407A immediately, send urgent interrupt request to 2407A.Because this interrupt priority level is the highest, so the 2407A immediate answer was saved in measurement result among the EEPEOM before system's power down.
The man-machine interface that system design of the present invention is made up of keyboard and LCD realizes the setting of instrument parameter and shows measurement result on the spot.Keyboard arrangements has 4 keys: setting key (SET), shift key (SFT), increase progressively key (INC) and acknowledgement key (ENTR), multiplexing mouthful of PA4, PA5, PA6 and PA7 with 2407A joins respectively, carry out timing scan by timer 3 cycle interruption, keyboard circuit as shown in Figure 9.Select the serial line interface section-type LCD for use, planimetric map as shown in figure 10.This LCD has two row and shows: up left side can show P, T, three kinds of symbols of Q, and the right side can show 6 bit data; Descending 8 bit data that show; The right side also has 14 prompting bar codes in addition.2407A utilizes the multifunctional multiplexing mouth to be connected with LCD, and PB7 connects that CS, PB6 meet WR, PB5 meets DATA, as shown in figure 11.LCD has two kinds of duties, a show state; Two for being provided with state.Switch two kinds of duties by setting key.Under show state, switch three kinds of patterns by acknowledgement key: the one, the flow display mode, this pattern is a default mode, and the up left side of LCD symbol is represented flow for showing " Q ", and the right side data are for being used to show instantaneous delivery, the descending integrated flow that then shows of LCD; Second kind of pattern shows pressure, and sign bit shows " P ", and up right side does not have demonstration, the force value that descending demonstration is measured; The third pattern displays temperature, sign bit shows " T ", up right side does not have demonstration, descending demonstration temperature value measured.Be provided with under the state, the LCD sign bit does not have demonstration, up right side display parameter sequence number, the numerical value of descending this parameter of demonstration, and descending " activation " digit order number arranged, be the flicker shape, activating position can pass through the shift key shift position, increases progressively key and can change the value that activates digit order number, and the value that acknowledgement key then will be revised passes to parameter, after revising this parameter, LCD enters next instrument parameter modification picture.
System of the present invention utilizes 2407A timer comparison output function to realize pulse output, and pulse output circuit as shown in figure 12.According to the clock frequency that the frequency values of measuring and system use, calculate the needed cycle of timer to preset number, thereby determine the frequency of output pulse.Relatively the setting value of output unit then is used for the output duty of ratio is set, and dutycycle is set to 1 usually.The pulse signal of final output is the instantaneous flow rate signal after the processing, carries out measurement count for host computer in system check and the practical application, also is set at the output of quantize pulse signal according to customer requirements simultaneously, i.e. the certain volumetric flow rate of pulse representative.
System of the present invention has adopted DAC (D/A switch) and V/I (voltage/current conversion) circuit to realize the electric current output of 4-20mA, as shown in figure 13.After the 2407A computing draws frequency, according to the predefined bound frequency values of user, give DAC with commutation frequency for the corresponding digital amount, DAC is converted to voltage, converts current signal output to by V/I again.System of the present invention is for artificial circuit part and the power supply separately of digital circuit part, with anti-tampering.The simulation part needs 5V, and numerical portion needs 5V and 3.3V simultaneously.General instrument all is with 24V or 12V power supply, consider the requirement of system low-power consumption, system has adopted high-level efficiency DC/DC conversion electric power, is 5V voltage with 12V or the 24V voltage transitions of importing, pass through low-dropout regulator (LDO) again and finish the 5V/3.3V conversion, offer the digital circuit part.The supply of system simulation part power supply is had relatively high expectations, therefore directly by the linear voltage-stabilizing circuit supply, as shown in figure 14.
The main task of system of the present invention is to adopt selected signal processing algorithm to finish flow measurement, and possesses pulse output, electric current output, the setting of instrument coefficient, the preservation of measurement result.Therefore, function is a lot, the software design complexity.For the ease of the design and the maintenance of system, it is functional module that the subroutine of finishing specific function or similar functions is combined into module, is called by a master monitor unification then.Also can call mutually between these functional modules.The software block diagram of system as shown in figure 15.
Initialization module mainly comprises the initialization of 2407A, the initialization of LCD, the initialization of program global variable.
The 2407A chip integration has become many functional modules, used in the system and comprised A/D with ranking function, serial peripheral equipment interface SPI, universaling I/O port, house dog, artificial mouth, task manager, clock phase-locked loop (PLL) etc., each functional module all needs the initialization corresponding registers before using, and determines its mode of operation.
Be provided with many global variables in the system program, reflection system work at present state makes things convenient for calling of each module subroutine, and the some of them variable needs initialization, is convenient to the carrying out of next step program.These variablees roughly are divided into two classes: need the global variable of preservation and the global variable of non-preservation.The global variable of need preserving refers generally to the parameter of instrument, generally can be provided with by keyboard to change or system's power down is stored among the EEPROM automatically.During initialization, parameter value is taken out from EEPROM, be put in the corresponding global variable; The global variable of non-preservation need not be stored among the EEPROM, but some program module frequently calls, as table of trigonometric function, if all call trigonometric function at every turn, must reduce program efficiency, therefore the numerical value that can will need to use in initialization module configures, and can improve program implementation speed.
After system powered on, LCD will show that as instantaneous delivery, integrated flow etc. particular content is pressed actual needs and determined.LCD needs initialization before use, and initialization step is undertaken by the LCD instructions.The LCD initialization is mainly: control pin initialization, write order word, definition internal oscillator, open the internal oscillator that shakes, initialization displaying contents etc.
Macro definition also is the part of system initialization, is instructed by precompile and realizes.The constant that exists many subroutines to use in the system, for example measurement range of timer cycle of interrupting, LCD refreshing frequency, temperature and pressure and the instrument parameter corresponding address etc. that is stored in EEPROM.For reducing storage space, be convenient to the maintenance of system, these constants can define in the macro definition module.
Signal processing module is finished tasks such as the analysis of spectrum processing, instantaneous delivery calculating, temperature and pressure compensation of vortex signal.The power spectrum analysis algorithm that system adopts, its basic process is: the data set that comes of sampling is carried out the FFT conversion, calculate the power spectrum of each discrete point in frequency then, again according to the maximum principle of energy, go out the frequency of signal according to a preliminary estimate.Need to carry out the center of gravity frequency spectrum then and proofread and correct, to improve the precision of Frequency Estimation.Simultaneously, also need result of calculation is repeatedly averaged, reduce the influence that system's stochastic error causes.According to actual conditions, parameters such as sample frequency, sampling number and average time are set, by keyboard with the control algolithm precision.Figure 16 is the signal processing algorithm process flow diagram of system of the present invention.
Instrument coefficient according to signal frequency of obtaining and default calculates instantaneous delivery.For low discharge, because the restriction of vortex shedding flow meter principle of work or possibility noise are dominant, the signal of sampling does not necessarily represent flow, so will excise.
The density of fluid is subjected to temperature, pressure influence bigger, particularly when fluid is gas, therefore when measuring the fluid mass flow, carry out the temperature and pressure compensation.Different fluid flows is subjected to the difference that influences of temperature and pressure.Native system is according to treating that fluid measured is furnished with four kinds of different compensation ways: liquid, general gas, superheated vapor and saturated vapour.Generally be stressed temperature factor influence of fluid flow is little, does not therefore compensate; General gas flow has certain rule with the variation of pressure and temperature, can be undertaken by general gas warm-pressing compensation formula the compensation of its flow; The flow-compensated of superheated vapor and saturated vapour realized by the interpolation of tabling look-up of temperature, pressure density meter separately.
4~20mA electric current that the present invention possesses is exported, and is used to reflect the measurement result of flow, to cooperate the needs of industry spot DCS control system.Detailed process is: system-computed goes out after the result, and the serial peripheral equipment interface SPI integrated by 2407A exports 10 bit data serials to D/A converter, is converted to behind the voltage again through the V/I conversion output 4~20mA electric current.In software, only need regularly in the SPI module after initialization transmitter register SPITXBUF to write concrete data and get final product.
Pulse output module utilizes the general purpose timer T4 among the 2407A manager B, and the pulse output of system is provided.At first initialization manager B after system enters major cycle, constantly writes the pairing data of instantaneous delivery in register T4PR and T4CMPR.Concrete formula is:
T 4 PR = CLK flow - 1
T4CMPR=0.5*T4PR
Wherein, CLK, the flow instantaneous delivery that is respectively the timer counting clock, calculates.Register T4PR and T4CMPR are 16 integers, so the fraction part of result of calculation is left in the basket, and this must bring the error of output frequency.When software design, can utilize the relatively interruption of timer, fraction part is added up, the cycle of output pulse is carried out dynamic compensation, improve and to send the precision of pulse.
Human-machine interface module is made up of keyboard and LCD, and LCD is responsible for Displaying Meter measurement result and instrument parameter; Keyboard then cooperates LCD, revises the instrument parameter, switches the LCD duty.
The keyboard scan process flow diagram as shown in figure 17.Counter is that software removes to shake used counter among the figure, and First is a variable of distinguishing the keyboard continued operation, the time interval when T is the keyboard continued operation.
2407A allows to handle 6 core stage maskable interrupts, adopts the peripheral hardware of a centralization to interrupt the response that extending controller is handled the interior peripheral hardware of all sheets and external pin priority of interrupt and interruption.When peripheral hardware interrupts when effective, its corresponding interrupt vector just deposits in the PIVR (PIVR) automatically, reads interrupt vector when CPU replys from PIVR, finds the inlet of interrupt service subroutine in the interrupt vector table.The programming of interrupt module mainly is the concrete operations with interrupt service subroutine of filling in of interrupt vector table.
Native system has adopted three cores to interrupt: INT1, INT2 and INT3.
Comprise two peripheral hardwares among the INT1 and interrupted, be respectively the interruption that converts from PDPINTA and A/D.The PDPINTA pin is used for monitoring system voltage, and when system's power down, the external monitoring circuit sends interrupt request by PDPINTA to DSP, requires to preserve integrated flux in EEPROM.This priority of interrupt is for the highest.Second interruption is used for signal sampling, timer 1 cycle interruption of system arrangement 2407A triggers automatically and starts the A/D module, the integrated automatic order module of this A/D module, but once sample conversion reaches 16 road signals, and native system need be adopted 3 road signals: flow, temperature and pressure.After A/D finished once conversion, the result that conversion is quantized was put in result register, sent interrupt request to CPU simultaneously.After this interrupt response, interrupt service subroutine is stored in the data buffer with the numerical value of result register, carries out the digital filtering of flow signal simultaneously.
INT2 is triggered by the cycle interruption of timer 3.In the interrupt service subroutine of INT2, are furnished with 4 software counters.First is used to handle the scanning of keyboard, when rolling counters forward when the certain numerical value, call the keyboard scan program, if then carry out the respective keys operation when having button to press,, then withdraw from if do not have.Second is used to carry out refreshing of LCD: be in show state as if LCD, then the displayed value of periodic refreshing LCD.The 3rd is used to finish LCD the flicker action that choosing under the state activated digit order number is set.Last is used for monitoring and recovers the LCD duty.If LCD is under the state of setting, and still do not had button operation above certain hour, promptly system default no longer carries out setting operation, returns the show state of LCD automatically, continues to show measurement result.Because this interruption is mainly used in keyboard and LCD display operation, not very high to time requirement, so this interrupt priority level is a low priority.
1NT3 is by the comparison down trigger of timer 4, pulse of the current output of expression system.Because require the pulsed frequency of output always to keep the integral multiple relation, so always there is certain error in the pulse of exporting with work clock.Utilize this to interrupt, can carry out dynamic compensation, improve the precision of output pulse the cycle of output pulse.Utilize this interruption simultaneously, the output pulse is added up, be convenient to integrated flow.
For the ease of the maintenance of program, define the interrupt cycle of all timers in the macro definition module, gives corresponding registers in the initialization module assignment.In addition, the inlet of corresponding interrupt service subroutine is inserted in the relevant position in interrupt vector table.
Integrated watchdog module is used to guarantee system failure recovery in the dsp chip.House dog has a hardware counter, begins continuous counter after resetting from power on, and triggering system resets when counter overflows.So, in position add house dog counter reset zero clearing statement, prevent that the house dog counter from overflowing.If system is absorbed in software fault, cause deadlock, the house dog counter will overflow, thus resetting system.
Master monitor is the total activation program of whole signal processing system, calls the subroutine in each module, realizes the instrument all functions.Basic process is: behind the system power-on reset, carry out initialization immediately; After the initialization, the vortex signal that obtains according to sampling carries out the processing of periodogram spectrum signal, calculates signal frequency; According to the instrument coefficient that sets, calculate instantaneous delivery then; According to the different fluid measured for the treatment of, select different temperature and pressure compensation ways, carry out the temperature and pressure compensation; After measuring flow, then export the electric current of 4~20mA of corresponding pulsed quantity and standard; After finishing output,, then carry out the instrument parameter modification if there is the signal that needs to revise the instrument parameter in system, afterwards, master monitor will be back to before the signal Processing, proceed signal Processing, the flow of finishing instrument that constantly circulates is successively measured in real time, and its flow process as shown in figure 18.

Claims (5)

1. low cost intelligent vortex shedding flowmeter signal processing system based on DSP, by analog signal conditioner module, dsp chip and extend out that RAM, EEPROM, low-voltage observation circuit, LCD show, keyboard input, analog quantity output, pulse output and power management module form; It is characterized in that including in the described analog signal conditioner module temperature signal regulation circuit, pressure signal conditioning circuit and flow sensor signal modulate circuit, described temperature signal regulation circuit is made up of electric bridge and differential amplifier circuit, described pressure signal conditioning circuit is made up of the I/V translation circuit, and described flow sensor signal modulate circuit is made up of the active bandwidth-limited circuit of charge amplifying circuit, band amplitude limit function and low-pass filter circuit with fixed gain; Described system accepts temperature, pressure and the flow detecting signal of sensing unit output and deliver to described DSP after described analog signal conditioner resume module; Utilize its inner integrated A/D modular converter and annular data buffer that temperature, pressure and flow three road electric signal are carried out timing sampling and regularly calculating by described DSP, or calculate on the sampling edge limit; Described DSP carries out digital filtering to the flow sensor signal that may be mixed with the noise that is caused by interference that its sampling obtains, and adopts the power spectrum analysis method that filtered data are carried out analysis of spectrum and frequency spectrum correction again; Average according to result of calculation repeatedly, determine peak power spectrum value, obtain its pairing frequency, be the frequency of signal; According to instrument coefficient with by temperature, pressure compensation, calculate instantaneous delivery and integrated flux in real time again; Described DSP utilizes its timer internal to compare output function the instantaneous delivery data is exported by the pulse output unit with impulse form; Described DSP utilizes its inner integrated SPI module that the instantaneous delivery data are sent to described analog quantity output unit, with the analog quantity form output of 4~20mA electric current; Described DSP is presented at instantaneous delivery, integrated flux, temperature and pressure on the described LCD; Include instrument coefficient, systematic sampling frequency, sampling number, repeatedly average time, the digital filter coefficient of analysis of spectrum by what keyboard was provided with; Preserve the instrument coefficient of described keyboard input and the integrated flux that calculates by described EEPROM; Described low-voltage observation circuit is responsible for proposing interrupt request to described DSP when system's power down, and before the complete power down of system measurement result is stored among the described EEPROM.
2. according to the described low cost intelligent vortex shedding flowmeter signal processing system of claim 1 based on DSP, it is characterized in that utilizing the cycle interruption of described dsp chip timer internal, realization is to the timing sampling of described temperature, pressure and flow signal, the data that sampling obtains are put into annular data buffer, and regularly the flow signal that sampling is obtained carries out described analysis of spectrum, sampling edge is calculated on the limit, the covering of overlapping of the data on flows of adjacent twice analyzing and processing.
3. according to the described low cost intelligent vortex shedding flowmeter signal processing system of claim 1 based on DSP, it is characterized in that described dsp chip is TMS320LF2407A, its inside is integrated with FLASH, the A/D conversion functional module of 32K, 2 task managers, house dog, serial peripheral equipment interface SPI, serial communication interface SCI, CAN functional module.
4. according to the described low cost intelligent vortex shedding flowmeter signal processing system of claim 1 based on DSP, it is characterized in that range ability according to described vortex shedding flow meter, by described keyboard sample frequency and sampling number are set, to control the computational accuracy of described power spectrumanalysis; Described dsp chip adopts the computational accuracy of center of gravity spectrum correcting method with further raising frequency; According to described flow sensor characteristic, by described keyboard segment instrument coefficient is set, improve the measuring accuracy of flow; Form by the temperature and pressure compensation carries out gamma correction to flow result of calculation, improves the measuring accuracy of overheated gas and saturated vapour flow.
5. according to the described low cost intelligent vortex shedding flowmeter signal processing system of claim 1 based on DSP, it is characterized in that utilizing described dsp chip timer internal, export pulse with mode relatively, and by interrupting that relatively the recurrence interval of output is carried out dynamic compensation.
CNB2005100410581A 2005-07-13 2005-07-13 Low cost intelligent vortex shedding flowmeter signal processing system based on DSP Expired - Fee Related CN100385207C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100410581A CN100385207C (en) 2005-07-13 2005-07-13 Low cost intelligent vortex shedding flowmeter signal processing system based on DSP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100410581A CN100385207C (en) 2005-07-13 2005-07-13 Low cost intelligent vortex shedding flowmeter signal processing system based on DSP

Publications (2)

Publication Number Publication Date
CN1737506A CN1737506A (en) 2006-02-22
CN100385207C true CN100385207C (en) 2008-04-30

Family

ID=36080386

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100410581A Expired - Fee Related CN100385207C (en) 2005-07-13 2005-07-13 Low cost intelligent vortex shedding flowmeter signal processing system based on DSP

Country Status (1)

Country Link
CN (1) CN100385207C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107687875A (en) * 2017-08-17 2018-02-13 合肥工业大学 A kind of magnetic vortex street flowmeter for measuring gassiness the flow of conductive liquid

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102175286B (en) * 2011-01-19 2012-11-21 南京航空航天大学 Signal processing method for turbine flow meter
CN102297709A (en) * 2011-05-19 2011-12-28 常州大学 Wireless industrial flow transducer
CN103148897A (en) * 2013-02-01 2013-06-12 浙江大学 Digital intelligent vortex shedding flowmeter based on DSP and metering method of same
CN105650064B (en) * 2016-03-06 2018-01-12 浙江大学 A kind of Pneumatic position control device based on DSP
CN106679741B (en) * 2016-12-20 2019-06-04 重庆川仪自动化股份有限公司 Processing method and system based on vortex-shedding meter anti-jamming signal
CN108759875B (en) * 2018-06-04 2020-06-26 合肥工业大学 Sensor dynamic compensation method based on system identification and frequency response correction
CN109668599B (en) * 2019-01-16 2024-03-26 江苏华海测控技术有限公司 Coriolis mass flowmeter

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6170338B1 (en) * 1997-03-27 2001-01-09 Rosemont Inc. Vortex flowmeter with signal processing
CN1104628C (en) * 1999-01-08 2003-04-02 合肥工业大学 Digital signal processing system of vortex street flowmeter
CN1206516C (en) * 1999-09-14 2005-06-15 横河电机株式会社 Swirl flowmeater

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6170338B1 (en) * 1997-03-27 2001-01-09 Rosemont Inc. Vortex flowmeter with signal processing
CN1104628C (en) * 1999-01-08 2003-04-02 合肥工业大学 Digital signal processing system of vortex street flowmeter
CN1206516C (en) * 1999-09-14 2005-06-15 横河电机株式会社 Swirl flowmeater

Non-Patent Citations (8)

* Cited by examiner, † Cited by third party
Title
具HART通信功能的智能涡街流量计设计. 陈祥荣,居滋培.自动化与仪器仪表,第1期. 2000
具HART通信功能的智能涡街流量计设计. 陈祥荣,居滋培.自动化与仪器仪表,第1期. 2000 *
基于DSP、具有谱分析功能的涡街流量计信号处理系统. 徐科军,吕讯竑,陈荣保,苏建徽,张崇巍.仪器仪表学报,第22卷第3期. 2001
基于DSP、具有谱分析功能的涡街流量计信号处理系统. 徐科军,吕讯竑,陈荣保,苏建徽,张崇巍.仪器仪表学报,第22卷第3期. 2001 *
基于FFT的频谱校正方法及应用. 黄云志,徐科军.仪器仪表学报,第22卷第3期. 2001
基于FFT的频谱校正方法及应用. 黄云志,徐科军.仪器仪表学报,第22卷第3期. 2001 *
基于自适应陷波的涡街流量计信号处理系统. 徐科军,汪安民,吕讯竑,陈荣保,苏建徽.计量学报,第21卷第3期. 2000
基于自适应陷波的涡街流量计信号处理系统. 徐科军,汪安民,吕讯竑,陈荣保,苏建徽.计量学报,第21卷第3期. 2000 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107687875A (en) * 2017-08-17 2018-02-13 合肥工业大学 A kind of magnetic vortex street flowmeter for measuring gassiness the flow of conductive liquid
CN107687875B (en) * 2017-08-17 2021-06-22 合肥工业大学 Electromagnetic vortex shedding flowmeter for measuring flow of gas-containing conductive liquid

Also Published As

Publication number Publication date
CN1737506A (en) 2006-02-22

Similar Documents

Publication Publication Date Title
CN100385207C (en) Low cost intelligent vortex shedding flowmeter signal processing system based on DSP
CN100470207C (en) Low-power consumption two-wire system vortex flowmeter
CN101782407B (en) Digital vortex street/precession flowmeter powered by battery
CN101451864B (en) Improved low power consumption two-wire system vortex shedding flowmeter
CN101706299B (en) Coriolis mass flow transmitter based on DSP
CN106679741B (en) Processing method and system based on vortex-shedding meter anti-jamming signal
CN101476906B (en) Anti-strong fixed interference digital signal processing system of vortex street flowmeter
CN101644590B (en) Anti-strong interference vortex street flowmeter digital signal processing system based on single sensor
CN101614566B (en) Low-power and two-wire vortex shedding flowmeter based on fast Fourier transform
CN102128656B (en) Slightly bent Koch mass flow meter digital signal processing method and system
CN203534650U (en) Cloud transmission digital signal processing device with Coriolis mass flow meter
CN103528634B (en) A kind of coriolis mass flowmeters cloud transmission digital signal processing device and method
CN1104628C (en) Digital signal processing system of vortex street flowmeter
CN104895611A (en) Intelligent sensor used for mine dust concentration measurement
CN106123973B (en) Vortex-shedding meter based on cross-correlation analysis measurement low reynolds number flow
CN106094963A (en) APD array chip bias voltage Full-automatic temperature compensation system
CN106053539A (en) PH water quality analyzer system and control method thereof
CN200993665Y (en) Small digitalized prase-comparing measuring device
CN107167196A (en) A kind of Ke's mass flowmeter digital drive system based on FPGA
Liang et al. Statistical modeling and signal reconstruction processing method of EMF for slurry flow measurement
CN100470206C (en) Split type vortex street effusion meter
CN203732929U (en) Energy source data acquisition terminal
CN207301758U (en) A kind of earth source heat pump unit control system controlled based on fuzzy control and PLC
CN101757709B (en) Flow rate collection method and device thereof
CN204421980U (en) Numerical model analysis filtering low flow velocity electromagnetic flowmeter

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080430

Termination date: 20140713

EXPY Termination of patent right or utility model