Method and apparatus for processing data

11144280 · 2021-10-12

Assignee

Inventors

Cpc classification

International classification

Abstract

A computer program product, an apparatus, a functionally safe programmable controller and a method for processing data, wherein an uncoded real number x is converted into a logarithmic number system (LNS) coded integer x.sub.LNS via a predetermined conversion rule for a logarithmic number system (LNS) in accordance with the relationship: x.sub.LNS=sgn(x).Math.2.sup.m+Id|x|.Math.2.sup.n, where sgn(x) denotes a sign function of the uncoded real number x, Id|x| denotes a binary logarithm of the uncoded real number x, m denotes a first exponent and n denotes a second exponent, and the LNS-coded integer x.sub.LNS is coded into an arithmetically coded integer x.sub.c via arithmetic coding such that the required integer operations is reduced.

Claims

1. A method for processing data to provide a functionally safe programmable controller, the method comprising: converting an uncoded real number x within a programmable controller into a logarithmic number system (LNS) coded integer x.sub.LNS via a predetermined conversion rule for the logarithmic number system (LNS) in accordance with the relationship:
x.sub.LNS=sgn(x).Math.2.sup.m+Id|x|.Math.2.sup.n, where sgn(x) denotes a sign function of the uncoded real number x, Id|x| denotes a binary logarithm of the uncoded real number x, m denotes a first exponent and n denotes a second exponent; coding the LNS-coded integer x.sub.LNS within the programmable controller into an arithmetically coded integer x.sub.c via arithmetic coding to provide the functionally safe programmable controller; and controlling a machine within an industrial system via the functionally safe programmable controller.

2. The method as claimed in claim 1, wherein the real number x is received as one of (i) an integer from a sensor (ii) a floating point number from the sensor (iii) a floating point number (iv) a string as a result of an input by a user and (v) a constant of a program code.

3. The method as claimed in claim 1, wherein the uncoded real number x is converted into the LNS-coded integer x.sub.LNS during a compiling process.

4. The method as claimed in claim 2, wherein the uncoded real number x is converted into the LNS-coded integer x.sub.LNS during a compiling process.

5. The method as claimed in claim 1, wherein the LNS-coded integer x.sub.LNS is coded to form the arithmetically coded integer x.sub.c during a compiling process.

6. The method as claimed in claim 1, further comprising: converting a number N, where N≥1, of uncoded real numbers x, y into a corresponding number N of LNS-coded integers x.sub.LNS, y.sub.LNS via the predetermined conversion rule; coding the number N of LNS-coded integers x.sub.LNS, y.sub.LNS into the corresponding number N of arithmetically coded integers x.sub.c, y.sub.c via the arithmetic coding; and applying a coded operation to the number N of arithmetically coded integers x.sub.c, y.sub.c.

7. The method as claimed in claim 6, wherein ANBD coding is utilized as the arithmetic coding and codes the LNS-coded integer x.sub.LNS into the arithmetically coded integer x.sub.c via an input constant A, a variable-specific signature B.sub.x and a cycle-specific signature D in accordance with the relationship:
x.sub.c=A.Math.x.sub.LNS+B.sub.x+D.

8. The method as claimed in claim 7, wherein the coded operation comprises a coded addition operation (CADD) in which the arithmetically coded integer x.sub.c, the arithmetically coded integer y.sub.c and a first parameter K.sub.1 are added utilizing the cycle-specific signature D to calculate a result of an addition (x+y).sub.c of the arithmetically coded integers x.sub.c, y.sub.c in accordance with the relationship:
(x+y).sub.c=x.sub.c+y.sub.c+K.sub.1−D, where the first parameter K.sub.1 is calculated via a signature B.sub.x specific to the arithmetically coded integer x.sub.c, a signature B.sub.y specific to the arithmetically coded integer y.sub.c and a signature B.sub.z specific to an arithmetically coded integer z.sub.c in accordance with the relationship:
K.sub.1=B.sub.x+y−B.sub.x−B.sub.z.

