A method for functional safety mutual inspection of a dsadc and a saradc

By using a functional safety cross-checking method between DSADC and SARADC, the error threshold and comparison step size are automatically calculated, which solves the problems of inconsistency in comparison and common cause failure under different ADC structures, realizes efficient redundant detection, and meets the functional safety design requirements of ASIL-D.

CN123158233APending Publication Date: 2026-11-24SHANGHAI XINBIDA MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511663285.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve redundant detection of ADCs with different structures in onboard motor control that meets ASIL-D requirements, especially due to time differences caused by variations in ADC sampling frequency and filter order, leading to inconsistencies in comparisons and common-cause failures.

Method used

The method of functional safety mutual inspection between DSADC and SARADC is adopted. The error threshold is automatically calculated and the conversion results of the two are compared by algorithm. The step size and error threshold are calculated by using floating point numbers to realize the arbitration of data comparison of three options and avoid common cause failure.

Benefits of technology

It enables the automatic finding of the optimal alignment relationship under different ADC structures without knowing the specific parameters, solves the problem of alignment inconsistency caused by different sampling rates, avoids common cause failures, and improves functional safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123158233A_ABST
    Figure CN123158233A_ABST
Patent Text Reader

Abstract

The application discloses a method for mutual safety inspection of a DSADC and a SARADC, and comprises the following steps: determining the data amount to be sampled in the DSADC or the SARADC; acquiring continuous sampling conversion data of the DSADC and the SARADC; comparing the data amount of the two groups of acquired data to determine the group of data with a larger data amount and the step length thereof; respectively solving the extreme value positions in the two groups of data and the maximum interval between adjacent two conversion results, and taking the set multiple of the maximum interval between the adjacent two conversion results as an error threshold; taking the extreme value position in the group of data with the larger data amount as the starting point of comparison of the group of data; if the two groups of data of the DSADC and the SARADC satisfy an algorithm running condition, then solving the variances of three groups of comparison errors from the two groups of data respectively, and performing subsequent data comparison according to the corresponding relationship of the group with the minimum variance, to determine the starting point of comparison of the group of data with the smaller data amount; and comparing the group of data with the larger data amount with the group of data with the smaller data amount according to the step length, and issuing an alarm when the comparison error is greater than the error threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of vehicle motor control, and more specifically, relates to a method for functional safety mutual testing of DSADC and SARADC. Background Technology

[0002] Today, the automotive industry is developing rapidly, and the functions of electronic devices in vehicles are becoming increasingly complex. The functional safety standard ISO 26262 is gradually becoming the standard for the automotive industry. In automotive motor control scenarios, especially in functional safety designs that meet ASIL-D requirements, the failure of the ADC's digital auxiliary circuit (DFA) must be fully considered.

[0003] Redundancy detection is one of the directions commonly considered in the industry for achieving functional safety. For example, in the application scenario of rotary transformers, it is necessary to ensure the correctness of the results of DSADC during the sampling and conversion process. When a fault occurs and the conversion result is abnormal, a safety mechanism is needed to detect it. For example, the sampling monitoring circuit and method disclosed in Chinese Patent 2023104493859 on May 30, 2023, monitors different ADC sampling signals between different hardware domains in a multi-core heterogeneous system or different ADC sampling signals within the same hardware domain. Another example is the motor angle detection and diagnosis device and method disclosed in Chinese Patent 2020800049789 on April 20, 2021, which describes a rotary transformer angle detection and diagnosis device. It has redundancy design in the ADC configuration itself, the ADC sampling and conversion result, the calculated sum of squares of sine and cosine, and the electrical angle calculation process, using the same sampling circuit to achieve a redundant safety mechanism.

[0004] However, in analyzing ADC redundancy detection, due to the complex analog and digital circuit designs involved in ADCs, isomorphically designed ADCs often fail to meet the ASIL-D standard due to DFA (Digital Aspect-Oriented Design). For example, the sampling monitoring scheme in Chinese Patent 2023104493859 theoretically calculates that the SAR ADC should start sampling a fixed time in advance, so that different ADCs sample the same point as much as possible. However, in practical applications, factors such as the ADC sampling frequency and filter order will change, causing the sampling time difference between different ADCs to change as well. At this time, recalculation and adjustment are required, and the scheme has poor versatility in actual implementation. Similarly, the redundancy scheme described in Chinese Patent 2020800049789 cannot avoid failures caused by common-cause failures from a functional safety perspective. Summary of the Invention

