Summary of the invention
In order to solve the accurate timing problem when high precision amplitude Real-time Collection of multi-analog signal and super threshold value, the invention provides a kind of multichannel analog signals acquisition system with automatic compensation function.
For achieving the above object, the technical solution adopted in the present invention is:
This system adopts automatic amplitude rectification circuit and penalty coefficient automatically to calculate memory function.In actual signal acquisition process, utilize the penalty coefficient stored to carry out auto-compensation to image data, improve the precision that amplitude gathers, realize the accurate timing of super threshold value simultaneously.This board can adopt pci interface and existing computing machine to form analog signals collection and the detection system of multichannel, also PC104Plus interface and single board computer can be adopted jointly to form the collection of portable multipath analog signals and detection system, this system can support that at most 4 pieces of boards work simultaneously, total can gather nearly hundred road analog signalses simultaneously, and concrete scheme is as described below.
The multichannel analog signals acquisition system with automatic compensation function of the present invention, according to the demand had the multi-analog signal acquiring system of automatic compensation function, adopt at least one piece of multi-analog signals collecting board with automatic compensation function, enter computer PCI bus according to the long calliper model of PCI and the clamping of PC104Plus interface board, described in there is automatic compensation function multi-analog signals collecting board comprise:
1) multichannel analog signals load module: adopt insulating power supply to isolate each road;
2) Signal-regulated kinase: adopt high-precision circuit to realize the conditioning of signal, comprise at least two conditioning module, one of them conditioning module mainly carries out nursing one's health the input dynamic range inputting simulating signal and meet signal isolation circuit, and a Signal-regulated kinase makes it meet the dynamic range of AD input;
3) signal isolation circuit module: on the basis of front end signal conditioning, adopts signal isolation module to realize the isolation of front and back end, linear optical coupling isolating device can be adopted to realize, carry out linear transformation to input signal to the isolation of simulating signal;
4) nominal voltage generation module: adopt preferred circuit to produce a series of these fiduciary levels as 10mV, 100mV, 500mV, 1V, controlled by the break-make of multidiameter option switch, it can be used as the input gathering simulating signal, for the conversion coefficient of automatic calibration linear optical coupling, and by this coefficient storage in system, carrying out auto-compensation when gathering simulating signal, realizing the high precision collecting of analog signals amplitude;
5) Systematical control and signal processing module: form primarily of primary processor and application program.Wherein master
Processor module can select DSP or FPGA, writes application program thereon and can realize the functional parameter configuration of whole system, collection of simulant signal, threshold settings and super threshold detection and accurate clocking capability;
6) PCI protocol realization circuit: adopt pci bridge chip to realize PCI protocol communication, wherein PC104Plus interface also selects PCI agreement to communicate.
Preferably, the way that preferred preferred described signals collecting board can carry out analog signals collection according to the design area of board is determined.
Preferably, adopt monolithic to have the multi-analog signals collecting board of automatic compensation function, according to the long calliper model of PCI and PC104Plus interface board portability requirements, general 24 road analog signalses of selecting carry out parallel processing; Adopt pci interface have in the multi-analog signal acquiring system of automatic compensation function, can the board number of collaborative work mainly limit by its carrier computer motherboard PCI slot count, and adopt the portable of PC104Plus interface to have in the multi-analog signal acquiring system of automatic compensation function, limit by PC104Plus interface, at most can only stacking 4 pieces of boards, namely can realize analog signals collection and the accurate timing process of super threshold value that 96 tunnels have automatic compensation function.
Preferably, linear optical coupling isolating device can be adopted to realize the isolation of simulating signal, linear transformation is carried out to input signal; Should consider the performance index such as its isolation, input impedance, response speed and bandwidth when linear optical coupling device is selected, requiring in addition should at below 10us to the time delay of signal.
Preferably, multichannel analog signals load module: require to isolate each other each road simulating signal of input according to signals security, adopt insulating power supply to isolate each road.This main circuit will adopt the method for transformer isolation to isolate.
Preferably, need in use to start or terminate optocoupler linear transformation parameter correction functions of modules with switch notice Systematical control and signal processing module.In course of normal operation, external analog signal is selected to select the closed of this way switch as the input of system.
Preferably, main processor modules mainly comprises following four modules:
1) system configuration module: this module mainly realizes the functional configuration of system, mainly comprises system initial
The setting of parameter, sample frequency are arranged, sample that each road simulating signal is arranged, each road simulating signal threshold value is arranged, sampling enable and stop these functions;
2) signal acquisition module: mainly realize adopting the multi-analog signal with automatic compensation function
Collection and process; First A/D digitizing conversion is carried out to the signal that linear optical coupling exports, then primary processor is exported to, primary processor high speed acquisition signal, and utilize the auto-compensation coefficient stored to carry out auto-compensation to image data, improve the amplitude precision of collection signal, final data can realize the storage of image data by pci bus;
3) signal detection module: realize the super threshold value inspection with the enough function multichannel analog signals of auto-compensation
The accurate timing of surveying, primary processor is when gathering simulating signal, the threshold value on each road oneself with default is compared simultaneously and detect, when comprising process from low to high and exceeding threshold value and exceed the super threshold value of threshold value two kinds of situations from high to low, record this time point, and by driving notice upper level applications, the main mode process adopting hardware interrupts;
4) optocoupler linear transformation parameter automatic calibration module: when user starts nominal voltage generation module, system will enter the zero offset capability module of linear optical coupling conversion parameter, according to the nominal voltage of input and the signal of collection, carry out automatic calibration calculating, for compensating collection signal, thus improve the range value precision of system acquisition simulating signal.
Relative to prior art, the multichannel analog signals acquisition system with automatic compensation function of the present invention, has following useful technique effect:
1) achieve the isolation of each input simulating signal, prevent disturbing mutually of input signal; Achieve the isolation of each input simulating signal and back-end processing circuit simultaneously, back-end processing circuit can be protected.
2) realize the high common mode inhibition to input simulating signal, meet " virtual earth " signals collecting.
3) adopt driving switch adjustment front end modulate circuit, support wide dynamic range, and be applicable to feeble signal collection.
4) for ensureing the precision that input signal amplitude gathers, support the zero offset capability to the linear optical coupling device conversion parameter adopted, the correction coefficient extracted is for the auto-compensation of amplitude during board image data, and this function can improve the amplitude precision of collection signal.
5) realize that there is the parallel acquisition of the multichannel analog signals of automatic compensation function and super threshold detection function, there is configurable signal amplitude real-time detection function and amplitude automatic compensation function, and accurate timing is carried out to the super threshold information detected, can be used for influence factor and abnormal factors analysis in commercial production or scientific research.
6) board supports pci interface and PC104Plus interface two kinds of patterns, wherein adopts PC104 interface modes can coordinate with single card microcomputer and forms the portable multichannel analog signals acquisition system with automatic compensation function.
7) polylith board collaborative work ability, nearly hundred road collection of simulant signal and super threshold detection field.Under wherein adopting PC104Plus interface portable mode, extend at most 4 pieces of boards, and adopt the board of pci interface in general only by PCI mainboard can PCI slot limit.
Embodiment
Describe the architecture with the multichannel analog signals acquisition system of automatic compensation function of the present invention in detail below in conjunction with accompanying drawing, but be not construed as limiting the invention.
A kind of design proposal with the multichannel analog signals acquisition system of automatic compensation function of the present invention:
According to the demand had the multi-analog signal acquiring system of automatic compensation function, the design proposal shown in Fig. 1 can be adopted.As shown in Figure 1, the way that monolithic " has the multi-analog signals collecting board of automatic compensation function " and can carry out analog signals collection according to the design area of board is determined, according to the long calliper model of PCI and PC104Plus interface board portability requirements, general 24 road analog signalses of selecting carry out parallel processing.If desired carry out the collection of nearly hundred road analog signalses and super threshold detection and accurate timing simultaneously, the pattern of polylith board collaborative work can be adopted to carry out system extension.In general, adopt pci interface have in the multi-analog signal acquiring system of automatic compensation function, can the board number of collaborative work mainly limit by its carrier computer motherboard PCI slot count, and adopt the portable of PC104Plus interface to have in the multi-analog signal acquiring system of automatic compensation function, limit by PC104Plus interface, at most can only stacking 4 pieces of boards, namely can realize analog signals collection and the accurate timing process of super threshold value that 96 tunnels have automatic compensation function.
1) multichannel analog signals load module
This model choice standard interface access multichannel analog signals, requires to isolate each other each road simulating signal of input according to signals security, adopts insulating power supply to isolate each road.This main circuit will adopt the method for transformer isolation to isolate.
0 level due to front-end circuit is one end of direct reference-input signal, is not namely equal to 0 level that we measure rear end, is not also equal to 0 level of measured signal part, produces " virtual earth " effect.In front-end circuit process, adopt high common mode inhibition method, meet the collection of " virtual earth " signal.
2) Signal-regulated kinase
Native system requirement is high-precision carries out the collection of simulating signal and super threshold detection, the main conditioning adopting high-precision circuit to realize signal.Whole system mainly comprises two conditioning module, wherein previous conditioning module mainly carries out nursing one's health the input dynamic range inputting simulating signal and meet signal isolation circuit (linear optical coupling isolating device), and then a signal conditioning circuit makes it meet the dynamic range of AD input.
Owing to adopting signal conditioning circuit to process after simulating signal input, system is made to have larger signal transacting scope, this system is particularly made " to be applicable to feeble signal collection ", main method is by " Gear Select Switch " the access difference resistance in the scale amplifying part of amplifier, makes it meet different range requirements.
3) signal isolation circuit module
For protection back-end circuit and whole system, require that front-end circuit (input signal) and back-end processing circuit are isolated, therefore on the basis of front end signal conditioning, adopt signal isolation module to realize the isolation of front and back end.Because system input signal is analog signals, the linear optical coupling isolating device that the isolation of simulating signal can adopt industry conventional is realized, linear transformation is carried out to input signal.Should consider the performance index such as its isolation, input impedance, response speed and bandwidth when linear optical coupling device is selected, requiring in addition should at below 10us to the time delay of signal.
4) nominal voltage generation module
When adopting linear optical coupling isolating device, owing to being subject to device itself and peripheral modulate circuit components and parts Accuracy, the fundamental formular of its linear change
in, the value of a and b will change.For improving the amplitude precision of this collection of simulant signal system, its transformation for mula zero offset capability of system configuration linear optical coupling.Main employing preferred circuit produces series of standards level (as 10mV, 100mV, 500mV, 1V etc.), controlled by the break-make of multidiameter option switch, it can be used as the input gathering simulating signal, for the conversion coefficient of automatic calibration linear optical coupling, and by this coefficient storage in system, carrying out auto-compensation when gathering simulating signal, realizing the high precision collecting of analog signals amplitude.Attention: need in use to start or terminate optocoupler linear transformation parameter correction functions of modules with switch notice Systematical control and signal processing module.In course of normal operation, select external analog signal as the input (selecting this way switch to close) of system.
5) Systematical control and signal processing module
Systematical control and signal processing module are formed primarily of primary processor+application program.Wherein main processor modules can select DSP or FPGA, writes application program thereon and can realize the functional parameter configuration of whole system, collection of simulant signal, threshold settings and super threshold detection and accurate clocking capability.Wherein mainly comprise following four modules:
A) system configuration module
The functions such as this module mainly realizes the functional configuration of system, the enable and stopping of mainly comprising the setting of system initial parameter, sample frequency is arranged, each road simulating signal of sampling arranges (as required enable sampling channel), each road simulating signal threshold value is arranged, sampling.
B) signal acquisition module
This system single board mainly realizes the acquisition and processing to the multi-analog signal with automatic compensation function.First A/D digitizing conversion is carried out to the signal that linear optical coupling exports in native system design, then primary processor is exported to, primary processor high speed acquisition signal, and utilize the auto-compensation coefficient stored to carry out auto-compensation to image data, improve the amplitude precision of collection signal, final data can realize the storage of image data by pci bus.
C) signal detection module
Native system veneer need realize the accurate timing of the super threshold detection with the enough function multichannel analog signals of auto-compensation, primary processor is when gathering simulating signal, the threshold value on each road oneself with default is compared simultaneously and detect, when there is super threshold value time (process from low to high exceedes threshold value and exceedes threshold value two kinds of situations from high to low), record this time point, and by driving notice upper level applications, the main mode process adopting hardware interrupts.
D) optocoupler linear transformation parameter automatic calibration module
(relevant analog switch is connected) when user starts nominal voltage generation module, system will enter the zero offset capability module of linear optical coupling conversion parameter, according to the nominal voltage of input and the signal of collection, carry out automatic calibration calculating, for compensating collection signal, thus improve the range value precision of system acquisition simulating signal.
6) PCI protocol realization circuit
This board adopts pci bridge chip to realize PCI protocol communication, and wherein PC104Plus interface also selects PCI agreement to communicate.
PCI or PC104Plus board designed by native system is by realization to the collection of simulating signal and the accurate timing of super threshold detection, and particular hardware structured flowchart as shown in Figure 2.
Front-end circuit comprises signal input circuit, signal conditioning circuit, signal isolation circuit and normal voltage and produces circuit, and wherein signal input circuit supports high common mode inhibition, can solve signal " virtual earth " problem; Signal-regulated kinase mainly makes input signal meet its rear end to connect the input signal dynamic range of circuit module, designed, can realize larger signal transacting scope, this system particularly can be made " to be applicable to feeble signal collection " by adjustable resistance; Signal isolation circuit comprises two parts, and buffer circuit is mainly used in the isolation of each input simulating signal foremost, prevents the mutual interference of input signal; Normal voltage generation circuit is chosen as acquisition system by the switching of analog switch provides a standard voltage signal, simultaneously can by the linear optical coupling linear transformation parameter zero offset capability module of interrupt notification main processing block when enabling, for correcting the amplitude precision of whole system front-end collection simulating signal.And the front end linearity buffer circuit before AD mainly realizes the isolation of input signal and back-end processing signal processing circuit, the main linear optical coupling isolating device that adopts realizes.Because needs gather multichannel input simulating signal, need one or more AD to form AD array and be translated into digital signal, and primary processor obtains each road simulating signal of the input that AD gathers by bus interface.
In addition, primary processor needs the laggard row cache of signal auto-compensation after gathering and whether exceedes the detection of threshold value, if exceed threshold value, writing time point, and to Labcard driver transmission hardware interrupts.For completing native system task, primary processor also needs to realize configuration module, timing module, test module and I2C module etc.FLASH in system is used for the solidification of basic configuration information.
Power management module is responsible for producing each level power supply needed for plank, and clock module provides clock signal for system.External clock input interface also supported by veneer simultaneously, so that coordinate the work of polylith board.
The Software for Design of test macro, based on modular design, is divided into board to have analog signals collection and the accurate timing program of super threshold value, driver, testing software three ingredients of automatic compensation function, collaborative work between three.Board gathers multichannel analog signals, carries out auto-compensation, carries out super threshold value state justify, then result is notified driver after temporary.Drivers monitor board information, and real-time notice test procedure.The notice of the image data that test procedure detection drives, reads the analog signal data gathered, and when there is the interruption of super threshold value if receive, test procedure will read the status information of super threshold value and accurate clocking information.Therefore, the overall design process of software can be divided into signals collecting and the accurate timing program of super threshold value designs, Driver Design, test procedure design three parts.Attention: system supports many boards collaborative work mode, can carry out gathering and detecting by Dui Jin hundred road analog signals simultaneously.
1. collection of simulant signal and the accurate timing program design proposal of super threshold detection
The software processing scheme of board, multi-analog signal after buffer circuit and modulate circuit process, after being carried out digital conversion by AD, by main processing block collection and be performed for more than after auto-compensation threshold value judge and timing.If there is threshold crossing event to occur, saltus step information will be stored and send to driving and interrupt.
System carries out order and information interaction by pci bus agreement and main frame simultaneously, the order of system real-time listening main frame.The Host Command that system is monitored is as follows:
1) threshold value setting command, for arranging the threshold value on each road;
2) whether storage of collected data command, will by the data driving the access of notice upper level applications to gather if selected, otherwise upper level applications not storage of collected data;
3) start sense command, carry out gathering and the judgement of super threshold value for the application program started on board;
4) stopping sense command, for stopping, the application program on card being carried out gathering and the judgement of super threshold value.
In addition the interruption of software monitors " linear optical coupling conversion parameter automatic calibration " function, have no progeny when receiving in this, system enters linear optical coupling conversion parameter zero offset capability module, carries out the automatic calibration of its conversion parameter, improves the amplitude precision of system acquisition simulating signal.This function generally once corrects before use, and correction parameter solidification is stored in system, the auto-compensation of collection signal amplitude when can be used for measuring next time.
2. Labcard driver programming process
The Windows driver of board is developed based on WDM model, realizes the function such as control, interrupt response, data acquisition of the loading to board, initialization, board.What drive main realization is pci bus communication.After driving work, detect board and interrupt, if when having board to interrupt occurring, then different according to the kind of interrupting, send different event interrupt notification upper strata test procedure.
3. test procedure design proposal
Upper level applications mainly contains following functions:
1) enumerate board function, when there being the collaborative work of polylith board in system, this application program needs to enumerate board, obtains the operation handle of all boards.
2) board configuration feature, for configuring the condition of work of board, comprise the threshold value of each road simulating signal, the function of the function of enable and forbidding each road collection of simulant signal, whether storage of collected data (if not, then only do super threshold detection, not the data of storage of collected) etc.
3) Signal aspects function, can the simulating signal that gathers of each road of playback.
4) board measuring ability is started, the data acquisition of enable board and super threshold detection function.
5) function stopping board detecting.
Above-described embodiment, just in order to technical conceive of the present invention and feature are described, its objective is and is one of ordinary skilled in the art can be understood content of the present invention and implement according to this, can not limit the scope of the invention with this.The change of every equivalence done by the essence of content of the present invention or modification, all should be encompassed in protection scope of the present invention.