Step length determination method, simulation method, electronic device and product of rigid circuit

By quantifying and correcting the step size error in the simulation process of rigid circuits, and using the autocorrelation coefficient to correct the error estimate, the problems of non-convergence and waveform oscillation caused by inaccurate step size calculation are solved, and higher accuracy simulation results are achieved.

CN121389946BActive Publication Date: 2026-04-17XPEEDIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XPEEDIC CO LTD
Filing Date
2025-12-25
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In the simulation of rigid circuits, the step size calculation in the existing technology is inaccurate, which leads to problems such as non-convergence or waveform oscillation.

Method used

By quantifying the local truncation error introduced by the undetermined step size, the error estimate is corrected using the autocorrelation coefficient, a suitable step size is determined to avoid waveform oscillation, the first error estimate is corrected using the autocorrelation coefficient, a more accurate second error estimate is obtained, and the actual step size is determined when the error is less than the threshold.

Benefits of technology

This improves the accuracy of step size calculation, avoids waveform non-convergence issues, and ensures the stability and accuracy of the simulation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121389946B_ABST
    Figure CN121389946B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a step length determination method and a simulation method of a rigid circuit, electronic equipment and products, and belong to the technical field of data processing. The step length determination method of the rigid circuit comprises obtaining a to-be-determined step length at a next time; quantifying a local truncation error introduced by the to-be-determined step length to obtain a first error estimation value related to the to-be-determined step length; correcting the first error estimation value by calculating an autocorrelation coefficient to obtain a second error estimation value; and when the second error estimation value is less than or equal to a preset error threshold, determining the to-be-determined step length as an actual step length at the next time. The autocorrelation coefficient can reflect the oscillation condition, so when the autocorrelation coefficient is different, the oscillation condition is also different. The first error estimation value is corrected by the autocorrelation coefficient, so that the actual step length determined based on the second error estimation value has higher accuracy, and the problem of non-convergence of the waveform is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and more specifically, to a method for determining the step size of a rigid circuit, a simulation method, an electronic device, and a product. Background Technology

[0002] In practical circuits, especially large-scale mixed-signal circuits (such as circuits containing precision biasing, oscillators, phase-locked loops, or power management modules), stiffness is widely observed, forming rigid circuits. A rigid circuit (rigid system) refers to a system whose dynamics contain multiple dynamic modes with significantly different time constants.

[0003] In the simulation of rigid systems, simulators may encounter problems such as non-convergence or waveform oscillation when solving rigid circuits. Furthermore, current methods for calculating the step size in the simulation process suffer from decreased accuracy due to non-convergence or waveform oscillation. Summary of the Invention

[0004] This application provides a method for determining the step size of a rigid circuit, a simulation method, an electronic device, and a product, to at least solve the technical problem of inaccurate step size calculation.

[0005] According to a first aspect of the embodiments of this application, a method for determining the step size of a rigid circuit is provided, the method comprising:

[0006] Obtain the undetermined step size for the next time step, where the undetermined step size is the time difference between the current time step and the next time step;

[0007] The local truncation error introduced by the undetermined step size is quantified to obtain the first error estimate related to the undetermined step size;

[0008] The first error estimate is corrected by calculating the autocorrelation coefficient to obtain the second error estimate;

[0009] When the second error estimate is less than or equal to the preset error threshold, the undetermined step size is determined as the actual step size for the next moment.

[0010] In this embodiment, the autocorrelation coefficient can reflect the oscillation situation. Therefore, when the autocorrelation coefficient is different, the oscillation situation is also different. The first error estimate is corrected by the autocorrelation coefficient, so that the actual step size determined based on the second error estimate is more accurate and the problem of waveform non-convergence is avoided.

[0011] In conjunction with the first aspect, in an optional implementation of this application embodiment, the step of correcting the first error estimate by calculating the autocorrelation coefficient to obtain the second error estimate includes:

[0012] The autocorrelation coefficient is calculated according to the autocorrelation formula;

[0013] The waveform state of the circuit state variable parameters of the rigid circuit during the simulation is determined based on the autocorrelation coefficient, wherein the circuit state variable parameters include at least one of capacitor voltage and inductor current.

[0014] Determine the correction coefficient based on the waveform state;