[0005] To address the shortcomings of the existing technology, this invention provides a method for functional safety mutual testing of DSADC and SARADC. This method can automatically calculate the error threshold between the conversion results of DSADC and SARADC, and automatically start comparing the conversion results of the two ADCs to determine whether the error exceeds the threshold.

[0006] According to one aspect of the present invention, a method for functional safety cross-testing between a DSADC and a SARADC is provided, comprising: Determine the amount of data that needs to be sampled in the DSADC or SARADC; Based on a defined amount of data, obtain continuous sampling conversion data between DSADC and SARADC; Compare the data volume of the two sets of data to determine the set with more data volume and its step size; Find the extreme value locations and the maximum interval between two adjacent transformation results in the two sets of data respectively, and use the set multiple of the maximum interval between two adjacent transformation results as the error threshold for data comparison. The extreme value position in the largest dataset is used as the starting point for comparison of this dataset; If the two sets of data from DSADC and SARADC meet the algorithm's operating conditions, then the variance of the three sets of comparison errors is calculated from the two sets of data respectively. Subsequent data comparisons are performed according to the correspondence of the set with the smallest variance, and the starting point for comparison of the set with the smaller amount of data is determined. During data comparison, the group with more data is compared one by one with the group with less data according to the step size. When the data comparison error exceeds the error threshold, an alarm is issued.

[0007] As a further technical solution, a large set of data and its step size are determined, including: When the data volume of DSADC is less than that of SARADC, use floating-point numbers to calculate the data volume of SARADC / the data volume of DSADC to obtain the step size of SARADC when taking data during the comparison.

[0008] As a further technical solution, determining a large set of data and its step size also includes: When the data volume of DSADC is greater than that of SARADC, use floating-point numbers to calculate the data volume of DSADC / the data volume of SARADC to obtain the step size of DSADC when taking data during the comparison.

[0009] As a further technical solution, using a set multiple of the maximum interval between two adjacent transformation results as the error threshold for data comparison, it also includes: The maximum interval between two consecutive conversion results in two sets of data is converted into the actual voltage value. The error threshold is determined based on the actual voltage value.

[0010] As a further technical solution, determining the error threshold also includes: When the maximum interval between two consecutive conversion results of DSADC is greater than the maximum interval between two consecutive conversion results of SARADC, the error threshold is calculated using floating-point numbers = maximum interval between two consecutive conversion results of DSADC × 1.1.

[0011] As a further technical solution, determining the error threshold also includes: When the maximum interval between two adjacent conversion results of SARADC is greater than the maximum interval between two adjacent conversion results of DSADC, the error threshold is calculated using floating-point numbers = maximum interval between two adjacent conversion results of SARADC × 1.1.

[0012] As a further technical solution, the algorithm's operating conditions include: When the amount of data from SARADC is greater than the amount of data from DSADC, the following condition is met: saradc_max_ptr +2×step ≤ saradc_num and dsadc_max_ptr +4 ≤ dsadc_num When the data volume of DSADC is greater than that of SARADC, the following condition is met: dsadc_max_ptr +2×step ≤ dsadc_num and saradc_max_ptr +4 ≤ saradc_num; Where saradc_max_ptr is the position of the maximum value of SARADC, dsadc_max_ptr is the position of the maximum value of DSADC, saradc_num is the number of samples of SARADC, dsadc_num is the number of samples of DSADC, and step is the step size of the group of data with a large amount of data.

[0013] As a further technical solution, the extreme value position includes the maximum value position or the minimum value position. If the calculated maximum value position is located at the rightmost position of the current set of data, the minimum value position is used to solve the variance of the three sets of comparison errors respectively, and subsequent data comparison is performed according to the correspondence of the set with the smallest variance.

