A method for calculating time domain signal convolution in Nport modeling process
By processing the frequency domain impulse response spectrum through interpolation, windowing, and frequency extension, the inaccuracy of time-domain signal convolution in Nport modeling is solved, and more accurate time-domain signal calculation is achieved.
Patent Information
- Application Number
- CN202410407883.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-07
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2044-04-07
AI Technical Summary
During Nport modeling, the impulse response function in the frequency domain suffers amplitude loss and incorrect oscillations when transformed to the time domain via inverse Fourier transform, resulting in inaccurate time-domain signal convolution results.
By interpolating, windowing, and frequency extension processing the frequency domain impulse response spectrum, the value of the time domain impulse response function at the zero point is corrected, ensuring the accuracy of the time domain signal after the inverse Fourier transform.
This improves the accuracy of time-domain signal convolution, reduces output signal errors, and enhances the simulation accuracy of Nport modeling.
Smart Images

Figure CN118193913B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of circuit simulation signal processing, and in particular to a method for calculating time domain signal convolution in Nport modeling process. BACKGROUND
[0002] In circuit simulation and signal processing, the process of two input signals convolving to get an output signal is often encountered. The convolution of two signals can be defined as
[0003]
[0004] Here x1(t) and x2(t) are two input signals, and y(t) is the output signal.
[0005] In the model of transmission line and Nport, one of the input signals is the time domain impulse response of the system, and the impulse response in frequency domain is usually obtained by inverse Fourier transform, i.e.
[0006] h(t) = IFFT(H(ω))
[0007] Here H(ω) is the impulse response in frequency domain, and h(t) is the impulse response in time domain.
[0008] Therefore, the output signal can be obtained by convolving a certain input signal with the impulse response of the system, i.e.
[0009]
[0010] Nport is a method for modeling passive devices using S parameters. It characterizes a complex multi-port passive device such as a transmission line or an inductor using S parameters. Here S parameters are defined in frequency domain and are the impulse response of the device in frequency domain. When Nport is applied to circuit simulation, it is usually necessary to convert the S parameters in frequency domain to time domain by inverse Fourier transform to obtain the impulse response in time domain, and then to convolve the actual input signal to obtain the output signal, thereby completing the simulation of complex passive devices.
[0011] However, the impulse response function in frequency domain is usually defined on discrete positive frequency points and in a limited frequency range. In order to obtain its time domain expression, inverse Fourier transform is needed. If direct inverse Fourier transform is performed, there will be two problems: the impulse response after inverse transform will have a half amplitude loss at t = 0; the time domain impulse response will produce incorrect oscillation near t = 0, which will gradually decay with time and then tend to the correct value.
[0012] The above two problems are caused by spectrum dispersion and high frequency truncation, and the time domain impulse response signal obtained is not accurate, so that the output signal obtained by subsequent convolution with the input signal also has errors. SUMMARY
[0013] In order to solve the defects of the prior art, the purpose of the present application is to provide a method for calculating time domain signal convolution in Nport modeling process, which obtains an accurate time domain impulse response function by performing frequency domain windowing on the frequency domain impulse response and correcting the time domain impulse response obtained after inverse Fourier transform, thereby improving the accuracy of calculating the output signal.
[0014] In order to achieve the above purpose, the method for calculating time domain signal convolution in Nport modeling process provided by the present application comprises the following steps:
[0015] The discrete impulse response spectrum is interpolated by an interpolation method to obtain a spectrum at uniform frequency points;
[0016] The spectrum at the uniform frequency points is modulated by a window function to obtain a windowed spectrum;
[0017] After frequency continuation of the windowed spectrum, the time domain impulse response function is obtained by inverse Fourier transform;
[0018] The value of the time domain impulse response function at zero time is corrected to obtain a corrected impulse response function;
[0019] The input signal and the corrected impulse response function are convolved to obtain an output signal.
[0020] Further, the step of interpolating the frequency domain impulse response by an interpolation method to obtain an impulse response spectrum at uniform frequency points further comprises:
[0021] The total number M of interpolation points is selected;
[0022] The new uniformly distributed frequency points are obtained according to the following formula,
[0023] g k =kf max / (M-1), k=0,…,M-1,
[0024] Where g k is the kth frequency point, and f max is the maximum frequency of the frequency domain impulse response;
[0025] The original frequency domain impulse response is used to obtain the spectrum at each frequency point by an interpolation method.
[0026] Furthermore, it also includes: sampling the original continuous impulse response spectrum and truncating the frequency; determining the maximum frequency, and dividing the frequency range from zero to the maximum frequency into several parts to obtain a discrete impulse response spectrum.
[0027] Furthermore, the interpolation method employs linear interpolation, spline interpolation, or polynomial interpolation.
[0028] Furthermore, the step of modulating the impulse response spectrum with a window function to obtain the windowed spectrum further includes:
[0029] Select a window function;
[0030] At the maximum frequency f of the impulse response spectrum max Select a frequency range [f] nearby min ,f max ], where 0 <f min <f max ;
[0031] Take the portion of the selected window function f≥0, and according to [f min ,f max The number of frequency points within the specified range generates the corresponding window function;
[0032] For frequencies in [f min ,f max The impulse response spectrum in [ ] is multiplied by the generated window function to obtain the windowed spectrum as follows:
[0033]
[0034] Among them, H(g) k ) represents the impulse response spectrum, G(g) k ) represents the impulse response spectrum modulated by a window function, g k f represents the k-th frequency point. min f is the minimum frequency in the windowed frequency range. max Let W(f) be the maximum frequency of the impulse response spectrum, and denote the expression based on [f]. min ,f max The number of frequency points within the range is used to generate the window function, where M represents the total number of interpolation points used to interpolate the impulse response in the original frequency domain.
[0035] Furthermore, the window function is a Blackman window.
[0036] Furthermore, the step of frequency extrapolating the windowed spectrum further includes: extrapolating the windowed spectrum to a negative frequency, resulting in:
[0037]
[0038] Among them, G(g k () represents the windowed spectrum, G * (f) indicates taking the conjugate. G(g) represents k ) as the spectrum after negative frequency extension, g k Let M represent the k-th frequency point, and M represent the total number of interpolation points for interpolating the impulse response in the original frequency domain.
[0039] Furthermore, the expression for the modified impulse response function is as follows:
[0040]
[0041] Where h(t) is the corrected impulse response function, g(t) is the impulse response function without zero-point correction, and t is continuous time.
[0042] 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 is configured to execute the computer program stored in the memory to implement the method for calculating time-domain signal convolution in the Nport modeling process as described above.
[0043] To achieve the above objectives, the present invention also provides a computer-readable storage medium storing at least one instruction that is loaded and executed by a processor to implement the method for calculating temporal signal convolution during Nport modeling as described above.
[0044] The method for calculating temporal signal convolution during Nport modeling provided by this invention has the following advantages compared with existing technologies:
[0045] By adding window function modulation to the impulse response spectrum in the frequency domain and correcting the value of the time-domain impulse response obtained after the inverse Fourier transform at the zero point, an accurate time-domain impulse response function is obtained, making the convolution calculation result with the time-domain input signal more accurate and greatly reducing the error of the output signal.
[0046] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. Attached Figure Description
[0047] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0048] Figure 1This is a flowchart of a method for calculating temporal signal convolution during Nport modeling according to an embodiment of the present invention;
[0049] Figure 2 This is a schematic diagram of the interpolated spectrum according to an embodiment of the present invention;
[0050] Figure 3 This is a schematic diagram of the Blackman window spectrum according to an embodiment of the present invention;
[0051] Figure 4 This is a schematic diagram comparing the impulse responses calculated by different methods according to embodiments of the present invention;
[0052] Figure 5 This is a schematic diagram of an electronic device structure according to an embodiment of the present invention. Detailed Implementation
[0053] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0054] Embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While some embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the invention. It should be understood that the accompanying drawings and embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the invention.
[0055] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0056] It should be noted that the concepts of "first" and "second" may be mentioned in this invention only to distinguish different devices, components or parts, and are not used to limit the order of the functions performed by these devices, components or parts or their interdependence.
[0057] It should be noted that the terms "one" and "multiple" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless explicitly stated otherwise in the context, they should be understood as "one or more". "Multiple" should be understood as two or more.
[0058] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0059] In embodiments of the present invention, a method for calculating temporal signal convolution during Nport modeling is provided, comprising:
[0060] The impulse response spectrum at a uniform frequency point is obtained by interpolating the impulse response in the frequency domain using an interpolation method.
[0061] The impulse response spectrum is modulated by a window function to obtain the windowed spectrum;
[0062] After frequency extension of the windowed spectrum, the impulse response function in the time domain is obtained by inverse Fourier transform.
[0063] The value of the impulse response function in the time domain at time zero is corrected to obtain the corrected impulse response function;
[0064] The input signal and the modified impulse response function are convolved to obtain the output signal.
[0065] Figure 1 The following is a flowchart of the method for calculating temporal signal convolution during Nport modeling according to an embodiment of the present invention, with reference to... Figure 1 The method for calculating temporal signal convolution during the Nport modeling process in this embodiment is described in detail.
[0066] In step 101, the impulse response H(f) in the frequency domain is... i Interpolate to obtain H(g) k ), k=0,…,M-1.
[0067] In an embodiment of the present invention, the original spectrum of the impulse response defined in the frequency domain is given as: H(f i ), i = 1, ..., N. Here are N frequency points f. i Arrange them in ascending order. Usually f1 = 0, while f N The corresponding maximum frequency, f max =f N For H(f) i Interpolation is performed to obtain the spectrum H(g) at the uniform frequency point. k This is to prepare for the Fourier transform.
[0068] First, in step 1011, select an integer M, which is the total number of interpolation points.
[0069] In step 1012, a new uniformly distributed frequency point, g, is obtained. k =kf max / (M-1),k=0,…,M-1.
[0070] In step 1013, using H(f) i ), i = 1, ..., N, and H(g) is obtained using a certain interpolation method. k ), k=0,…,M-1.
[0071] In embodiments of the present invention, the interpolation methods include: linear interpolation, spline interpolation, polynomial interpolation, etc.
[0072] In step 102, in the frequency range [f min ,f max The spectrum of ] is windowed to obtain the windowed spectrum G(g) k ), k=0,…,M-1:in f max Select a frequency range [f] nearby min ,f max ], here 0 <f min <f max ; for those falling on [f min ,f max The spectrum H(f) in ] i Multiplying the spectrum by a window function W(f) yields the windowed spectrum.
[0073] It should be noted that the selected original window function is an even function with respect to f, and the value of the window function is 1 at f = 0. In this embodiment of the invention, only the portion of the original window function f ≥ 0 is taken, and based on [f min ,f max The number of frequency points within the range is used to generate the corresponding window function W(f).
[0074] In embodiments of the present invention, since the interpolated spectrum is defined at discrete points, the windowed spectrum is also defined at each discrete frequency point. The windowed spectrum G(g k )as follows:
[0075]
[0076] In step 103, the windowed spectrum G(g) is processed. k Frequency extension is performed, and the time-domain impulse response function g(t) is obtained through inverse Fourier transform.
[0077] First, in step 1031, for G(g) k Extending to negative frequencies yields the frequency-extended spectrum. as follows:
[0078]
[0079] Here G *(f) indicates taking the conjugate.
[0080] In step 1032, for Performing the inverse Fourier transform, we obtain the impulse response function g(t) in the time domain:
[0081]
[0082] g(t) is defined at discrete time points, that is:
[0083]
[0084] In step 104, the value of the impulse response function g(t) at t=0 is corrected to obtain the corrected impulse response function h(t):
[0085]
[0086] In step 105, the time-domain input signal x(t) and h(t) are convolved to obtain the output signal y(t).
[0087] The method for calculating time-domain signal convolution in the Nport modeling process of this invention can reduce the distortion of the impulse response caused by the inverse Fourier transform of the original spectrum, making the time-domain signal convolution calculation more accurate.
[0088] The following example uses the calculation of an impulse response spectrum to illustrate the implementation process and effectiveness of the method for calculating time-domain signal convolution in Nport modeling.
[0089] We use the following spectrum
[0090]
[0091] Where s = j2πf, and a is a real number greater than 0. In this embodiment, a = 1.
[0092] The analytical spectrum is used because its time-domain impulse response has an analytical form, which facilitates the analysis of the errors of the method of this invention and conventional methods. The impulse response in the frequency domain described above is transformed into the time domain as follows:
[0093] h0(t)=e -at H eav (t)
[0094] Where h0(t) represents the exact time-domain impulse response, H eav (t) is the step function, H eav (t) is defined as
[0095]
[0096] We sample this spectrum H(f) and truncate its frequency. Here we choose f. max =300, 0-f max Divide the spectrum into 1000 parts, i.e., N = 1000. In this way, the original continuous spectrum H(f) becomes a discrete spectrum H(f) with a frequency interval of 0.3. i ).
[0097] Simultaneously, the time-domain input signal x(t) is set to a pulse signal with a rising edge, i.e.
[0098]
[0099] Among them, t r The signal rise time is set to t in this embodiment. r =1. The analytical solution for its output signal is:
[0100]
[0101] in,
[0102] θ(t)=e -at
[0103] The time-domain output signal obtained by the method of this invention will be compared with the above analytical solution.
[0104] The time-domain output signal is obtained according to the method steps of the present invention:
[0105] According to step 101, for H(f) i Interpolation is performed to obtain the spectrum at the uniform frequency point, which prepares for Fourier transform.
[0106] First, choose the number of interpolation points M; here we choose M=2. 13 =8192;
[0107] To obtain new uniformly distributed frequency points, g k =kf max / (M-1), k=0,…,M-1; the frequency interval here is f max / (M-1);
[0108] Using the existing H(f) i ), i = 1, ..., N, and H(g) is obtained by interpolation. k (k = 0, ..., M-1). The simplest linear interpolation is used here. The interpolated spectrum is as follows: Figure 2 As shown.
[0109] According to step 102, the interpolated spectrum is windowed.
[0110] First, in f maxSelect a frequency range [f] nearby min ,f max In this embodiment, f is selected. min =0.5f max In f max When the value is 300, the windowing frequency range is [150, 300].
[0111] Multiply the spectrum of frequencies in the range [150, 300] by a window function: In this embodiment, a Blackman window is used as the window function, as shown in the figure below. Figure 3 As shown. Because we choose M = 8192, and f min =0.5f max The corresponding window range is 4096.
[0112] The discrete spectrum after window function modulation can be calculated as follows:
[0113]
[0114] According to step 103, the windowed spectrum is used to perform an inverse Fourier transform to obtain the impulse response function in the time domain.
[0115] First, the windowed spectrum is extended to negative frequencies to obtain the frequency-extended spectrum.
[0116]
[0117] Here G * (f) indicates taking the conjugate.
[0118] right Performing the inverse Fourier transform, we obtain the impulse response function g(t) in the time domain:
[0119]
[0120] At this point, g(t) is defined at discrete time points, i.e.
[0121]
[0122] According to step 104, g(t) at t=0 is corrected, and the corrected impulse response function h(t) is finally obtained, that is:
[0123]
[0124] Figure 4 This is a comparative diagram of impulse responses calculated by different methods according to embodiments of the present invention, such as... Figure 4As shown, the impulse response (IR) calculated by different methods is presented. IR-without correction indicates no correction; IR-this work indicates the method of this invention; and IR-accurate indicates the accurate impulse response. It is evident that the impulse response calculated by the method of this invention agrees more closely with the accurate solution than the uncorrected impulse response.
[0125] Finally, according to step 105, the given time-domain input signal x(t) and the impulse response function h(t) are convolved to obtain the output signal y(t). For accurate value comparison, the error is defined as follows:
[0126]
[0127] Table 1 shows the impulse response function h(t) obtained with different window ranges and the output signal y obtained by convolving the input signal x(t). IR (t) and precise output signal y acc (t) represents the error obtained from the comparison. Here, the window range W range The definition is as follows:
[0128]
[0129] W range The smaller the value, the larger the window area.
[0130] Table 1 shows the errors of the impulse response and the output signal obtained after convolving the input signal with the exact value for different window ranges.
[0131]
[0132] As can be seen from Table 1:
[0133] First, the correction of the impulse response at t=0 is crucial, as it significantly reduces the error in the output signal. Even without windowing, the error is approximately one-third of the error in the uncorrected output signal.
[0134] Secondly, windowing modulation further improves the accuracy of the output signal; the accuracy generally decreases as the window size increases. However, the window cannot be too large, otherwise it will affect the accuracy of the signal itself. Therefore, an appropriately sized window helps improve the accuracy of the output signal. In this example, a window size of 0.3 is roughly the optimal choice, reducing the error to 1 / 20 of its uncorrected state.
[0135] In embodiments of the present invention, an electronic device is also provided. Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention, such as... Figure 5As shown, the electronic device of the present invention includes a processor 501 and a memory 502, wherein,
[0136] The memory 502 stores a computer program, which, when read and executed by the processor 501, performs the steps in the method embodiment for calculating the convolution of the time-domain signal during the Nport modeling process as described above.
[0137] In embodiments of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to execute, at runtime, the steps of the method embodiment for calculating temporal signal convolution during Nport modeling as described above.
[0138] In this embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0139] It will be understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is 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 can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for calculating temporal signal convolution during Nport modeling, characterized in that, Includes the following steps: The discrete impulse response spectrum is interpolated using an interpolation method to obtain the spectrum at the uniform frequency point; The spectrum at the uniform frequency point is modulated by a window function to obtain the windowed spectrum; After frequency extension of the windowed spectrum, the impulse response function in the time domain is obtained by inverse Fourier transform; the value of the impulse response function in the time domain at time zero is corrected to obtain the corrected impulse response function. The input signal and the modified impulse response function are convolved to obtain the output signal. The step of modulating the spectrum at the uniform frequency point using a window function to obtain the windowed spectrum further includes: Select a window function; At the maximum frequency f of the impulse response spectrum max Select a frequency range [f] nearby min ,f max ], where 0 <f min <f max ; Take the portion of the selected window function f≥0, and according to [f min ,f max The number of frequency points within the specified range generates the corresponding window function; For frequencies in [f min ,f max The impulse response spectrum in [ ] is multiplied by the generated window function to obtain the windowed spectrum as follows: Among them, H(g) k ) represents the impulse response spectrum, G(g) k ) represents the impulse response spectrum modulated by a window function, g k f represents the k-th frequency point. min f is the minimum frequency in the windowed frequency range. max Let W(f) be the maximum frequency of the impulse response spectrum, and denote the expression based on [f]. min ,f max The number of frequency points within the range is used to generate the window function, where M represents the total number of interpolation points used to interpolate the impulse response in the original frequency domain.
2. The method for calculating temporal signal convolution during Nport modeling according to claim 1, characterized in that, The step of interpolating the impulse response in the frequency domain using an interpolation method to obtain the impulse response spectrum at a uniform frequency point further includes: Select the total number of interpolation points, M; The new uniformly distributed frequency points can be obtained using the following formula. g k =kf max / (M-1),k=0,…,M-1, Among them, g k For the k-th frequency point, f max The maximum frequency of the impulse response in the frequency domain; By using the impulse response in the original frequency domain, the spectrum at each frequency point is obtained by interpolation.
3. The method for calculating temporal signal convolution during Nport modeling according to claim 1, characterized in that, Also includes: The original continuous impulse response spectrum is sampled and frequency truncation is performed; Determine the maximum frequency, divide the frequency range from zero to the maximum frequency into several parts, and obtain the discrete impulse response spectrum.
4. The method for calculating temporal signal convolution during Nport modeling according to claim 1, characterized in that, The interpolation method may employ linear interpolation, spline interpolation, or polynomial interpolation.
5. The method for calculating temporal signal convolution during Nport modeling according to claim 1, characterized in that, The window function is the Blackman window.
6. The method for calculating temporal signal convolution during Nport modeling according to claim 1, characterized in that, The step of frequency extension of the windowed spectrum further includes: extending the windowed spectrum to a negative frequency, to obtain: Among them, G(g k () represents the windowed spectrum, G * (f) indicates taking the conjugate. G(g) represents k ) as the spectrum after negative frequency extension, g k Let M represent the k-th frequency point, and M represent the total number of interpolation points for interpolating the impulse response in the original frequency domain.
7. The method for calculating temporal signal convolution during Nport modeling according to claim 1, characterized in that, The expression for the modified impulse response function is as follows: Where h(t) is the corrected impulse response function, g(t) is the impulse response function without zero-point correction, and t is continuous time.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor is configured to execute the computer program stored in the memory to implement the method for calculating temporal signal convolution during Nport modeling as described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, which is loaded and executed by a processor to implement the method for calculating temporal signal convolution during Nport modeling as described in any one of claims 1-7.
Citation Information
Patent Citations
Equalizer for the intermediate frequency channel of an FMCW fill state sensor
CN106104295A
Transform domain quadratic estimation method based on combination of time domain clustering denoising with equalization decision making
CN108833311A