[0015] The second error estimate is obtained by multiplying the first error estimate by the correction coefficient.

[0016] In this implementation, the waveform state of the circuit state variable parameters is first determined based on the autocorrelation coefficient. Then, the corresponding correction coefficient is determined based on the different waveform states. Finally, the correction coefficient is multiplied by the first error estimate to obtain the second error estimate, thus completing the correction of the first error estimate and ensuring the correlation between the second error estimate and the autocorrelation coefficient. This allows the step size determined based on the second error estimate to overcome the waveform oscillation.

[0017] In conjunction with the first aspect, in one optional implementation of the embodiments of this application, the waveform state includes an oscillating state and a non-oscillating state;

[0018] Determining the correction coefficient based on the waveform state includes:

[0019] The corresponding correction coefficient is retrieved from the preset state table according to the waveform state. The state table includes the oscillation state and the oscillation state corresponds to a corresponding correction coefficient.

[0020] By adopting this implementation method and determining the correction coefficient through a preset state table, it is beneficial to save resources and improve the efficiency and accuracy of determining the correction coefficient.

[0021] In conjunction with the first aspect, in one optional implementation of the embodiments of this application, the waveform state includes an oscillation state, an oscillation critical state, and a non-oscillation state;

[0022] Determining the correction coefficient based on the waveform state includes:

[0023] If the waveform state is the oscillation state, then the larger the autocorrelation coefficient, the larger the correction amplitude of the correction coefficient;

[0024] If the waveform state is in a critical oscillation state, then the smaller the autocorrelation coefficient, the smaller the correction amplitude of the correction coefficient;

[0025] If the waveform state is a non-oscillating state, then the smaller the autocorrelation coefficient, the closer the correction coefficient is to 1.

[0026] By adopting this implementation method, different correction coefficients can be determined under different waveform states by constraining the relationship between the autocorrelation coefficient and the correction coefficient, which is beneficial to improving the correlation between the correction coefficient and the autocorrelation coefficient.

[0027] In conjunction with the first aspect, in an optional implementation of this application embodiment, determining the waveform state of the circuit state variable parameters of the rigid circuit during simulation based on the autocorrelation coefficient includes:

[0028] If the autocorrelation coefficient is within a preset first interval, then the waveform state is an oscillation state;

[0029] If the autocorrelation coefficient is within a preset second interval, then the waveform state is a non-oscillating state;

[0030] The minimum value in the first interval is greater than the maximum value in the second interval.

[0031] This implementation method uses a preset interval to determine the waveform state, which helps to save computing resources and improve the efficiency of waveform state determination.

[0032] In conjunction with the first aspect, in an optional implementation of the embodiments of this application, the method further includes:

[0033] When the second error estimate is greater than the error threshold, the undetermined step size is reduced and the integral order when calculating the first error estimate is decreased.

[0034] The second error estimate is recalculated using the reduced step size and the reduced order of integration until the recalculated second error estimate is less than or equal to the preset error threshold.

[0035] Using this implementation, when the second error estimate is greater than the error threshold, the required step size and the order of integration will be adjusted simultaneously, so that the second error estimate recalculated in the future is less than or equal to the error threshold.

[0036] According to a second aspect of the embodiments of this application, a simulation method for a rigid circuit is provided, the method comprising:

[0037] The step size determination method described above is used to determine the step size between the current time and the next time in the simulation process;

[0038] The next time point is determined according to the step size for simulation.

[0039] According to a third aspect of the embodiments of this application, an electronic device is provided, including a memory and a processor;

[0040] The memory stores a computer program, and the processor implements the method described above when executing the computer program.

[0041] According to a fourth aspect of the present application, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program that, when run on a computer or processor, causes the computer or processor to perform the steps of the method described above.

[0042] According to a fifth aspect of the embodiments of this application, a computer program product is provided, the computer program product comprising computer instructions that, when executed by a computer or processor, cause the steps of the method described above to be performed.

[0043] The technical effects achieved by the second to fifth aspects mentioned above are similar to those achieved by the corresponding technical means in the first aspect, and will not be repeated here. Attached Figure Description

[0044] Figure 1 This is a flowchart of a method for determining the step size of a rigid circuit according to an embodiment of this application;

