Bus Communication Method of Test Instrument Measurement and Control System Based on CPLD
Through the bus communication method of the test instrument measurement and control system based on CPLD, the level digital signals of external devices are processed in segments, and the jump abnormality and distribution differences are calculated, which solves the problem of signal level detection in the prior art that cannot adapt to external device failures in time and The problem of changes in the communication environment has achieved accurate monitoring of peripheral functions and guaranteed system stability.
Patent Information
- Application Number
- CN202411571185.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-06
AI Technical Summary
In the prior art, signal level detection cannot timely adapt to the complexity and change in external equipment failure conditions and the variability of the communication environment, resulting in inaccurate analysis of peripheral functional status and poor communication effect.
Using the bus communication method of the test instrument measurement and control system based on CPLD, the level digital signal of the external device is obtained, and after segmentation processing, the degree of jump abnormality and distribution difference is calculated according to the number of level jump times and time distribution, and the jump is further obtained. Variable frequency abnormality and signal mutation degree to achieve accurate monitoring of peripheral functions.
Through segmented processing and abnormality calculation, signal abnormalities can be more accurately identified, the accuracy of peripheral functional status analysis can be improved, and the system stability and data acquisition accuracy can be ensured.
Smart Images

Figure CN119087894B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of signal data processing, and in particular to a bus communication method of a test instrument measurement and control system based on CPLD. Background Art
[0002] In the test instrument measurement and control system, complex programmable logic devices (CPLDs) can implement specific digital logic functions based on user-defined logic macro units and interconnection matrices through programming, and communicate with peripherals at high speed through parallel buses. However, due to problems such as signal interference, external devices may malfunction and affect communication quality. In order to ensure the accuracy and reliability of the system, CPLDs need to be able to effectively detect and handle these abnormal situations.
[0003] In the prior art, signal level detection is used to perform functional detection on external devices. By comparing the real-time level value of the peripheral signal with the preset empirical value, it is determined whether the peripheral is in a normal working state. However, since the commonly used signal level detection cannot adapt to the complex and changeable fault conditions of the external device in a timely manner, as well as the variability of the communication environment and other factors, the detection results are biased, the analysis of the functional status of the peripheral is inaccurate, and the communication effect is poor. Summary of the invention
[0004] In order to solve the technical problem that the commonly used signal level detection cannot timely adapt to the complex and changeable external device fault conditions, the variability of the communication environment and other factors, and the analysis of the peripheral function status is inaccurate, the purpose of the present invention is to provide a test instrument measurement and control system bus communication method based on CPLD, and the technical scheme adopted is as follows:
[0005] The present invention proposes a CPLD-based test instrument measurement and control system bus communication method, the method comprising:
[0006] Obtaining level digital signals from external devices in the system based on CPLD;
[0007] Obtain signal segmentation of the level digital signal; obtain the abnormality of the jumps in each signal segment according to the distribution of the number of level jumps in different signal segments; obtain the difference of the jump distribution of each signal segment according to the time distribution corresponding to the level jumps in each signal segment; obtain the abnormality of the jump frequency of each signal segment according to the abnormality of the jumps and the difference of the jump distribution;
[0008] Performing noise reduction processing on the signal segmentation to obtain noise-reduced signal segmentation of the signal segmentation; obtaining abnormal data in each noise-reduced signal segment according to the fluctuation characteristics of the data in different noise-reduced signal segments; obtaining the signal mutation degree of each noise-reduced signal segment according to the distribution characteristics of the abnormal data within the segment neighborhood of each noise-reduced signal segment;
[0009] According to the abnormality of the jump frequency of the real-time signal segment and the corresponding signal mutation degree, the abnormality of the peripheral function of the real-time signal segment is obtained; and the external device is monitored for abnormality according to the abnormality of the peripheral function.
[0010] Furthermore, the method for obtaining the abnormal degree of the jump includes:
[0011] According to the number of level jumps in different signal segments, all signal segments are clustered to obtain segment clustering clusters;
[0012] Obtaining the average of the number of level jumps of all signal segments in the segment cluster where each signal segment is located as the average number of level jumps corresponding to each signal segment;
[0013] According to the difference between the number of level jumps of each signal segment and the corresponding average number of level jumps, as well as the fluctuation degree of the number of level jumps within the corresponding segment clustering cluster, the abnormality degree of jumps of each signal segment is obtained. The difference in number is positively correlated with the abnormality degree of jumps, and the fluctuation degree of the number of level jumps is negatively correlated with the abnormality degree of jumps.
[0014] Furthermore, the method for obtaining the jump distribution difference includes:
[0015] For each signal segment, the time distances between all adjacent level jumps are obtained for clustering to obtain a time distance clustering cluster;
[0016] According to the difference in the number of elements, the difference in average time distance and the degree of fluctuation of time distance between the time distance clusters in the corresponding signal segment, the jump distribution difference of each signal segment is obtained. The difference in the number of elements and the difference in average time distance are positively correlated with the jump distribution difference, and the degree of fluctuation of time distance is negatively correlated with the jump distribution difference.
[0017] Furthermore, the method for obtaining the abnormality of the hopping frequency includes:
[0018] The product of the transition abnormality degree and the transition distribution difference of each signal segment is obtained, and normalized mapping is performed as the transition frequency abnormality degree of each signal segment.
[0019] Furthermore, the method for obtaining abnormal data includes:
[0020] The mean of the data in each noise reduction signal segment is obtained as the local data mean; the standard deviation of the data in all noise reduction signal segments is obtained as the overall data standard deviation;
[0021] The difference between the data in each noise reduction signal segment and the local data mean is obtained. If the difference result is greater than three times the overall data standard deviation, the corresponding data is regarded as abnormal data.
[0022] Furthermore, the method for obtaining the degree of signal mutation includes:
[0023] According to the distribution characteristics of abnormal data within the segmented neighborhood of each noise reduction signal segment, the local abnormal expression degree of each noise reduction signal segment and the overall abnormal expression degree within the segmented neighborhood are obtained; a first sum value of the overall abnormal expression degree and a preset constant is obtained, and a ratio of the local abnormal expression degree of each noise reduction signal segment to the first sum value is calculated as a first mutation coefficient;
[0024] Obtain the mean value of the number of abnormal data in all other noise reduction signal segments within the segmented neighborhood as the abnormal distribution amount within the segmented neighborhood; obtain the second sum of the abnormal distribution amount and a preset constant, and calculate the ratio of the number of abnormal data in each noise reduction signal segment to the second sum as the second mutation coefficient;
[0025] The first mutation coefficient and the second mutation coefficient are fused and normalized to obtain the signal mutation degree of each noise reduction segmented signal.
[0026] Furthermore, the step of obtaining the local abnormality performance of each noise reduction signal segment and the overall abnormality performance within the segment neighborhood includes:
[0027] According to the data difference between each abnormal data and the average abnormal data in each noise reduction signal segment, and the fluctuation degree of all abnormal data, the deviation degree of each abnormal data is obtained, the data difference is positively correlated with the deviation degree, and the fluctuation degree of the abnormal data is negatively correlated with the deviation degree;
[0028] Obtaining the degree of deviation of each abnormal data relative to the average abnormal data in each noise reduction signal segment;
[0029] Obtain the mean of the corresponding deviation degree of all abnormal data in each noise reduction signal segment as the local abnormal expression degree of each noise reduction signal segment;
[0030] The average of the local abnormal expression of all other noise-reduced signal segments within the segment neighborhood of each noise-reduced signal segment is obtained as the overall abnormal expression within the segment neighborhood.
[0031] Furthermore, the method for obtaining the degree of abnormality of the peripheral function includes:
[0032] The product of the hopping frequency abnormality of the real-time signal segment and the corresponding signal mutation degree is obtained and normalized as the peripheral function abnormality degree of the real-time signal segment.
[0033] Furthermore, the abnormality monitoring of the external device according to the abnormality degree of the peripheral function includes:
[0034] If the degree of peripheral function abnormality of the real-time signal segment is greater than a preset abnormal threshold, it is determined that the external device is abnormal.
[0035] Furthermore, K-means algorithm is used for clustering.
[0036] The present invention has the following beneficial effects:
[0037] The present invention obtains signal segmentation of a level digital signal, and segmentation processing helps to reduce computational complexity while maintaining local features of the signal; according to the distribution of the number of level jumps in different signal segments, the jump abnormality of each signal segment is obtained, and abnormal activities that may exist in the signal are identified; according to the time distribution corresponding to the level jump in each signal segment, the jump distribution difference of each signal segment is obtained, and the stability of the signal is further analyzed to identify whether there is an abnormal jump mode; according to the jump abnormality degree and jump distribution difference of each signal segment, the jump frequency abnormality of each signal segment is obtained, which helps to identify Those jumps that are both frequent and abnormally distributed can be identified to more accurately judge the operating status of the equipment; obtain the noise reduction signal segmentation of the signal segmentation; according to the fluctuation characteristics of the data in different noise reduction signal segments, the abnormal data in each noise reduction signal segment is obtained, reflecting the abnormal behavior or failure of the equipment; according to the distribution characteristics of the abnormal data in the segment neighborhood of each noise reduction signal segment, the signal mutation degree of each noise reduction signal segment is obtained, which is helpful to identify the signal that has changed significantly; further obtain the peripheral function abnormality degree of the real-time signal segmentation, reflecting the operating status and abnormality degree of the equipment; perform abnormal monitoring on the external equipment. The present invention obtains the accurate functional abnormality of the external equipment to ensure the stability of the system and the accuracy of data acquisition. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A flow chart of a bus communication method for a test instrument measurement and control system based on CPLD provided by an embodiment of the present invention;
[0040] Figure 2 A flow chart of a method for obtaining a jump abnormality degree provided by an embodiment of the present invention;
[0041] Figure 3 A flow chart of a method for obtaining the degree of information mutation provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the bus communication method of a test instrument measurement and control system based on CPLD proposed by the present invention, its specific implementation method, structure, characteristics and effects are as follows in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0043] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0044] The specific scheme of the bus communication method of the test instrument measurement and control system based on CPLD provided by the present invention is described in detail below with reference to the accompanying drawings.
[0045] See also Figure 1 , which shows a flow chart of a bus communication method of a test instrument measurement and control system based on CPLD provided by an embodiment of the present invention, and the specific method includes:
[0046] Step S1: Acquire a level digital signal of an external device in the system based on the CPLD.
[0047] In the embodiment of the present invention, in the test instrument measurement and control system, considering that the external device may have functional abnormalities that affect the stability of the system, high-speed data processing and logic control are implemented based on CPLD, and the signal change trend of the external device is analyzed; first, the CPLD connected to each external device in the test instrument measurement and control system structure of CPLD collects the input level signal of each external device;
[0048] It should be noted that since different external devices use different level standards, in order to uniformly process and transmit level signals, the level signals are converted into digital signals according to the corresponding communication protocols, and the level digital signals of the external devices in the system are obtained based on CPLD.
[0049] Step S2: Obtain signal segmentation of the level digital signal; obtain the abnormality of the jumps in each signal segment according to the distribution of the number of level jumps in different signal segments; obtain the difference in the jump distribution of each signal segment according to the time distribution corresponding to the level jumps in each signal segment; obtain the abnormality of the jump frequency of each signal segment according to the abnormality of the jumps and the difference in the jump distribution.
[0050] By segmenting the level digital signal, the signal can be divided into smaller parts, reducing the complexity of processing, making the data of each part more concentrated and clear, and helping to more accurately identify and analyze the characteristics of the signal. Therefore, the signal segmentation of the level digital signal is obtained; it should be noted that, in one embodiment of the present invention, the level digital signal is segmented according to the time interval of 1S to obtain the signal segmentation; in other embodiments of the present invention, the segmentation interval can be specifically set according to the specific situation, which is not limited or elaborated here.
[0051] Since the use process and function of the test instrument are relatively simple, when the external device is normal, the signal jump frequency is within a certain range; when the external device is abnormal, the peripheral signal is not very stable, resulting in jitter when the input level jumps, and it is difficult to maintain stability when maintaining high and low levels, resulting in additional level jumps. The distribution of the number of level jumps can be used to understand the changes in the signal in different ranges, reflecting the stability and reliability of the signal. Therefore, the degree of jump abnormality of each signal segment is obtained according to the distribution of the number of level jumps in different signal segments.
[0052] Preferably, in one embodiment of the present invention, the method for obtaining the degree of abnormal jump is described in Figure 2 , which shows a flow chart of a method for obtaining the degree of jump abnormality, including:
[0053] Step S201: clustering all signal segments according to the number of level jumps in different signal segments to obtain segment clustering clusters.
[0054] By clustering signal segments with similar level jump characteristics, it is helpful to identify abnormal signal segments.
[0055] It should be noted that, in the embodiment of the present invention, the K-means algorithm is used for clustering. Since the working state of the external device is divided into a data transmission stage and a sleep state, the value of K is set to 2 to obtain two clusters. The specific K-means algorithm is a technical means well known to those skilled in the art and will not be described in detail here.
[0056] Step S202: obtaining the average of the number of level transitions of all signal segments in the segment cluster where each signal segment is located as the average number of level transitions corresponding to each signal segment.
[0057] The average level of the number of level jumps within the segment cluster where each signal segment is located is quantified by averaging, so as to serve as a benchmark for subsequent data analysis.
[0058] Step S203: According to the difference between the number of level jumps of each signal segment and the corresponding average number of level jumps, and the fluctuation degree of the number of level jumps within the corresponding segment cluster, the jump abnormality degree of each signal segment is obtained. The number difference is positively correlated with the jump abnormality degree, and the fluctuation degree of the level jump number is negatively correlated with the jump abnormality degree.
[0059] Among them, the fluctuation degree reflects the discrete degree of the corresponding jump number of the signal segment within the segmented clustering cluster. The smaller the fluctuation degree, the more similar the jumps of the signal segments within the segmented clustering cluster, the more significant the difference, and the greater the jump abnormality; the larger the fluctuation degree, the lower the jump similarity of the signal segments within the segmented clustering cluster, the lower the significant difference, and the smaller the jump abnormality; the difference between the number of level jumps and the corresponding average level jump number reflects the jump deviation degree of the clustering cluster where the signal segment is located. The larger the difference in number, the greater the jump deviation degree, the more the level jump number is relative to the average level jump number, the more likely it is to exist in an abnormal situation, and the greater the jump abnormality; the smaller the difference in number, the smaller the jump deviation degree, the closer the level jump number is to the average level jump number, and the smaller the jump abnormality.
[0060] It should be noted that, in one embodiment of the present invention, the degree of fluctuation is expressed by calculating the standard deviation. The larger the standard deviation, the greater the degree of fluctuation, and the smaller the standard deviation, the smaller the degree of fluctuation. In other embodiments of the present invention, the variance and range can also be used to express the degree of fluctuation. The specific means are technical means well known to those skilled in the art and will not be elaborated here.
[0061] In one embodiment of the present invention, the formula for the degree of abnormal jump is expressed as:
[0062] ;
[0063] in, Indicates The degree of abnormal transition of each signal segment; Indicates Number of level transitions of each signal segment; Indicates The average level jump times of the segment clusters where the signal segments are located; Indicates The standard deviation of the number of level jumps within the segment cluster where the signal segment belongs, that is, the degree of fluctuation; Represents the normalization function.
[0064] In the formula for the degree of jump abnormality, It means calculating the difference between the number of level jumps of each signal segment and the corresponding average number of level jumps, that is, the number difference, and calculating the ratio of the number difference to the standard deviation of the number of level jumps in the corresponding segment cluster, reflecting the degree of deviation of the number of level jumps relative to the average number of jumps. The larger the ratio, the greater the deviation and the greater the abnormality of the jump.
[0065] It should be noted that, in the embodiment of the present invention, the normalization function is maximum and minimum value normalization, and the specific means are technical means well known to those skilled in the art and will not be elaborated here.
[0066] When an external device is abnormal, abnormal jumps often appear in a short period of time, making the distribution of level jumps more concentrated than in the normal state. Therefore, the time distribution is denser than that in the normal state. Therefore, the jump distribution difference of each signal segment is obtained according to the time distribution corresponding to the level jump in each signal segment.
[0067] Preferably, in one embodiment of the present invention, the method for obtaining the jump distribution difference includes:
[0068] For each signal segment, the time distances between all adjacent level jumps are obtained for clustering to obtain a time distance clustering cluster;
[0069] According to the difference in the number of elements, the difference in average time distance and the degree of fluctuation of time distance between the time distance clusters in the corresponding signal segment, the jump distribution difference of each signal segment is obtained. The difference in the number of elements and the difference in average time distance are positively correlated with the jump distribution difference, and the degree of fluctuation of time distance is negatively correlated with the jump distribution difference.
[0070] In one embodiment of the present invention, the formula for the jump distribution difference is expressed as:
[0071] ;
[0072] in, Indicates The difference in transition distribution of each signal segment; Indicates The number of time distance clusters within a signal segment; Indicates The number of elements in a time distance cluster; Indicates The number of elements in a time distance cluster; Indicates The average time distance within a time distance cluster; Indicates The average time distance within a time distance cluster; Indicates The standard deviation of the time distance within a time distance cluster, that is, the degree of fluctuation; Indicates The standard deviation of the time distance within a time distance cluster, that is, the degree of fluctuation; Represents the normalization function.
[0073] In the formula for jump distribution difference, Indicates the calculation The first The product of the difference in the number of elements and the difference in the average time distance between the time distance clusters is calculated, and the ratio of the product result to the degree of fluctuation is calculated; the greater the difference in the number of elements, the greater the difference in the average time distance, the greater the difference in the jump distribution, and the greater the difference in the jump distribution; the greater the fluctuation degree of the time distance cluster, the more uneven the time distance distribution, the less obvious the difference between the clusters, and the smaller the difference in the jump distribution; the smaller the fluctuation degree, the more even the time distance distribution, the more obvious the difference between the clusters, and the greater the difference in the jump distribution.
[0074] It should be noted that, in one embodiment of the present invention, the time distance is the time interval between adjacent level jumps; the number of time distance clustering clusters is set to 2; in other embodiments of the present invention, the number of time distance clustering clusters can be set according to specific circumstances, and is not limited or elaborated here.
[0075] The degree of jump abnormality can evaluate the stability and reliability of the signal during transmission. The higher the degree of jump abnormality, the more serious the interference or fault of the signal in the segment; jump distribution difference is a statistic that measures the symmetry of the signal jump distribution. When the signal jump distribution difference is large, it means that the jump is unevenly distributed in time. There may be frequent jumps in some time periods, while the jumps are reduced in other time periods; jump frequency abnormality is an indicator calculated based on the comprehensive calculation of jump abnormality and jump distribution difference, which is used to quantitatively evaluate the abnormal situation of signal jump frequency. When the jump frequency abnormality is high, it means that the signal has obvious frequency instability or abnormal jump phenomenon during transmission. Therefore, according to the jump abnormality degree and jump distribution difference of each signal segment, the jump frequency abnormality of each signal segment is obtained.
[0076] Preferably, in one embodiment of the present invention, the method for acquiring the abnormality of the hopping frequency includes:
[0077] The product of the transition abnormality degree and the transition distribution difference of each signal segment is obtained, and normalized mapping is performed as the transition frequency abnormality degree of each signal segment.
[0078] In one embodiment of the present invention, the formula for the abnormality of the hopping frequency is expressed as:
[0079] ;
[0080] in, Indicates The abnormality of the hopping frequency of each signal segment; Indicates The degree of abnormal transition of each signal segment; Indicates The difference in transition distribution of each signal segment; Represents the normalization function.
[0081] In the formula of the transition frequency abnormality, the greater the transition abnormality, the greater the difference in transition distribution, the greater the difference in the number of transitions, the more abnormalities caused by transitions, and the greater the transition frequency abnormality.
[0082] Step S3: performing noise reduction processing on the signal segment to obtain noise-reduced signal segmentation of the signal segmentation; obtaining abnormal data in each noise-reduced signal segment according to the fluctuation characteristics of the data in different noise-reduced signal segments; obtaining the signal mutation degree of each noise-reduced signal segment according to the distribution characteristics of the abnormal data within the segment neighborhood of each noise-reduced signal segment.
[0083] Since the signal is affected by various noises and interferences, the signal quality is low. Noise reduction can effectively remove noise and interference, improve signal clarity and accuracy, and perform noise reduction processing on signal segments to obtain noise-reduced signal segments. It should be noted that the signal is denoised based on the built-in signal noise reduction logic of CPLD to obtain noise reduction information segments for each signal segment.
[0084] By analyzing the fluctuation characteristics of the data, the true situation of the signal can be reflected, and abnormal data that is inconsistent with the overall situation can be identified, which is helpful for subsequent analysis of signal abnormalities; according to the fluctuation characteristics of the data in different noise reduction signal segments, the abnormal data in each noise reduction signal segment is obtained.
[0085] Preferably, in one embodiment of the present invention, the method for acquiring abnormal data includes:
[0086] The mean of the data in each noise reduction signal segment is obtained as the local data mean; the standard deviation of the data in all noise reduction signal segments is obtained as the overall data standard deviation;
[0087] The difference between the data in each noise reduction signal segment and the local data mean is obtained. If the difference result is greater than three times the overall data standard deviation, the corresponding data is regarded as abnormal data.
[0088] It should be noted that the three-times variance criterion is used to evaluate the abnormal distribution of data. The specific means are well known to those skilled in the art and will not be elaborated here.
[0089] When the level of the external device jumps, it will affect the analyzed signal value, resulting in greater noise interference and affecting the stability of the signal; by analyzing the distribution characteristics of the abnormal data within the segmented neighborhood, the degree of fluctuation deviation of the abnormal data within the segmented neighborhood can be more accurately reflected; according to the distribution characteristics of the abnormal data within the segmented neighborhood of each noise reduction signal segment, the degree of signal mutation of each noise reduction signal segment is obtained.
[0090] Preferably, in one embodiment of the present invention, the method for obtaining the degree of information mutation can be found in Figure 3 , which shows a flow chart of a method for obtaining the degree of information mutation, including:
[0091] Step S301: According to the distribution characteristics of abnormal data within the segment neighborhood of each denoised signal segment, the local abnormal expression of each denoised signal segment and the overall abnormal expression within the segment neighborhood are obtained; a first sum of the overall abnormal expression and a preset constant is obtained, and the ratio of the local abnormal expression of each denoised signal segment to the first sum is calculated as the first mutation coefficient.
[0092] There are significant differences between abnormal data and normal data. By analyzing the distribution of abnormal data, we can reflect the degree to which the signal is affected by the abnormality, and obtain the local abnormality expression degree and the overall abnormality expression degree, which is helpful to quantify the abnormal expression of each noise reduction signal segment area.
[0093] Preferably, in one embodiment of the present invention, obtaining the local abnormality performance of each noise reduction signal segment and the overall abnormality performance within the segment neighborhood includes:
[0094] According to the data difference between each abnormal data and the average abnormal data in each noise reduction signal segment, and the fluctuation degree of all abnormal data, the deviation degree of each abnormal data is obtained, the data difference is positively correlated with the deviation degree, and the fluctuation degree of the abnormal data is negatively correlated with the deviation degree;
[0095] Obtain the mean of the corresponding deviation degree of all abnormal data in each noise reduction signal segment as the local abnormal expression degree of each noise reduction signal segment;
[0096] The average of the local abnormal expression of all other noise-reduced signal segments within the segment neighborhood of each noise-reduced signal segment is obtained as the overall abnormal expression within the segment neighborhood.
[0097] In one embodiment of the present invention, the formula for the overall abnormal expression is expressed as:
[0098] ;
[0099] ;
[0100] in, Indicates The overall abnormal expression within the segment neighborhood of the noise-reduced signal segment; Indicates The local abnormality representation of each noise-reduced signal segment; Indicates The number of noise reduction signal segments within the segment neighborhood of the noise reduction signal segment; Indicates The local abnormality representation of each noise-reduced signal segment; Indicates The number of abnormal data in a noise reduction signal segment; Indicates Abnormal data; Indicates The mean of the abnormal data in the noise reduction signal segment, that is, the average abnormal data; Represents the standard deviation of the data in all noise reduction signal segments, that is, the overall data standard deviation.
[0101] In the formula for overall abnormal expression, represents three times the overall data standard deviation; It means calculating the difference between each abnormal data and the average abnormal data in each noise reduction signal segment, that is, the data difference, and the ratio of the data difference to three times the overall data standard deviation, that is, the degree of deviation. The smaller the standard deviation, the more uniform the distribution table of the abnormal data, the greater the difference, the greater the difference between each abnormal data and the average abnormal data, the more significant the feature, the greater the local abnormal expression; the greater the overall abnormal expression.
[0102] It should be noted that, in one embodiment of the present invention, the method for obtaining the segmented neighborhood range is based on each noise reduction signal segment and a range composed of a preset number of historical noise reduction signal segments, and the preset number is 100; in other embodiments of the present invention, the size of the segmented neighborhood range is a technical means well known to those skilled in the art, and is not limited or elaborated here.
[0103] Step S302: Obtain the mean value of the number of abnormal data in all other noise reduction signal segments within the segmented neighborhood as the abnormal distribution amount within the segmented neighborhood; obtain the second sum of the abnormal distribution amount and a preset constant, and calculate the ratio of the number of abnormal data in each noise reduction signal segment to the second sum as the second mutation coefficient.
[0104] The average number of abnormal data in the segmented neighborhood is quantified by the mean method, which helps to evaluate the distribution of abnormal data in the neighborhood and compare the number of abnormal data in different segments within the neighborhood. The larger the average number, the more abnormal data there are in the segmented neighborhood and the larger the abnormal distribution.
[0105] The second mutation coefficient can reflect the degree of deviation of the number of abnormal data in a denoised segmented signal relative to the number of abnormal data in the segmented neighborhood. The larger the number of abnormal data in each denoised signal segment is than the overall abnormal distribution, the greater the degree of abnormal performance in the corresponding signal and the larger the second mutation coefficient.
[0106] Step S303: The first mutation coefficient and the second mutation coefficient are merged and normalized to obtain the signal mutation degree of each noise reduction segmented signal.
[0107] It should be noted that, in some embodiments of the present invention, the first mutation coefficient and the second mutation coefficient are fused by addition or multiplication. The specific means are well known to those skilled in the art and will not be elaborated here.
[0108] In one embodiment of the present invention, the formula for the degree of signal mutation is expressed as:
[0109] ;
[0110] in, Indicates the degree of signal mutation for each noise reduction signal segment; Indicates the local abnormality expression of each noise reduction signal segment; Indicates the overall abnormal expression within the segment neighborhood; Indicates the number of abnormal data in each noise reduction signal segment; Indicates the amount of abnormal distribution within the segmented neighborhood; represents the normalization function; It indicates a preset constant. To avoid the denominator of the formula being 0, the empirical value is 0.01.
[0111] In the formula for the degree of signal mutation, It means calculating the sum of the overall abnormal performance and the preset constant, that is, the first sum value. It means calculating the ratio of the local abnormal expression degree and the first sum value of each noise reduction segment signal as the first mutation coefficient. The larger the local abnormal expression degree is relative to the overall abnormal expression degree, the more likely there are more abnormalities in the corresponding noise reduction signal segment, and the greater the signal mutation degree; It means calculating the sum of abnormal distribution and preset constant, that is, the second sum value. It means calculating the ratio of the number of abnormal data in each noise reduction segmented signal to the second sum value as the second mutation coefficient. The larger the second mutation coefficient is, the more abnormal data there are, the more abnormalities there are, and the greater the degree of signal mutation.
[0112] Step S4: Obtain the degree of peripheral function abnormality of the real-time signal segment according to the degree of abnormality of the jump frequency of the real-time signal segment and the degree of the corresponding signal mutation; and perform abnormal monitoring on the external device according to the degree of abnormality of the peripheral function.
[0113] When an external device fails or is subject to external interference, the signal frequency will jump abnormally. The jump frequency abnormality reflects the degree of abnormal frequency jump of the signal within the time range. The greater the jump frequency abnormality, the greater the possibility of external device abnormality. The signal mutation degree reflects the fluctuation of signal changes. The greater the signal mutation degree, the more unstable the signal of the external device. The greater the fluctuation, the more likely the external device will have an abnormal situation. The jump frequency abnormality and signal mutation degree are combined to more comprehensively evaluate the peripheral function abnormality of the real-time signal segment. Therefore, the peripheral function abnormality of the real-time signal segment is obtained according to the jump frequency abnormality of the real-time signal segment and the corresponding signal mutation degree.
[0114] Preferably, in one embodiment of the present invention, the method for obtaining the degree of abnormality of peripheral function includes:
[0115] The product of the jump frequency abnormality of the real-time signal segment and the corresponding signal mutation degree is obtained and normalized as the peripheral function abnormality degree of the real-time signal segment.
[0116] In one embodiment of the present invention, the formula for the degree of abnormality of peripheral function is expressed as:
[0117] ;
[0118] in, Indicates real-time signal segmentation The degree of abnormality of peripheral functions; Indicates real-time signal segmentation The abnormality of the jump frequency; Indicates real-time signal segmentation The corresponding signal mutation degree; Represents the normalization function.
[0119] In the formula of peripheral function abnormality, the greater the jump frequency abnormality, the greater the signal mutation degree, that is, the more unstable the jump, the more abnormal data there is, and the greater the degree of peripheral function abnormality.
[0120] The external function abnormality can help understand the operating status and performance change trend of the device, and help to timely discover abnormal changes in device performance. The greater the external function abnormality, the more unstable the signal change of the external device, and the more likely it is to be abnormal. Monitor external devices for abnormalities based on the external function abnormality.
[0121] Preferably, in one embodiment of the present invention, the external device is monitored for abnormality according to the degree of abnormality of the peripheral function, including:
[0122] If the degree of peripheral function abnormality of the real-time signal segment is greater than a preset abnormal threshold, it is determined that the external device is abnormal.
[0123] It should be noted that, in one embodiment of the present invention, the size of the preset abnormal threshold is set to 0.67; in other embodiments of the present invention, the size of the preset abnormal threshold can be set according to specific circumstances, which is not limited or elaborated here.
[0124] After determining that there is an abnormal external device, an abnormal alarm is generated through the CPLD connected to the peripheral device, which is used for device alarm and abnormality tracing, avoiding detection errors caused by functional abnormalities of the peripheral module in the test instrument, and helping to improve the communication speed of the peripheral device while ensuring the communication quality of the peripheral device.
[0125] In summary, the present invention obtains the abnormal degree of jumps in each signal segment according to the distribution of the number of level jumps in different signal segments; obtains the difference in jump distribution of each signal segment according to the time distribution corresponding to the level jumps in each signal segment; and then obtains the abnormal degree of jump frequency of each signal segment; obtains the noise reduction signal segment of the signal segment; obtains the abnormal data in each noise reduction signal segment according to the fluctuation characteristics of the data in different noise reduction signal segments; obtains the signal mutation degree of each noise reduction signal segment according to the distribution characteristics of the abnormal data within the segment neighborhood of each noise reduction signal segment; and then obtains the abnormal degree of peripheral function of the real-time signal segment; and performs abnormal monitoring on external devices. The present invention obtains the accurate functional abnormality of external devices to ensure the stability of the system and the accuracy of data acquisition.
[0126] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0127] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A bus communication method for a test instrument measurement and control system based on CPLD, characterized in that: The method comprises: Acquire the level digital signal of external devices in the system based on CPLD; Obtain signal segmentation of a level digital signal; obtain the abnormality of the jumps in each signal segment according to the distribution of the number of level jumps in different signal segments; obtain the difference of the jump distribution of each signal segment according to the time distribution corresponding to the level jumps in each signal segment; obtain the abnormality of the jump frequency of each signal segment according to the abnormality of the jumps and the difference of the jump distribution of each signal segment; Performing noise reduction processing on the signal segmentation to obtain noise-reduced signal segmentation of the signal segmentation; obtaining abnormal data in each noise-reduced signal segment according to the fluctuation characteristics of the data in different noise-reduced signal segments; obtaining the signal mutation degree of each noise-reduced signal segment according to the distribution characteristics of the abnormal data within the segment neighborhood of each noise-reduced signal segment; According to the abnormality of the jump frequency of the real-time signal segment and the corresponding signal mutation degree, the abnormality of the peripheral function of the real-time signal segment is obtained; and the external device is monitored for abnormality according to the abnormality of the peripheral function; The method for obtaining the degree of abnormal jump includes: According to the number of level jumps in different signal segments, all signal segments are clustered to obtain segment clustering clusters; Obtaining the average of the number of level jumps of all signal segments in the segment cluster where each signal segment is located as the average number of level jumps corresponding to each signal segment; According to the difference between the number of level jumps of each signal segment and the corresponding average number of level jumps, as well as the fluctuation degree of the number of level jumps in the corresponding segment cluster, the abnormality degree of jumps of each signal segment is obtained. The difference is positively correlated with the abnormality degree of jumps, and the fluctuation degree of the number of level jumps is negatively correlated with the abnormality degree of jumps. The method for obtaining the jump distribution difference includes: For each signal segment, the time distances between all adjacent level jumps are obtained for clustering to obtain a time distance clustering cluster; According to the difference in the number of elements, the difference in average time distance and the fluctuation degree of time distance between the time distance clusters in the corresponding signal segment, the jump distribution difference of each signal segment is obtained. The difference in the number of elements and the difference in average time distance are positively correlated with the jump distribution difference, and the fluctuation degree of time distance is negatively correlated with the jump distribution difference. The method for obtaining the abnormality of the hopping frequency includes: The product of the transition abnormality degree and the transition distribution difference of each signal segment is obtained, and normalized mapping is performed to obtain the transition frequency abnormality degree of each signal segment; The method for obtaining abnormal data includes: The mean of the data in each noise reduction signal segment is obtained as the local data mean; the standard deviation of the data in all noise reduction signal segments is obtained as the overall data standard deviation; Obtain the difference between the data in each noise reduction signal segment and the local data mean. If the difference result is greater than three times the overall data standard deviation, the corresponding data is regarded as abnormal data. The method for obtaining the degree of signal mutation includes: According to the distribution characteristics of abnormal data within the segmented neighborhood of each noise reduction signal segment, the local abnormal expression degree of each noise reduction signal segment and the overall abnormal expression degree within the segmented neighborhood are obtained; a first sum value of the overall abnormal expression degree and a preset constant is obtained, and a ratio of the local abnormal expression degree of each noise reduction signal segment to the first sum value is calculated as a first mutation coefficient; Obtain the mean value of the number of abnormal data in all other noise reduction signal segments within the segmented neighborhood as the abnormal distribution amount within the segmented neighborhood; obtain the second sum of the abnormal distribution amount and a preset constant, and calculate the ratio of the number of abnormal data in each noise reduction signal segment to the second sum as the second mutation coefficient; The first mutation coefficient and the second mutation coefficient are merged and normalized to obtain the signal mutation degree of each noise reduction segmented signal; The step of obtaining the local abnormality performance of each noise reduction signal segment and the overall abnormality performance within the segment neighborhood includes: According to the data difference between each abnormal data and the average abnormal data in each noise reduction signal segment, and the fluctuation degree of all abnormal data, the deviation degree of each abnormal data is obtained, the data difference is positively correlated with the deviation degree, and the fluctuation degree of the abnormal data is negatively correlated with the deviation degree; Obtaining the degree of deviation of each abnormal data relative to the average abnormal data in each noise reduction signal segment; Obtain the mean of the corresponding deviation degree of all abnormal data in each noise reduction signal segment as the local abnormal expression degree of each noise reduction signal segment; The average of the local abnormal expression of all other noise-reduced signal segments within the segment neighborhood of each noise-reduced signal segment is obtained as the overall abnormal expression within the segment neighborhood.
2. According to a CPLD-based test instrument measurement and control system bus communication method according to claim 1, it is characterized in that: The method for obtaining the degree of abnormality of the peripheral function includes: The product of the hopping frequency abnormality of the real-time signal segment and the corresponding signal mutation degree is obtained and normalized as the peripheral function abnormality degree of the real-time signal segment.
3. The bus communication method of a test instrument measurement and control system based on CPLD according to claim 1 is characterized in that: The abnormality monitoring of the external device according to the abnormality degree of the peripheral function includes: If the degree of peripheral function abnormality of the real-time signal segment is greater than a preset abnormal threshold, it is determined that the external device is abnormal.
4. The bus communication method of a test instrument measurement and control system based on CPLD according to claim 1 is characterized in that: K-means algorithm is used for clustering.
Citation Information
Patent Citations
Unmanned aerial vehicle frequency hopping signal detection and identification method based on clustering analysis
CN110334591A
Decoding method and device for FM0 coded data, and reader-writer
CN111510151A