Disclosure of Invention
The invention aims to provide a self-learning self-adaptive novel vibration sensing device which has strong reliability and adaptability.
The technical aim of the invention is realized by the following technical scheme:
A self-learning adaptive novel vibration sensing device comprising:
the vibration sensing element is used for sensing vibration and transmitting a sensed vibration signal to the singlechip processor;
the single chip microcomputer processor is used for data processing, the data processing process comprises the steps of receiving a vibration signal transmitted by the vibration sensing element, comparing the vibration signal with the signal model, judging that the vibration signal is an effective signal when the vibration signal is matched with the signal model, and judging that the vibration signal is an ineffective signal when the vibration signal is not matched with the signal model;
the sensitivity adjustment setting switch is used for receiving a sensitivity adjustment instruction and transmitting a sensitivity adjustment signal to the singlechip processor according to the instruction so that the singlechip processor can realize the adjustment of the sensitivity;
the signal matching result display circuit is used for receiving the data information sent by the singlechip processor and displaying the data information;
A data storage circuit for storing data;
The vibration sensing element, the sensitivity adjusting and setting switch, the signal matching result display circuit and the data storage circuit are respectively and electrically connected with the singlechip processor.
In a preferred embodiment, the vibration sensor further comprises a lightning protection and static electricity protection circuit for realizing lightning protection and static electricity protection, wherein the lightning protection and static electricity protection circuit is arranged between the singlechip processor and the vibration sensing element.
In a preferred embodiment, the vibration sensor further comprises a signal filtering circuit for filtering the vibration signal, wherein the signal filtering circuit is arranged between the singlechip processor and the vibration sensing element.
In a preferred embodiment, the vibration signal processing device further comprises a waveform extension circuit for extending the waveform of the vibration signal proportionally so that the narrow signal is changed into a wide signal, and the waveform extension circuit is arranged between the singlechip processor and the vibration sensing element.
In a preferred embodiment, the device further comprises a self-learning starting switch and an adaptive starting switch, wherein the self-learning starting switch and the adaptive starting switch are connected with the singlechip processor, and the self-learning starting switch is used for controlling the starting of a self-learning mode;
after the self-learning mode is started, receiving information of a plurality of signal waveforms, carrying out data statistics on the information of the plurality of signal waveforms, and establishing a signal model;
After the self-adaptive starting switch is started, counting the matching times of different signal models, finding out the signal model reaching the preset matching times or the preset matching times duty ratio, defining the signal model as a priority model, and carrying out matching comparison on the priority model in the subsequent matching process.
In a preferred embodiment, the vibration sensing device further comprises an output level switch for configuring a normally-open mode and a normally-closed mode of the vibration sensing device, and the output level switch is connected with the singlechip processor.
In a preferred embodiment, the system further comprises a working mode configuration switch for realizing the switching of working modes of different working scenes, wherein the working mode configuration switch is connected with the singlechip processor.
In a preferred embodiment, the vibration sensor further comprises a signal voltage comparison circuit for converting peak analog signals of the vibration signals into square wave signals, wherein the signal voltage comparison circuit is arranged between the vibration sensing element and the singlechip processor.
In a preferred embodiment, the process of comparing the vibration signal with the signal model by the singlechip processor comprises the following steps:
Recording the time width of each pulse, the time interval between adjacent pulses and the number of pulses of the square wave signal converted from the peak analog signal of the vibration signal;
And carrying out regression calculation on the time width of each pulse of the square wave signal and the time interval between adjacent pulses, when the time width of each pulse of the square wave signal and the time interval between adjacent pulses are in a preset range, adjusting the time width of each pulse of the square wave signal and the time interval between adjacent pulses to a preset value, generating a shaped signal according to the adjusted preset value, comparing the shaped signal with a signal model, judging that the vibration signal is an effective signal when the shaped signal is matched with the signal model, and judging that the vibration signal is an ineffective signal when the shaped signal is not matched with the signal model.
In a preferred embodiment, the singlechip processor further performs the steps of identifying a section with excessively high or excessively low pulse intensity in the square wave signal, defining the section as a suspected superposition section, cutting the square wave signal by taking end points at two ends of the suspected superposition section as references to form a sub-section, carrying out waveform extension on the sub-section, wherein the extension time is equal to the duration of the suspected superposition section to form a simulation signal, and comparing the simulation signal with the signal model.
Compared with the prior art, the invention realizes vibration sensing through the vibration sensing element, performs data processing by utilizing the singlechip processor, and realizes the adjustment of the sensitivity of the processor by utilizing the sensitivity adjustment setting switch. In the working process, the vibration sensing element is used for sensing the vibration signal, the vibration signal is sent to the singlechip processor, a trained signal model, namely a signal model conforming to the effective signal characteristics, is stored in the singlechip processor, the vibration signal is compared with the signal model, when the vibration signal is matched with the signal model, the vibration signal is judged to be an effective signal, and when the vibration signal is not matched with the signal model, the vibration signal is judged to be an ineffective signal, so that stable vibration signal identification can be realized, the influence of irrelevant vibration signals is avoided, and the singlechip processor has better stability. Meanwhile, the sensitivity is adjusted by the sensitivity adjusting setting switch, the sensitivity is mainly adjusted by adjusting the similarity of the vibration signal and the signal model when the vibration signal and the signal model are matched, the similarity of the vibration signal and the signal model is set to be higher when the sensitivity requirement is higher, and the similarity of the vibration signal and the signal model is set to be lower when the sensitivity requirement is lower, so that the vibration signal and the signal model have excellent adaptability.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
The present embodiment is only for explanation of the present invention and is not to be construed as limiting the present invention, and modifications to the present embodiment, which may not creatively contribute to the present invention as required by those skilled in the art after reading the present specification, are all protected by patent laws within the scope of claims of the present invention.
As shown in fig. 1, a self-learning adaptive novel vibration sensing device includes:
The vibration sensing element 1 is used for sensing vibration and transmitting a sensed vibration signal to the singlechip processor 2;
The singlechip processor 2 is realized by adopting a domestic singlechip STC8H8K64U and is used for data processing, the data processing process comprises the steps of receiving a vibration signal transmitted by the vibration sensing element 1, comparing the vibration signal with a signal model, judging the vibration signal as an effective signal when the vibration signal is matched with the signal model, and judging the vibration signal as an ineffective signal when the vibration signal is not matched with the signal model;
The sensitivity adjustment setting switch 3 is used for receiving a sensitivity adjustment instruction and transmitting a sensitivity adjustment signal to the singlechip processor 2 according to the instruction, so that the singlechip processor 2 realizes the adjustment of the sensitivity;
The signal matching result display circuit 4 is used for receiving the data information sent by the singlechip processor 2 and displaying the data information, wherein the data information comprises parameters such as pulse width, pulse number, pulse interval time and the like of signals and a matched preset signal model code number;
The data storage circuit 5 is realized by adopting W25Q32JVSSIQ SPI NOR Flash and is used for storing data, in particular to signal model data, measurement waveform data, statistical data, configuration information and the like which are built after self-learning;
the vibration sensing element 1, the sensitivity adjustment setting switch 3, the signal matching result display circuit 4 and the data storage circuit 5 are respectively and electrically connected with the singlechip processor 2.
The novel self-learning self-adaptive vibration sensing device of the embodiment realizes vibration sensing through the vibration sensing element 1, performs signal measurement, statistics and analysis by utilizing the singlechip processor, and realizes the adjustment of the sensitivity of the processor by utilizing the sensitivity adjustment setting switch 3. In the working process, firstly, a vibration sensing element 1 is utilized to sense a vibration signal, the vibration signal is sent to a singlechip processor 2, a trained signal model, namely a signal model conforming to effective signal characteristics, is stored in the singlechip processor 2, the vibration signal is compared with the signal model, when the vibration signal is matched with the signal model, the vibration signal is judged to be an effective signal, and when the vibration signal is not matched with the signal model, the vibration signal is judged to be an ineffective signal, so that stable vibration signal identification can be realized, the influence of irrelevant vibration signals is avoided, and the singlechip processor has good stability. Meanwhile, the sensitivity is adjusted by the sensitivity adjusting setting switch 3, the sensitivity is mainly adjusted by adjusting the similarity of the vibration signal and the signal model in matching, when the sensitivity requirement is higher, the similarity of the vibration signal and the signal model in matching is higher, and when the sensitivity requirement is lower, the similarity of the vibration signal and the signal model in matching is lower, so that the vibration signal and the signal model have excellent adaptability.
Further, the vibration sensing element 1 establishes a white list and a black list of signal waveforms along with the existing mature vibration sensing element 1 as a basic trigger source. In the use process, the vibration sensing device outputs correct electric signals according with the signals of the white list. And (5) carrying out statistics on signals conforming to the blacklist by the system, and giving out evaluation of the severity of the use environment. And under the condition that the system does not belong to a white list or a black list, the system establishes statistical data for further model research analysis and guiding on-site debugging personnel to carry out correct configuration setting.
Further, for signals that do not belong to either the white list or the black list, the following procedure is performed:
collecting data characteristics of the signals, wherein the data characteristics comprise the number of pulses, pulse width time, pulse interval and occurrence time, and the data characteristics are not limited to the data characteristics;
Counting the time law of the data characteristics, and eliminating interference sources according to the time law;
the number, pulse width time, pulse interval and occurrence time of the pulses generated by each trigger are counted and analyzed, and a similarity comparison algorithm is adopted to infer the possible missing report situation;
and updating the white list parameters according to a similarity comparison algorithm by combining with the judgment result of the report omission authenticity, so as to be confirmed by field debugging personnel.
Therefore, the complex manual debugging process is replaced by the above process. The method saves a great deal of manpower cost expenditure, has more comprehensive and reliable data result, namely, achieves the purpose that the more the equipment is used, the better the use of the equipment by running the parameter correction data with more accurate data calculation.
The novel self-learning self-adaptive vibration sensing device further comprises a lightning protection and static protection circuit 6 for achieving lightning protection and static protection, and the lightning protection and static protection circuit 6 is arranged between the single chip processor 2 and the vibration sensing element 1, so that the self-learning self-adaptive vibration sensing device is suitable for open field environments. The lightning protection and static electricity prevention protection circuit is composed of a gas discharge tube and a TVS tube.
Further, the vibration signal processing device further comprises a signal filtering circuit 7, wherein the signal filtering circuit 7 is used for filtering the vibration signal, the signal filtering circuit 7 is arranged between the singlechip processor 2 and the vibration sensing element 1, and electromagnetic interference is filtered through the signal filtering circuit 7, so that the working stability of the device is improved. The signal filter circuit 7 adopts a capacitance-inductance filter network to calculate the filter frequency and select proper parameters for realization.
Further, when the vibration sensing element 1 with higher sensitivity vibrates, the pulse width of the vibration waveform is only at the microsecond level, so that a waveform extension circuit 8 is further arranged and used for extending the waveform of the vibration signal in proportion, so that the narrow signal is changed into a wide signal, and the waveform extension circuit 8 is arranged between the singlechip processor 2 and the vibration sensing element 1, so that the measurement precision of the singlechip processor 2 is improved. The signal filter circuit 7 adopts a capacitance-inductance filter network to calculate the filter frequency and select proper parameters for realization.
Further, the purpose of waveform extension is to achieve a spike narrow pulse that would be difficult to achieve accurate measurement in a low cost manner, scale up of pulse width, and measurement of spike narrow pulse by measurement and calculation of wide pulse.
As shown in fig. 2, the waveform expansion circuit is realized by a diode D1, an energy storage inductance L1, a charging capacitor C1, and a discharging resistor R1. The diode D1, by utilizing the unidirectional conduction characteristic of the diode, the spike narrow pulse input by the connection terminal JP1 can charge the L1 and the C1 through the diode D1, so as to prevent the electric quantity on the L1 and the C1 from discharging reversely through the input end. The A-pin of the voltage comparator U1 is high-impedance input hardware, and the internal resistance is very large, so that the discharging mainly depends on a resistor R1, and the size of the resistor R1 determines the discharging speed.
The key point of the waveform extension circuit is that the length of the discharge time mainly depends on the resistance value of the resistor R1, and the main discharge effect of the resistor R1 is enhanced by the reverse high resistance of the resistor R1 and the high resistance design of the U1 input pin.
The magnitude of the resistance R1 can adjust the pulse width amplification degree.
By way of waveform comparison in fig. 3, waveform extension is actually an extension of the width of the discharge waveform. The magnitude of the comparison voltage can also affect the width of the square wave. In fig. 3, (1) is a schematic diagram of a narrow pulse, (2) is a waveform after passing through the charge-discharge network D1, L1, C1, R1 in fig. 2, and (3) is a square wave after being subjected to comparator voltage comparison shaping.
Further, the self-learning starting switch 9 and the self-adaptive starting switch 10 are further included and are used for setting a self-learning mode, a self-adaptive working mode and a common working mode, the self-learning starting switch 9 and the self-adaptive starting switch 10 are connected with the single chip microcomputer processor 2, and the self-learning starting switch 9 is used for controlling the starting of the self-learning mode.
After the self-learning mode is started, information of a plurality of signal waveforms is received, data statistics is carried out on the information of the plurality of signal waveforms, a signal model is built, in the self-learning mode, the singlechip processor 2 measures and records the time width (pulse time 1, pulse time 2.) of each pulse of a series of signal waveforms, the time interval (pulse interval time 1, pulse interval time 2.) between adjacent pulses and the number of pulses, the data statistics is carried out for a plurality of records, a basic model of the signal is built, and on the basis of the basic model, the comparison signal models of the corresponding pulse time widths, the pulse interval time and the number of pulses with different similarities are calculated. In the working mode, the measured signal waveform is compared with the comparison signal model, and whether the signal waveform is a valid waveform is judged.
After the adaptive start switch 10 is started, the matching times of different signal models are counted, a signal model reaching the preset matching times or the preset matching times duty ratio is found out, the signal model is defined as a priority model, and in the subsequent matching process, the priority model performs matching comparison preferentially. The method mainly aims at finding out the best matched signal comparison waveform model by counting the matching times of different basic waveform models in a self-adaptive mode, and dynamically adjusting the sensitivity of the system in a working mode, wherein the longer the operation, the more matched the model is, and the compatibility is sensitive and reliable. So that the applicability is wider and wider.
In the process of finding out the priority model, the priority model can be calculated according to the matching times, when a certain signal model is matched for more than a preset matching times, the priority model can be defined, or the priority model can be calculated according to the matching times ratio, and when the ratio of the times of the certain signal model to the total times reaches a preset ratio, the priority model can be defined.
Further, the vibration sensing device also comprises an output level switch 11, which is used for configuring a normally-open mode and a normally-closed mode of the vibration sensing device, and is compatible with two level output modes in the existing market, and the output level switch 11 is connected with the singlechip processor 2.
Further, the system further includes a working mode configuration switch 12, configured to implement switching of working modes of different working scenarios, where the working mode configuration switch 12 is connected to the single-chip processor 2, the switching of the working modes is implemented by adjusting parameter configuration settings, different parameter configurations adapt to different application scenarios, and the working mode configuration switch 12 may be a toggle switch.
Further, the vibration sensor further comprises a signal voltage comparison circuit 13 for converting peak analog signals of the vibration signals into square wave signals, so that digital processing is facilitated, and the signal voltage comparison circuit 13 is arranged between the vibration sensing element 1 and the singlechip processor 2. The signal voltage comparison circuit 13 is designed based on the LM393 chip to form a signal voltage comparator.
Further, the reference voltage of the comparator is controlled and regulated by the singlechip, and the aim of positively regulating the sensitivity is fulfilled by dynamically controlling the reference voltage.
Further, the signal voltage comparison circuit is utilized to eliminate the influence of the load factor at the output end of the charge-discharge circuit. The reason is that the output end of the charge-discharge circuit needs to meet the requirement of switching in a higher load resistor to eliminate the discharge effect caused by too small load, and the combined use of the voltage comparator circuit solves the multiple purposes of the load requirement of the output end of the charge-discharge circuit and converting peak analog signals of vibration signals into square wave signals.
The process of comparing the vibration signal with the signal model by the singlechip processor 2 comprises the following steps:
S1, recording the time width of each pulse, the time interval between adjacent pulses and the number of pulses of a square wave signal converted from a peak analog signal of a vibration signal;
s2, carrying out regression calculation on the time width of each pulse of the square wave signal and the time interval between adjacent pulses, wherein the regression calculation process is to adjust the time width of each pulse of the square wave signal and the time interval between adjacent pulses to a preset value when the time width of each pulse of the square wave signal and the time interval between adjacent pulses are in a preset range, and generating a shaped signal according to the adjusted preset value,
And comparing the shaped signal with the signal model, judging the vibration signal as an effective signal when the shaped signal is matched with the signal model, and judging the vibration signal as an ineffective signal when the shaped signal is not matched with the signal model.
In practice, when adjusting the time width of each pulse of the square wave signal and the time interval between adjacent times, a plurality of adjustment processes may be involved, specifically, for each signal model, adjustment values for the signal model a, the signal model B, the signal model C, the signal model D, the signal model E and the signal model F are set, and then, for example, adjustment values for the signal model a, the signal model B, the signal model C, the signal model D, the signal model E and the signal model F are set, respectively.
In this embodiment, a signal model is taken as an example, referring to fig. 4, which has pulse width time 1, pulse width time 2 and pulse width time 3, pulse interval time 1 and pulse interval time 2, pulse width time 1, pulse width time 2 and pulse width time 3 are respectively 200ms, 100ms and 130ms, pulse interval time 1 and pulse interval time 2 are respectively 230ms and 390ms, when square wave signal processing is performed, for the signal model, when the first pulse width time of the square wave signal is in the range of 190-210ms, the pulse width time thereof is adjusted to 200ms, when the second pulse width time of the square wave signal is in the range of 95-105ms, the pulse width time thereof is adjusted to 100ms, when the third pulse width time of the square wave signal is in the range of 125-135ms, the first pulse width time thereof is adjusted to 230ms, and when the first pulse interval time of the square wave signal is in the range of 220-240ms, the second pulse interval time of the square wave signal is in the range of 390-400 ms. Through the adjustment process, the square wave signal can be directly processed into a state capable of being directly compared with the signal model, when the processed square wave signal is consistent with the signal model, the signal is indicated to be an effective signal aiming at the signal model, and when the processed square wave signal is inconsistent with the signal model, the signal is indicated to be an ineffective signal aiming at the signal model.
Through the above process, the difficulty of similarity judgment is simplified, and the square wave signal can be directly compared with the signal model after being processed. Meanwhile, direct parameter control similarity judgment can be achieved, namely, the sensitivity of the sensing device can be adjusted by adjusting the inclusion range of the pulse width time and the pulse interval time, when the sensitivity requirement is higher, the range interval is set narrower, and when the sensitivity requirement is lower, the range interval is set wider.
Further, before comparing the vibration signal with the signal model, the singlechip processor 2 further performs the steps of identifying a section with excessively high or excessively low pulse intensity in the square wave signal, defining the section as a suspected superposition section, cutting the square wave signal by taking the end points of the two ends of the suspected superposition section as references, forming a sub-section, carrying out waveform extension on the sub-section, wherein the extension time is equal to the duration of the suspected superposition section, forming a simulation signal, and comparing the simulation signal with the signal model.
The occurrence of a section of the square wave signal with too high or too low a pulse intensity indicates that the section may have a superposition of waves such that the pulse intensity is increased or decreased, and too high or too low means that the pulse intensity of one section is higher or lower than the pulse intensity of the other section and exceeds a certain range.
In order to realize splitting and identifying the superposition situation, the above processing steps are specially set, referring to fig. 5, the square wave signal is cut according to the above method, two sub-sections are respectively formed at two ends of the suspected superposition section 14, the two sub-sections are defined as a first sub-section 15 and a second sub-section 16, the two sub-sections are subjected to waveform expansion, the time of the expansion is equal to the time of the first superposition section, a first simulation signal 17 and a second simulation signal 18 are formed, the dotted line part in the figure is the part obtained by expansion, the first simulation signal 17 and the second simulation signal 18 are the deduced waveform signals, and when the vibration signal is identified, the square wave signal which is not cut is respectively matched with the first simulation signal 17 and the second simulation signal 18 with the signal model, so that the possible superposition signal is split and identified, the rejection of the square wave signal can not be caused, and the signal detection is more complete and accurate.
In this embodiment, the stretching process of the segmented and waveform stretching circuits is significantly different, and should not be confused.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, elements defined by the phrases "including" or "comprising" do not exclude the presence of additional elements in a process, method, article, or terminal device that includes the elements. In addition, herein, "greater than", "less than", "exceeding" and the like are understood to exclude the present number, and "above", "below", "within" and the like are understood to include the present number.
The embodiments described above are intended to facilitate a person of ordinary skill in the art in order to make and use the present invention, it will be apparent to those skilled in the art that various modifications may be made to the embodiments and that the general principles described herein may be applied to other embodiments without the need for inventive faculty. Therefore, the present invention is not limited to the above-described embodiments, and those skilled in the art, based on the present disclosure, should make improvements and modifications without departing from the scope of the present invention.