[0045] Figure 2 This is a transient simulation flowchart of a rigid circuit in application provided in an embodiment of this application;

[0046] Figure 3 This is a flowchart illustrating the application of a method for determining the step size of a rigid circuit, as provided in an embodiment of this application. Detailed Implementation

[0047] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0048] It should be understood that "multiple" as mentioned herein refers to two or more. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. In addition, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first," "second," etc., are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and the terms "first," "second," etc., do not necessarily imply that they are different.

[0049] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or apparatus.

[0050] First, the technical background and / or terminology involved in the embodiments of this application will be introduced.

[0051] In practical circuits, especially large-scale mixed-signal circuits (such as circuits containing precision biasing, oscillators, phase-locked loops, or power management modules), stiffness is widely observed. A stiff circuit (stiff system) refers to a circuit whose dynamics contain multiple dynamic modes with vastly different time constants. For example, a circuit may simultaneously involve nanosecond-level transistor switching processes and millisecond-level RC bias network setup processes. This characteristic of multiple eigenvalues ​​being spread across orders of magnitude makes the MNA equations describing its behavior a stiff system.

[0052] In simulating rigid systems, transient analysis is one of the most crucial and computationally intensive analysis types in integrated circuit SPICE simulators. Its mathematical foundation is Modified Nodal Analysis (MNA), which systematically establishes circuit equations to elegantly handle various circuit components, ultimately forming a large set of first-order ordinary differential equations (ODEs) or differential-algebraic equations (DAEs) that can be solved numerically. The goal of transient simulation is to numerically solve this MNA equation to obtain the time-varying response waveforms of the voltage at each node and the current in each branch of the circuit.

[0053] Rigid systems pose a significant challenge to numerical integration methods:

[0054] Explicit integration methods (such as Forward Euler) are forced to use extremely small step sizes, which are equivalent to the minimum time constant, even in the waveform flat regions corresponding to large time constants, in order to achieve stability rather than accuracy. This results in extremely low simulation efficiency.

[0055] Implicit integration methods (such as Trapezoidal and Gear): Although they are inherently adamant (A-Stable) or rigidly stable, allowing for step sizes larger than the minimum time constant, the choice of integration step size remains the most critical factor determining simulation efficiency and accuracy. While excessively large step sizes can maintain stability, they introduce unacceptable numerical errors, leading to waveform distortion.

[0056] To resolve the triple contradiction of "stability," "accuracy," and "efficiency" in rigid system simulation, modern SPICE simulators generally employ adaptive step-size control algorithms based on Local Truncation Error (LTE) estimation, often combined with implicit integration methods for rigid stability (such as the Gear method). The core idea of ​​this technique is to dynamically adjust the integration step size: using larger step sizes in regions of gentle waveform change to span the slow-changing modes of the rigid system, and automatically shrinking the step size in regions of rapid waveform change (such as transition edges) to capture the details of fast-changing modes, thereby achieving maximum efficiency while ensuring stability and accuracy.

[0057] The working principle and process can be briefly summarized as follows:

[0058] Prediction and Integration: At the current time point Based on historical information, the next time point is predicted using the currently selected implicit integration formula (such as Gear-2). The circuit state variables (capacitor voltage and inductor current in the MNA equation) at the specified location. Where h is the current attempt step size.

[0059] LTE estimation: This quantifies the local truncation error introduced by the current step size h using an error estimator that matches the integral formula (e.g., comparing results from Gear formulas of different orders). LTE is typically defined as an error estimate of a key state variable.

[0060] Step & Order Control for Stiff Systems: The estimated LTE value is compared with user-preset error tolerances (ABSTOL, RELTOL, CHGTOL). For stiff systems, advanced algorithms also dynamically adjust the order of the integration method.

[0061] If LTE ≤ Tolerance: the calculation was successful at this time point. In the region of smooth, rigid, slowly varying waveforms, the algorithm may simultaneously increase the integration order and the step size to accelerate the simulation extremely quickly.

[0062] If LTE > Tolerance: This indicates that the step size h is too large. The algorithm will reject the result, reduce the integration order (to improve stability), and significantly decrease the step size, backtracking. The points are recalculated to ensure accuracy and stability at rapid change edges.

