Method for signal verification and device for carrying out the method
Patent Information
- Application Number
- DE102010064205
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2010-12-27
- Publication Date
- 2025-08-07
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
The present invention relates to a method for checking the correct transmission and / or validity of a periodic analog signal transmitted from a transmitter to a receiver. Furthermore, an apparatus for carrying out the method is described. For example, a signal transmitted from a measuring device to an evaluation unit is checked.In process measurement technology, frequently used are measuring devices which transmit their measured value in the form of an analog signal to a subsequent control or monitoring unit. During the transmission of the measurement signal, errors can occur, for example, as a result of the coupling in of interference signals or damage to a cable serving for transmission. Furthermore, errors can occur in the measuring device itself, which for example result in a static measurement signal no longer changing its value despite a change in the measurement value or in a dynamic signal having a frequency deviating from a setpoint frequency. This is then an invalid signal. If these errors are not detected, the measurement signal can be incorrectly interpreted and subsequent units which use the measurement signal as a control signal can carry out the incorrect function, which can have serious consequences. For example, an unsignaled reaching of a maximum fill level of a medium in a container may result in the container overflowing, since the corresponding safety function, e.g. the closing of an inlet, has not occurred. In particular in areas which must meet high safety standards, checking the correct transmission and the validity of a signal is therefore expedient. The checking of an analog signal is hardly possible for direct current and is possible for alternating current, for example by sampling the edges of the analog signal to determine the frequency, but involves a high amount of hardware and computing effort.The object of the invention is to provide a method which allows the efficient checking of the correct transmission and the validity of an analog signal, and to provide a device for carrying out the method.The object is achieved by a method for checking the correct transmission and / or the validity of a periodic analog signal which is transmitted as a transmission signal from a transmitter to a receiver from which it is received as a reception signal, wherein the reception signal is sampled and digitized at a sampling rate by assigning to the respectively sampled value a bit which is set to one or zero relative to a fixed threshold value as a function of the sampled value, wherein the bit is supplied to a test variable having n digits, wherein the number n of digits is selected and / or adapted to the sampling rate and / or the frequency of the signal such that the digitized values of at least one period of the signal can be stored in the test variable, wherein the test variable is compared bit by bit with a reference variable which has the same number n of digits as the test variable, and which corresponds to a transmission signal digitized in the same manner as the received signal by checking the value of the ith position of the test variable with the value of the ith position of the reference variable for identity and determining a correlation value as the sum of all identities, wherein the test variable and the reference variable are displaced stepwise relative to one another by a total of at least one period of the transmission signal and the respective correlation value is determined, wherein the maximum of the correlation values determined over at least one period is determined, and wherein a statement about the transmission and / or the validity of the signal is made on the basis of the maximum of the correlation values.With the method according to the invention, both alternating current signals and direct current signals can be checked, wherein an alternating current signal is modulated onto a direct current signal for checking, on the basis of which also the correct transmission of the direct current signal and the validity of the direct current signal can be controlled. A valid signal is understood to mean a signal which was correctly generated and thus carries and transmits the correct information. The periodic transmit signal has a nominal low level and a nominal high level with any pulse duration-to-pause duration ratio and a particular frequency. For example, it is a square-wave signal. With the method according to the invention, both an erroneous pulse duration-pause duration ratio, which indicates an error or a disturbance in the transmission, and an erroneous frequency of the signal, which indicates an error in the generation and thus the invalidity of the transmitted signal, can be detected.The received signal is sampled and digitized with a sampling frequency, wherein only one bit is provided for the digitalization, i.e. it is merely checked whether the sampled value is above or below a predefined threshold value and the bit is occupied accordingly. The digitized values are successively supplied to a test variable having n positions in order to compare the sequence thus created with a reference sequence stored in a reference variable having n positions as well. The reference sequence corresponds to a transmit signal digitized in the same manner as the receive signal. If the transmission signal has been transmitted correctly, the sequence stored in the test variable corresponds to the sequence stored in the reference variable with a specific phase shift. The two variables are compared by checking the mutually corresponding sites for identity. The number of matching bits is referred to as correlation value below.Since the phase shift between the bit sequence of the test variable relative to that of the reference variable is not known, the correlation value is determined not only once but several times in succession. The two variables are shifted with respect to one another, or one variable is shifted relative to the other variable, so that the phase shift changes. Overall, the shift is carried out by at least one period, so that the two variables are in phase at least once and the maximum possible correlation value is thus present. This is determined from all correlation values determined and used for evaluation with respect to the correct signal transmission and / or validity of the signal. The higher the maximum of the correlation values, the higher the agreement of the transmission signal with the reception signal. The more the maximum of the correlation values deviates from n, the more erroneous is the signal transmission or the transmission signal is already erroneous.The method contributes to the system comprising transmitter and receiver to fulfil predetermined safety standards such as a specific safety integrity level (SIL) or a specific performance level (PL). The method is suitable in particular for systems which are designed for the highest safety levels, for example SIL 3 or PL e. The solution according to the invention enables a rapid checking of the transmitted signal, so that a mistransmission or an error in the signal generation can be detected almost immediately and possible subsequent errors can be avoided. In addition, the method can be carried out with a small memory space, so that the space additionally required for the monitoring function in the electronics unit of the receiver, in particular in RAM and ROM, is small. In addition, the computing power required for carrying out the method is low. The method according to the invention therefore represents a very efficient solution for checking the correct signal transmission and / or the validity of a correctly transmitted signal.In a first embodiment of the solution according to the invention, the presence and / or the frequency and / or the quality of the signal is checked. All these quantities can be checked on the basis of the correlation value. The signal may not be present, for example, if the periodic signal is modulated onto a DC signal and fails to be modulated due to a fault in the electronics unit of the transmitter. The test variable then generally contains only zeroes. The quality of the transmitted signal can be recognized from whether the signal is at the high level or the low level at the expected point. If this is not the case, the amplitude of the signal has dropped or interference signals have been injected. In the sampled digitized signal, i.e. in the test variable, a low signal quality is therefore manifested as a bit error and is reflected in a reduced correlation value.In a further embodiment, the threshold value for the received signal is set by forming the arithmetic mean from a nominal high level and a nominal low level of the signal and setting the threshold value equal to the arithmetic mean. Preferably, the bit provided for digitizing the sampled values is set to zero when the sampled value is below the threshold and set to one when the sampled value is above the threshold.In one embodiment, the received signal is digitized by an analog-to-digital converter. This embodiment relates in particular to the case where the receiver has a microcontroller with an analog-to-digital converter.According to a further embodiment, the digitized values of the received signal are stored in the test variable according to the first-in-first-out principle. In other words, the test variable is filled by shifting the n bits one bit at a time to more significant digits, eliminating the most significant bit and re-setting the least significant digit, i.e., the 0th digit. After each sample and digitising the sampled value, the ith locations are shifted and the 0th location rewritten. The test variable obtained in this way is then used to determine the correlation with the reference variable.In one configuration of the method, the test variable is shifted relative to the reference variable or the reference variable is shifted relative to the test variable at a frequency which is higher than the sampling rate.A further embodiment of the method includes comparing the maximum of the correlation value with a fixed limit value, and generating an alarm signal when the limit value is undershot, which alarm signal indicates at least one error in the transmission and / or a disturbance of the signal and / or transmission signal. The level of the limit value is preferably set in such a way that low transmission errors or low coupled-in disturbances are tolerated.According to an advantageous embodiment of the method, the correlation values are stored in a correlation variable, wherein a current value of the correlation variable is overwritten if a newly determined correlation value is greater than a correlation value currently stored in the correlation variable, and wherein a newly determined correlation value is discarded if it is less than the correlation value currently stored in the correlation variable. The correlation variable thus always contains the maximum of all correlation values recorded hitherto for a specific occupancy of the test variable. The correlation variable is rewritten when the occupancy of the test variable changes, i.e., a new bit is supplied to the test variable, and the correlation for the changed test variable is determined. Overwriting the correlation variables saves memory space compared to storing all correlation values determined in one pass and subsequently determining the maximum.According to one embodiment of the method, in the case that the test variable essentially contains only one period of the signal, the mean value of at least two determined maxima of the correlation values is used for evaluation with respect to the transmission and / or validity of the signal. This leads to improved accuracy in the determination of the maximum of the correlation values.The object is furthermore achieved by a device for carrying out the method according to at least one of the described embodiments, wherein the transmitter is a field device and the receiver is an evaluation unit which receives and evaluates the analog signal of the field device, and wherein the evaluation unit carries out the checking of the correct transmission and / or the validity of the signal. An evaluation unit can also be assigned to a plurality of field devices and monitor the signal transmission for a plurality of field devices. The field device and the evaluation unit are components of the device for carrying out the method. The evaluation unit evaluates the received signal and the field device generates the transmitted signal such that it can be evaluated by the evaluation unit according to the described method.A field device is understood to mean any devices used, for example, in process or factory automation technology, which are used for detecting and / or influencing process variables. Measuring devices, such as fill level and / or density measuring devices, flow measuring devices, pressure and temperature measuring devices, pH measuring devices, conductivity measuring devices, etc., are used to record process variables, which measuring devices record the corresponding process variables fill level, density, flow rate, pressure, temperature, pH value, conductivity, etc. Actuators are used to influence the process variables, such as valves or pumps, by means of which, for example, the fill level of a medium in a container is regulated and / or controlled. The term "field devices" used in connection with the invention thus includes all types of measuring devices and actuators. Furthermore, in connection with the invention, all devices are referred to as field devices, which are used close to the process and which supply or process process relevant information. Besides measuring devices or sensors and actuators, field devices are generally also referred to as units which are directly connected to a field bus and are used for communication with the superordinate unit, such as remote I / Os, gateways or linking devices. A large number of such field devices are manufactured and sold by the Endress+Hauser group.The evaluation unit, which monitors the correct signal transmission and / or the validity of the transmitted signal, is arranged separately from the field device and is preferably located in a control room. For example, the evaluation unit is configured as an individual device, plug-in card or assembly of a plurality of plug-in modules. In one embodiment, the evaluation unit supplies the field device with energy. Preferably, energy transmission and communication take place via a 4-20 mA interface. In one embodiment, the field device is a measuring device which determines and / or monitors at least one process variable and forwards a signal representing the measured value to the evaluation unit. This evaluates the measured value and generates, for example, an alarm signal when predetermined limit values are exceeded or undershot, or controls actuators, such as pumps or valves, which are optionally adjusted to the measuring device. A signal of an actuator indicates, for example, the state of the actuator, e.g., the degree of opening of a valve. In one embodiment, the evaluation unit is a programmable logic controller (PLC). A plurality of sensors and actuators may be connected to the PLC, the actuators being controlled based on the measurements the PLC receives from the measurement devices.The invention is explained in more detail with reference to the following figures. FIG. 1 shows a flow chart of the method for checking the validity and / or the correct transmission of the signal; FIG. 2 ashows a periodic transmission signal and a corresponding reception signal with sampling instants; FIG. 2 bshows a reference variable corresponding to the transmission signal and test variables corresponding to the reception signal with different phase shifts; FIG. 3 schematically outlines a device for carrying out the method.FIG. 1 shows a flow chart of an embodiment of the method for checking the transmitted signal. The method is preferably carried out in directly successive runs, so that the transmitted signal is continuously monitored. Each pass begins with the sampling of the received signal and ends with the comparison of the maximum correlation value K max determined as a criterion for correct transmission or generation with a setpoint value or an admissible limit value G. For one pass, the time between two sampling processes is available. The sampling frequency f 2 thus specifies the time window which is available for ascertaining the maximum of the correlation values K max. The sampling rate f 2 is preferably a multiple of the frequency f 1 of the signal, e.g. 20 times, so that sufficient measured values are recorded for capturing the signal.In a first step of the method, the received signal is sampled and the sampled value is digitized. The received signal is not completely digitized, but only the values sampled at specific times are digitized. This is done by comparing the value with a threshold value and converting it into a binary digit depending on whether the sampled value exceeds the threshold value or not or whether it falls below the threshold value or not. This is effected, for example, by means of an analog / digital converter. The threshold value is preferably defined as an arithmetic mean of the nominal high and low levels of the signal.In a second step, the bit containing the sampled digitized value is supplied to a test variable s having n digits. In this case, all n bits of the test variable are shifted to the respectively next higher position, wherein the bit which is already at the highest position is omitted and is no longer taken into account. The resampled and digitized value is stored at the last location of the test variable s. The number n of points is preferably adapted at least to the frequency f 1 of the transmission signal in such a way that at least one period T 1 of the signal, preferably a plurality of periods, is encoded in the test variable s. Advantageously, the sampling rate f 2 is tuned to the length n of the test variable s and the frequency f 1 of the signal, so that as many sampling points as possible exist. However, the length n of the test variable s can also be adapted to the sampling rate f 2.The third step relates to the determination of a correspondence of the test variable s with a reference variable r and is divided into two repeating substeps. The reference variable r corresponds to a transmission signal digitized in the same way as the test variable s and thus contains a desired sequence for the values stored in the test variable s. The reference variable r comprises the same number of digits as the test variable s.In the first substep, the respectively ithelement of the test variable s is compared with the respectively ithelement of the reference variable r. In the comparison, it is determined whether the two bits stored at this location are identical or different. The comparison corresponds to an XNOR operation. This operation is performed for all n locations and the results are added to a so-called correlation value K x. This correlation value K x indicates the number of correlations and accordingly assumes a value between zero and n. The correlation value K x is preferably stored in a variable, the correlation variable.In the second substep, the test variable s and the reference variable r are shifted relative to one another, preferably by one bit. The value at the i-th position of the one variable then remains the same, while the value at the i-th position of the other variable is at the (i+1)-th position after the shift. In contrast to the shifting of the values in describing the test variable s, the most significant bit does not drop, but is shifted to the lowest place.The first and the second substep are repeated until the test variable s or the reference variable r-depending on which is being shifted-has been shifted by at least an entire period T 1 of the signal. In other words, the correlation values K x must have been determined for at least one entire period T 1. If the test variable s comprises, for example, 60 bits and contains three periods T 1, the correlation value K x is shifted by at least 20 times by one bit each and 20 times is determined for the 60 bit pairs each.In the fourth step, the maximum K max is determined from all correlation values K x determined in one pass. This step can be omitted if the correlation values K x are stored in a corresponding correlation variable only if they exceed the value stored there, so that the correlation variable always contains the maximum K max of the correlation values K x determined hitherto in one pass.In a fifth step, the maximum K max of the correlation values K x is compared with a predefined limit value G. If it is above the limit value G, the transmission signal and the reception signal are sufficiently well correlated, i.e. the signal transmission and / or the signal generation takes place sufficiently correctly. However, if the maximum determined is below the limit value G, there is an error in the signal transmission, significant interference signals have been injected, or the frequency of the generated signal does not match the expected frequency f1. In this case, it is not ensured that, for example, a measured value represented by the signal is correctly displayed or transmitted, for which reason an alarm signal is generated. The alarm signal is generated by the receiver of the signal, for example a process controller or an PLC. In one embodiment, the alarm signal controls an actuator as a safety measure. The limit value for the maximum K max of the correlation values, at the exceedance of which the signal is considered to be transmitted sufficiently correctly, is set to 2n / 3, for example, i.e. if two thirds of all the values converted into bits have been transmitted correctly, this is sufficient for a correct interpretation of the signal at the receiver. The value to which the limit value G is set depends on the fault tolerance in the respective application.In one embodiment of the method, steps one to four are repeated at least once, then the mean value of the maxima is formed and this mean value is compared with the limit value for the maximum correlation. This enables the maximum correlation to be determined more accurately in the case where only one period T 1 of the signal is stored in the test variable s.FIG. 2 ashows an analog received signal with sampling instants t x and the associated transmitted signal. In this example, the transmission signal is a square-wave signal having a pulse duration-pause duration ratio of 1:1, which is superimposed on a direct current. The direct current is a 4-20 mA signal and represents, for example, a measurement value of a measuring device. The square-wave signal is an auxiliary signal which serves for checking the signal representing the measured value of its own light. It can be seen from the presence of such a periodic signal superimposed on a static signal whether the static signal represents a measured value, for example, or is frozen to a non-representative value due to a malfunction in the transmitter. With the method according to the invention, not only the presence of the dynamic signal can be monitored, but also its characteristic variables such as, for example, the frequency. The sampling frequency f 2 is in this example four times as great as the frequency f 1 of the signal, i.e. the signal is sampled four times per period T 1. The sampling times t x are each spaced apart from one another by the period duration T 2. The signal shown was not transmitted completely correctly, as can be seen at the too short pause at sampling time t 6. The dashed line represents the threshold above which an analog value is digitized as 1 and below which it is digitized as 0.FIG. 2 b illustrates the determination of the maximum correlation value K max on the basis of the test variable s 1- s 4 created after the sampling time t 8 with n=8 locations each, which contain the last eight sampled and digitized values of the signal shown in FIG. 2 a. The test variable s 1 has emerged from the test variable created at the time t 7 by the values of the ith position being advanced to the (i+1)th position, where i=0,..., n-1, and the value at the (n-1)th position has dropped and the 0th position has been occupied with the value resampled and digitized at the time t 8. The test variable s 2 has emerged from the test variable s 1 by shifting all values by one bit to the left, with the binary digit at the (n-1)th position shifted to the 0th position. The test variables s 3, s 4 are likewise produced from the respective previous test variable s x-1 by shifting by one bit.Furthermore, the reference variable r is shown. This also has n=8 positions and corresponds to a digitized transmission signal. After each test variable s x the correlation value K x is given, which results as the sum of the results from an XNOR combination of the respectively i-th location of the test variable s x with the respectively i-th location of the reference variable r. The correlation value K x can assume values between zero and eight in this example.A phase shift of 180° is present between the test variable s 1 and the reference variable r. If the signal were transmitted completely correctly, the correlation value K 1 would be zero. As a result of the interference being coupled in, the binary digits respectively located at the third point of the test variable s 1 and of the reference variable r are identical, so that the correlation value K 1 is one.Between the test variable s 2 shifted by one bit with respect to the test variable s 1 and the reference signal r, there is a phase shift of 90°. Accordingly, the correlation value K 2 is higher than when there is a maximum phase shift and is five, instead of four, in a correct transmission.The test variable s 3 and the reference variable r are in phase. The correlation value K 3 assumes the maximum possible value over a period T 1 of the signal and is in this example seven.The test variable s 4 shifted by one bit with respect to the test variable s 3 has a phase shift of 270° relative to the reference signal. The correlation value K 4 is two.The maximum of all the correlation values K 1 to K 4 determined is seven and only deviates by one from a maximum possible value of n=8, i.e. the correlation is over 85%. The higher the sampling rate f 2 the more accurate the correlation can be determined. The significance of the maximum correlation value K max determined can likewise be influenced by adapting the length n of the test variable s to the frequency f 1 of the signal. Preferably, the test variable s comprises two or more periods T 1 of the signal to be checked.FIG. 3 schematically outlines a system in which the method for monitoring the correct transmission and / or validity of an analog signal is used. The essential components of the system are a measuring device 1, which determines and / or monitors one or more process variables and is located directly on the process for this purpose, and an evaluation unit 2, which is arranged at a distance from the measuring device 1. The measuring device 1 serves as a transmitter and transmits to the evaluation unit 2 an analog signal which represents the process variable. In this exemplary embodiment, the measuring device 1 is a vibronic limit level switch and monitors the maximum admissible fill level of a liquid or granular medium in a container 4. The signal transmitted by the measuring device 1 is a periodic signal or a direct current signal, to which a periodic signal is modulated, for example a 4-20 mA signal with a superimposed square wave signal, in order to enable checking whether the signal is correctly generated and / or correctly transmitted. The signal is preferably transmitted to the evaluation unit 2 via a bus system 3 or a 2-wire line 3. The evaluation unit 2 is, for example, an PLC or a process control system. The evaluation unit 2 preferably has an analog / digital converter 21 and a microcontroller 22, wherein the analog / digital converter 21 can also be part of the microcontroller. The evaluation unit 2 is connected to the actuator 6, which the evaluation unit 2 controls as a function of the process variable determined or monitored by the measuring device 1. The actuator 6 preferably also generates a periodic analog signal which represents its state and which can be monitored by the evaluation unit 2 in an analogous manner to the signal of the measuring device 1. A plurality of measuring devices 1 and / or actuators 6 can also be connected to the evaluation unit 2.List of reference characters1 Measuring device 2 Evaluation unit 21 Analog / digital converter 22 Microcontroller 3 Bus system / 2-wire line 4 Container 5 Pipeline 6 Actuator f 1 Frequency of the signal T 1 Period duration of the signal f 2 Sampling frequency T 2 Period duration of the sampling t x Sampling instants s, s x Test variable r Reference variable K, K x Correlation value
Claims
Method for checking the correct transmission and / or the validity of a periodic analog signal which is transmitted as a transmission signal from a transmitter to a receiver from which it is received as a reception signal, wherein the reception signal is sampled and digitized at a sampling rate (f 2) by assigning to the respectively sampled value a bit which is set to one or zero relative to a fixed threshold value as a function of the sampled value, wherein the bit is fed to a test variable (s) having n digits, wherein the number n of digits is selected in such a way and / or is adapted to the sampling rate (f 2) and / or the frequency (f 1) of the signal, the digitized values of at least one period (T 1) of the signal are storable in the test variable (s), wherein the test variable (s) is compared bit by bit with a reference variable (r) which has the same number n of points as the test variable (s) and which corresponds to a transmission signal digitized in the same manner as the reception signal by checking the value of the ith point of the test variable (s) for identity with the value of the ith point of the reference variable (r) and determining a correlation value (K x) as the sum of all identities, wherein the test variable (s) and the reference variable (r) are shifted stepwise relative to one another by a total of at least one period (T 1) of the transmission signal and the respective correlation value (K x) is determined, wherein the maximum (K max) of the correlation values (K x) determined over at least one period (T 1) is determined, and wherein a statement about the transmission and / or the validity of the signal is made on the basis of the maximum of the correlation values (K max).Method according to claim 1, characterised in that the presence and / or the frequency (f 1) and / or the quality of the signal is checked.Method according to Claim 1 or 2, characterized in that the threshold value for the received signal is fixed by forming the arithmetic mean from a nominal high level and a nominal low level of the signal and setting the threshold value equal to the arithmetic mean.Method according to one of the preceding claims, characterized in that the received signal is digitized by an analog / digital converter (21).Method according to one of the preceding claims, characterized in that the digitized values of the received signal are stored in the test variable (s) according to the first-in-first-out principle.Method according to one of the preceding claims, characterized in that the test variable (s) is displaced relative to the reference variable (r) or the reference variable (r) is displaced relative to the test variable (s) at a frequency which is higher than the sampling rate (f 2).Method according to one of the preceding claims, characterized in that the maximum of the correlation values (K max) is compared with a fixed limit value (G), and in that, if the limit value (G) is undershot, an alarm signal is generated which indicates at least one error in the transmission and / or a disturbance of the signal and / or of the transmission signal.Method according to one of the preceding claims, characterized in that the correlation values (K x) are stored in a correlation variable, wherein a current value of the correlation variable is overwritten if a newly determined correlation value (K x) is greater than a correlation value (K x), currently stored in the correlation variable, and wherein a newly determined correlation value (K x) is discarded if it is less than the correlation value (K x). currently stored in the correlation variable.Method according to one of the preceding claims, characterized in that, in the event that the test variable (s) contains essentially only one period (T 1) of the signal, the mean value of at least two maxima (K max) of the correlation values determined is used for evaluation with respect to the transmission and / or the validity of the signal.Device for carrying out the method according to one of Claims 1 to 9, characterized in that the transmitter is a field device (1) and the receiver is an evaluation unit (2) which receives and evaluates the analog signal of the field device (1), and in that the evaluation unit (2) carries out the checking of the correct transmission and / or the validity of the signal.
Citation Information
Patent Citations
Method for determining the number of digital data transmitted incorrectly via a data transmission path to be examined (number of bit errors) and device for carrying out the method
DE4205776C1
Multicarrier reflectometry device and method for on-line diagnosis of at least one transmission line
US20110035168A1