A method for simplifying piecewise linear excitation source data points
By using wavelet filtering, difference filtering, and slope filtering, the data points in circuit simulation are simplified, solving the problems of long simulation time and difficulty in convergence, and achieving shorter simulation time and improved convergence.
Patent Information
- Application Number
- CN202411005404.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2044-07-25
AI Technical Summary
Existing technologies suffer from long simulation times and difficulty in convergence when processing circuits with a large number of data points. Manual segmentation is inefficient, and unreasonable segmentation may still lead to problems with simulation convergence.
We use wavelet filtering, difference filtering, and slope filtering to extract core data points. We then use a computer program to simplify the data points, retaining their main features and reducing their number.
It significantly shortens the simulation time, improves the simulation time of circuit simulation solutions, and helps with simulation convergence.
Smart Images

Figure CN119179847B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of waveform data point simplification, and particularly relates to a segmented linear excitation source data point simplification method. BACKGROUND
[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 capability. The segmented linear excitation source provided by PSpice can support input of actual voltage or current waveform data points, and there is no limit to the number of data points. However, when the number of data points is too large, the simulation time will be significantly increased. Secondly, PSpice will automatically adjust the step size in simulation, and if the number of data points is too large and the step size between data points changes greatly or the data is not smooth enough, the simulation may need a very small step size to maintain accuracy, which may lead to difficulty in convergence of the simulation.
[0003] The traditional solution for 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 of corresponding simulation initial values for each segment of data. For a large amount of data, segmentation also requires a lot of time, and if the manual segmentation is unreasonable, each segment of data is still large, and the same problem of difficulty in convergence after segmentation may occur.
[0004] Therefore, the above problems are further improved. SUMMARY
[0005] The main purpose of the present application is to provide a segmented linear excitation source data point simplification method. By using this method, the core data points in the actual voltage or current waveform original data points can be extracted, the core data points retain the main characteristics of the original data points, and the number of core data points is much smaller than the number of original data points. Using the core data points as the input of the segmented linear excitation source can significantly shorten the simulation time and help the simulation convergence.
[0006] To achieve the above purpose, the present application provides a segmented linear excitation source data point simplification method, wherein the time sequence and data value sequence corresponding to the waveform data points (voltage or current data, etc.) to be simplified are respectively t k and v k , k = 1, 2,..., n, comprising the following steps:
[0007] Step S1: wavelet filtering: wavelet filtering is performed on the original waveform data points to obtain a wavelet filtered data value sequence vf k , k = 1, 2,..., n, and the peak-to-peak value of vf pp ;
[0008] Step S2: screening out special extreme points: if vf k is a regular maximum point, it satisfies,
[0009]
[0010] Similarly, if the ith point is a regular minimum point, it satisfies,
[0011]
[0012] For vf k , if i = 1, or i = n, or vf i satisfies the formula of a regular maximum point or the formula of a regular minimum point, the ith point is called a regular extreme point of vf k , and let NP be the set of all regular extreme points in vf k , then i ∈ NP.
[0013] Define the difference screening threshold as Δv limit , Δv limit ≥ 0, the larger Δv limit , the more data points are screened out, and 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 bth point is a special extreme point, it satisfies,
[0014] |vf b -vf a |≥ Δv limit ;
[0015] For the bth point in vf k , if b = 1, or b = n, or vf b satisfies the above formula (|vf b -vf a |≥ Δv limit ), the bth point is called a special extreme point of vf k , and let SP be the set of all special extreme points in vf k , then b ∈ SP.
[0016] Step S3: screening data points by difference: let vf k , k = 1, 2,..., c-1, c,..., n, and let the first point vf1 in vf k be the current difference screening reference point vf base , i.e. vf base=vf1, following the order of increasing k, i.e., k = 2, 3, ..., n-1, find the next reference point. If c is the next reference point, then it satisfies...
[0017] c∈SP or |vf c -vf base |≥Δv limit ;
[0018] Where, if c-base=1, that is, vf k If the base-th point and the c-th point are adjacent, then c is a data point that meets the difference filtering requirement. If c - base > 1, that is, vf k If the base-th point and the c-th point are not adjacent, then both c and c-1 are data points that meet the difference filtering requirements.
[0019] Find a new benchmark vf c This was then used as the current reference point vf base That is, vf base =vf c And following the order of increasing k, i.e., k = c+1, c+2, ..., n-1, continue searching for the next benchmark point and data points that meet the difference screening requirements, and so on, until k = n-1, let vf k The first and nth points in the data are both data points that meet the difference filtering requirements. Let vf k Let DIFF be the set of all data points that satisfy the difference filtering requirement. If c is a data point that satisfies the difference filtering requirement, then c∈DIFF. Let m be the number of elements in the set DIFF. Arranging these m data points in ascending order, we can obtain the sequence {c1, c2, ..., c...}. m From the preceding analysis, we 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 r-th point in} is point c. r Point C r The slope corresponding to that point is k r Then it satisfies,
[0021]
[0022] Define the slope percentage filtering threshold as ΔRk limit , ΔRk limit ≥0, ΔRk limit The larger the value, the more points are filtered out, ΔRk. limit When the slope is 0, no slope filtering is performed;
[0023] Let the slope of point c2 in the sequence {c1, c2,..., c r ,...,c m} be k2, and the current reference point slope k base , i.e. k base =k2, find the next reference point along the order of increasing r, i.e. r=3, 4,..., d,..., m-1, if point c d is the next reference point, it satisfies,
[0024] c d ∈SP or
[0025] After finding the new reference point c d , its slope k d is taken as the current reference point slope k base , i.e. k base =k d , and continue to find the next reference point along the order of increasing r, i.e. r=d+1, d+2,..., m-1, and so on, until the final r=m-1;
[0026] For the dth point in 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 ), the dth point c d is called a point satisfying the slope screening requirement, let the set of all points in the sequence {c1, c2,..., c d ,...,c m} satisfying the slope screening requirement be FP, then c d ∈FP, let the number of elements in set FP be h, arrange the h data in ascending order to obtain the sequence {c d1 ,c d2 ,...,c dh}, by the foregoing analysis, c d1 =1, c dh =n.
[0027] The original data points are t k and v k , k=1, 2,..., n, let the core data points obtained by simplifying 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 time sequence starting point of the simplified waveform data point needs to be 0, t k is translated to the starting point of 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, Δv limit = 0.01vf pp is taken in step S2, and ΔRk limit = 0.5 is taken in step S4.
[0030] To achieve the above purpose, the present application further provides an electronic device, including a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the simplified method for segmenting linear excitation source data points when executing the program.
[0031] To achieve the above purpose, the present application further provides a non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program is executable by a processor to implement the steps of the simplified method for segmenting linear excitation source data points.
[0032] The present application has the following advantages:
[0033] The present application provides a simplified method for segmenting linear excitation source data points. The traditional solution for large amount of simulation data points is to process the data points in segments, but this requires manual segmentation of the data and setting of corresponding simulation initial values for each segment of data. For large amounts of data, segmentation also requires a lot of time, and if the manual segmentation is unreasonable, each segment of data is still large, and it may also be difficult to converge after segmentation. The present application can extract core data points from the original data points of the actual voltage or current waveform according to the difference screening and slope screening method. The core data points retain the main characteristics of the original data points, and their number is much smaller than that of the original data points. Using core data points as the input of the segmented linear excitation source can significantly shorten the simulation time and help the simulation converge. The data point simplification calculation method of the present application can be easily realized by a computer program. BRIEF DESCRIPTION OF DRAWINGS
[0034] Figure 1 is a flowchart of a simplified method for segmenting linear excitation source data points of the present application. DETAILED DESCRIPTION
[0035] The following description is presented to enable any person skilled in the art to practice the application as claimed. Preferred embodiments are presented in the following description only as examples and modifications thereto can be made by those skilled in the art upon reading the present disclosure without departing from the spirit of the application. The present application is well suited to achieving this object. This description, accordingly, sets forth certain embodiments of the application together with methods thereof, apparatus and systems thereof for the practice of the application, along with
[0036] In the preferred embodiments of the present application, those skilled in the art should note that the waveform data points and the like involved in the present application can be regarded as prior art.
[0037] Preferred embodiments.
[0038] The present application discloses a method for simplifying piecewise linear excitation source data points, which is characterized in that the time sequence and the data value sequence corresponding to the waveform data points (voltage or current data and the like) to be simplified are respectively represented as t k and v k , k = 1, 2,..., n, and the method comprises the following steps:
[0039] Step S1: wavelet filtering: the original waveform data points are subjected to wavelet filtering, and the data value sequence after wavelet filtering is vf k , k = 1, 2,..., n, and the peak-to-peak value of vf pp ;
[0040] Step S2: screening out special extreme points: if the i-th point in vf k is a regular maximum value point, it satisfies,
[0041]
[0042] Similarly, if the i-th point is a regular minimum value point, it satisfies,
[0043]
[0044] For the i-th point in vf k , if i = 1, or i = n, or vf i satisfies the formula of the regular maximum value point or the formula of the regular minimum value point, the i-th point is referred to as a regular extreme point of vf k , and the set of all regular extreme points in vf k is denoted as NP, and i ∈ NP;
[0045] The difference value screening threshold is defined as Δv limit , Δv limit ≥ 0, and the greater Δv limit , the more data points are screened out, and when Δv limit = 0, the number of special extreme points = the number of regular extreme points, and the special extreme points are denoted as vfk , k = 1, 2,..., a,..., b,..., n, where a and b are adjacent regular extreme points, a < b, a, b ∈ NP, if the bth point is a special extreme point, it satisfies,
[0046] |vf b -vf a |≥Δv limit ;
[0047] For the bth point in vf k , if b = 1, or b = n, or vf b satisfies the above formula (|vf b -vf a |≥Δv limit ), it is called a special extreme point of vf k , and let the set of all special extreme points in vf k be SP, then b ∈ SP;
[0048] Step S3: screening data points by difference value, let vf k , k = 1, 2,..., c-1, c,..., n, let the 1st point vf1 in vf k be the current reference point vf base for difference value screening, i.e. vf base = vf1, along the order of increasing k, i.e. k = 2, 3,..., n-1, find the next reference point, if c is the next reference point, it satisfies,
[0049] c ∈ SP or |vf c -vf base |≥Δv limit ;
[0050] where, if c-base = 1, i.e. the base th point and the cth point in vf k are adjacent points, then c is a data point satisfying the difference value screening requirement, if c-base > 1, i.e. the base th point and the cth point in vf k are not adjacent points, then both c and c-1 are data points satisfying the difference value screening requirement;
[0051] After finding the new reference point vf c , take it as the current reference point vf base , i.e. vf base = vf c , and continue to find the next reference point and data points satisfying the difference value screening requirement along the order of increasing k, i.e. k = c+1, c+2,..., n-1, and so on, until finally k = n-1, let vf kThe first point and the nth point in the set satisfy the difference screening requirement, and let vf k The set of all data points that satisfy the difference screening requirement in the set is DIFF, and if c is a data point that satisfies the difference screening requirement, then c ∈ DIFF, let the number of elements in the set DIFF be m, and arrange the m data in ascending order to obtain the sequence {c1, c2,..., c m}. According to the foregoing analysis, c1=1, c m =n;
[0052] Step S4: Screen the data points by the slope. Let the rth point in the sequence {c1, c2,..., c r ,...,c m} be point c r , and the slope corresponding to point c r be k r , and it satisfies,
[0053]
[0054] Define the slope proportion screening threshold as ΔRk limit , ΔRk limit ≥0, and the larger ΔRk limit , the more points are screened out. When ΔRk limit =0, no slope screening is performed.
[0055] Let the slope k2 of point c2 in the sequence {c1, c2,..., c r ,...,c m} be the current reference point slope k base , that is, k base =k2, and find the next reference point along the order of increasing r, that is, r=3, 4,..., d,..., m-1. If point c d is the next reference point, it satisfies,
[0056] c d ∈SP or
[0057] After finding the new reference point c d , take its slope k d as the current reference point slope k base , that is, k base =k d , and continue to find the next reference point along 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} is the dth point, if d = 1, or d = 2, or d = m, or d satisfies the above formula (c d ∈ SP or ), it is called that the dth point c d is a point satisfying the slope screening requirement, and the set of all points satisfying the slope screening requirement in the sequence {c d ,..., c m} is FP, c d ∈ FP, the number of elements in the set FP is h, and the h data are arranged in ascending order to obtain the sequence {c d1 ,c d2 ,..., c dh}, it is known from the foregoing analysis that c d1 = 1, c dh = n.
[0059] The original data points are t k and v k , k = 1, 2,..., n, and the core data points obtained by simplifying are t k_new and v k_new , then k_new = c d1 ,c d2 ,..., c dh .
[0060] Specifically, if the time sequence starting point of the waveform data point to be simplified is not 0, t k is translated to the starting point of 0, and the translation method is t k = t k -t1, k = 1, 2,..., n.
[0061] More specifically, Δv limit = 0.01vf pp is taken in step S2, and ΔRk limit = 0.5 is taken in step S4.
[0062] The application further discloses an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the steps of the simplification method of the segmented linear excitation source data points when executing the program.
[0063] The application further discloses a non-transitory computer readable storage medium, which stores a computer program, and the computer program implements the steps of the simplification method of the segmented linear excitation source data points when executed by a processor.
[0064] It is worth mentioning that the waveform data points and other technical features involved in the present patent application should be regarded as prior art, and the specific structure, working principle and possible control mode and spatial arrangement mode thereof can be selected according to the conventional selection in the field, and should not be regarded as the invention point of the present patent, and the present patent will not be further expanded and described in detail.
[0065] For those skilled in the art, the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features thereof can be replaced equivalently, and any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A simplified method for piecewise linear excitation source data points, characterized in that, let... The time series and data value series to which the simplified waveform data points correspond are t k and v k , comprising the steps of: Step S1: wavelet filtering is performed: wavelet filtering is performed on the wave data points corresponding to the original voltage or current data, and a wavelet filtered data value sequence is obtained vf k , , vf The peak-to-peak value of the wavelet filtered data value sequence is vf pp ; Step S2: screening out special extreme points: if vf k If the ith point is a regular maximum point, it satisfies, ; Also, if the ith point is a regular minimum point, then it satisfies, ; for vf k The i-th point in the array, if i=1, or i=n, or vf i If a point satisfies either the formula for a regular maximum or a regular minimum, then the i-th point is called a... vf k A typical extreme point, let vf k If the set of all regular extreme points in a given region is NP, then i∈NP; The difference screening threshold is defined as , , The greater the difference screening threshold is, the more data points are screened out, When the difference screening threshold is equal to the difference threshold, the number of special extreme points = the number of regular extreme points, and the difference screening threshold is set as vf k , wherein a and b are adjacent regular extreme points, a < b, a, b ∈ NP, and if the bth point is a special extreme point, then it satisfies, ; For the bth point in vf k , if b = 1, or b = n, or vf b satisfies the above formula, the bth point is called a special extreme point of vf k , and let vf k The set of all special extreme points in is SP, and b ∈ SP. Step S3: Screening data points by difference value: Let vf k , , let vf k be the first point in the sequence vf 1 be the current reference point of difference value screening vf base , i.e. , find the next reference point in the order of increasing , i.e. , if is the next reference point, then it satisfies ; Among them, if ,Right now vf k The first in The point and the first If each point is an adjacent point, then To meet the data points required for difference filtering, if ,Right now vf k The first in The point and the first If the points are non-adjacent, then and All data points meet the difference filtering requirements; Find a new reference point vf c Then take it as the current reference point vf base That is , and continue to find the next reference point and data points that meet the difference screening requirements in the order of increasing k, that is , and so on, until the final , let vf k The first point and the nth point in vf k The set of all data points that meet the difference screening requirements in If is a data point that meets the difference screening requirements, then c ∈ DIFF, let the number of elements in the set DIFF be m, and arrange the m data in ascending order to obtain the sequence From the foregoing analysis, Step S4: Screening data points by slope: Let the rth point in the sequence be point c r , and the corresponding slope at point c r be k r Then it satisfies, ; The slope ratio screening threshold is defined as , , The greater the slope ratio screening threshold is, the more points are screened out, No slope screening is performed when the slope ratio screening threshold is 0. Let the slope of point c2 in the sequence k 2 is the current reference point slope k base , i.e. , find the next reference point in the order of increasing r, i.e. , if point c d is the next reference point, then it satisfies, ; Find a new reference point c d Later, its slope k d As the current reference point slope k base That is And continue to find the next reference point in the order of increasing r, that is In the order of increasing r, that is ; For the dth point in the sequence , if , or , or , or d satisfies the above formula, the dth point c d is called a point satisfying the slope screening requirement. Let the set of all points in the sequence satisfying the slope screening requirement be FP, and let c d ∈ FP. Let the number of elements in the set FP be h, and arrange the h data in ascending order to obtain the sequence . From the foregoing analysis, we have . The original data points are t k and v k , Suppose the core data points obtained by simplifying are t k_new and v k_new then .
2. The method of claim 1, wherein, If the time series start point of the simplified waveform data point is not 0, it needs to be translated to 0, the translation method is, t k to the start point of 0, the translation method is, .
3. The method of claim 1, wherein, In step S2, the value of the variable "i" is set to 0. In step S4, the value of the variable "i" is set to 0. 4. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, vf 5. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The processor, when executing the program, implements the steps of the method for simplifying data points of a piecewise linear excitation source as claimed in any one of claims 1 to 3. The computer program, when executed by the processor, implements the steps of the method for simplifying data points of a piecewise linear excitation source as claimed in any one of claims 1 to 3.
Citation Information
Patent Citations
Pipeline detection method and system based on harmonic magnetic field phasor infinitesimal data
CN115856068A
Method and system for extracting waveform
CN115943567A