[0063] Progression and repetition: Adjust the step size and order based on the decision result, and advance to the next accepted time point, repeating the above process until the simulation ends.

[0064] This technique, which combines a rigid stable integral method, LTE-based adaptive step / order control, and the MNA framework, is the cornerstone of SPICE simulator's ability to efficiently and robustly handle large-scale rigid circuits. It intelligently allocates computational resources to the most needed time periods, automatically managing the dynamic behavior of circuits across multiple time scales without user intervention, thereby obtaining reliable and efficient simulation results.

[0065] Based on the above, embodiments of this application provide a method for determining the step size of a rigid circuit, a simulation method, an electronic device, and a product, the purpose of which is:

[0066] Because SPICE simulators can exhibit non-convergence or waveform oscillation issues when solving stiff circuits, this invention, based on LTE estimation, proposes a method to detect different states during simulation and select an appropriate step size strategy to overcome numerical problems such as non-convergence and oscillation.

[0067] Next, the step size determination method, simulation method, electronic equipment and products of the rigid circuit provided in the embodiments of this application will be further described.

[0068] Reference Figure 1 The flowchart shown is a method for determining the step size of a rigid circuit. The method includes the following processing steps.

[0069] S100, Obtain the undetermined step size for the next time step.

[0070] Here, the undetermined step size is the time difference between the current moment and the next moment. That is, during the simulation, the step size needs to be continuously determined to calculate the next moment, and then implicit integration formulas (such as Gear-2) are used to predict the circuit state variable values ​​(i.e., circuit state variable parameters) at the next moment. For example, at the current moment... (or the current time point) When the time step is determined, the step size h for the next time step is obtained, and then the time point of the next time step is obtained. Using implicit integration formulas (such as Gear-2) to predict The capacitor voltage and inductor current values ​​at the specified locations are simulated.

[0071] The undetermined step size for the next time step can be determined by implicit integration, explicit integration, or preset. This example does not impose specific limitations on this and allows for the selection of the appropriate method to determine the undetermined step size for the next time step based on the actual simulation conditions.

[0072] S102. Quantify the local truncation error introduced by the undetermined step size to obtain the first error estimate related to the undetermined step size.

[0073] In one embodiment, quantization is performed using LTE estimation. Specifically, LTE estimation uses an error estimator that matches the integral formula (e.g., comparing results from Gear formulas of different orders) to quantify the local truncation error introduced by the current step size h. LTE is typically defined as an error estimate of a key state variable, which in this embodiment is the first error estimate.

[0074] S104. The first error estimate is corrected by calculating the autocorrelation coefficient to obtain the second error estimate.

[0075] The autocorrelation function measures the similarity between a signal and itself at different time delays (usually denoted as τ). It can be understood as making a copy of the signal, shifting the copy by τ on the time axis, and then calculating the correlation between the original signal and the shifted signal. This correlation is the value of the autocorrelation function at point τ. The autocorrelation coefficient, calculated using the autocorrelation function, reflects whether the waveform oscillates. Therefore, by calculating the autocorrelation coefficient and correcting the first error estimate based on it, the step size of the corrected second error estimate is more conducive to suppressing oscillations and avoiding non-convergence.

[0076] In one embodiment, the correction can be implemented using a preset algorithm or a preset function, such as weighting the first error estimate to achieve the correction.

[0077] S106. When the second error estimate is less than or equal to the preset error threshold, the undetermined step size is determined as the actual step size at the next moment.

[0078] The error threshold is preset and can be set according to the actual needs of the simulation or according to commonly used values ​​in the field. This embodiment does not specifically limit this setting. It should be noted that when the second error estimate is greater than the error threshold, it proves that the undetermined step size determined by the second error estimate does not meet the usage conditions. A new undetermined step size can be introduced or the current undetermined step size can be adjusted, and then the second error estimate is recalculated until the step size corresponding to the second error estimate meets the usage requirements (i.e., the second error estimate is less than or equal to the error threshold). Based on this step size, the next time point is determined. Then, based on the Modified Nodal Analysis (MNA) method, which systematically establishes circuit equations and can elegantly handle various circuit elements, a large set of first-order ordinary differential equations (ODEs) or differential algebraic equations (DAEs) that can be numerically solved is formed. The goal of transient simulation is to numerically solve this MNA equation to obtain the response waveforms of the voltage at each node and the current in the branch of the circuit over time, thus achieving continuous simulation.

