Methods used to detect signals
By determining the program dependency diagram in the control device and dividing the signal set, only the necessary signals are measured, the efficiency of signal recording and measurement in the control device is solved, minimizing signal measurement and complete reconstruction are achieved, and technical consumption is reduced.
Patent Information
- Application Number
- CN201810014801.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2017-01-09
- Filing Date
- 2018-01-08
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2038-01-08
AI Technical Summary
In control devices, the prior art cannot effectively record and measure all internal signals, resulting in increased storage and communication requirements and local parameters cannot be measured because they lack a fixed address, resulting in measurement and communication delays.
By determining the program dependency graph from the program of the control device, dividing the signal set and allocating the nodes to the subset, measuring only the necessary signals, calculating the relevant signals based on the measured signals, reducing the actual measured signal volume, and ensuring that all required signals are available.
The measurement data scale is achieved, the actual measured signal quantity is reduced, the availability of all required signals is ensured, multiple measurements and recursion is reduced, the availability of intermediate parameters is provided, and the technical consumption is reduced.
Smart Images

Figure CN108287695B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for detecting a signal of a control device and a corresponding control device. Background Art
[0002] In order to be able to reproduce the effects occurring in the control device, internal signals are recorded during the operating time of the control device. The signal profile can then be visualized and evaluated with the aid of analysis software.
[0003] The number of recorded signals or variables is limited here, since the storage requirements increase linearly with the number of signals to be measured. As a result, the storage requirements and communication requirements increase during runtime on the one hand, and the amount of data to be transmitted on the other hand. As a result, only a small fraction of all available signals can be recorded. In addition, only specific signals, such as messages and measuring points, can be measured. In particular, local variables cannot be measured, since these do not have fixed addresses in the control device.
[0004] Thus, when analyzing a measurement, it may happen that the required signal is not contained in the measurement file. In this case, a new measurement is required, which includes the missing signal. This results in considerable expenditure for the measurement and the subsequent communication and delayed availability. Currently, the selection of the signals to be recorded is done manually and therefore depends largely on the experience of the measurer. Summary of the invention
[0005] A first aspect relates to a method for detecting signals of a control device, the method comprising the following steps: determining a program dependency graph from a program of the control device, the nodes of the program dependency graph being calculation steps of the program, the signals being obtained from the calculation steps, and the connecting lines of the program dependency graph being data and / or control dependencies between these calculation steps; defining a signal set, the signal set comprising a first subset for the signals to be measured and a second subset for the related signals; assigning a node to the first subset under the following conditions: if the other nodes on the incoming connecting line of the node are outside the signal set, then the node represents the signal to be measured; measuring the signals of the first subset; and calculating the signals of the second subset based on the measured signals of the first subset. By means of this method, a minimum number of signals is measured, by which a complete reconstruction of all other signals is then performed. Thus, on the one hand, the data size of the measurement is reduced, and on the other hand, it is ensured that all signals required for the evaluation are available. In addition, intermediate variables can be made available, which cannot be measured temporarily. Thus, the amount of signals actually to be measured is effectively reduced.
[0006] In a technically advantageous embodiment of the method, a node is assigned to the second subset under the condition that it is calculable within the signal set on all incoming links. This achieves the technical advantage that an alternative criterion can be used for the assignment and the original assignment can be checked.
[0007] In another technically advantageous embodiment of the method, the assignment is performed for all nodes within the signal set. This achieves the technical advantage, for example, that all nodes can be unambiguously assigned to one or the other subset.
[0008] In another technically advantageous embodiment of the method, the program dependency graph is determined from the program statically or dynamically. In the case of a static determination, the following technical advantage is achieved, for example: the time for executing the method is reduced. In the case of a dynamic determination, the following technical advantage is achieved, for example: the current program dependency graph can always be determined, for example after a program update of the control device.
[0009] In another technically advantageous embodiment of the method, the measured signals are stored in a measurement log. This achieves the technical advantage that the relevant signals can be calculated at a later point in time or at another location, for example.
[0010] In another technically advantageous embodiment of the method, the measurement log is stored in a non-volatile memory. This achieves the technical advantage that the relevant signals can continue to be calculated even after a power supply failure.
[0011] In another technically advantageous embodiment of the method, the step of measuring is based on the detection of the current or voltage of the corresponding signal in the corresponding calculation step. As a result, for example, the following technical advantages are achieved: a signal suitable for further calculation is obtained. The control device can include an interface to detect these data. For example, the memory can be read out at the corresponding storage location containing the signal.
[0012] The second aspect relates to a control device, which comprises: a determining device for determining a program dependency graph from a program of the control device, the nodes of the program dependency graph being calculation steps of the program, signals being obtained from the calculation steps, and the connecting lines of the program dependency graph being data and / or control dependencies between the calculation steps; a defining interface for defining a signal set, the signal set comprising a first subset for signals to be measured and a second subset for related signals; an allocating device for allocating a node to the first subset under the following condition: if other nodes on the incoming connecting line of the node are outside the signal set, then the node represents the signal to be measured; a measuring tool for measuring the signals of the first subset; and a calculating device for calculating the signals of the second subset based on the measured signals of the first subset.
[0013] The same technical advantages as those achieved by the method according to the first aspect are achieved by means of the control device.
[0014] In a technically advantageous embodiment of the control device, the control device comprises a non-volatile memory for storing measurement records of the measured signals. This achieves the technical advantage that, for example, the complete signal set can also be calculated at a later point in time.
[0015] A third aspect relates to a computer program which can be loaded into the memory of a digital computer and which comprises software code segments by means of which the method according to the first aspect can be implemented when the computer program is run on a computer. By means of the computer program, the same technical advantages as those resulting from the method according to the first aspect are achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Exemplary embodiments of the invention are illustrated in the drawings and are described in further detail below.
[0017] in:
[0018] Figure 1 A block diagram illustrating the method;
[0019] Figure 2 Shows a program dependency graph;
[0020] Figure 3 a schematic diagram showing a control device; and
[0021] Figure 4 The flow of the method is shown. DETAILED DESCRIPTION
[0022] Figure 1The block diagram shows a method for detecting signals of a control device. The control device is, for example, a control device for engine control, which may be able to detect a plurality of measured variables. The program of the control device serves to evaluate and further process these measured variables. The program calculates one or more output signals from a plurality of input signals in a plurality of calculation steps. Thus, each calculation step generates a further internal signal as output, which is further processed by a further calculation step.
[0023] In general, a control device can be used to control any other device. The program of the control device can be depicted by a program dependency graph. Based on the program dependency graph, the signals to be detected by the control device are determined. Based on the program dependency graph, it can be automatically determined which signals must be known in order to calculate a given set of related signals.
[0024] In step S100, a program dependency graph is first determined from the program of the control device. The nodes of the program dependency graph represent internal calculation steps of the program, from which corresponding signals are obtained. The connecting lines of the program dependency graph represent data and / or control dependencies between these calculation steps.
[0025] In step S101, a signal set is defined, the signal set comprising a first subset for signals to be measured and a second subset for related signals. The signals of the second subset can be calculated from the signals of the first subset.
[0026] In step S102 , nodes of the program dependency graph are assigned to a first subset under the following condition: a node represents a signal to be measured if the subordinate node on the incoming connection line of the node is outside the signal set and the node therefore has a connection line that cannot be calculated.
[0027] In step S103, the signal of the first subset is measured by means of a suitable measuring tool. Next, in step S104, the signal of the second subset is calculated based on the measured signal of the first subset. This is possible because the dependency between the signal of the first subset and the signal of the second subset is known.
[0028] On the one hand, the number of signals to be measured is thereby minimized, and on the other hand it is ensured that all the required information is nevertheless obtained. The technical problem is thus solved in such a way that, on the one hand, no signals are missing in the later analysis and therefore no unnecessary multiple measurements and recursions are required. On the other hand, the size of the measured signals can be reduced by means of the program dependency graph. Another technical advantage is the availability of intermediate variables that could not be measured until now.
[0029] Figure 2 An exemplary program dependency graph 101 of a control device 100 is shown with data dependencies caused by connecting lines 105 between nodes 103. The program dependency graph 101 is constructed based on a control flow graph of the individual calculation steps of the program. Thus, a node 103 represents a calculation step for a signal 109 of a program of the control device 100.
[0030] At the same time, the nodes 103 of the control flow graph constitute the nodes 103 of the program dependency graph 100. The output signal of the node 103-3 is therefore related to the input signals of the nodes 103-1 and 103-2. From the interpretation of the meaning of the computation steps belonging to the nodes 103 by the program interpreter, two types of dependency relationships between the nodes 103 can be derived.
[0031] If other node 103-3 uses a variable that has been assigned a value in node 103-1, and there is a path from node 103-1 to the other node 103-3 in the control flow graph without reassigning a value to the variable, there is a data dependency relationship between the two nodes 103-1 and 103-3.
[0032] If a node 103-1 determines the operation of another node 103-3, then there is a control dependency between the two nodes 103-1 and 103-3. In this case, in the control flow graph, there is a path from the node 103-1 to the other node 103-3, and the node 103-1 is a control flow node. In the case of a structured program, for example, a calculation step performed according to a condition (If instruction) or a loop body depends on a pre-adjusted condition. Therefore, the pre-adjusted condition represents a control flow node. The other operation of the program depends on the control flow node. In the case of a program with arbitrary transfers, other situations should be considered.
[0033] Thus, the program dependency graph 101 describes the relationship between the various computation steps of the program. If a node 103 is computable 103 on all incoming links, then the node 103, that is, the computation step for the internal signal, is computable. Through each computation step of the program, an internal signal 109 is obtained as the output of the corresponding computation step.
[0034] The nodes 103 of the program dependency graph 101 represent the individual calculation steps of the program, and the connecting lines 105 of the program dependency graph 101 represent the data and control dependencies between these calculation steps. The calculation steps include, for example, multiplication, division, subtraction, addition, or ODER-Verknüpfung, AND-Verknüpfung or any other operation, in which one or more output values are calculated from input values. The program dependency graph 101 can be used to improve the efficiency of signal detection.
[0035] First, a signal set 107 of all desired signals 109 to be obtained is defined. The definition of the set of desired signals 109 can be performed by a user. On the one hand, the signal set 107 includes a subset 111 for the node 103, that is, a calculation step, whose signals 109 cannot be calculated because the dependencies of the node 103 are outside the selected signal set 107. On the other hand, the signal set 107 includes a subset 113 for the node 103, whose signals 109 can be calculated due to the known dependencies within the signal set 107.
[0036] For the program dependency graph 101, it applies that if the node 103 is computable on all incoming links 105, then the node 103, that is to say the computation step, is computable. Therefore, by tracing the links in the program dependency graph 101, it can be determined whether the node 103 belongs to the subset 111 or to the subset 113. If the node 103 is not computable on all incoming links, then the node belongs to the subset 111. If the node is computable on all incoming links, then the node belongs to the subset 113.
[0037] After the nodes 103 have been assigned to the respective subsets 111 and 113, the signals 109 of the nodes 103 of the subset 111 are measured explicitly, since these signals are not calculable. The signals 109 of the nodes 103 of the other subset 113 are calculated, since the dependencies required for this are known.
[0038] Thus, the program dependency graph 101 is used to determine the optimal subset 111 of signals 109 to be measured from the set 107 of desired signals 109. Subsequently, the actual measurement of these signals 109 of the first subset 111 is performed. The program interpreter is then used to calculate the now missing related signals 109 of the second subset 113 from the measured signals 109 of the subset 111.
[0039] This achieves the technical advantage that a minimum number of signals 109 can be measured, but a complete reconstruction of all remaining signals 109 can then nevertheless be carried out from this minimum number of signals 109 .
[0040] In the case of the measured signal 109, the program interpreter can determine the relevant signal 109 of the subset 113 from the measured signal 109 of the subset 111, provided that the corresponding input variables are completely known. For program parts of the program that do not contain the input values that have been occupied, the program interpreter cannot determine the result. In this regard, the program is interpreted to the extent that it is possible in the case of a given variable assignment by means of an incomplete evaluation.
[0041] Figure 3 1 shows a schematic view of a control device 100. The control device 100 comprises a determining means 401 for determining a program dependency graph 101 from a program 115 of the control device 100. The determination of the program dependency graph 101 from the program 115 of the control device 100 can be performed once statically or dynamically after the program 115 is updated.
[0042] The definition interface 403 of the control device 100 is used to define the desired signal set 107, which includes the first subset 111 for the signal 109 to be measured and the second subset 113 for the related signal 109. The definition interface 403 is formed, for example, by an electronic interface or a program interface.
[0043] The allocation device 405 is used to allocate the node 103 of the program dependency graph 101 within the signal set 107 to the first subset 111 under the following condition: if at least one subordinate node 103 on the incoming connection line of the node 103 is outside the signal set 107 and therefore cannot be calculated, then the node 103 represents the signal 109 to be measured.
[0044] The measuring means 407 of the control device 100 is used to measure the signals 109 of the first subset 111. For this purpose, the measuring means tap the signals 109 at a suitable location, for example after a corresponding program step or within an electronic circuit. The calculation device 409 of the control device 100 is used to calculate the signals 109 of the second subset 113 based on the measured signals 109 of the first subset 111.
[0045] The determining device 401, the defining interface 403, the allocating device 405, the measuring tool 407 and the calculating device 409 can be formed by fixed-wired digital circuits adapted to implement the corresponding functions, such as application-specific integrated circuits (ASIC, Application-Specific Integrated Circuit). However, the determining device 401, the defining interface 403, the allocating device, the measuring tool 407 and the calculating device 409 can also be implemented by program modules, which are run by means of a processor of the control device 100.
[0046] Figure 4 The sequence of the method for detecting signals 109-0 by control unit 100 is shown. Optimization device 413 determines the optimal subset 111 of signals 109-1 to be actually measured with the aid of program dependency graph 101. For this purpose, program dependency graph 101 is derived once in advance from program 115 of control unit 100. In the actual measurement case, the corresponding signals 109-1 are recorded during operation of control unit 100 with the aid of a suitable measuring device 407.
[0047] The additionally desired, but not measured, signal 109-2 is then calculated and supplemented by the program interpreter 415. For this purpose, the program interpreter 415 is run with the measured signal 109-1 on the program 115 of the control device 100. As a result, all values of the dependent signal 109-2 can be calculated. For this purpose, all desired measuring points also correspond to the construction performed by the program dependency graph 101.
[0048] As a result, the user can always obtain the measured value for the precisely required signal 109-0. The present invention combines the technology of the program interpreter 415 and the program dependency graph 101 with the measurements at the control device 100 in order to optimize them. With the aid of the control device 100, all desired signals 109 of the signal set 107 can be efficiently derived completely with the aid of the program interpreter 415. The program interpreter then interprets the program 115 of the control device 100 with partial variable assignments.
[0049] To calculate the minimum subset 111 of the signal 109 to be measured, the following algorithm may be applied:
[0050] 1. A signal set 107 of required signals 109 to be measured, for example all signals 109 of a function, is input in a manner predefined by the user.
[0051] 2. For each individual node 103 in the program dependency graph 101, the following markings are possible (including combinations):
[0052] a. Measurement is desired (upon request)
[0053] b. Measurement is possible (given)
[0054] c. Calculation is possible
[0055] d. Required value (either measured or calculated)
[0056] e. Measurement is required as a result of the algorithm.
[0057] Initially, no node 103 is marked in the program dependency graph 101 of the control device 100 .
[0058] 3. The expected or required signals 109 are marked as 2.a) and 2.d) in the program dependency graph 101 .
[0059] 4. The measurable signal 109 is marked as 2.b) in the program dependency graph.
[0060] 5. The computability of the nodes 103 that cannot be measured is ensured in the following manner. For each desired node 103 that cannot be measured, that is to say for 2.a) but not for 2.b), the following applies:
[0061] a. Trace the connection line 105 in the program dependency graph 101 in the backward direction.
[0062] b. Mark all reachable nodes 103 as 2.d), terminating at the measurable node 2.b).
[0063] 6. Remove redundant measuring points as follows. For each measurable and required node 103, ie for 2.b) and 2.d), the following applies:
[0064] a. If all incoming links 105 to a node 103 of the program dependency graph 101 marked with 2.b) and 2.d) also lead (in a transitive manner) via further links 105 , then the node 103 is marked with 2.c).
[0065] 7. Optionally, the subset 111 of nodes 103 to be measured is further optimized with the aid of the program dependency graph 101 in order to obtain optimized measurement points 417 .
[0066] 8. All nodes 103 marked with 2.b) and 2.d) but not with 2.c) are then marked with 2.e). In the program dependency graph 101, these nodes 103 represent a subset 111 of the nodes 103 to be measured and thus of the signals 109-1 to be measured.
[0067] These signals 109-1 to be measured are actually measured by the measuring tool 407 and a corresponding measurement record 411, such as an electronic file, is created. The electronic file can include a sequence of measurement points and can be stored in the control device 100. Based on this measurement record 411, the signal 109-2 derived from the measured signal 109-1 can be calculated.
[0068] The measuring means 407 comprises, for example, one or more current measuring circuits for measuring current or one or more voltage measuring circuits for measuring voltage. The measuring means 407 can also be used to read out a random access memory (RAM, Random Access Memory). The signals 109 are stored in digital form in the random access memory. The signals 109 can also be stored in a non-volatile memory, such as a hard disk or a USB memory stick, so that these signals 109 are also retained after a power supply interruption.
[0069] By configuring the algorithm, it is ensured on the program dependency graph that virtually all expected signals 109-2 can be calculated from measured signals 109-1 by the program interpreter 109. When deriving the program dependency graph 101, loops can be unrolled and function calls can be used if necessary, ie replaced by their implementation.
[0070] The method can be used in all areas in which measured data are detected on an operating control device 100. This is particularly relevant to function developers and application engineers. Firstly, in the communication of these groups, the present invention can help improve and accelerate the process by ensuring with reduced technical effort and effectively that all required signals 109 are fully detected.
[0071] exist Figure 4 The method shown in FIG. 1 illustrates an exemplary embodiment of the method with corresponding essential components and how these essential components contribute to solving the technical problem of measuring a minimum number of signals and reducing the amount of data.
[0072] However, the scope of protection of the present invention is given by the claims and is not limited by the features set forth in the description or shown in the drawings. Thus, within the scope of the claims, the method can be further improved in order to increase the efficiency of the method.
[0073] All features explained and shown in connection with individual embodiments of the invention may be provided in various combinations in the subject matter according to the invention in order to simultaneously achieve their advantageous effects.
Claims
1. A method for detecting a signal of a control device (100), the method comprising the following steps: - determining a program dependency graph (101) from a program (115) of the control device (100), the nodes (103) of the program dependency graph being calculation steps of the program (115) from which signals are obtained, and the links (105) of the program dependency graph being data and / or control dependencies between the calculation steps; - defining a signal set (107), said signal set comprising a first subset (111) and a second subset (113), wherein said first subset (111) consists of signals to be measured and said second subset (113) consists of signals that are dependent on the signals of said first subset (111); - assigning a node (103) to said first subset (111) under the following condition: said node (103) represents a signal to be measured if the other nodes on the node's incoming link (105) are outside said signal set (107); - measuring the signal (109-1) of said first subset (111); and - calculating the signal (109-2) of the second subset (113) based on the measured signal (109-1) of the first subset (111).
2. The method according to claim 1, in, The node (103) is assigned to the second subset (113) under the condition that the node (103) is computable on all incoming links (105) within the signal set.
3. The method according to claim 1, in, The allocation is performed for all nodes (103) within the signal set (107).
4. The method according to any one of claims 1 to 3, in, The program dependency graph (101) is determined from the program (115) either statically or dynamically.
5. The method according to any one of claims 1 to 3, in, The measured signals (109-1) of the first subset (111) are stored in a measurement log (411).
6. The method according to claim 5, in, The measurement record (411) is stored in a non-volatile memory.
7. The method according to any one of claims 1 to 3, in, The step of measuring the signals (109-1) of the first subset (111) is based on detecting the current or voltage of the respective signal in the respective calculation step.
8. A control device (100), comprising: - determining means (401) for determining a program dependency graph (101) from a program (115) of the control device (100), the nodes (103) of the program dependency graph being calculation steps of the program (115) from which signals are obtained, and the links (105) of the program dependency graph being data and / or control dependencies between the calculation steps; - defining an interface (403) for defining a signal set (107), the signal set comprising a first subset (111) and a second subset (113), wherein the first subset (111) consists of signals to be measured and the second subset (113) consists of signals that are dependent on the signals of the first subset (111); - allocation means (405) for allocating a node (103) to said first subset (111) under the following condition: said node (103) represents a signal to be measured if other nodes on the node's incoming link (105) are outside said signal set (107); - a measuring means (407) for measuring the signal (109-1) of said first subset (111); and - calculation means (409) for calculating the signal (109-2) of the second subset (113) based on the measured signal (109-1) of the first subset (111).
9. The control device (100) according to claim 8, in, The control device (100) comprises a non-volatile memory for storing a measurement record (411) of the signals (109-1) of the first subset (111) that have been measured.
10. A computer-readable storage medium storing a computer program, wherein the computer program comprises software code segments, and when the computer program is executed on a computer, the software code segments are used to cause the computer to implement the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, wherein the computer program comprises software code segments, and when the computer program is run on a computer, the software code segments are used to cause the computer to implement the method according to any one of claims 1 to 7.