[0014] As a further technical solution, the variances of the three sets of alignment errors are calculated separately, and the three sets of alignment data are obtained in the following manner: When the amount of data from SARADC is greater than that from DSADC, the correspondence between the three sets of comparison data is as follows: saradc_max_ptr +0×step −−− dsadc_max_ptr+ offset + 0 saradc_max_ptr +1×step −−− dsadc_max_ptr+ offset + 1 saradc_max_ptr +2×step −−− dsadc_max_ptr+ offset + 2 When the data volume of DSADC is greater than that of SARADC, the correspondence between the three sets of comparison data is as follows: dsadc_max_ptr +0×step −−− saradc_max_ptr+ offset + 0 dsadc_max_ptr +1×step −−− saradc_max_ptr+ offset + 1 dsadc_max_ptr +2× step −−− saradc_max_ptr+ offset + 2; Where saradc_max_ptr is the position of the maximum value of SARADC, dsadc_max_ptr is the position of the maximum value of DSADC, step is the step size of the set of data with a large amount of data, and offset is the variance of the alignment error.

[0015] According to one aspect of the present invention, an apparatus for functional safety interoperability testing of DSADC and SARADC is provided, comprising a DSADC, a SARADC, a memory, and a processor. The DSADC and SARADC are used for data sampling conversion. The memory stores program instructions that are executed by the processor. The processor calls the program instructions to execute the method for functional safety interoperability testing of DSADC and SARADC.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention addresses the issue of inconsistent sampling rates and filter orders between ADCs with different structures during cross-checking. It automatically finds the initial values ​​of the sampling points for the two different ADCs without requiring knowledge of their specific sampling rates and filter orders. Through algorithms and signal characteristics, it finds the optimal comparison relationship between the two sets of data. Based on this optimal relationship, it arbitrates the closest data comparison point using a three-way selection method, automatically extracts the data for comparison, and calculates the minimum error based on interpolation and variance in the actual three-way comparison. It also automatically calculates the safety alarm threshold. This invention solves the problem of a lack of fixed correspondence between two sets of sampled data when comparing data due to differences in sampling rates and sampling trigger times between two different ADCs.

[0017] 2. This invention enables the automatic matching of the best correspondence for each data segment for data comparison.

[0018] 3. This invention solves the common-cause failure problem that exists in redundant security mechanisms using the same sampling circuit. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 The hardware architecture diagram in the actual application on which the method provided in the embodiments of the present invention is based.

[0021] Figure 2 This is a flowchart illustrating a method for functional safety cross-checking between DSADC and SARADC provided in an embodiment of the present invention.

[0022] Figure 3 This is a schematic diagram illustrating the grouping of two sets of data for comparison in an embodiment of the present invention. Detailed Implementation

[0023] The existing designs mentioned do not meet the ASIL-D standard. Therefore, this invention proposes redundancy verification based on two different ADC architectures. However, due to the different design principles of different ADCs, the data samples obtained from sampling the same measured signal are not identical. Considering that the data will not be completely equal when performing redundancy comparison between the two types, a new algorithm needs to be designed to solve the data comparison consistency problem.

[0024] In the context of resolver applications, in order to ensure that the DSADC can detect whether there are any abnormalities in the conversion results during the sampling conversion process, an algorithm for mutual detection between DSADC and SARADC is proposed as a functional safety mechanism.

[0025] This algorithm can solve the two problems in the above analysis: 1. The algorithm can ignore the conversion time difference between two different ADCs and automatically calculate the appropriate points for data comparison based on the data retrieved from the two ADCs; 2. It can also avoid the failure caused by the common cause of the same sampling circuit making redundancy mechanism.

[0026] The algorithm ultimately achieves the following effect: given the amount of data to be sampled by either of the two ADCs, the algorithm can automatically calculate the error threshold between the conversion results of DSADC and SARADC, and automatically start comparing the conversion results of the two ADCs to determine whether the error exceeds the threshold.