[0079] In this embodiment, the autocorrelation coefficient can reflect the oscillation situation. Therefore, when the autocorrelation coefficient is different, the oscillation situation is also different. The first error estimate is corrected by the autocorrelation coefficient, so that the actual step size determined based on the second error estimate is more accurate and the problem of waveform non-convergence is avoided.

[0080] In one possible embodiment of this application, the step of correcting the first error estimate by calculating the autocorrelation coefficient to obtain the second error estimate includes:

[0081] The autocorrelation coefficient is calculated according to the autocorrelation formula;

[0082] The waveform state of the circuit state variable parameters of the rigid circuit during the simulation is determined based on the autocorrelation coefficient, wherein the circuit state variable parameters include at least one of capacitor voltage and inductor current.

[0083] Determine the correction coefficient based on the waveform state;

[0084] The second error estimate is obtained by multiplying the first error estimate by the correction coefficient.

[0085] The autocorrelation formula can be selected based on whether the values ​​collected during the simulation are continuous or discrete.

[0086] For example, in one embodiment, the signal acquired by the ADC is a discrete, finite-length signal sequence. Therefore, we use the following formula to estimate the autocorrelation function.

[0087] Suppose we have collected N data points: .

[0088] formula:

[0089] ; : Number of delayed sample points (Lag). The actual delay time is... ,in It is the sampling interval.

[0090] : The index for summation, traversing all overlapping data points.

[0091] Number of terms to sum: when delayed As the number increases, the number of overlapping data points It will decrease.

[0092] denominator This is a fixed normalization factor. Because the number of summation terms increases with... Increases and decreases, but the result is still divided by . This causes the magnitude of the estimated value to change with... It increases and then gradually decreases to 0. This is why it is called "biased".

[0093] In this implementation, the waveform state of the circuit state variable parameters is first determined based on the autocorrelation coefficient. Then, the corresponding correction coefficient is determined based on the different waveform states. Finally, the correction coefficient is multiplied by the first error estimate to obtain the second error estimate, thus completing the correction of the first error estimate and ensuring the correlation between the second error estimate and the autocorrelation coefficient. This allows the step size determined based on the second error estimate to overcome the waveform oscillation.

[0094] Optionally, in one implementation of this embodiment, the waveform state includes an oscillating state and a non-oscillating state;

[0095] Determining the correction coefficient based on the waveform state includes:

[0096] The corresponding correction coefficient is retrieved from the preset state table according to the waveform state. The state table includes the oscillation state and the oscillation state corresponds to a corresponding correction coefficient.

[0097] By adopting this implementation method and determining the correction coefficient through a preset state table, it is beneficial to save resources and improve the efficiency and accuracy of determining the correction coefficient.

[0098] Optionally, in one implementation of this embodiment, the waveform state includes an oscillation state, an oscillation critical state, and a non-oscillation state;

[0099] Determining the correction coefficient based on the waveform state includes:

[0100] If the waveform state is the oscillation state, then the larger the autocorrelation coefficient, the larger the correction amplitude of the correction coefficient;

[0101] If the waveform state is in a critical oscillation state, then the smaller the autocorrelation coefficient, the smaller the correction amplitude of the correction coefficient;

[0102] If the waveform state is a non-oscillating state, then the smaller the autocorrelation coefficient, the closer the correction coefficient is to 1.

[0103] The correction coefficient is calculated by setting a base value and a variation range. For example, if the base value is 1 and the variation range is 0.1, taking an oscillating waveform as an example, the autocorrelation coefficient ranges from 0 to 1. When the autocorrelation coefficient is greater than 0.5, it indicates an oscillating state, and the larger the autocorrelation coefficient, the greater the variation range. If the autocorrelation coefficient is 0.7, the variation range is... The correction factor is 1 + 0.2 = 1.2.

[0104] By adopting this implementation method, different correction coefficients can be determined under different waveform states by constraining the relationship between the autocorrelation coefficient and the correction coefficient, which is beneficial to improving the correlation between the correction coefficient and the autocorrelation coefficient.

