Complex function table look-up implementation method and system based on electrochemical model
By using the segmented table lookup method in the electrochemical model and looking up values according to different slopes, the accuracy and resource utilization problems of the traditional table lookup solution when processing floating point decimal input data is solved, achieving more efficient calculation results.
Patent Information
- Application Number
- CN202411477890.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-03-25
AI Technical Summary
In electrochemical models, traditional FPGA table lookup schemes are difficult to effectively process floating point decimal input data, resulting in large changes in calculation accuracy and low resource utilization.
The segmented table lookup method is used to calculate by preset input data sets, generate a lookup table, and search values according to different slopes to reduce the error of floating point to fixed points and save table lookup resources.
It effectively reduces the error of floating point to fixed point, improves the utilization rate of table lookup resources, and is suitable for the calculation requirements of complex electrochemical models.
Smart Images

Figure CN119696590A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electrochemical computing technology, and in particular to a complex function table lookup implementation method, system and storage medium based on an electrochemical model. Background Art
[0002] Due to the particularity of the electrochemical model, there are very complex physical equations to be implemented. This cannot be met on a general hardware platform, so when implementing the hardware, a mixed floating point and fixed point table lookup method is mainly used to calculate this function. This invention further improves the accuracy and resource utilization of the table lookup method.
[0003] There are two problems when using the table lookup method in electrochemical models: (1) the input data is floating point decimals and (2) the calculation accuracy of the function varies greatly.
[0004] In the traditional FPGA table lookup scheme, the table lookup is based on the address, and the corresponding value is obtained to complete the table lookup calculation. However, in the electrochemical model, many floating point decimal inputs are required for table lookup, not integers like addresses. Therefore, it is necessary to map floating point decimals to integers. After mapping, the data accuracy problem also needs to be considered. In order to solve the above problems existing in the existing system and technical solutions, the present invention provides a method for implementing complex function table lookup based on electrochemical model. Summary of the invention
[0005] The purpose of the present application is to provide a complex function table lookup implementation method and system based on an electrochemical model, which can reduce the error of floating-point to fixed-point conversion; adopt a segmented table lookup method to look up values according to different slopes, which is conducive to saving table lookup resources.
[0006] The present application provides a complex function table lookup implementation method based on an electrochemical model, the method comprising:
[0007] Perform a first calculation on a preset input data set to obtain a calculation result output data set of the corresponding precision of each data, and store the input data set and the output data set results in a one-to-one correspondence to obtain a lookup table;
[0008] Determine the current data to be input and the accuracy of the calculation result, use the lookup table to find a calculation result and extract it, and extract the input data corresponding to the calculation result;
[0009] Perform a second calculation on all corresponding input data extracted to obtain a second data set, and truncate the input data in the second input data set to retain integer digits to obtain a third data set;
[0010] Sort the numbers in the third data set, calculate the slope between every two adjacent numbers after the sorting, and determine the data range of each slope corresponding to the third data set;
[0011] The address of the actual number is obtained based on the slope calculation, and the calculation result corresponding to the input data is found based on the address.
[0012] In this solution, the method of using the lookup table to find a calculation result and extract it, and at the same time extracting the input data corresponding to the calculation result, includes:
[0013] If the calculation accuracy is 1 / 2 n , then start from the smallest calculation result in the lookup table, and every 1 / 2 n Extract a calculation result from the stored calculation results and extract its corresponding input data at the same time.
[0014] In this solution, all corresponding input data extracted are subjected to a second calculation to obtain a second data set, and the input in the second input data set is truncated to retain integer digits to obtain a third data set, including:
[0015] All corresponding input data m extracted are set to arbitrary integers to obtain a second data set, wherein the integer part of the data in the second data set is unique. If it is not unique, the value of m is multiplied by 10 and recalculated. After confirming that the integer in the second data set is unique, the number in the data set is truncated to retain the integer digit to obtain the third data set.
[0016] In this solution, the address of the actual number is obtained based on the slope calculation, and the calculation formula is:
[0017] n1 / k1+(n2-n1) / k2+(n3-n2) / k3
[0018] Wherein, k1, K2, and k3 represent different slopes, n is the actual input data, n1 is the upper limit of the first data set, and n2 is the upper limit of the second data set.
[0019] In this scheme, if n is less than n2 and greater than n1, the address calculation formula of the actual number is: n1 / k1+(n-n1) / k2; if n is less than n1, the address calculation formula of the actual number is: n / k1.
[0020] In this solution, the slope is an integer, and the number of the integers in the third data set is less than or equal to 10.
[0021] In a second aspect, the present application provides a complex function table lookup implementation system based on an electrochemical model, the complex function table lookup implementation system based on an electrochemical model comprising: a memory and a processor, the memory comprising a program of a complex function table lookup implementation method based on an electrochemical model, the program of the complex function table lookup implementation method based on an electrochemical model when executed by the processor implements the following steps:
[0022] Perform a first calculation on a preset input data set to obtain a calculation result output data set of the corresponding precision of each data, and store the input data set and the output data set results in a one-to-one correspondence to obtain a lookup table;
[0023] Determine the current data to be input and the accuracy of the calculation result, use the lookup table to find a calculation result and extract it, and extract the input data corresponding to the calculation result;
[0024] Perform a second calculation on all corresponding input data extracted to obtain a second data set, and truncate the input data in the second input data set to retain integer digits to obtain a third data set;
[0025] Sort the numbers in the third data set, calculate the slope between every two adjacent numbers after the sorting, and determine the data range of each slope corresponding to the third data set;
[0026] The address of the actual number is obtained based on the slope calculation, and the calculation result corresponding to the input data is found based on the address.
[0027] In this solution, the method of using the lookup table to find a calculation result and extract it, and at the same time extracting the input data corresponding to the calculation result, includes:
[0028] If the calculation accuracy is 1 / 2 n , then start from the smallest calculation result in the lookup table, and every 1 / 2 n Extract a calculation result from the stored calculation results and extract its corresponding input data at the same time.
[0029] In this solution, all corresponding input data extracted are subjected to a second calculation to obtain a second data set, and the input in the second input data set is truncated to retain integer digits to obtain a third data set, including:
[0030] All corresponding input data m extracted are set to arbitrary integers to obtain a second data set, wherein the integer part of the data in the second data set is unique. If it is not unique, the value of m is multiplied by 10 and recalculated. After confirming that the integer in the second data set is unique, the number in the data set is truncated to retain the integer digit to obtain the third data set.
[0031] The third aspect of the present application provides a computer-readable storage medium, which includes a program for a method for implementing a complex function table lookup based on an electrochemical model. When the program for implementing a method for implementing a complex function table lookup based on an electrochemical model is executed by a processor, the steps of the method for implementing a complex function table lookup based on an electrochemical model are implemented.
[0032] As can be seen from the above, the complex function lookup table implementation method, system and storage medium based on the electrochemical model disclosed in the present invention include: performing a first calculation on a preset input data set to obtain a calculation result output data set of the corresponding accuracy of each data, corresponding the input data set and the output data set results one by one and storing them to obtain a lookup table; determining the current input data to be input and the accuracy of the calculation result, using the lookup table to find a calculation result and extract it, and extracting the input data corresponding to the calculation result; performing a second calculation on all the corresponding input data extracted to obtain a second data set, intercepting the input in the second input data set to retain integer digits, and obtaining a third data set; sorting the numbers in the third data set, calculating the slope between every two adjacent numbers after sorting, and determining the data range corresponding to each slope in the third data set; calculating the address of the actual number according to the slope, and finding the calculation result corresponding to the input data according to the address. The present invention can reduce the error of floating point to fixed point conversion; adopting a segmented table lookup method to find values according to different slopes is conducive to saving table lookup resources.
[0033] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1 A flow chart of a complex function table lookup implementation method based on an electrochemical model provided in an embodiment of the present application;
[0036] Figure 2 A block diagram of a complex function table lookup implementation system based on an electrochemical model provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0038] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0039] Please refer to Figure 1 , is a flow chart of a complex function table lookup implementation method based on an electrochemical model in some embodiments of the present application. The complex function table lookup implementation method based on an electrochemical model is used for electrochemical model calculation. The complex function table lookup implementation method based on an electrochemical model comprises the following steps:
[0040] S101, performing a first calculation on a preset input data set to obtain a calculation result output data set of the corresponding precision of each data, and storing the input data set and the output data set results in a one-to-one correspondence to obtain a lookup table;
[0041] S102, determining the current input data and the calculation result accuracy, using the lookup table to find a calculation result and extract it, and at the same time extracting the input data corresponding to the calculation result;
[0042] S103, performing a second calculation on all corresponding input data extracted to obtain a second data set, and truncating the input data in the second input data set to retain integer digits to obtain a third data set;
[0043] S104, sorting the numbers in the third data set, calculating the slope between every two adjacent numbers after the sorting, and determining the data range of each slope corresponding to the third data set;
[0044] S105. Obtain the address of the actual number according to the slope calculation, and find the calculation result corresponding to the input data according to the address.
[0045] It should be noted that in the electrochemical model calculation, each data model needs to clarify its corresponding calculation accuracy when performing calculations. The premise of the present invention is that the corresponding algorithm model has clarified the accuracy required for calculation. The accuracy of the calculation model is defined as 2 n , where n is an arbitrary integer. In addition, the present invention is a hardware implementation of a software algorithm, so the premise of the present invention is that there is a corresponding software algorithm in the computer, but not in the hardware, and the hardware cannot be implemented according to the software algorithm steps.
[0046] The technical purpose of the present application is to obtain an output data set of calculation results of the corresponding precision of each data by performing a first calculation on a preset input data set, and to correspond and store the input data set and the output data set results one by one to obtain a lookup table; determine the current input data to be input and the precision of the calculation result, use the lookup table to find a calculation result and extract it, and extract the input data corresponding to the calculation result; perform a second calculation on all the corresponding input data extracted to obtain a second data set, truncate the input in the second input data set to retain integer digits, and obtain a third data set; sort the numbers in the third data set, calculate the slope between every two adjacent numbers after sorting, and determine the data range corresponding to each slope in the third data set; calculate the address of the actual number according to the slope, and find the calculation result corresponding to the input data according to the address.
[0047] According to an embodiment of the present invention, the step of searching for a calculation result using the lookup table and extracting the result, and extracting input data corresponding to the calculation result, includes:
[0048] If the calculation accuracy is 1 / 2 n , then start from the smallest calculation result in the lookup table, and every 1 / 2 n Extract a calculation result from the stored calculation results and extract its corresponding input data at the same time.
[0049] It should be noted that first determine the current input data and calculation result accuracy. If the calculation accuracy is 1 / 2 n , then start from the smallest calculation result in the lookup table, and every 1 / 2 n Extract a calculation result from the stored calculation results and extract its corresponding input data at the same time.
[0050] According to an embodiment of the present invention, a second calculation is performed on all corresponding input data extracted to obtain a second data set, and the input in the second input data set is truncated to retain integer digits to obtain a third data set, including:
[0051] All corresponding input data m extracted are set to arbitrary integers to obtain a second data set, wherein the integer part of the data in the second data set is unique. If it is not unique, the value of m is multiplied by 10 and recalculated. After confirming that the integer in the second data set is unique, the number in the data set is truncated to retain the integer digit to obtain the third data set.
[0052] According to an embodiment of the present invention, the address of the actual number is obtained according to the slope calculation, and the calculation formula is:
[0053] n1 / k1+(n2-n1) / k2+(n3-n2) / k3
[0054] Among them, k1, K2, k3 represent different slopes, n is the actual input data, n1 is the upper limit of the first data set, and n2 is the upper limit of the second data set. It should be noted that the above situation is the case where n is greater than n2.
[0055] If n is less than n2 and greater than n1, the address calculation formula of the actual number is: n1 / k1+(n-n1) / k2; if n is less than n1, the address calculation formula of the actual number is: n / k1.
[0056] It should be noted that, in a specific embodiment, different slopes correspond to different data ranges in the third data set, for example, k1: 0-100, k2: 100-1000, k3: 1000-10000.
[0057] In a specific embodiment, the address of the actual number is determined according to k. When an input number q falls in k3, its address is calculated as 100 / k1+900 / k2+(q-1000) / k3.
[0058] According to an embodiment of the present invention, the slope is an integer, and the number of the slopes in the third data set is less than or equal to 10.
[0059] It should be noted that the first calculation in the present application is a general algorithm. The present application does not limit the type or calculation process of the first algorithm, and any algorithm that can complete the precision conversion calculation can be used.
[0060] It should be noted that, in a specific embodiment, the index value is calculated in the following steps:
[0061] 1. First multiply the corresponding input data (floating point number) by m, where m is any integer m mentioned above.
[0062] 2. Convert the floating point number obtained after multiplying by m into a fixed point number according to the IEEE754 standard, where only the integer part is required for the converted fixed point number.
[0063] 3. Compare the obtained integer with the range of each slope, subtract the minimum value in the corresponding range, divide it by the current slope, and then add the address corresponding to the minimum value of the range to get a new address, and search for data based on this address.
[0064] In a second aspect, the present application provides a complex function table lookup implementation system based on an electrochemical model, the complex function table lookup implementation system based on an electrochemical model comprising: a memory and a processor, the memory comprising a program of a complex function table lookup implementation method based on an electrochemical model, the program of the complex function table lookup implementation method based on an electrochemical model when executed by the processor implements the following steps:
[0065] S101, performing a first calculation on a preset input data set to obtain a calculation result output data set of the corresponding precision of each data, and storing the input data set and the output data set results in a one-to-one correspondence to obtain a lookup table;
[0066] S102, determining the current input data and the calculation result accuracy, using the lookup table to find a calculation result and extract it, and at the same time extracting the input data corresponding to the calculation result;
[0067] S103, performing a second calculation on all corresponding input data extracted to obtain a second data set, and truncating the input data in the second input data set to retain integer digits to obtain a third data set;
[0068] S104, sorting the numbers in the third data set, calculating the slope between every two adjacent numbers after the sorting, and determining the data range of each slope corresponding to the third data set;
[0069] S105. Obtain the address of the actual number according to the slope calculation, and find the calculation result corresponding to the input data according to the address.
[0070] It should be noted that in the electrochemical model calculation, each data model needs to clarify its corresponding calculation accuracy when performing calculations. The premise of the present invention is that the corresponding algorithm model has clarified the accuracy required for calculation. The accuracy of the calculation model is defined as 2 n , where n is an arbitrary integer. In addition, the present invention is a hardware implementation of a software algorithm, so the premise of the present invention is that there is a corresponding software algorithm in the computer, but not in the hardware, and the hardware cannot be implemented according to the software algorithm steps.
[0071] The technical purpose of the present application is to obtain an output data set of calculation results of the corresponding precision of each data by performing a first calculation on a preset input data set, and to correspond and store the input data set and the output data set results one by one to obtain a lookup table; determine the current input data to be input and the precision of the calculation result, use the lookup table to find a calculation result and extract it, and extract the input data corresponding to the calculation result; perform a second calculation on all the corresponding input data extracted to obtain a second data set, truncate the input in the second input data set to retain integer digits, and obtain a third data set; sort the numbers in the third data set, calculate the slope between every two adjacent numbers after sorting, and determine the data range corresponding to each slope in the third data set; calculate the address of the actual number according to the slope, and find the calculation result corresponding to the input data according to the address.
[0072] According to an embodiment of the present invention, the step of searching for a calculation result using the lookup table and extracting the result, and extracting input data corresponding to the calculation result, includes:
[0073] If the calculation accuracy is 1 / 2 n , then start from the smallest calculation result in the lookup table, and every 1 / 2 n Extract a calculation result from the stored calculation results and extract its corresponding input data at the same time.
[0074] It should be noted that first determine the current input data and calculation result accuracy. If the calculation accuracy is 1 / 2 n , then start from the smallest calculation result in the lookup table, and every 1 / 2 n Extract a calculation result from the stored calculation results and extract its corresponding input data at the same time.
[0075] According to an embodiment of the present invention, a second calculation is performed on all corresponding input data extracted to obtain a second data set, and the input in the second input data set is truncated to retain integer digits to obtain a third data set, including:
[0076] All corresponding input data m extracted are set to arbitrary integers to obtain a second data set, wherein the integer part of the data in the second data set is unique. If it is not unique, the value of m is multiplied by 10 and recalculated. After confirming that the integer in the second data set is unique, the number in the data set is truncated to retain the integer digit to obtain the third data set.
[0077] According to an embodiment of the present invention, the address of the actual number is obtained according to the slope calculation, and the calculation formula is:
[0078] n1 / k1+(n2-n1) / k2+(n3-n2) / k3
[0079] Among them, k1, K2, k3 represent different slopes, n is the actual input data, n1 is the upper limit of the first data set, and n2 is the upper limit of the second data set. It should be noted that the above situation is the case where n is greater than n2.
[0080] If n is less than n2 and greater than n1, the address calculation formula of the actual number is: n1 / k1+(n-n1) / k2; if n is less than n1, the address calculation formula of the actual number is: n / k1.
[0081] It should be noted that, in a specific embodiment, different slopes correspond to different data ranges in the third data set, for example, k1: 0-100, k2: 100-1000, k3: 1000-10000.
[0082] In a specific embodiment, the address of the actual number is determined according to k. When an input number q falls in k3, its address is calculated as 100 / k1+900 / k2+(q-1000) / k3.
[0083] According to an embodiment of the present invention, the slope is an integer, and the number of the slopes in the third data set is less than or equal to 10.
[0084] It should be noted that the first calculation in the present application is a general algorithm. The present application does not limit the type or calculation process of the first algorithm, and any algorithm that can complete the precision conversion calculation can be used.
[0085] It should be noted that, in a specific embodiment, the index value is calculated in the following steps:
[0086] 1. First multiply the corresponding input data (floating point number) by m, where m is any integer m mentioned above.
[0087] 2. Convert the floating point number obtained after multiplying by m into a fixed point number according to the IEEE754 standard, where only the integer part is required for the converted fixed point number.
[0088] 3. Compare the obtained integer with the range of each slope, subtract the minimum value in the corresponding range, divide it by the current slope, and then add the address corresponding to the minimum value of the range to get a new address, and search for data based on this address.
[0089] The third aspect of the present application provides a computer-readable storage medium, which includes a program for a method for implementing a complex function table lookup based on an electrochemical model. When the program for implementing a method for implementing a complex function table lookup based on an electrochemical model is executed by a processor, the steps of the method for implementing a complex function table lookup based on an electrochemical model are implemented.
[0090] Example 2
[0091] This embodiment illustrates and describes the present invention through specific data examples. When implementing the present invention, it is necessary to first determine the accuracy of the calculation. For example, the accuracy of the output data is required to be 0.0001.
[0092] 1. According to the requirements of output data, all calculation result data sets A are traversed, that is, all values of Y values from 0.0 to 1.0 in the figure are calculated, where a point is taken every 0.0001, and the corresponding x and y are stored in the memory.
[0093] 2. All inputs x are classified into a data set B. In data set A, the input data x obtained here is also 0.0-1.0. According to the data set B calculated this time, m (mentioned in the invention content) is selected as 1000-000, so that all values of the obtained data set C are unique.
[0094] 3. Re-match the data set in C with its calculation results, and then sort them from large to small according to the integer value of its input data, corresponding to address bits 0, 1, 2, and 3. Then use the corresponding calculation results as the data corresponding to the address bits. Obtain the corresponding data table.
[0095] 4. Obtain the slope k between every two adjacent numbers in c after the corresponding numbers are arranged from large to small, and give the range of different k, such as k1: 0-100, k2: 100-1000, k3: 1000-10000.
[0096] Directions:
[0097] 1. Multiply the corresponding floating point number a by m: 1000_000. Get the new floating point value b.
[0098] 2. Convert b into a fixed-point number using the IEEE754 standard, discard the decimal part of the fixed-point number, retain the integer, and obtain c.
[0099] 3. According to the above scheme of 100 / k1+900 / k2+(q-1000) / k3, find the address corresponding to c, and finally look up the table to get the calculation result corresponding to the input data.
[0100] The present invention discloses a complex function lookup table implementation method, system and storage medium based on an electrochemical model, the method comprising: performing a first calculation on a preset input data set to obtain a calculation result output data set of the corresponding precision of each data, making the input data set and the output data set result correspond to each other and storing them one by one to obtain a lookup table; determining the current input data to be input and the calculation result precision, using the lookup table to find a calculation result and extract it, and extracting the input data corresponding to the calculation result; performing a second calculation on all the corresponding input data extracted to obtain a second data set, intercepting the input in the second input data set to retain integer digits, and obtaining a third data set; sorting the numbers in the third data set, calculating the slope between every two adjacent numbers after sorting, and determining the data range corresponding to each slope in the third data set; calculating the address of the actual number according to the slope, and finding the calculation result corresponding to the input data according to the address. The present invention can reduce the error of floating point to fixed point conversion; adopting a segmented table lookup method to find values according to different slopes is conducive to saving table lookup resources.
[0101] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0102] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0103] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0104] Those skilled in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, and other media that can store program codes.
[0105] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
Claims
1. A complex function table lookup implementation method based on an electrochemical model, characterized in that: The method comprises: Perform a first calculation on a preset input data set to obtain a calculation result output data set of the corresponding precision of each data, and store the input data set and the output data set results in a one-to-one correspondence to obtain a lookup table; Determine the current data to be input and the accuracy of the calculation result, use the lookup table to find a calculation result and extract it, and extract the input data corresponding to the calculation result; Perform a second calculation on all corresponding input data extracted to obtain a second data set, and truncate the input data in the second input data set to retain integer digits to obtain a third data set; Sort the numbers in the third data set, calculate the slope between every two adjacent numbers after the sorting, and determine the data range of each slope corresponding to the third data set; The address of the actual number is obtained based on the slope calculation, and the calculation result corresponding to the input data is found based on the address.
2. A complex function table lookup implementation method based on an electrochemical model according to claim 1, characterized in that: The step of using the lookup table to search for a calculation result and extracting it, and extracting input data corresponding to the calculation result, includes: If the calculation accuracy is 1 / 2 n , then start from the smallest calculation result in the lookup table, and every 1 / 2 n Extract a calculation result from the stored calculation results and extract its corresponding input data at the same time.
3. A complex function table lookup implementation method based on an electrochemical model according to claim 2, characterized in that: Perform a second calculation on all corresponding input data extracted to obtain a second data set, and truncate the input in the second input data set to retain integer digits to obtain a third data set, including: All corresponding input data m extracted are set to arbitrary integers to obtain a second data set, wherein the integer part of the data in the second data set is unique. If it is not unique, the value of m is multiplied by 10 and recalculated. After confirming that the integer in the second data set is unique, the number in the data set is truncated to retain the integer digit to obtain the third data set.
4. The method for implementing a complex function table lookup based on an electrochemical model according to claim 3, characterized in that: The address of the actual number is obtained according to the slope calculation. The calculation formula is: n1 / k1+(n2-n1) / k2+(n-n2) / k3 Wherein, k1, K2, and k3 represent different slopes, n is the actual input data, n1 is the upper limit of the first data set, and n2 is the upper limit of the second data set.
5. The method for implementing a complex function table lookup based on an electrochemical model according to claim 4, characterized in that: If n is less than n2 and greater than n1, the address calculation formula of the actual number is: n1 / k1+(n-n1) / k2; if n is less than n1, the address calculation formula of the actual number is: n / k1.
6. The method for implementing a complex function table lookup based on an electrochemical model according to claim 1, characterized in that: The slope is an integer, and the number of the integers in the third data set is less than or equal to 10.
7. A complex function table lookup implementation system based on an electrochemical model, characterized in that: The complex function table lookup implementation system based on the electrochemical model comprises: a memory and a processor, wherein the memory comprises a program of a complex function table lookup implementation method based on the electrochemical model, and when the program of the complex function table lookup implementation method based on the electrochemical model is executed by the processor, the following steps are implemented: Perform a first calculation on a preset input data set to obtain a calculation result output data set of the corresponding precision of each data, and store the input data set and the output data set results in a one-to-one correspondence to obtain a lookup table; Determine the current data to be input and the accuracy of the calculation result, use the lookup table to find a calculation result and extract it, and extract the input data corresponding to the calculation result; Perform a second calculation on all corresponding input data extracted to obtain a second data set, and truncate the input data in the second input data set to retain integer digits to obtain a third data set; Sort the numbers in the third data set, calculate the slope between every two adjacent numbers after the sorting, and determine the data range of each slope corresponding to the third data set; The address of the actual number is obtained based on the slope calculation, and the calculation result corresponding to the input data is found based on the address.
8. The method for implementing a complex function table lookup based on an electrochemical model according to claim 7, characterized in that: The step of using the lookup table to search for a calculation result and extracting it, and extracting input data corresponding to the calculation result, includes: If the calculation accuracy is 1 / 2 n , then start from the smallest calculation result in the lookup table, and every 1 / 2 n Extract a calculation result from the stored calculation results and extract its corresponding input data at the same time.
9. The method for implementing a complex function table lookup based on an electrochemical model according to claim 7, characterized in that: Perform a second calculation on all corresponding input data extracted to obtain a second data set, and truncate the input in the second input data set to retain integer digits to obtain a third data set, including: All corresponding input data m extracted are set to arbitrary integers to obtain a second data set, wherein the integer part of the data in the second data set is unique. If it is not unique, the value of m is multiplied by 10 and recalculated. After confirming that the integer in the second data set is unique, the number in the data set is truncated to retain the integer digit to obtain the third data set.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a program for implementing a complex function table lookup method based on an electrochemical model. When the program for implementing a complex function table lookup method based on an electrochemical model is executed by a processor, the steps of the complex function table lookup method based on an electrochemical model described in any one of claims 1 to 6 are implemented.