[0027] To address the aforementioned technical problems, the technical solution adopted in this invention is as follows: both ADCs use continuous transfer sampling and conversion of data, respectively determine the position of the maximum value of each group of data, divide them into three corresponding relationships according to the cross-grouping method, calculate the variance of the error in the three corresponding relationships, and then compare the data according to the corresponding relationship with the smallest variance.

[0028] The complete and detailed plan is as follows: Set the amount of data to be sampled by DSADC. After DSADC starts sampling and conversion, let SARADC also start sampling and conversion. Both ADCs perform continuous conversion, and the conversion results are stored in two arrays respectively. After DSADC completes sampling, stop SARADC sampling. The two ADCs will then obtain two sets of data respectively.

[0029] Find the location of the maximum value, the specific value of the maximum value, the maximum interval between two adjacent conversion results, and the number of data points in each of the two sets of data. Use 1.1 times the maximum interval between two adjacent conversion results as the error threshold for data comparison. Because the sampling rates and sampling times of the two ADCs may be different, the difference between two consecutive points in the set with less data is inherently larger than the difference in the set with more data. No matter which of the two adjacent points in the set with less data is selected for comparison with the set with more data, there will be an error. To avoid false detections caused by this inherent error, it is stipulated that 1.1 times the maximum interval between two adjacent conversion results should be used as the error threshold for data comparison.

[0030] Determining the starting point for data comparison, taking the case where the SARADC data volume is greater than the DSADC data volume as an example, it's clear that the comparison between the two sets of data is not a one-to-one comparison. Instead, the SARADC is compared one-to-one with the DSADC at a certain step size. The step size is calculated by dividing the SARADC data volume by the DSADC data volume. Since the SARADC data volume is larger, the maximum value point in the SARADC data is designated as the starting point for this data comparison. Similarly, the minimum value point in the SARADC data can also be designated as the starting point for this data comparison.

[0031] The maximum value position of DSADC is designated as D1, followed by points D2, D3, D4, D5, and so on. The maximum value position of SARADC is designated as S1, followed by points S1+step, S1+2×step, and so on, referred to as S2, S3, and so on. These are divided into three groups based on different correspondences: Group 1 {S1-D1, S2-D2, S3-D3}, Group 2 {S1-D2, S2-D3, S3-D4}, and Group 3 {S1-D3, S2-D4, S3-D5}. The variance of the error in each of these three groups is calculated. The group with the smallest variance indicates the most stable error value when comparing data according to that correspondence; that is, the correspondence with the smallest relative error is more reliable. Therefore, the starting position for DSADC data comparison is determined. For example, if the variance of the error in the second group is found to be the smallest, then the starting position for DSADC data comparison is determined to be D2.

[0032] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. In addition, the technical features of the various embodiments or individual embodiments provided by the present invention can be arbitrarily combined to form new technical solutions. Such combinations are not bound by the order of steps and / or structural composition patterns, but must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

[0033] exist Figure 1 In this process, the software continuously samples the DSADC and SARADC through the system bus, and stores the output results in memory. After one continuous sampling is completed, the two sets of sampled data are calculated and compared based on the method described in the embodiments of this invention.

[0034] like Figure 2 The flowchart shown illustrates that the method described in this embodiment of the invention specifically includes the following steps: Step 1: Specify the number of DSADC sampling conversions in the software. This explanation uses DSADC as an example; however, in practice, you can also specify the starting number of SARADC sampling conversions.

[0035] Step 2, calculate the step size step_f. Because the sampling rates of the two ADCs may not be the same, the amount of sampled data will also be different within the same sampling time. Therefore, the data comparison is not a one-to-one comparison, but rather the data with smaller data volume is compared one by one, while the data with larger data volume is compared according to a fixed step size step.

[0036] Assuming the number of SARADC samples (saradc_num) > the number of DSADC samples (dsadc_num), that is, DSADC samples data from the 1st point, the 2nd point, ..., the Nth point, while SARADC samples data from the 1st point, the 1+step_fth point, ..., the 1+(N-1)×step_fth point, where step_f = saradc_num / dsadc_num. Floating-point numbers are used in this calculation, retaining the decimal part, and rounding the data each time it is taken, resulting in more accurate data. The calculation of sampling points is also the core of this invention, because in typical practical designs, the amount of data collected by SARADC and DSADC differs significantly. As previously assumed, the number of SARADC samples is greater than the number of DSADC samples. However, from a time-domain perspective, the original data sampled by the two different ADCs is the same; only the sampling step size is different. Therefore, to ensure that the data values ​​for redundant comparison are consistent, it is necessary to select appropriate values ​​from the sampled data for comparison.