[0105] Optionally, in one implementation of this embodiment, determining the waveform state of the circuit state variable parameters of the rigid circuit during simulation based on the autocorrelation coefficient includes:

[0106] If the autocorrelation coefficient is within a preset first interval, then the waveform state is an oscillation state;

[0107] If the autocorrelation coefficient is within a preset second interval, then the waveform state is a non-oscillating state;

[0108] The minimum value in the first interval is greater than the maximum value in the second interval.

[0109] In one embodiment, the first interval is 0.5-1 and the second interval is 0-0.2.

[0110] This implementation method uses a preset interval to determine the waveform state, which helps to save computing resources and improve the efficiency of waveform state determination.

[0111] Optionally, in one implementation of this embodiment, the method further includes:

[0112] When the second error estimate is greater than the error threshold, the undetermined step size is reduced and the integral order when calculating the first error estimate is decreased.

[0113] The second error estimate is recalculated using the reduced step size and the reduced order of integration until the recalculated second error estimate is less than or equal to the preset error threshold.

[0114] Using this implementation, when the second error estimate is greater than the error threshold, the required step size and the order of integration will be adjusted simultaneously, so that the second error estimate recalculated in the future is less than or equal to the error threshold.

[0115] A second aspect of this application provides a simulation method for a rigid circuit, the method comprising:

[0116] The step size determination method described above is used to determine the step size between the current time and the next time in the simulation process;

[0117] The next time point is determined according to the step size for simulation.

[0118] A third aspect of the embodiments of this application provides an electronic device, including a memory and a processor;

[0119] The memory stores a computer program, and the processor implements the method described above when executing the computer program.

[0120] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when run on a computer or processor, causes the computer or processor to perform the steps of the method described above.

[0121] A fifth aspect of this application provides a computer program product comprising computer instructions that, when executed by a computer or processor, cause the steps of the method described above to be performed.

[0122] In the above embodiments of this application, the descriptions of each embodiment have their own emphasis. Parts not described in detail in a certain embodiment can be referred to in the relevant descriptions of other embodiments. The steps illustrated in the related flowcharts can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than that shown here. In other words, the order of steps described in the foregoing embodiments is merely an example. Reasonable adjustments to the order of steps based on the content of the embodiments of this application are also within the protection scope of the embodiments of this application.

[0123] In a specific implementation of the embodiment of the present application, the simulation method of the rigid circuit includes the following processing procedures:

[0124] As Figure 2 and Figure 3 shown, the transient simulation process:

[0125] 1. According to the solution of the previous time step and the LTE strategy, estimate the time step of the next moment.

[0126] 2. According to the estimated time step, select an appropriate integration method and solve the MNA equation through the Newton iteration method.

[0127] 3. If the error is acceptable, repeat the above steps to continue solving the next time point. If the error is not acceptable, re - estimate the error and recalculate the time point at this time.

[0128] Step - size estimation process:

[0129] 1. Calculate LTE according to the formula.

[0130] 2. Calculate the autocorrelation coefficient according to the autocorrelation formula to determine different states, specifically including the flexible state (oscillation - critical state), stable state (non - oscillation state) and oscillation state. For example, set two thresholds a and b. If the autocorrelation coefficient 0 < r < a, it belongs to the stable state. If a < r < b, it belongs to the flexible state. If r > b, it belongs to the oscillation state. The calculation process of the autocorrelation coefficient is not specifically limited in this embodiment. Usually, in actual analysis, the data sample is finite, not the entire theoretical distribution. Therefore, the sample autocorrelation function is used to estimate the theoretical . For a time - series data with n observations , the sample autocorrelation coefficient at the time lag k is calculated by the formula:

[0131] ; where is the sample mean of the entire time series, the numerator is the sample covariance of and (multiplied by n), and the denominator is the sample variance of (multiplied by n).

[0132] 3. Multiply LTE by the relevant coefficient according to the state to obtain a new LTE value.

[0133] 4. Determine the step size according to the LTE value.

[0134] 5. Determine if the step size is acceptable. If it is acceptable, repeat the above process and start calculating the MNA equation for the next time point. If it is rejected, shorten the step size and recalculate the time point.