9. The method as claimed in claim 6, wherein the coded operation comprises a coded addition operation (CADD) in which the arithmetically coded integer x.sub.c, the arithmetically coded integer y.sub.c and a first parameter K.sub.1 are added utilizing the cycle-specific signature D to calculate a result of an addition (x+y).sub.c of the arithmetically coded integers x.sub.c, y.sub.c in accordance with the relationship:
(x+y).sub.c=x.sub.c+y.sub.c+K.sub.1−D, where the first parameter K.sub.1 is calculated via a signature B.sub.x specific to the arithmetically coded integer x.sub.c, a signature B.sub.y specific to the arithmetically coded integer y.sub.c and a signature B.sub.z specific to an arithmetically coded integer z.sub.c in accordance with the relationship:
K.sub.1=B.sub.x+y−B.sub.x−B.sub.z.

10. The method as claimed in claim 6, wherein DNB coding is utilized as the arithmetic coding and codes the LNS-coded integer x.sub.LNS into the arithmetically coded integer x.sub.c via a cycle-specific signature D and a variable-specific signature B.sub.x in accordance with the relationship:
x.sub.c=D.Math.x.sub.LNS+B.sub.x.

11. The method as claimed in claim 10, wherein the coded operation comprises a coded addition operation (CADD) in which the arithmetically coded integer x.sub.c and the arithmetically coded integer y.sub.c are added utilizing a second parameter K.sub.2 to form an arithmetically coded integer z.sub.c in accordance with the relationship:
z.sub.c=(x.sub.c+y.sub.c+K.sub.2), where the second parameter K.sub.2 is calculated via a signature B.sub.x specific to the arithmetically coded integer x.sub.c, a signature B.sub.y specific to the arithmetically coded integer y.sub.c and a signature B.sub.z specific to the arithmetically coded integer in accordance with the relationship:
K.sub.2=B.sub.z−B.sub.x−B.sub.y.

12. The method as claimed in claim 10, wherein the coded operation comprises a coded subtraction operation (CSUB) in which a difference between the arithmetically coded integer x.sub.c and the arithmetically coded integer y.sub.c is calculated utilizing a third parameter K.sub.3 in order to provide an arithmetically coded integer z.sub.c in accordance with the relationship:
z.sub.c=(x.sub.c−y.sub.c+K.sub.3), where the third parameter K.sub.3 is calculated via a signature B.sub.x specific to the arithmetically coded integer x.sub.c, a signature B.sub.y specific to the arithmetically coded integer y.sub.c and a signature B.sub.z specific to the arithmetically coded integer in accordance with the relationship:
K.sub.3=B.sub.z−B.sub.x+B.sub.y.

13. The method as claimed in claim 6, wherein the coded operation comprises a coded addition operation (CADD) in which the arithmetically coded integer x.sub.c and the arithmetically coded integer y.sub.c are added utilizing a second parameter K.sub.2 to form an arithmetically coded integer z.sub.c in accordance with the relationship:
z.sub.c=(x.sub.c+y.sub.c+K.sub.2), where the second parameter K.sub.2 is calculated via a signature B.sub.x specific to the arithmetically coded integer x.sub.c, a signature B.sub.y specific to the arithmetically coded integer y.sub.c and a signature B.sub.z specific to the arithmetically coded integer in accordance with the relationship:
K.sub.2=B.sub.z−B.sub.x−B.sub.y.

14. The method as claimed in claim 6, wherein the coded operation comprises a coded subtraction operation (CSUB) in which a difference between the arithmetically coded integer x.sub.c and the arithmetically coded integer y.sub.c is calculated utilizing a third parameter K.sub.3 in order to provide an arithmetically coded integer z.sub.c in accordance with the relationship:
z.sub.c=(x.sub.c−y.sub.c+K.sub.3), where the third parameter K.sub.3 is calculated via a signature B.sub.x specific to the arithmetically coded integer x.sub.c, a signature B.sub.y specific to the arithmetically coded integer y.sub.c and a signature B.sub.z specific to the arithmetically coded integer in accordance with the relationship:
K.sub.3=B.sub.z−B.sub.x+B.sub.y.