[0037] Step 3: Calculate the maximum (minimum) value points dsadc_max(min)_ptr and saradc_max(min)_ptr in the two sets of ADC data, and the maximum interval between two adjacent results dsadc_interval_max and saradc_interval_max.

[0038] The purpose of finding the maximum (minimum) value is to find the first starting point for comparison between the two ADCs. Because regardless of which ADC is used for sampling, the position of the maximum (minimum) value can be considered as the peak (bottom) position of the waveform presented by the actual data (since in normal use, the ADC sampling frequency is much higher than the frequency of the actual signal).

[0039] Step 4: Convert dsadc_interval_max and saradc_interval_max from step 3 into actual voltage values, i.e.: dsadc_interval_max_f =dsadc_interval_max / dsadc_max_value×vref, saradc_interval_max_f =saradc_interval_max / saradc_max_value×vref, Where dsadc_max_value and saradc_max_value are the full-scale maximum values ​​of DSADC and SARADC, respectively, and vref represents the reference voltage of the ADC converter. Floating-point numbers are used for calculation here, and the decimal part is retained.

[0040] Step 5: Determine the safety alarm threshold (i.e., error threshold) based on the voltage value calculated in Step 4. Use 1.1 times the maximum interval between two adjacent conversion results as the error threshold for data comparison. Because the sampling rates and sampling times of the two ADCs may differ, the difference between two consecutive points in the group with less data is inherently larger than the difference in the group with more data. Therefore, the group with less data will have errors regardless of which of the adjacent points is compared with the group with more data. To avoid false detections due to this inherent error and to consider a certain degree of redundancy, it is stipulated that 1.1 times the maximum interval between two adjacent conversion results is used as the error threshold for data comparison. safety_alarm_threshold = dsadc_interval_max_f ×1.1 or safety_alarm_threshold = saradc_interval_max_f ×1.1.

[0041] The redundant comparison error in this step is an acceptable loss of accuracy in functional safety comparisons.

[0042] Step 6 involves determining whether the algorithm needs to continue execution. Since the later parts of the algorithm involve a large amount of computation, if the execution conditions are not met, the calculation results will be meaningless and software execution time will be wasted. The necessary conditions will be discussed later. Figure 3 Provide explanations when making interpretations.

[0043] Step 7: To determine the starting point for data comparison for each of the two sets of data and the appropriate correspondence between the data for data comparison, how to determine the starting point for data comparison in the following text? Figure 3 Provide explanations when making interpretations.

[0044] Step 8: Compare the two sets of data one by one according to the correspondence calculated in step 7. If the error between the two sets of data is greater than the safety alarm threshold, an alarm is issued and the algorithm is exited.

[0045] like Figure 3 As shown, within the same time frame, the more conversion results there are, the more accurately the original input is reproduced. Figure 2 Step 3 has already determined the maximum (minimum) value points of the two sets of data. The starting point for subsequent data comparisons is also from the maximum or minimum value position. However, because the maximum value point obtained in the green curve itself has a difference from the maximum value point of the red curve, and this difference is smallest at the maximum value position, if we directly compare the D1 point of the green curve with the S1 point of the red curve, the D2 point of the green curve with the S2 point of the red curve, and the D3 point of the green curve with the S3 point of the red curve, this correspondence will lead to the difference becoming larger and larger as the points closer to the maximum slope value increases. Therefore, relying on the maximum value of the two curves as the starting point for data comparison is unreliable. It is necessary to find the correspondence between the two curves with the smallest relative error of the comparison points.