[0135] The time series is selected from ten time points preceding the current moment. Different coefficients, α = 0.5, 1, and 2, are used to represent the steady state (non-oscillating state), flexible state (oscillating critical state), and oscillating state, respectively. The final error value is obtained by multiplying the error value calculated by LTE by the autocorrelation coefficient α. Step size = coefficient / error (the larger the error, the smaller the step size). Coefficient = 2.

[0136] The descriptions of the above computer program products, computer-readable storage media, and electronic devices are similar to those of the above method embodiments, and have similar beneficial effects. For any technical details not disclosed in the computer program products, computer-readable storage media, and electronic devices of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0137] The sequence numbers or order of description of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0138] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0139] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0140] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0141] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital versatile disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiments of this application can be a non-volatile storage medium; in other words, it can be a non-transient storage medium.

[0142] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the scene data of the current frame in the 3D virtual scene involved in the embodiments of this application, the client's device information, and the scene interaction information are all obtained with full authorization.

[0143] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A step length determination method for rigid circuits, characterized in that The method includes: Obtain the undetermined step size for the next time step, where the undetermined step size is the time difference between the current time step and the next time step; The local truncation error introduced by the undetermined step size is quantified to obtain the first error estimate related to the undetermined step size; The first error estimate is corrected by calculating the autocorrelation coefficient to obtain the second error estimate; When the second error estimate is less than or equal to the preset error threshold, the undetermined step size is determined as the actual step size at the next moment. The step of correcting the first error estimate by calculating the autocorrelation coefficient to obtain the second error estimate includes: The autocorrelation coefficient is calculated according to the autocorrelation formula; The waveform state of the circuit state variable parameters during the simulation of the rigid circuit is determined based on the autocorrelation coefficient, wherein the circuit state variable parameters include at least one of capacitor voltage and inductor current. Determine the correction coefficient based on the waveform state; The second error estimate is obtained by multiplying the first error estimate by the correction coefficient.

2. The step length determination method for rigid circuit according to claim 1, wherein, The waveform states include oscillating states and non-oscillating states; Determining the correction coefficient based on the waveform state includes: The corresponding correction coefficient is retrieved from the preset state table according to the waveform state. The state table includes the oscillation state and the oscillation state corresponds to a corresponding correction coefficient.

3. The method for determining the step size of a rigid circuit according to claim 1, characterized in that, The waveform states include oscillation states, oscillation critical states, and non-oscillation states; Determining the correction coefficient based on the waveform state includes: If the waveform state is the oscillation state, then the larger the autocorrelation coefficient, the larger the correction amplitude of the correction coefficient; If the waveform state is in a critical oscillation state, then the smaller the autocorrelation coefficient, the smaller the correction amplitude of the correction coefficient; If the waveform state is a non-oscillating state, then the smaller the autocorrelation coefficient, the closer the correction coefficient is to 1.

4. The method for determining the step size of a rigid circuit according to claim 1, characterized in that, The step of determining the waveform state of the circuit state variable parameters of the rigid circuit during simulation based on the autocorrelation coefficient includes: If the autocorrelation coefficient is within a preset first interval, then the waveform state is an oscillation state; If the autocorrelation coefficient is within a preset second interval, then the waveform state is a non-oscillating state; The minimum value in the first interval is greater than the maximum value in the second interval.

5. The method for determining the step size of a rigid circuit according to any one of claims 1-4, characterized in that, The method further includes: When the second error estimate is greater than the error threshold, the undetermined step size is reduced and the integral order when calculating the first error estimate is decreased. The second error estimate is recalculated using the reduced step size and the reduced order of integration until the recalculated second error estimate is less than or equal to the preset error threshold.

6. A simulation method for a rigid circuit, characterized in that, The method includes: The step size between the current moment and the next moment in the simulation process is determined using the step size determination method described in any one of claims 1-5; The next time point is determined according to the step size for simulation.

7. An electronic device, characterized in that, Including memory and processor; The memory stores a computer program, and the processor, when executing the computer program, implements the method according to any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed on a computer or processor, causes the computer or processor to perform the steps of the method according to any one of claims 1-6.

9. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a computer or processor, cause the steps of the method described in any one of claims 1-6 to be performed.