Simplification method for piecewise linear excitation source data points
Wavelet filtering and screening techniques extract core data points from large datasets, addressing simulation time and convergence issues in circuit simulation by reducing data points and enhancing efficiency.
Patent Information
- Application Number
- CN202411005404.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-07-25
AI Technical Summary
Existing circuit simulation software like PSpice faces challenges with large numbers of data points, leading to increased simulation time and convergence issues due to varying step sizes and non-smooth data, requiring manual segmentation that is time-consuming and often ineffective.
A method involving wavelet filtering, extreme point screening, difference screening, and slope screening to extract core data points that retain the main features of the original waveform, reducing the number of data points and facilitating faster simulation convergence.
The method significantly shortens simulation time and improves convergence by using a smaller set of core data points as input for piecewise linear excitation sources, implemented through a computer program.
Smart Images

Figure CN119179847A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of waveform data point simplification, and in particular relates to a method for simplifying piecewise linear excitation source data points. Background Art
[0002] In the current circuit industry simulation field, PSpice, as a landmark software, is widely used in the industry due to its powerful circuit simulation capabilities. The piecewise linear excitation source provided by PSpice can support the input of actual voltage or current waveform data points, with no limit on the number of data points. However, when there are too many data points, the simulation time will increase significantly. Secondly, PSpice will automatically adjust the step size during the simulation. If there are too many data points and the step size between data points varies greatly or the data is not smooth enough, the simulation may require a very small step size to maintain accuracy, which may make it difficult for the simulation to converge.
[0003] The traditional solution to a large number of data points is to process the data points in segments to reduce the simulation burden and help convergence. However, this requires manual segmentation of the data and setting the corresponding simulation initial value for each segment of data. For large amounts of data, segmentation processing also takes a lot of time, and if the manual segmentation is unreasonable and the amount of data in each segment is still large, it may also be difficult to converge after segmentation.
[0004] Therefore, further improvements are made to the above problems. Summary of the invention
[0005] The main purpose of the present invention is to provide a method for simplifying piecewise linear excitation source data points, by which the core data points in the original data points of the actual voltage or current waveform can be extracted, the core data points retain the main features of the original data points, and the number of the core data points is much smaller than the number of the original data points. Using the core data points as the input of the piecewise linear excitation source significantly shortens the simulation time and helps the simulation convergence.
[0006] In order to achieve the above objectives, the present invention provides a method for simplifying piecewise linear excitation source data points. Assume that the time series and data value series corresponding to the waveform data points (voltage or current data, etc.) to be simplified are t k and v k , k = 1, 2, ..., n, comprising the following steps:
[0007] Step S1: Perform wavelet filtering: Perform wavelet filtering on the original waveform data points to obtain a data value sequence vf after wavelet filtering. k , k=1,2,...,n, the peak-to-peak value of vf is vf pp ;
[0008] Step S2: Screen out special extreme points: If the $i$-th point in $v_f$ k is a regular maximum point, then it satisfies
[0009]
[0010] Similarly, if the $i$-th point is a regular minimum point, then it satisfies
[0011]
[0012] For the $i$-th point in $v_f$ k , if $i = 1$, or $i = n$, or $v_f$ i satisfies the formula for a regular maximum point or the formula for a regular minimum point, then the $i$-th point is called a regular extreme point of $v_f$ k . Let the set of all regular extreme points in $v_f$ k be $NP$, then $i\in NP$;
[0013] Define the difference screening threshold as $\Delta v$ limit , $\Delta v$ limit $\geq0$. The larger $\Delta v$ limit is, the more data points will be screened out. When $\Delta v$ limit $ = 0$, the number of special extreme points = the number of regular extreme points. Let $v_f$ k , $k = 1,2,\cdots,a,\cdots,b\cdots,n$, where $a$ and $b$ are adjacent regular extreme points, $a < b$, $a,b\in NP$. If the $b$-th point is a special extreme point, then it satisfies
[0014] $|v_f$ b $-v_f$ a $|\geq\Delta v$ limit ;
[0015] For the $b$-th point in $v_f$ k , if $b = 1$, or $b = n$, or $v_f$ b satisfies the above formula ($|v_f$ b $-v_f$ a $|\geq\Delta v$ limit ), then the $b$-th point is called a special extreme point of $v_f$ k . Let the set of all special extreme points in $v_f$ k be $SP$, then $b\in SP$;
[0016] Step S3: Screen data points through differences: Let $v_f$ k , $k = 1,2,\cdots,c - 1,c,\cdots,n$. Let the first point $v_{f1}$ in $v_f$ k be the reference point $v_f$ base for the current difference screening, that is, $v_f$ base=vf1, along the order of increasing k, that is, k = 2, 3, ..., n-1, find the next reference point. If c is the next reference point, it satisfies,
[0017] c∈SP or |vf c -vf base |≥Δv limit ;
[0018] Among them, if c-base=1, that is, vf k The base-th point and the c-th point in are adjacent points, then c is the data point that meets the difference screening requirements. If c-base>1, that is, vf k The base-th point and the c-th point in are non-adjacent points, then c and c-1 are both data points that meet the difference screening requirements;
[0019] Find the new reference point vf c Then use it as the current reference point vf base , that is, vf base =vf c , and continue to search for the next reference point and the data point that meets the difference screening requirements in the order of increasing k, that is, k = c + 1, c + 2, ..., n-1, and so on, until finally k = n-1, let vf k The first point and the nth point in are both data points that meet the difference screening requirements. Let vf k The set of all data points that meet the difference screening requirements is DIFF. If c is a data point that meets the difference screening requirements, then c∈DIFF. Let the number of elements in the set DIFF be m. Arrange the m data in ascending order and we can get the sequence {c1,c2,...,c m}, from the above analysis, we can know that c1=1, c m =n;
[0020] Step S4: Filter data points by slope: Let the sequence {c1, c2, ..., c r ,...,c m The rth point in} is point c r , point c r The corresponding slope is k r , then it is satisfied,
[0021]
[0022] Define the slope ratio screening threshold as ΔRk limit , ΔRk limit ≥0, ΔRk limit The larger the value, the more points are screened out. limit =0, no slope screening is performed;
[0023] Let the sequence {c1,c2,...,c r ,...,c m The slope k2 of point c2 in} is the slope k of the current reference point base , that is, k base = k2, follow the increasing order of r, that is, r = 3, 4, ..., d, ..., m-1, and find the next reference point. If point c d is the next reference point, then it satisfies,
[0024] c d ∈SP or
[0025] Find the new reference point c d Then its slope k d As the slope k of the current reference point base , that is, k base =k d , and continue to look for the next reference point in the order of increasing r, that is, r = d + 1, d + 2, ..., m-1, and so on, until finally r = m-1;
[0026] For the sequence {c1,c2,...,c d ,...,c m}, if d = 1, or d = 2, or d = m, or d satisfies the above formula (c d ∈SP or ), then the d-th point c d To find the points that meet the slope screening requirements, let the sequence {c1,c2,...,c d ,...,c m The set of all points that meet the slope screening requirements in} is FP, then c d ∈FP, let the number of elements in the set FP be h, and arrange the h data in ascending order, we can get the sequence {c d1 ,c d2 ,...,c dh}, from the above analysis, we can know that c d1 =1, c dh =n;
[0027] The original data point is t k and v k , k = 1, 2, ..., n, let the core data point obtained by simplification be t k_new and v k_new , then k_new=c d1 ,c d2 ,...,c dh .
[0028] As a further preferred technical solution of the above technical solution, if the starting point of the time series of the waveform data points to be simplified is not 0, it is necessary to set t k The translation to the starting point is 0, and the translation method is, t k =t k -t1, k = 1, 2, ..., n.
[0029] As a further preferred technical solution of the above technical solution, in step S2, Δv limit =0.01vf pp , in step S4, take ΔRk limit =0.5.
[0030] To achieve the above objectives, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for simplifying piecewise linear excitation source data points when executing the program.
[0031] To achieve the above objectives, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for simplifying piecewise linear excitation source data points.
[0032] The beneficial effects of the present invention are:
[0033] The present invention provides a method for simplifying data points of a piecewise linear excitation source. The traditional solution for a large amount of simulation data points is to process the data points in segments. However, this requires manual segmentation of the data and setting corresponding simulation initial values for the simulation of each segment of data. For a large amount of data, segmentation processing also takes a lot of time, and if the manual segmentation is unreasonable and the amount of data in each segment is still large, it may also be difficult to converge after segmentation. The present invention can extract the core data points from the original data points of the actual voltage or current waveform according to the difference screening and slope screening methods. The core data points retain the main features of the original data points, and their number is much smaller than the number of original data points. Using the core data points as the input of the piecewise linear excitation source significantly shortens the simulation time and helps the simulation convergence. The data point simplification calculation method of the present invention can be easily implemented by a computer program. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a flow chart of a simplified method of piecewise linear excitation source data points of the present invention. DETAILED DESCRIPTION
[0035] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art can think of other obvious variations. The basic principles of the present invention defined in the following description can be applied to other embodiments, variations, improvements, equivalents, and other technical solutions that do not deviate from the spirit and scope of the present invention.
[0036] In the preferred embodiment of the present invention, those skilled in the art should note that the waveform data points and the like involved in the present invention may be regarded as prior art.
[0037] Preferred embodiments.
[0038] The present invention discloses a method for simplifying piecewise linear excitation source data points. Assume that the time series and data value series corresponding to the waveform data points (voltage or current data, etc.) to be simplified are t k and v k , k = 1, 2, ..., n, comprising the following steps:
[0039] Step S1: Perform wavelet filtering: Perform wavelet filtering on the original waveform data points to obtain a data value sequence vf after wavelet filtering. k , k=1,2,...,n, the peak-to-peak value of vf is vf pp ;
[0040] Step S2: Screen out special extreme points: If vf k If the i-th point in is a conventional maximum point, then it satisfies,
[0041]
[0042] Similarly, if the i-th point is a conventional minimum point, then it satisfies,
[0043]
[0044] For vf k The i-th point in , if i = 1, or i = n, or vf i If the formula of the conventional maximum point or the formula of the conventional minimum point is satisfied, the i-th point is called vf k A conventional extreme point of k The set of all regular extreme points in is NP, then i∈NP;
[0045] Define the difference screening threshold as Δv limit , Δv limit ≥0,Δv limit The larger the value, the more data points are filtered out. limit = 0, the number of special extreme points = the number of regular extreme points, let vfk where \(k = 1, 2, \cdots, a, \cdots, b, \cdots, n\), and \(a\) and \(b\) are adjacent regular extreme points, \(a < b\), \(a, b\in NP\). If the \(b\)-th point is a special extreme point, it satisfies
[0046] \(\vert v_f\) b \(- v_f\) a \(\vert\geq\Delta v\) limit ;
[0047] For the \(b\)-th point in \(v_f\) k , if \(b = 1\), or \(b = n\), or \(v_f\) b satisfies the above formula (\(\vert v_f\) b \(- v_f\) a \(\vert\geq\Delta v\) limit ), then the \(b\)-th point is called a special extreme point of \(v_f\) k . Let the set of all special extreme points in \(v_f\) k be \(SP\), then \(b\in SP\);
[0048] Step S3: Screen data points by difference: Let \(v_f\) k , \(k = 1, 2, \cdots, c - 1, c, \cdots, n\). Let the first point \(v_{f1}\) in \(v_f\) k be the reference point \(v_f\) base for the current difference screening, that is, \(v_f\) base \(= v_{f1}\). Along the order of increasing \(k\), that is, the order of \(k = 2, 3, \cdots, n - 1\), find the next reference point. If \(c\) is the next reference point, it satisfies
[0049] \(c\in SP\) or \(\vert v_f\) c \(- v_f\) base \(\vert\geq\Delta v\) limit ;
[0050] where, if \(c - base = 1\), that is, the \(base\)-th point and the \(c\)-th point in \(v_f\) k are adjacent points, then \(c\) is the data point that meets the difference screening requirements. If \(c - base>1\), that is, the \(base\)-th point and the \(c\)-th point in \(v_f\) k are non - adjacent points, then both \(c\) and \(c - 1\) are data points that meet the difference screening requirements;
[0051] After finding the new reference point \(v_f\) c , take it as the current reference point \(v_f\) base , that is, \(v_f\) base \(= v_f\) c . And along the order of increasing \(k\), that is, the order of \(k = c + 1, c + 2, \cdots, n - 1\), continue to find the next reference point and the data points that meet the difference screening requirements, and so on, until finally \(k = n - 1\). Let \(v_f\) kThe first point and the nth point in are both data points that meet the difference screening requirements. Let vf k The set of all data points that meet the difference screening requirements is DIFF. If c is a data point that meets the difference screening requirements, then c∈DIFF. Let the number of elements in the set DIFF be m. Arrange the m data in ascending order and we can get the sequence {c1,c2,...,c m}, from the above analysis, we can know that c1=1, c m =n;
[0052] Step S4: Filter data points by slope: Let the sequence {c1, c2, ..., c r ,...,c m The rth point in} is point c r , point c r The corresponding slope is k r , then it is satisfied,
[0053]
[0054] Define the slope ratio screening threshold as ΔRk limit , ΔRk limit ≥0, ΔRk limit The larger the value, the more points are screened out. limit =0, no slope screening is performed;
[0055] Let the sequence {c1,c2,...,c r ,...,c m The slope k2 of point c2 in} is the slope k of the current reference point base , that is, k base = k2, follow the increasing order of r, that is, r = 3, 4, ..., d, ..., m-1, and find the next reference point. If point c d is the next reference point, then it satisfies,
[0056] c d ∈SP or
[0057] Find the new reference point c d Then its slope k d As the slope k of the current reference point base , that is, k base =k d , and continue to look for the next reference point in the order of increasing r, that is, r = d + 1, d + 2, ..., m-1, and so on, until finally r = m-1;
[0058] For the sequence {c1,c2,...,c d ,...,cm}, if d = 1, or d = 2, or d = m, or d satisfies the above formula (c d ∈SP or ), then the d-th point c d To find the points that meet the slope screening requirements, let the sequence {c1,c2,...,c d ,...,c m The set of all points that meet the slope screening requirements in} is FP, then c d ∈FP, let the number of elements in the set FP be h, and arrange the h data in ascending order, we can get the sequence {c d1 ,c d2 ,...,c dh}, from the above analysis, we can know that c d1 =1, c dh =n;
[0059] The original data point is t k and v k , k = 1, 2, ..., n, let the core data point obtained by simplification be t k_new and v k_new , then k_new=c d1 ,c d2 ,...,c dh .
[0060] Specifically, if the starting point of the time series of the waveform data points to be simplified is not 0, then t k The translation to the starting point is 0, and the translation method is, t k =t k -t1, k = 1, 2, ..., n.
[0061] More specifically, in step S2, Δv is taken limit =0.01vf pp , in step S4, take ΔRk limit =0.5.
[0062] The present invention also discloses an electronic device, including a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the method for simplifying the piecewise linear excitation source data points are implemented.
[0063] The present invention also discloses a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for simplifying piecewise linear excitation source data points as described in any one of claims 1 to 3 are implemented.
[0064] It is worth mentioning that the technical features such as waveform data points involved in the patent application of this invention should be regarded as prior art. The specific structure, working principle and possible control method and spatial layout method of these technical features can be selected according to the conventional selection in the field, and should not be regarded as the inventive point of the patent of this invention. The patent of this invention will not be further elaborated.
[0065] For those skilled in the art, it is still possible to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for simplifying piecewise linear excitation source data points, characterized in that: The time series and data value series corresponding to the waveform data points that need to be simplified are t k and v k , k = 1, 2, ..., n, comprising the following steps: Step S1: Perform wavelet filtering: Perform wavelet filtering on the original waveform data points to obtain a data value sequence vf after wavelet filtering. k , k=1,2,…,n, the peak-to-peak value of vf is vf pp ; Step S2: Screen out special extreme points: If vf k If the i-th point in is a conventional maximum point, then it satisfies, Similarly, if the i-th point is a conventional minimum point, then it satisfies, For vf k The i-th point in , if i = 1, or i = n, or vf i If the formula of the conventional maximum point or the formula of the conventional minimum point is satisfied, the i-th point is called vf k A conventional extreme point of k The set of all regular extreme points in is NP, then i∈NP; Define the difference screening threshold as Δv limit , Δv limit ≥0, Δv limit The larger it is, the more data points are screened out. When Δv limit = 0, the number of special extreme points = the number of regular extreme points. Let vf k , k = 1, 2, …, a, …, b…, n, where a and b are adjacent regular extreme points, a < b, a, b ∈ NP. If the b-th point is a special extreme point, then it satisfies |vf b -vf a |≥Δv limit ; For vf k The bth point in , if b=1, or b=n, or vf b If the above formula is satisfied, the bth point is called vf k A special extreme point of k The set of all special extreme points in is SP, then b∈SP; Step S3: Filter data points by difference: Let vf k , k=1,2,…,c-1,c,…,n, let vf k The first point vf1 in is the reference point vf for the current difference screening. base , that is, vf base =vf1, along the order of increasing k, that is, k = 2, 3, ..., n-1, find the next reference point. If c is the next reference point, it satisfies, c∈SP or |vf c -vf base |≥Δv limit ; Among them, if c-base=1, that is, vf k The base-th point and the c-th point in are adjacent points, then c is the data point that meets the difference screening requirements. If c-base>1, that is, vf k The base-th point and the c-th point in are non-adjacent points, then c and c-1 are both data points that meet the difference screening requirements; Find the new reference point vf c Then use it as the current reference point vf base , that is, vf base =vf c , and continue to search for the next reference point and the data point that meets the difference screening requirements in the order of increasing k, that is, k = c + 1, c + 2, ..., n-1, and so on, until finally k = n-1, let vf k The first point and the nth point in are both data points that meet the difference screening requirements. Let vf k The set of all data points that meet the difference screening requirements is DIFF. If c is a data point that meets the difference screening requirements, then c∈DIFF. Let the number of elements in the set DIFF be m. Arrange the m data in ascending order and we can get the sequence {c1,c2,…,c m }, from the above analysis, we can know that c1=1, c m =n; Step S4: Filter data points by slope: Let the sequence {c1, c2, …, c r ,…,c m The rth point in} is point c r , point c r The corresponding slope is k r , then it is satisfied, Define the slope ratio screening threshold as ΔRk limit , ΔRk limit ≥0, ΔRk limit The larger the value, the more points will be screened out. limit =0, no slope screening is performed; Let the sequence {c1,c2,…,c r ,…,c m The slope k2 of point c2 in} is the slope k of the current reference point base , that is, k base = k2, follow the increasing order of r, that is, r = 3, 4, ..., d, ..., m-1, and find the next reference point. If point c d is the next reference point, then it satisfies, Find the new reference point c d Then its slope k d As the slope k of the current reference point base , that is, k base =k d , and continue to look for the next reference point in the order of increasing r, that is, r = d + 1, d + 2, ..., m-1, and so on, until finally r = m-1; For the sequence {c1,c2,…,c d ,…,c m }, if d = 1, or d = 2, or d = m, or d satisfies the above formula, then the d-th point c d To find the points that meet the slope screening requirements, let the sequence {c1,c2,…,c d ,…,c m The set of all points that meet the slope screening requirements in} is FP, then c d ∈FP, let the number of elements in the set FP be h, and arrange the h data in ascending order, we can get the sequence {c d1 ,c d2 ,…,c dh }, from the above analysis, we can know that c d1 =1, c dh =n; The original data point is t k and v k , k = 1, 2, ..., n, let the core data point obtained by simplification be t k_new and v k_new , then k_new=c d1 ,c d2 ,…,c dh .
2. A method for simplifying piecewise linear excitation source data points according to claim 1, characterized in that: If the starting point of the time series of the waveform data points to be simplified is not 0, then t k The translation to the starting point is 0, and the translation method is, t k =t k -t1, k = 1, 2,…, n.
3. The method for simplifying piecewise linear excitation source data points according to claim 1, characterized in that: In step S2, Δv is taken limit =0.01vf pp , in step S4, take ΔRk limit =0.
5.
4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for simplifying piecewise linear excitation source data points as claimed in any one of claims 1 to 3 are implemented.
5. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for simplifying piecewise linear excitation source data points as claimed in any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Special point linear segmentation-based satellite telemetry date time series representation method
CN106778840A
Discrete waveform data compression method based on slope distribution
CN108055042A
Pipeline detection method and system based on harmonic magnetic field phasor infinitesimal data
CN115856068A
Method and system for extracting waveform
CN115943567A
System and method for circuit analysis
US20110313738A1
Cited By
Method for accurately calculating passive discharge time
CN121324777A