[0046] according to Figure 3 The correspondences are divided into three groups: the first group {S1-D1, S2-D2, S3-D3}, the second group {S1-D2, S2-D3, S3-D4}, and the third group {S1-D3, S2-D4, S3-D5}. The minimum variance of the differences between the comparison data in each of the three groups is calculated. A smaller variance indicates a smaller sampling error between the data and the actual received data. The correspondence of the group with the smallest variance is the most suitable. The correspondences are as follows: SARADC data volume > DSADC data volume saradc_max_ptr +0×step −−− dsadc_max_ptr+ offset + 0 saradc_max_ptr +1×step −−− dsadc_max_ptr+ offset + 1 saradc_max_ptr +2× step −−− dsadc_max_ptr+ offset + 2 ... DSADC data volume > SARADC data volume dsadc_max_ptr +0× step −−− saradc_max_ptr+ offset + 0 dsadc_max_ptr +1×step −−− saradc_max_ptr+ offset + 1 dsadc_max_ptr +2× step −−− saradc_max_ptr+ offset + 2 ... The step is... Figure 2 The step_f calculated in step 2 needs to be rounded because the data is stored in memory. The offset is the value retrieved for each calculation. Figure 2 The offsets represented by the correspondences calculated in steps 7 and 8. It should be noted that, as mentioned above, for the three sets of correspondences, if the solved correspondence is the first set {S1-D1, S2-D2, S3-D3}, then offset=0; if it is the second set {S1-D2, S2-D3, S3-D4}, then offset=1; and if it is the third set {S1-D3, S2-D4, S3-D5}, then offset=2.

[0047] From the above derivation, we can see that Figure 2 The conditions for determining whether the algorithm needs to continue execution in step 6 are as follows: SARADC data volume > DSADC data volume saradc_max_ptr +2×step ≤ saradc_num and dsadc_max_ptr +4 ≤ dsadc_num; DSADC data volume > SARADC data volume: dsadc_max_ptr +2×step ≤ dsadc_num and saradc_max_ptr +4 ≤ saradc_num.

[0048] If the maximum value is located at the rightmost position of the data segment, then the minimum value will be used instead. Figure 2 The algorithm in steps 7 and 8. It should be noted that the "position of the maximum value" refers to the position of the maximum value found in step 3. If the maximum value in either set of data is on the far right, the minimum value position needs to be used instead.

[0049] Based on the same inventive concept as the foregoing embodiments, this embodiment of the invention also provides an apparatus for functional safety mutual testing of DSADC and SARADC, including DSADC, SARADC, memory and processor. The DSADC and SARADC are used for data sampling conversion. The memory stores program instructions that are executed by the processor. The processor calls the program instructions to execute the aforementioned method for functional safety mutual testing of DSADC and SARADC.

[0050] The terms “comprising” and “having”, and any variations thereof, in the specification, claims, and accompanying drawings of this invention are intended to cover a non-exclusive inclusion, such as a process, method, system, product, or apparatus that includes a series of steps or units, not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0051] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.

Claims

1. A method for functional safety cross-testing between DSADC and SARADC, characterized in that, include: Determine the amount of data that needs to be sampled in the DSADC or SARADC; Based on a defined amount of data, obtain continuous sampling conversion data between DSADC and SARADC; Compare the data volume of the two sets of data to determine the set with more data volume and its step size; Find the extreme value locations and the maximum interval between two adjacent transformation results in the two sets of data respectively, and use the set multiple of the maximum interval between two adjacent transformation results as the error threshold for data comparison. The extreme value position in the largest dataset is used as the starting point for comparison of this dataset; If the two sets of data from DSADC and SARADC meet the algorithm's operating conditions, then the variance of the three sets of comparison errors is calculated from the two sets of data respectively. Subsequent data comparisons are performed according to the correspondence of the set with the smallest variance, and the starting point for comparison of the set with the smaller amount of data is determined. During data comparison, the group with more data is compared one by one with the group with less data according to the step size. When the data comparison error exceeds the error threshold, an alarm is issued.

2. The method for functional safety cross-testing of DSADC and SARADC according to claim 1, characterized in that, Determine a large set of data and its step size, including: When the data volume of DSADC is less than that of SARADC, use floating-point numbers to calculate the data volume of SARADC / the data volume of DSADC to obtain the step size of SARADC when taking data during the comparison.

