A transient simulation method for oscillation circuits
By monitoring the changes in physical quantities of the oscillation circuit nodes, adjusting the time step and simulation points, and using the time step replication method, the problem of large period variations in the transient simulation of the oscillation circuit is solved, and more accurate period extraction and noise analysis are achieved.
Patent Information
- Application Number
- CN202311334758.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-16
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2043-10-16
AI Technical Summary
In existing transient simulations of oscillating circuits, the time discrete points do not match the system periodicity well, resulting in large period variations in the periodic oscillation state, affecting the accuracy of period extraction and noise analysis.
By monitoring the changes in physical quantities at the nodes of the oscillation circuit, adjusting the time point and time step of the transient simulation, and adopting the time step replication method, when the oscillation circuit enters periodic oscillation, linear interpolation is used to calculate the time restart point, and the time step style is adjusted accordingly to ensure simulation accuracy and periodic stability.
The periodic variation in transient waveforms is significantly reduced, the accuracy of oscillation circuit period extraction and the reliability of noise analysis are improved, and the accuracy of the simulation process is maintained.
Smart Images

Figure CN117172030B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of EDA radio frequency circuit simulation, and in particular to a transient simulation method for an oscillation circuit. Background Art
[0002] In RF circuit simulation, oscillating circuits often exhibit periodic oscillations under some external stimulus. Determining the circuit's oscillation period is often a crucial task in RF simulation. Generally speaking, frequency-domain and time-domain calculation methods, such as harmonic balance and shooting, can be used to rigorously calculate the oscillation frequency of oscillating circuits. However, in some applications, it's necessary to accurately extract the oscillating circuit's period using only the waveform from a transient simulation.
[0003] At present, in the transient simulation of existing oscillating circuits, a time-discrete method is used to solve time-dependent algebraic equations, and it is necessary to obtain the values of the unknown quantities to be solved at some discrete time points. When the circuit oscillates periodically, the values of these unknown quantities should theoretically repeat in a certain period. However, since the discrete time points and the periodicity of the system cannot completely match, even if the system is in a perfect periodic oscillation state, the period extracted from the actual output transient signal will still have slight changes. For example Figure 1 and Figure 2 As shown in the figure, it shows that the time step and period cannot match under periodic oscillation, where Figure 1 This is a time domain waveform diagram. Figure 2 This is a schematic diagram of the corresponding periodic changes. When the period is 2π, the periodic fluctuation is about 10 -6 Magnitude. Figure 3 and Figure 4 As shown, under periodic oscillations, the time step and period can match, where Figure 3 This is another time domain waveform diagram. It can be seen that the distribution pattern of time sampling points in each cycle is exactly the same. Figure 4 Shows a periodic fluctuation of about 10 -13 Magnitude. Figure 4 and Figure 2 In comparison, the range of significant periodic variations is much smaller. The magnitude of this periodic variation varies with certain transient simulation settings, such as the time step and the convergence criteria for each step. Therefore, this periodic variation does not originate from the oscillator circuit itself, such as multiple solutions or noise, but rather from the numerical implementation of the equation solution. Periodic variations hinder the extraction of precise time periods, and since the system's phase noise is also reflected in periodic fluctuations, they are also detrimental to noise analysis and should be avoided as much as possible in transient simulations. Summary of the Invention
[0004] In order to address the defects of the prior art, the purpose of the present invention is to provide a transient simulation method for an oscillating circuit. By monitoring the changes in physical quantities at a certain node of the oscillating circuit, the time point and time step of the transient simulation are adjusted. When the system is in periodic oscillation, the periodic variation in the transient waveform is greatly reduced, thereby enabling the period of the oscillating circuit to be accurately extracted through the transient simulation waveform of the circuit.
[0005] In order to achieve the above object, the present invention provides a transient simulation method for an oscillator circuit, comprising the following steps:
[0006] Obtain the time point when the oscillation circuit enters periodic oscillation;
[0007] Determine the length of the time step pattern and obtain the time step pattern according to the time step replication method;
[0008] Determine the time restart point and apply the time step pattern to perform transient simulation of the oscillating circuit.
[0009] Furthermore, the step of obtaining the time point at which the system enters periodic oscillation further includes:
[0010] Selecting a node from an oscillating circuit as a reference point, wherein a physical quantity of the node changes periodically with the oscillation of the circuit;
[0011] Determining a time point when the oscillation circuit enters a stable oscillation state;
[0012] A reference value of the physical quantity at the reference point is preset, and the reference value is within a variation range of the physical quantity at the reference point.
[0013] Furthermore, the physical quantity of the reference point is voltage or current; and the change pattern of the physical quantity is in the shape of sine or cosine.
[0014] Furthermore, the step of determining the length of the time step pattern and obtaining the time step pattern according to the time step replication method further includes:
[0015] Determines the length of the time step pattern;
[0016] Perform transient simulation on the oscillation circuit and monitor the changes in physical quantities at the reference point;
[0017] During the period of time when the physical quantity is monitored to change from small to large and exceeds a preset reference value, a linear interpolation calculation is performed to obtain a time point when the physical quantity is equal to the reference value;
[0018] Continuing the simulation from the time point when the physical quantity is equal to the preset reference value, after a number of time steps equal to the length value, to obtain the same number of consecutive time points;
[0019] The time step pattern is calculated based on the obtained continuous time points and recorded in the step set.
[0020] Furthermore, the time point and the time step pattern have the following relationship:
[0021]
[0022] Among them, N s The length of the time step style is set, and its value is a positive integer. t* is the time point when the physical quantity of the reference point is equal to the preset reference value. From t1 to t Ns N after t* s consecutive time points, h1 to h Ns The time step style for each time period.
[0023] Furthermore, the step of determining the time restart point and applying the time step pattern to perform transient simulation on the oscillation circuit further includes:
[0024] Perform transient simulation of oscillation circuits and monitor physical quantities at reference points;
[0025] During the time period when the physical quantity exceeds the preset reference value, linear interpolation is performed to calculate the time point when the physical quantity is equal to the reference value and determine it as the time restart point;
[0026] Extracting a time step pattern from the step set;
[0027] Calculating a time point after the time restart point according to the time step pattern;
[0028] Simulate at the calculated time point to obtain the value of the unknown physical quantity at each node of the oscillation circuit;
[0029] Determine whether the simulation duration reaches the preset total simulation time. If so, end the simulation; otherwise, continue with the above steps.
[0030] Furthermore, the step of performing transient simulation on the oscillation circuit and monitoring the physical quantity of the reference point further includes: using a time discretization method to perform time discretization and controlling the time step.
[0031] Furthermore, the step of performing linear interpolation calculation to obtain the time point when the physical quantity is equal to the reference value is performed by using the following mathematical relationship:
[0032]
[0033] Among them, u + and t + are the physical quantity and the corresponding time point when the physical quantity is greater than u*; u - and t - They are the physical quantity and the corresponding time point when the physical quantity is less than u*.
[0034] To achieve the above-mentioned objectives, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to execute the computer program stored in the memory to implement the transient simulation method of the oscillation circuit as described above.
[0035] To achieve the above object, the present invention further provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, and the instruction is loaded and executed by a processor to implement the transient simulation method of the oscillation circuit as described above.
[0036] The transient simulation method of the oscillator circuit provided by the present invention has the following beneficial effects compared with the prior art:
[0037] The method of the present invention monitors the changes in the physical quantity of a node in the oscillating circuit to obtain a time step pattern for adjusting the time point and time step of subsequent transient simulations. When the system is in periodic oscillation, the periodic variation in the transient waveform can be greatly reduced; at the same time, the simulation accuracy is guaranteed and the normal evolution process of the original circuit differential equation is not disturbed.
[0038] Other features and advantages of the present invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0040] Figure 1 A schematic diagram of a time domain waveform according to the present invention;
[0041] Figure 2 A schematic diagram of a periodic change according to the present invention;
[0042] Figure 3 is another time domain waveform diagram according to the present invention;
[0043] Figure 4 is another schematic diagram of periodic changes according to the present invention;
[0044] Figure 5 is a flow chart of a transient simulation method for an oscillation circuit according to an embodiment of the present invention;
[0045] Figure 6 Schematic diagram of the structure of an LC oscillator circuit according to an embodiment of the present invention;
[0046] Figure 7 A flowchart for obtaining a time step pattern according to an embodiment of the present invention;
[0047] Figure 8 A schematic diagram of a time step pattern structure obtained according to an embodiment of the present invention;
[0048] Figure 9 A flowchart of applying a time step style according to an embodiment of the present invention;
[0049] Figure 10 A schematic diagram of a time step pattern application structure according to an embodiment of the present invention;
[0050] Figure 11 is a schematic diagram of simulation results according to an embodiment of the present invention;
[0051] Figure 12 FIG. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0053] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0054] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0055] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative and non-restrictive. Those skilled in the art will understand that unless the context clearly indicates otherwise, they should be understood as "one or more". "Plurality" should be understood as two or more.
[0056] In transient simulation, the time step needs to be calculated at each time point to determine the next time point. If the system evolves according to the same time step at the beginning of each cycle, then it is more likely to evolve according to the same time step in the subsequent stages of each cycle, thereby matching the time points and cycles and eliminating the period uncertainty caused by the numerical calculation format. Therefore, the present invention proposes a transient simulation method for oscillating circuits, also known as the time step replication method. The idea of this method is:
[0057] During transient simulation, when the system undergoes periodic oscillations, a specific waveform will be repeatedly reproduced at most nodes. A node in the circuit is selected as a reference point, and the physical quantity at the reference point is monitored and set to a preset value. Once the physical quantity at that node changes past this preset value, the time point at which the preset value appears at that node is calculated through interpolation. This time point is called the time restart point. The system is then evolved using the same time step from the time restart point. After several time steps, interference with the system evolution time step is eliminated, allowing the system to generate steps normally and continue transient simulation. This achieves the goal of adjusting the time point and time step of transient simulation, significantly reducing the periodic variations in the transient waveform when the system is in periodic oscillation. Simultaneously, this ensures simulation accuracy and does not interfere with the normal evolution of the original circuit differential equation.
[0058] Figure 5 FIG. 1 is a flow chart of a transient simulation method for an oscillating circuit according to an embodiment of the present invention. Figure 5 The embodiments of the present invention will be described in detail.
[0059] In step 501, a reference point of an oscillation circuit and a time point for entering periodic oscillation are determined.
[0060] This step specifically includes: selecting a node from the oscillating circuit as a reference point n0, where the physical quantity (voltage or current) at this node will change periodically with the circuit oscillation, and the change pattern is approximately sinusoidal or cosine; selecting a time point t0, after which the oscillating circuit roughly enters a stable oscillation state, and after this time point, using the time step replication method of the present invention to obtain a time step pattern, and subsequently applying the obtained time step pattern to interfere with the time step of the transient simulation; and presetting a reference value u* of the physical quantity at the reference point n0, ensuring that the reference value u* is within the variation range of the physical quantity at the reference point n0 in subsequent simulations. For example, for a sinusoidal signal, u* can be set to 0.
[0061] In the embodiment of the present invention, taking an LC oscillation circuit as an example, there is no energy loss due to the lack of resistance. As long as the initial condition is not 0, the circuit can oscillate, and the waveform of the oscillation after reaching stability is a sine wave.
[0062] Figure 6 FIG. 1 is a schematic structural diagram of an LC oscillator circuit according to an embodiment of the present invention. Figure 6 As shown, in the LC oscillator circuit, O is the ground point and A is a voltage node with a voltage value of u. The equations and initial conditions satisfied by the LC oscillator circuit are:
[0063]
[0064] Where L is the inductor, C is the capacitor, u is the voltage at node A, and t is the time. The period of this LC oscillator circuit is In this embodiment, C=L=1 is taken, and the oscillation period of the LC oscillating circuit is 2π. The total simulation time is set to 500. There are many methods for time discretization and step size prediction, and any method can be selected. In the embodiment of the present invention, the trapezoidal method is used for time discretization and step size control. The trapezoidal method is one of the many time discretization methods and has second-order accuracy. In the control of the step size of the trapezoidal method, it is necessary to estimate the error of the second-order derivative of the voltage. The size of each step size must ensure that the error accuracy of u is less than a certain small amount, such as 10 -3 The specific algorithm can be found in textbooks on numerical solution of differential equations.
[0065] Since Equation (1) is an oscillator, it will enter a periodic oscillation state after a certain simulation time. In order to accurately estimate the period of the oscillator, it is first necessary to determine the time point when the LC oscillation circuit enters periodic oscillation. Because there is only one node A in the circuit, node A is selected as the reference point n0 for monitoring. The total simulation time is 500, and the step size is determined to be copied after 1 / 10 of the total simulation time, that is, t0 = 50. The preset reference value u* has a large degree of arbitrariness. As long as u* is within the signal amplitude variation range, the signal amplitude is averaged based on the simulation of the time period 0-t0, and u* = 0 is selected.
[0066] In step 502, the length of the time step pattern is set, and after the physical quantity reaches a preset reference value, the time step pattern is acquired.
[0067] In an embodiment of the present invention, by determining the length of a time step pattern (the number of time step patterns), which is a positive integer, once the physical quantity of the reference point is monitored to reach a preset reference value, the time point when the physical quantity is just equal to the preset reference value is calculated by interpolation, and multiple time points are obtained from the transient simulation after the time point, and multiple time step patterns are calculated, and the number of the time step patterns is equal to the value of the length.
[0068] Figure 7 A flowchart of obtaining a time step pattern according to an embodiment of the present invention is shown in FIG. Figure 7 As shown, the process of obtaining the time step style is as follows:
[0069] In step 701, the length N of the time step pattern is determined. s , N s Positive integer.
[0070] In step 702 , the physical quantity u at the reference point n0 is monitored in a transient simulation of the oscillation circuit.
[0071] In this embodiment of the present invention, except for the stage where the acquired time step pattern is applied to interfere with the time step of the transient simulation starting from the time restart point, the time step and time points of the transient simulation of the oscillating circuit in other stages (including the stage of acquiring the time step pattern) are obtained using conventional time discretization methods. In this embodiment, the trapezoidal method is used. The change in the physical quantity u at the selected node is monitored. Whether this physical quantity is voltage or current is determined by the nature of the unknown quantity to be determined at the node.
[0072] In step 703 , it is determined whether u is greater than u*. This step is based on continuously monitoring the physical quantity u at the reference point and comparing it with a preset reference value u*. When u changes from small to large and becomes greater than u*, the process proceeds to step 304 .
[0073] In step 704, the time point t* at which u equals u* is obtained by linear interpolation calculation based on the time points corresponding to the physical quantity less than u* and the time points corresponding to the physical quantity greater than u*. The mathematical relationship is as follows:
[0074]
[0075] Here, u + and t + They are the physical quantity and the corresponding time point when the physical quantity is greater than u*, u + >u*; while u - and t - They are the physical quantity and the corresponding time point when the physical quantity is less than u*, u - <u*。u + and u - As close to u* as possible.
[0076] In step 705, continue N s Time step transient simulation, get continuous N s time points t1, t2, ..., t Ns In this step, the time step and time point of transient simulation are still calculated using the usual numerical algorithm to obtain continuous N greater than t*. s Time point, t* <t1<t2<…<t Ns .
[0077] At step 706, the time step patterns h1, h2, ..., h are calculated. Ns , and record it in the step set Ω. This step is for the above continuous N s time points, calculate the time step patterns h1, h2, ..., h Ns :
[0078]
[0079] All calculated time step patterns are recorded as a step set Ω = {h i , i=1,2,…,N s}.
[0080] Figure 8 Schematic diagram of the time step pattern structure obtained according to an embodiment of the present invention, where N s =3. Figure 8 As shown in (a), in the transient simulation, it is monitored that during the time period t0→t1, the value of the physical quantity u at the reference point n0 exceeds the preset reference value u*. Figure 8 As shown in (b), t* is obtained when u is equal to u* by interpolation, and h1 is obtained by calculating t1-t* and recorded in the set Ω. Figure 8As shown in (c), the simulation continues until the third time point, and the time steps h2 and h3 are calculated and recorded in the set Ω.
[0081] Continuing with the above LC oscillation circuit as an example, determine the length of the time step to be N s = 3. When the transient simulation time is greater than t0 = 50, continue monitoring the voltage change at point A. When the voltage changes from low to high and is greater than u*, interpolate to obtain t*. In this embodiment, t* = 50.5030 is calculated. After t*, three time points are obtained: t1 = 50.6796, t2 = 50.9123, and t3 = 51.1427. The time steps between t* and t3 are then calculated: h1 = 0.1766, h2 = 0.2327, and h3 = 0.2304, and recorded in the set Ω.
[0082] In step 503 , the transient simulation of the oscillation circuit is continued. When the physical quantity of the reference point reaches the preset reference value again, the obtained time step pattern is applied to adjust the time step and time point of the simulation.
[0083] In an embodiment of the present invention, while continuing the transient simulation, the changes in the physical quantity of the reference point are continuously monitored. As long as the value of the physical quantity reaches a preset reference value, the time step pattern obtained by the above steps is applied to interfere with the time step of the system evolution, that is, the time point and time step of the transient simulation are adjusted. When the system is in periodic oscillation, the problem of periodic variation in the transient waveform can be greatly reduced.
[0084] Figure 9 FIG. 1 is a flowchart of applying a time step style according to an embodiment of the present invention. Figure 9 As shown below, refer to Figure 9 A detailed description of the steps for applying a time-stepping style.
[0085] In step 901, a transient simulation is performed on the oscillating circuit and the physical quantity u at the reference point is monitored. In this embodiment, the time step and time point in the transient simulation of the oscillating circuit are still obtained by the trapezoidal method, while the change of the physical quantity u at the reference point n0 is observed.
[0086] In step 902, it is determined whether the physical quantity u is greater than u*.
[0087] In step 903, the time point t* at which u is equal to u* is calculated by interpolation.
[0088] In the embodiment of the present invention, the time point t* at this time is defined as a time restart point, and t* is set as a time point of transient analysis. Transient analysis calculation is performed at this time point, including calculating the voltage value of the reference point at this time point.
[0089] In step 904, extract N from the step size set Ω. s time step patterns h1,h2,…,h Ns .
[0090] In step 905, calculate N after t* s time points. According to the extracted time step pattern, calculate the N after t* s Time points:
[0091]
[0092] In step 906, respectively, s Simulation is performed at each time point, that is, solving the circuit equations and obtaining the values of unknown physical quantities (such as voltage or current) at each node.
[0093] In step 907, it is determined whether the simulation duration has reached the preset total simulation time. If the simulation duration has not reached the preset total simulation time, the process returns to step 901 to continue the simulation; otherwise, the simulation is terminated.
[0094] Figure 10 Schematic diagram of a time step pattern application structure according to an embodiment of the present invention, wherein N s =3. Figure 10 As shown in (a), in the transient simulation, the value of the physical quantity u at the reference point in the time period t0→t1 exceeds the preset reference value u*. Figure 10 As shown in (b), t* is obtained by interpolation, and u at t* is equal to u*. Figure 10 As shown in (c), time step patterns h1, h2, and h3 are extracted from the step set Ω, and time points t1, t2, and t3 are calculated. Then, u1, u2, and u3 are calculated, respectively. Time points after t3 are obtained using conventional transient simulation.
[0095] Continuing with the LC oscillator circuit above, monitor the voltage change at point A. When it increases from a small value to a large value greater than u*, calculate the interpolated voltage value at time t*. Apply the three time step patterns h1, h2, and h3 within the step size Ω. Based on the relationship between the time point and the time step, calculate the three time points after t*:
[0096] t1=t * +h1
[0097] t2=t1+h2
[0098] t3=t2+h3
[0099] Calculate the corresponding voltage values at these three time points. Continue conventional transient analysis while monitoring the voltage at point A. Once the voltage at point A just exceeds u*, return to step 901 and repeat the step-size replication process. This process continues until the total simulation time reaches 500, completing the simulation.
[0100] Figure 11 Schematic diagram of simulation results according to an embodiment of the present invention, as shown in FIG. Figure 11 As shown, according to the simulation results of the physical quantity u(t) at time (Time) t, it can be seen that when the time is less than t0, that is, less than 50, the time point in each cycle does not match the cycle, while the time point after greater than 50 perfectly matches the cycle.
[0101] Table 1 shows a comparison of period variations under different step size control errors. The second row in Table 1 shows the period variations using the existing transient simulation method, while the third row shows the results using the transient simulation method of the present invention. It can be seen that the range of period variations is significantly reduced using the method of the present invention, demonstrating the effectiveness of the method.
[0102] Table 1 Comparison of period variation under different step length control errors
[0103] Step size control error <![CDATA[10 -3 ]]> <![CDATA[10 -4 ]]> <![CDATA[10 -5 ]]> <![CDATA[10 -6 ]]> <![CDATA[10 -7 ]]> Existing transient simulation methods <![CDATA[3.2×10 -6 ]]> <![CDATA[2.9×10 -6 ]]> <![CDATA[1.4×10 -6 ]]> <![CDATA[2.3×10 -7 ]]> <![CDATA[2.3×10 -8 ]]> Transient simulation method of the present invention <![CDATA[5.7×10 -14 ]]> <![CDATA[9.8×10 -14 ]]> <![CDATA[1.3×10 -13 ]]> <![CDATA[2.6×10 -13 ]]> <![CDATA[3.7×10 -13 ]]>
[0104] In an embodiment of the present invention, an electronic device is further provided. Figure 12 FIG. 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 12 As shown, the electronic device of the present invention includes a processor 1201 and a memory 1202, wherein:
[0105] The memory 1202 stores a computer program. When the computer program is read and executed by the processor 1201 , the computer program executes the steps in the embodiment of the transient simulation method for an oscillating circuit as described above.
[0106] In an embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored. The computer program is configured to execute the steps of the transient simulation method embodiment of the oscillation circuit described above when running.
[0107] In this embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0108] Those skilled in the art will understand that the foregoing descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will be able to modify the technical solutions described in the foregoing embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A transient simulation method for an oscillating circuit, comprising the following steps: Obtain the time point when the oscillation circuit enters periodic oscillation; Determine the length of the time step pattern and obtain the time step pattern according to the time step replication method; Determine a time restart point and apply the time step pattern to perform transient simulation on the oscillation circuit; The step of determining the length of the time step pattern and obtaining the time step pattern according to the time step replication method further includes: Determine the length of the time step pattern; Perform transient simulation of oscillation circuits and monitor physical quantities at reference points; During the period of time when the physical quantity is monitored to change from small to large and exceeds a preset reference value, a linear interpolation calculation is performed to obtain a time point when the physical quantity is equal to the reference value; Continuing the simulation from the time point when the physical quantity is equal to the preset reference value, after a number of time steps equal to the length value, to obtain the same number of consecutive time points; Calculate the time step pattern based on the obtained continuous time points and record it in the step set; The time point and the time step pattern have the following relationship: Among them, N s The length of the time step style is set, and its value is a positive integer. t* is the time point when the physical quantity of the reference point is equal to the preset reference value. From t1 to t Ns N after t* s consecutive time points, h1 to h Ns The time step style for each time period.
2. The transient simulation method of an oscillator circuit according to claim 1, wherein: The step of obtaining the time point when the oscillation circuit enters periodic oscillation further includes: Selecting a node from an oscillating circuit as a reference point, wherein a physical quantity of the node changes periodically with the oscillation of the circuit; Determining a time point when the oscillation circuit enters a stable oscillation state; A reference value of the physical quantity at the reference point is preset, and the reference value is within a variation range of the physical quantity at the reference point.
3. The transient simulation method of an oscillator circuit according to claim 2, wherein: The physical quantity of the reference point is voltage or current; and the change pattern of the physical quantity is in the shape of sine or cosine.
4. The transient simulation method of an oscillator circuit according to claim 1, wherein: The step of determining the time restart point and applying the time step pattern to perform transient simulation on the oscillation circuit further includes: performing transient simulation on the oscillation circuit and monitoring physical quantities at the reference point; During the time period when the physical quantity exceeds the preset reference value, linear interpolation is performed to calculate the time point when the physical quantity is equal to the reference value and determine it as the time restart point; Extracting a time step pattern from the step set; Calculating a time point after the time restart point according to the time step pattern; Simulate at the calculated time point to obtain the value of the unknown physical quantity at each node of the oscillation circuit; determine whether the simulation duration reaches the preset total simulation time. If so, end the simulation; otherwise, continue to execute the above steps.
5. The transient simulation method of an oscillating circuit according to claim 1 or 4, characterized in that: The steps of performing transient simulation on the oscillation circuit and monitoring the physical quantity of the reference point also include: using a time discretization method to perform time discretization and controlling the time step.
6. The transient simulation method of an oscillating circuit according to claim 1 or 4, characterized in that: The step of performing linear interpolation calculation to obtain the time point when the physical quantity is equal to the reference value is performed using the following mathematical relationship: Among them, u + and t + are the physical quantity and the corresponding time point when the physical quantity is greater than u*; u - and t - They are the physical quantity and the corresponding time point when the physical quantity is less than u*.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: The processor is configured to execute the computer program stored in the memory to implement the transient simulation method for the oscillation circuit according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that Computer program instructions are stored thereon, and the computer-readable instructions can be executed by a processor to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for adjusting simulation time step length of circuit
CN105095610A
Automatic control system stability diagnosis and parameter adjusting method for electromechanical transient simulation
CN107342599A