15. A non-transitory computer-readable medium encoded with a program instructions which, when executed by a processor of a programmable controller, causes data to be processed such that a functionally safe programmable controller is provided, the program instructions comprising: program code for converting an uncoded real number x within the programmable controller into a logarithmic number system (LNS) coded integer x.sub.LNS via a predetermined conversion rule for the logarithmic number system (LNS) in accordance with the relationship:
x.sub.LNS=sgn(x).Math.2.sup.m+Id|x|.Math.2.sup.n, where sgn(x) denotes a sign function of the uncoded real number x, Id|x| denotes a binary logarithm of the uncoded real number x, m denotes a first exponent and n denotes a second exponent; program code for coding the LNS-coded integer x.sub.LNS within the programmable controller into an arithmetically coded integer x.sub.c via arithmetic coding to provide the functionally safe programmable controller; and program code for controlling a machine within an industrial system via the functionally safe programmable controller.

16. An apparatus for processing data to provide a functionally safe programmable controller, comprising: a conversion unit which is configured to convert an uncoded real number x into an logarithmic number system (LNS) coded integer x.sub.LNS via a predetermined conversion rule for a logarithmic number system (LNS) in accordance with the relationship:
x.sub.LNS=sgn(x).Math.2.sup.m+Id|x|.Math.2.sup.n, where sgn(x) denotes a sign function of the uncoded real number x, Id|x| denotes a binary logarithm of the uncoded real number x, m denotes a first exponent and n denotes a second exponent; and a coding unit which is configured to code the LNS-coded integer x.sub.LNS into an arithmetically coded integer x.sub.c via arithmetic coding; wherein the functionally safe programmable controls a machine within an industrial system.

17. A functionally safe programmable controller having the apparatus as claimed in claim 16.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) The subclaims and the exemplary embodiments of the invention which are described below relate to further advantageous configurations and aspects of the invention. The invention is explained in more detail below on the basis of preferred embodiments with reference to the enclosed figures, in which:

(2) FIG. 1 shows a schematic flowchart of an exemplary embodiment of a method for processing data in accordance with the invention;

(3) FIG. 2 shows a schematic flowchart of a further exemplary embodiment of a method for processing data via coded operations in accordance with the invention;

(4) FIG. 3 shows a schematic flowchart of a further exemplary embodiment of a method for processing data via coded operations in accordance with the invention;

(5) FIG. 4 shows a schematic block diagram of an exemplary embodiment of an apparatus for processing data in accordance with the invention; and

(6) FIG. 5 shows a schematic block diagram of an exemplary embodiment of a functionally safe programmable controller having the apparatus according to FIG. 4.

DETAILED DESCRIPTION OF THE EXEMPLARY EMBODIMENTS

(7) In the figures, identical or functionally identical elements have been provided with the same reference signs, unless indicated otherwise.

(8) FIG. 1 shows a schematic flowchart of an exemplary embodiment of a method for processing data in accordance with the invention.

(9) With reference to FIG. 1, an uncoded real number x is converted into an LNS-coded integer x.sub.LNS, as indicated in step 101.

(10) In detail, in step 101, the uncoded real number x is converted into the LNS-coded integer x.sub.LNS via a predetermined conversion rule for a logarithmic number system, LNS, in accordance with the relationship:
x.sub.LNS=sgn(x).Math.2.sup.m+Id|x|.Math.2.sup.n,  Eq. 1
where sgn(x) denotes a sign function of the uncoded real number x, Id|x| denotes a binary logarithm of the uncoded real number x, m denotes a first exponent and n denotes a second exponent.

(11) The real number x can be received as an integer from a sensor or as a floating point number from the sensor or as a floating point number or as a string as a result of an input by a user or as a constant of a program code.

(12) The uncoded real number x is preferably converted into the LNS-coded integer x.sub.LNS during a compiling process.

(13) In step 102, the LNS-coded integer x.sub.LNS is coded into an arithmetically coded integer x.sub.c via arithmetic coding.

(14) The LNS-coded integer x.sub.LNS is preferably coded to form the arithmetically coded integer x.sub.c during a compiling process.

(15) FIG. 2 shows a schematic flowchart of a further exemplary embodiment of a method for processing data via coded operations.