3. The method for functional safety cross-testing of DSADC and SARADC according to claim 1, characterized in that, Determining a large set of data and its step size also includes: When the data volume of DSADC is greater than that of SARADC, use floating-point numbers to calculate the data volume of DSADC / the data volume of SARADC to obtain the step size of DSADC when taking data during comparison.

4. The method for functional safety mutual testing of DSADC and SARADC according to claim 1, characterized in that, The error threshold for data comparison is set as a multiple of the maximum interval between two adjacent transformation results, and also includes: The maximum interval between two consecutive conversion results in two sets of data is converted into the actual voltage value. The error threshold is determined based on the actual voltage value.

5. The method for functional safety mutual testing of DSADC and SARADC according to claim 4, characterized in that, Determining the error threshold also includes: When the maximum interval between two consecutive conversion results of DSADC is greater than the maximum interval between two consecutive conversion results of SARADC, the error threshold is calculated using floating-point numbers = maximum interval between two consecutive conversion results of DSADC × 1.

1.

6. The method for functional safety mutual testing of DSADC and SARADC according to claim 5, characterized in that, Determining the error threshold also includes: When the maximum interval between two adjacent conversion results of SARADC is greater than the maximum interval between two adjacent conversion results of DSADC, the error threshold is calculated using floating-point numbers = maximum interval between two adjacent conversion results of SARADC × 1.

1.

7. The method for functional safety mutual testing of DSADC and SARADC according to claim 1, characterized in that, The algorithm's operating conditions include: When the amount of data from SARADC is greater than the amount of data from DSADC, the following condition is met: saradc_max_ptr +2×step ≤ saradc_num and dsadc_max_ptr +4 ≤ dsadc_num When the data volume of DSADC is greater than that of SARADC, the following condition is met: dsadc_max_ptr +2×step ≤ dsadc_num and saradc_max_ptr +4 ≤ saradc_num; Where saradc_max_ptr is the position of the maximum value of SARADC, dsadc_max_ptr is the position of the maximum value of DSADC, saradc_num is the number of samples of SARADC, dsadc_num is the number of samples of DSADC, and step is the step size of the group of data with a large amount of data.

8. The method for functional safety mutual testing of DSADC and SARADC according to claim 7, characterized in that, The extreme value position includes the maximum value position or the minimum value position. If the calculated maximum value position is located at the rightmost position of the current set of data, then the minimum value position is used to solve the variance of the three sets of comparison errors respectively, and subsequent data comparisons are performed according to the correspondence of the set with the smallest variance.

9. The method for functional safety mutual testing of DSADC and SARADC according to claim 1, characterized in that, Solving for the variance of the three sets of alignment errors separately also includes obtaining the three sets of alignment data in the following manner: When the amount of data from SARADC is greater than that from DSADC, the correspondence between the three sets of comparison data is as follows: saradc_max_ptr +0×step −−− dsadc_max_ptr+ offset + 0 saradc_max_ptr +1×step −−− dsadc_max_ptr+ offset + 1 saradc_max_ptr +2×step −−− dsadc_max_ptr+ offset + 2 When the data volume of DSADC is greater than that of SARADC, the correspondence between the three sets of comparison data is as follows: dsadc_max_ptr +0×step −−− saradc_max_ptr+ offset + 0 dsadc_max_ptr +1×step −−− saradc_max_ptr+ offset + 1 dsadc_max_ptr +2× step −−− saradc_max_ptr+ offset + 2; Where saradc_max_ptr is the position of the maximum value of SARADC, dsadc_max_ptr is the position of the maximum value of DSADC, step is the step size of the set of data with a large amount of data, and offset is the variance of the alignment error.

10. A device for functional safety cross-testing of DSADC and SARADC, characterized in that, The device includes a DSADC, a SARADC, a memory, and a processor. The DSADC and SARADC are used for data sampling and conversion. The memory stores program instructions that are executed by the processor. The processor calls the program instructions to execute a method for functional safety mutual testing of a DSADC and a SARADC as described in any one of claims 1 to 9.