(16) With reference to FIG. 2, a number N of uncoded real numbers x, y is converted into a number N of LNS-coded integers x.sub.LNS, y.sub.LNS via a conversion rule, as indicated in step 201.

(17) Furthermore, in step 202, the number N of LNS-coded integers x.sub.LNS, y.sub.LNS is coded into the corresponding number N of arithmetically coded integers x.sub.c, y.sub.c via the arithmetic coding.

(18) In this case, the arithmetic coding comprises, in particular, ANBD coding in which the LNS-coded integer x.sub.LNS is coded into the arithmetically coded integer x.sub.c in accordance with the relationship:
x.sub.c=A.Math.x.sub.LNS+B.sub.x+D.  Eq. 2

(19) In step 203, a coded operation is applied to the number N of arithmetically coded integers x.sub.c, y.sub.c.

(20) In this case, the coded operation comprises, in particular, a coded addition operation CADD.

(21) FIG. 3 shows a schematic flowchart of a further exemplary embodiment of a method for processing data via coded operations.

(22) With reference to FIG. 3, a number N of uncoded real numbers x, y is converted into a number N of LNS-coded integers x.sub.LNS, y.sub.LNS by means of a conversion rule, as indicated in step 301.

(23) Furthermore, in step 302, the number N of LNS-coded integers x.sub.LNS, y.sub.LNS is coded into the corresponding number N of arithmetically coded integers x.sub.c, y.sub.c via the arithmetic coding.

(24) Here, the arithmetic coding comprises, in particular, DNB coding that codes the LNS-coded integer x.sub.LNS into the arithmetically coded integer x.sub.c in accordance with the relationship:
x.sub.c=D.Math.x.sub.LNS+B.sub.x  Eq. 5.

(25) In step 303, a coded operation is applied to the number N of arithmetically coded integers x.sub.c, y.sub.c. Here, the coded operation comprises, in particular, a coded addition operation CADD and/or a subtraction operation CSUB.

(26) FIG. 4 shows a schematic block diagram of an exemplary embodiment of an apparatus 10 for processing data. The apparatus 10 comprises a conversion unit 11 and a coding unit 12.

(27) The conversion unit 11 is configured to convert an uncoded real number x into an LNS-coded integer x.sub.LNS via a predetermined conversion rule for a logarithmic number system, LNS, in accordance with the relationship:
x.sub.LNS=sgn(x).Math.2.sup.m+Id|x|.Math.2.sup.n  Eq. 1.

(28) In particular, the conversion unit 11 configured to perform method steps 101, 201 and 301 in accordance with FIGS. 1, 2 and 3 and, in particular, to also convert further uncoded real numbers.

(29) The coding unit 12 is configured to code the LNS-coded integer x.sub.LNS into an arithmetically coded integer x.sub.c via arithmetic coding.

(30) In particular, the coding unit 12 is configured to perform method steps 102, 202 and 302 in accordance with FIGS. 1, 2 and 3 and, in particular, to also code further LNS-coded integers.

(31) FIG. 5 shows a schematic block diagram of an exemplary embodiment of a functionally safe programmable controller 1.

(32) The controller 1 is configured to control a machine 2, such as a conveyor belt or a robot arm. For this purpose, the controller 1 in FIG. 5 has an apparatus 10 for processing data, as described with respect to FIG. 4.

(33) Even though the present invention has been described on the basis of exemplary embodiments, it can be modified in various ways.

(34) Thus, while there have been shown, described and pointed out fundamental novel features of the invention as applied to a preferred embodiment thereof, it will be understood that various omissions and substitutions and changes in the form and details of the devices illustrated, and in their operation, may be made by those skilled in the art without departing from the spirit of the invention. For example, it is expressly intended that all combinations of those elements and/or method steps which perform substantially the same function in substantially the same way to achieve the same results are within the scope of the invention. Moreover, it should be recognized that structures and/or elements shown and/or described in connection with any disclosed form or embodiment of the invention may be incorporated in any other disclosed or described or suggested form or embodiment as a general matter of design choice. It is the intention, therefore, to be limited only as indicated by the scope of the claims appended hereto.