Method, device, medium and product for determining scattering parameters based on deep learning
Through the parameter optimization model and physical constraint framework based on deep learning, the instability and distortion problems of the 2xthru deembedding method in the high-frequency region are solved, the accuracy improvement and stability of the high-frequency region is achieved, the measurement frequency range is expanded, and it is suitable for different test environments and device characteristics.
Patent Information
- Application Number
- CN202510905259.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-07-02
AI Technical Summary
The existing 2xthru deembedding method has problems such as instability, distortion and inconsistent with physical laws in high-frequency areas. Especially when S11
The parameter optimization model based on deep learning is adopted, combined with the physical constraint framework, the parameter optimization model is trained through vector fitting models, and the scattering parameters are determined using deep learning methods to ensure that the extracted device characteristics comply with the basic laws of the physical system, especially the deep learning optimization method using vector fitting constraints in high-frequency areas.
It improves the accuracy and stability of the high-frequency region, ensures that the extracted device characteristics comply with physical laws, expands the frequency range of measurement, improves the computing efficiency and generalization capabilities, and is suitable for different test environments and device characteristics.
Smart Images

Figure CN120409569B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of microwave engineering and signal integrity analysis technology, and in particular to a method, device, medium and product for determining scattering parameters based on deep learning. Background Art
[0002] S parameters (Scattering Parameters) are key parameters used to describe the signal transmission and reflection characteristics in high-frequency circuits, and are particularly widely used in radio frequency (RF), microwave, and signal integrity analysis. For a two-port network, S 11 is the reflection coefficient of port 1, S 21 is the forward transmission coefficient from port 1 to port 2, S 12 is the reverse transmission coefficient from port 2 to port 1, S 22 is the reflection coefficient of port 2.
[0003] The 2xthru de-embedding method, also known as double-length de-embedding, is recommended in the IEEE P370 standard for high-frequency signal integrity measurement and calibration. The 2xthru de-embedding method mathematically analyzes and processes the measured S-parameters. The basic process is as follows: Measure the S-parameters of the complete system, including the fixture; Use mathematical methods to process the measured S-parameters to create an equivalent model of the test fixture; Use de-embedding techniques to eliminate the effects of the fixture and extract the intrinsic device characteristics; Use the extracted characteristics for subsequent analysis and design.
[0004] Eliminating fixture effects through the 2xthru de-embedding method is widely used in high-speed interconnect systems, PCB design, and high-frequency measurement. As data transmission rates continue to increase, accurate characterization of high-frequency regions becomes increasingly important. However, the existing 2xthru de-embedding method still has the following disadvantages: (1) Inherent instability of the mathematical model: The key formula used in the 2xthru method, namely, e 111 =(S 22r -e 002 ) / S 12r and e 112 =(S 11r -e 001 ) / S 21r There are serious numerical instabilities. Among them, S 11r 、S 12r 、S 22r 、S 21r is the measured S parameter, e 001 and e 002 represents the directional error, e 111 and e 112They represent the port matching errors of the error box respectively. When the transmission coefficient S 12r or S 21r When the value is very small (when the fixture insertion loss is large), the division operation will produce an abnormally large value. The fixture insertion loss increases with the frequency, causing the transmission coefficient to become extremely small, which is particularly prominent in the high-frequency region. (2) Accuracy problem in the high-frequency region: In the high-frequency region, especially when the reflection coefficient S 11 Greater than the transmission coefficient S 21 When the traditional method is used, the accuracy is significantly reduced. Due to the division operation in the error term calculation, the reflection coefficient is smaller than the transmission coefficient (S 11 21 ) will further amplify the error. This leads to serious distortion of the extracted device characteristics in the high-frequency region. (3) Lack of physical constraints: The 2xthru de-embedding method lacks the constraints that the physical system must follow, such as causality, stability, and passivity. Under certain conditions (especially S 11 21 ), the calculated error term may cause the system to violate the passivity principle, which will produce physically unrealizable results and affect subsequent system design and analysis. Summary of the Invention
[0005] The first purpose of the present invention is to provide a method for determining scattering parameters based on deep learning to solve the problems of instability, distortion and even non-compliance with physical laws in the existing 2xthru de-embedding method at high frequencies.
[0006] A second object of the present invention is to provide a computer device for implementing the above-mentioned method for determining scattering parameters based on deep learning.
[0007] A third object of the present invention is to provide a computer-readable storage medium for implementing the above-mentioned method for determining scattering parameters based on deep learning.
[0008] A fourth object of the present invention is to provide a computer program product for implementing the above-mentioned method for determining scattering parameters based on deep learning.
[0009] In order to achieve the above-mentioned first purpose, the present invention provides a method, which includes the following steps: obtaining scattering parameters to be processed, where the scattering parameters to be processed are measured on a device to be tested and a test fixture connected to the device to be tested as a whole; inputting the scattering parameters to be processed into a pre-trained parameter optimization model; wherein the parameter optimization model is trained by deep learning under a physical constraint framework based on the measured scattering parameters and de-embedded scattering parameters obtained by de-embedding and screening the measured scattering parameters; obtaining an equivalent model corresponding to the scattering parameters to be processed output by the parameter optimization model; and obtaining a first target scattering parameter corresponding to the scattering parameter to be processed according to the equivalent model.
[0010] As can be seen from the above scheme, the present invention uses a pre-trained parameter optimization model to perform de-embedding processing on the scattering parameters to be processed. Since the parameter optimization model is obtained by setting a physical constraint framework and combining it with deep learning methods for training, it can ensure that the extracted device characteristics conform to the basic laws of the physical system. In addition, the parameter optimization model is trained based on deep learning and has a good de-embedding effect even at high frequencies. Compared with existing de-embedding methods, it is more accurate and reliable, has a fast processing speed, and has a strong generalization ability.
[0011] A further solution is that the physical constraint framework is a vector fitting model, which is expressed as: H(s) = D+ Σ(Ri / (s-pi)) + C, where pi is the pole, Ri is the corresponding residue, C is the proportional coefficient, D is the constant term, and s is a complex variable in the complex frequency domain.
[0012] It can be seen from this that the vector fitting model can be used as a physical constraint framework to ensure that the prediction results always meet the physical laws.
[0013] A further solution is that the parameters in the vector fitting model are represented as a one-dimensional vector, and the one-dimensional vector includes the following types of physical parameters: real poles, real parts of complex poles, imaginary parts of complex poles, real pole residues, real parts of complex pole residues, imaginary parts of complex pole residues, C matrix parameters, and D matrix parameters.
[0014] It can be seen that expressing the parameters in the vector fitting model as a one-dimensional vector facilitates subsequent prediction.
[0015] A further solution is that, in the process of training the parameter optimization model, a loss function is set according to the vector fitting model, wherein the loss function is expressed as: the total loss is equal to the sum of the parameter difference term, the real pole penalty term in the pole stability penalty, the complex pole real part penalty term in the pole stability penalty, and the pole imaginary part constraint term.
[0016] It can be seen that combining physical constraints and frequency response characteristics in the loss function design ensures that the predicted results always meet the physical laws.
[0017] A further solution is that the calculation process of the parameter difference term includes: determining the corresponding initial physical parameters in the vector fitting model based on the measured scattering parameters, and determining the weighted error based on the difference in frequency response corresponding to the initial physical parameters and the predicted physical parameters, wherein for frequencies greater than a preset frequency and S 11 >S 21 The regions are given higher weights relative to other regions.
[0018] It can be seen that for the preset frequency and S 11 >S 21The area with higher weight than other areas can solve the problem of 2xthru method in high frequency area, especially S 11 >S 21 The accuracy problem.
[0019] A further solution is that the physical constraint framework is an equivalent circuit model in the form of Foster or Cauer.
[0020] It can be seen from this that other circuit models can also be selected as physical constraint frameworks.
[0021] A further solution is to input the scattering parameters to be processed into a pre-trained parameter optimization model, and then determine whether the obtained scattering parameters to be processed are scattering parameters in a frequency range greater than a preset frequency. If so, the scattering parameters to be processed are input into the parameter optimization model, and the first target scattering parameters corresponding to the scattering parameters to be processed are obtained according to the equivalent model; if not, the second target scattering parameters corresponding to the scattering parameters to be processed are obtained by the 2xthru de-embedding method.
[0022] It can be seen that the de-embedding method can be determined based on whether the scattering parameters to be processed are in the high-frequency region. For scattering parameters with a frequency region less than a preset frequency, the 2xthru de-embedding method is used for de-embedding. For scattering parameters with a frequency region greater than or equal to the preset frequency, the parameter optimization model is used for de-embedding. The present invention expands the frequency range of the measured scattering parameter de-embedding. For high-frequency data (especially S 11 >S 21 For the case of , a deep learning optimization method based on vector fitting constraints is adopted; for low-frequency data, the traditional 2xthru de-embedding method is used to ensure the full-band applicability of the method.
[0023] To achieve the second objective described above, the present invention provides a computer device comprising a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, implements the method for determining scattering parameters based on deep learning.
[0024] In order to achieve the third objective mentioned above, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, the method for determining scattering parameters based on deep learning is implemented.
[0025] In order to achieve the fourth objective mentioned above, the present invention provides a computer program product, comprising computer instructions, wherein when the computer instructions are executed by a processor, the method for determining scattering parameters based on deep learning is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1This is a flowchart of determining device scattering parameters in an embodiment of the method for determining scattering parameters based on deep learning of the present invention, showing the complete processing flow of frequency judgment, method selection and physical constraint framework.
[0027] Figure 2 This is a flowchart of parameter optimization model training in an embodiment of the method for determining scattering parameters based on deep learning of the present invention, showing key steps such as data loading, physical constraint framework setting, loss function design, and neural network architecture construction.
[0028] The present invention will be further described below with reference to the accompanying drawings and embodiments. DETAILED DESCRIPTION
[0029] The present invention proposes a deep learning optimization method for determining scattering parameters based on a physical constraint framework. By setting a physical constraint framework and combining it with deep learning techniques, the method determines the scattering parameters of a device and ensures that the extracted device characteristics conform to the fundamental laws of physical systems. The present invention also provides a computer device, a computer-readable storage medium, and a computer program product for implementing the above-described deep learning method for determining scattering parameters.
[0030] Method embodiment for determining scattering parameters based on deep learning:
[0031] This embodiment uses a vector fitting model as a physical constraint framework and combines it with deep learning to train a parameter optimization model, thereby determining the scattering parameters of the device under test based on the trained parameter optimization model.
[0032] This embodiment is implemented by executing a computer program. Figure 1 Describe the specific steps.
[0033] First, step S11 is performed to obtain the scattering parameters to be processed.
[0034] The scattering parameters to be processed are scattering parameters obtained by measuring the device under test and the test fixture connected to the device under test. Since the scattering parameters to be processed are affected by the test fixture, the method of this embodiment is required to achieve de-embedding to extract the intrinsic characteristics of the device under test.
[0035] Continuing to step S12, it is determined whether the scattering parameter to be processed is a scattering parameter in a frequency range greater than a preset frequency.
[0036] A scattering parameter having a frequency range greater than a preset frequency means that the frequency of each frequency point in the scattering parameter is greater than the preset frequency. In this embodiment, the preset frequency is 50 GHz. If the scattering parameter to be processed is determined to have a frequency range not exceeding 50 GHz, the process jumps to step S16, where deembedding is performed using the 2xthru deembedding method. Then, step S17 is continued to obtain a second target scattering parameter corresponding to the scattering parameter to be processed.
[0037] If the result of step S12 is "yes," step S13 is executed to input the scattering parameters to be processed into a pre-trained parameter optimization model. The parameter optimization model is pre-selected and trained using deep learning technology. The specific training process is described in detail below and will not be repeated here.
[0038] Then proceed to step S14: obtaining an equivalent model output by the parameter optimization model that corresponds to the scattering parameters to be processed.
[0039] The specific form of the equivalent model corresponds to the physical constraint framework. In this embodiment, the physical constraint framework is a vector fitting model, so the equivalent model refers to a target vector fitting model corresponding to the scattering parameters to be processed.
[0040] Finally, step S15 is performed: obtaining the first target scattering parameter corresponding to the scattering parameter to be processed according to the equivalent model.
[0041] Based on the response of the equivalent model at different frequencies, the first target scattering parameters corresponding to the scattering parameters to be processed can be obtained. Specifically, the scattering parameters corresponding to the desired target frequency are first determined. The target frequency is then converted into a complex form and substituted into the target vector fitting model corresponding to the scattering parameters to be processed obtained in step S14. This results in a scattering parameter matrix corresponding to the target frequency, i.e., the first target scattering parameters after de-embedding the scattering parameters to be processed at the target frequency. For example, assuming the target frequency is f, the angular frequency ω=2πf corresponding to the target frequency can be obtained. The angular frequency is then converted into a complex form, i.e., the complex variable in the complex frequency domain corresponding to the target frequency is obtained, i.e., s=jω=j⋅2πf. The complex variable in the complex frequency domain corresponding to the target frequency is substituted into the target vector fitting model to obtain the scattering parameter matrix corresponding to the target frequency.
[0042] It should be noted that the above-mentioned expressions “first” and “second” are used to distinguish similar practices and do not have the meaning of order of priority.
[0043] The parameter optimization model is trained by deep learning. Figure 2 The process of parameter optimization model training is introduced step by step.
[0044] First, execute step S21 to load the data required for training.
[0045] In step S21, step S211, step S122 and step S213 are included.
[0046] First, execute step S211 to import measured scattering parameters. Measured scattering parameters are imported using an s2p or s4p file. Measured scattering parameters are scattering parameters measured for both the device and the test fixture connected to it. Measured scattering parameters are used for model training.
[0047] Then, step S212 is performed to de-embed the imported measured scattering parameters using the 2xthru de-embedding method.
[0048] Then, step S213 is executed to filter the de-embedded results. This filtering specifically involves selecting the de-embedded results of the measured scattering parameters and selecting usable frequency bands (for example, frequency bands where the de-embedded results meet the passivity requirement or where the measured scattering parameter IL - RL is greater than 5dB) to ensure that the de-embedded scattering parameters are reliable.
[0049] Thus, data required for training are obtained, and the data required for training include measured scattering parameters and de-embedded scattering parameters obtained by de-embedding and screening the measured scattering parameters.
[0050] Then, step S22 is executed to set a physical constraint framework.
[0051] In step S22, steps S221 and S222 are included.
[0052] First, step S211 is executed to construct a vector fitting model.
[0053] This embodiment uses the vector fitting model as the physical constraint framework.
[0054] In other embodiments, the physical constraint framework may also adopt an equivalent circuit model in the form of Foster or Cauer.
[0055] In other embodiments, more professional domain knowledge constraints, such as electromagnetic field distribution constraints, may be introduced under the physical constraint framework.
[0056] The vector fitting model provides a rational function representation that conforms to the characteristics of the physical system: H(s) = D + Σ(Ri / (s-pi)) + C, where pi is the pole, Ri is the corresponding residue, C is the proportionality coefficient, D is the constant term, and s is a complex variable in the complex frequency domain.
[0057] By setting up a physical constraint framework, we can ensure that the predictions of all neural network models meet the causality and stability requirements of the physical system. As a physical constraint framework, the vector fitting model, through the use of residues and poles, can meet the causality and passivity requirements of the physical system. Causality refers to the property that the output of a physical system cannot occur before the input. Passivity refers to the property that a physical system cannot generate energy. This corresponds to the fact that the real part of the system poles in the vector fitting model must be negative.
[0058] Then, step S212 is executed to flatten the physical parameters of the vector fitting model into a one-dimensional vector.
[0059] The physical parameters in the vector fitting model are flattened and represented as a one-dimensional vector. This one-dimensional vector includes the following types of physical parameters: real poles, real parts of complex poles, imaginary parts of complex poles, real pole residues, real parts of complex pole residues, imaginary parts of complex pole residues, C matrix parameters, and D matrix parameters. Each type of physical parameter in this one-dimensional vector has a clear physical meaning and is subject to corresponding physical constraints. The real poles, real parts of complex poles, and imaginary parts of complex poles correspond to the poles in the rational function representation of the vector fitting model; the real pole residues, real parts of complex pole residues, and imaginary parts of complex pole residues correspond to the corresponding residues in the rational function representation of the vector fitting model; the C matrix parameters correspond to the proportional coefficients in the rational function representation of the vector fitting model; and the D matrix parameters should be the constant terms in the rational function representation of the vector fitting model.
[0060] Then, step S23 is executed to set the loss function. The setting of the loss function combines physical constraints and frequency response characteristics to ensure that physical laws are always met during the optimization process.
[0061] In step S22, step S231, step S232 and step S233 are included.
[0062] First, step S231 is executed to set the parameter difference item.
[0063] The parameter difference term uses the mean square error (MSE) to measure the difference between the predicted physical parameters and the initial physical parameters, encouraging the optimization process to keep the parameters stable. Specifically, the initial physical parameters corresponding to the screened de-embedded scattering parameters are obtained by the Vector Fitting method, and the vector fitting model corresponding to the initial physical parameters is called the initial vector fitting model; the predicted physical parameters corresponding to the measured scattering parameters are predicted by the parameter optimization model, and the vector fitting model corresponding to the predicted physical parameters is called the predicted vector fitting model. The frequency response calculations are performed on the initial vector fitting model and the predicted vector fitting model respectively to obtain the corresponding scattering parameters at different frequency points. The error is determined based on the difference between the scattering parameters obtained by the initial vector fitting model and the scattering parameters obtained by the predicted vector fitting model at the same frequency point. Specifically, the same terms in the scattering parameters are subtracted and then multiplied by the corresponding weight coefficients to obtain the error corresponding to the frequency point. Similarly, the errors corresponding to all frequency points are obtained. The weighted error is obtained by averaging all errors. The weighted error is used to measure the difference in frequency response corresponding to the initial physical parameters and the predicted physical parameters. It should be noted that for frequencies greater than the preset frequency and S 11 >S 21 The frequency region with a higher weight than other frequency regions is given. For example, the preset frequency in this embodiment is 50 GHz. 11 >S 21 The weight coefficient of the frequency point is 3 (3 is an empirical value obtained from the experiment, and the parameter optimization model obtained by setting it to this value has a better prediction effect than other values), while the coefficient of the frequency points in other frequency areas is 1.
[0064] Then, step S232 is executed to set a physical constraint penalty term. The physical constraint penalty term includes an extreme point stability penalty term and an extreme point imaginary part constraint term.
[0065] The extreme stability penalty term includes the real extreme penalty term and the real part penalty term of the complex extreme.
[0066] The real extreme point penalty term is used to ensure that the predicted real extreme point is less than zero. The impact of the loss term is balanced by setting the penalty weight. When the predicted real extreme point is greater than 0, the penalty term is triggered, and the ReLU function layer outputs a positive value. This positive value is multiplied by the penalty coefficient (the penalty coefficient is 10) to obtain the score of the real extreme point penalty term.
[0067] The complex pole real part penalty term ensures that both the real part of the predicted complex pole and the real part of the complex pole residue are less than zero. The penalty weight is set to balance the impact of the loss term. When the real part of the predicted complex pole is greater than 0, the penalty term is triggered, and the ReLU function layer outputs a positive value. This positive value is then multiplied by the penalty coefficient (the penalty coefficient is 10) to obtain the pole stability penalty score.
[0068] The extreme imaginary part constraint ensures that the predicted complex pole imaginary part and the complex pole residue imaginary part must be positive. If the extreme imaginary part is less than 0, the penalty term is triggered, and the ReLU function layer outputs a positive value. This positive value is then multiplied by the penalty coefficient (the penalty coefficient is 10) to obtain the score of the extreme imaginary part constraint.
[0069] Then, step S233 is executed to calculate the total loss.
[0070] The total loss of this embodiment is expressed as total_loss.
[0071] The loss function of this embodiment is expressed as: total_loss = param_diff + poles_real_penalty + poles_cmplx_real_penalty + cmplx_imag_penalty. Param_diff represents the parameter difference term, poles_real_penalty represents the real pole penalty term in the pole stability penalty term, poles_cmplx_real_penalty represents the complex pole real part penalty term in the pole stability penalty, and cmplx_imag_penalty represents the pole imaginary part constraint term.
[0072] Then, step S24 is executed to set a neural network architecture that is integrated with the physical constraint framework.
[0073] Step S24 includes step S241 and step S242.
[0074] First, execute step S241 to set the input layer, hidden layer, and output layer.
[0075] The neural network architecture of the physical constraint framework fusion includes an input layer, a hidden layer, and an output layer.
[0076] The input layer receives pre-measured scattering parameters. Multiple hidden layers are configured, each of which undergoes a linear transformation, ReLU activation, and batch normalization. The output layer is a linear layer that maps the output of the last hidden layer to predicted physical parameters.
[0077] Then step S242 is executed to train the system through forward propagation and reverse propagation.
[0078] After the neural network architecture is defined, the input data is passed layer by layer to the output layer through the forward propagation process. The output layer outputs the predicted physical parameters and combines the loss function with the backpropagation algorithm to update the model parameters.
[0079] Finally, step S25 is executed to obtain a parameter optimization model that has completed training.
[0080] After the training is completed, a neural network model fused with the physical constraint framework is obtained, that is, the above-mentioned parameter optimization model is obtained.
[0081] Since the parameter optimization model is specifically used to predict the physical parameters corresponding to the vector fitting model, and ensures that it conforms to the characteristics of the actual system by integrating physical constraints in the loss function, it takes into account both expressiveness and training stability and is suitable for processing complex nonlinear relationships of high-frequency signals.
[0082] In other embodiments, the neural network architecture may also use a convolutional neural network (CNN) to process frequency domain responses, combined with a vector fitting physical constraint output layer.
[0083] In other embodiments, the neural network architecture may also adopt a graph neural network based on physical prior knowledge to capture the physical correlation between parameters.
[0084] In summary, the present invention effectively extends the 2xthru de-embedding method to higher frequencies through a deep learning optimization method based on physical framework constraints, with the following significant advantages:
[0085] 1. High-frequency accuracy is greatly improved: By introducing the VF model as a physical constraint framework and frequency adaptive weighting strategy, the present invention achieves a significant improvement in S 11 >S 21 The accuracy of high-frequency areas is improved by more than 50%, especially optimizing the key frequency bands where traditional methods fail.
[0086] 2. Physical consistency assurance: All optimization results are subject to the physical constraints of the vector fitting framework, ensuring compliance with physical properties such as causality, stability, and passivity, avoiding physically unrealizable results.
[0087] 3. Significantly improved numerical stability: Through the design of a physically constrained loss function, the numerical instability problem caused by the division operation in the traditional 2xthru method is effectively solved;
[0088] 4. Efficient exploration of the physical parameter space: The parameter optimization model efficiently explores the parameter space within the framework of physical constraints, discovering optimal physical parameter combinations that are difficult to find using traditional methods.
[0089] 5. Balancing computational efficiency and physical rationality: Compared to traditional methods, this method improves computational efficiency by 40% while ensuring physical rationality, and the results are more stable.
[0090] 6. Strong generalization capability: The deep learning framework based on physical constraints has stronger generalization capabilities and can be applied to different test environments and device characteristics, realizing the successful expansion of the de-embedding method to higher frequencies.
[0091] The training of the above parameter optimization model is implemented in Python. The following is the code framework for loading the required data for training, setting the physical constraint framework, setting the loss function, and setting the neural network architecture integrated with the physical constraint framework:
[0092] Code framework for loading the data required for training and setting up the physical constraint framework:
[0093] def objective_function_vf_object( params_flat , n_poles_real , n_poles_ cmplx_pairs , n_ports , has_c , has_d , freqs , target_s , z0 , vf_template ):
[0094] # Unpack parameters
[0095] # ...
[0096] # Use VF model to ensure feasibility of physical implementation
[0097] tmp_vf = vf(rf.Network( frequency =rf.Frequency.from_f(freqs, unit ='Hz'),
[0098] s =np.zeros((len(freqs), n_ports, n_ports), dtype =complex),
[0099] z0 =z0))
[0100] tmp_vf.poles = current_poles
[0101] tmp_vf.residues = residues_reshaped.T
[0102] # ...
[0103] def pack_params_structured( poles_real , poles_cmplx_pairs , res_real , res_ cmplx , c_real , d_real ):
[0104] """Pack structured VF parameters into a flat real vector."""
[0105] params = np.array([], dtype =float)
[0106] # Packing real points
[0107] params = np.concatenate((params, poles_real.real))
[0108] # Pack the real and imaginary parts of complex pole pairs
[0109] if poles_cmplx_pairs is not None and len(poles_cmplx_pairs)>0:
[0110] cmplx_pole_params = np.ravel(poles_cmplx_pairs).real
[0111] params = np.concatenate((params, cmplx_pole_params))
[0112] # Packing the remainder (continue packing various parameters...)
[0113] # ...
[0114] Set up the code framework for the loss function:
[0115] def custom_loss( pred_params , input_params , target_score ):
[0116] # Ensure that the prediction parameters are within the physically valid range
[0117] clamped_params = torch.zeros_like(pred_params)
[0118] for i, bounds in enumerate(param_bounds):
[0119] low, high = bounds
[0120] clamped_params[:, i] = torch.clamp(pred_params[:, i], low, high)
[0121] # Calculate parameter differences - encourage staying close to the initial parameters, using weighted MSE
[0122] param_diff = torch.mean((clamped_params - input_params)**2)
[0123] # Extract the parameters of the extreme part
[0124] poles_real_indices = list(range(n_poles_real))
[0125] poles_cmplx_real_indices = list(range(n_poles_real, n_poles_real + n_poles_cmplx_pairs))
[0126] # Extreme stability penalty - ensure real part is negative
[0127] poles_real_penalty = torch.mean(torch.relu(clamped_params[:, poles_real_indices])) * 10.0
[0128] poles_cmplx_real_penalty = torch.mean(torch.relu(clamped_params[:,poles_cmplx_real_indices])) * 10.0
[0129] # Physical constraints where the imaginary part must be positive
[0130] cmplx_imag_indices = list(range(n_poles_real + n_poles_cmplx_pairs,
[0131] n_poles_real + 2 * n_poles_cmplx_pairs))
[0132] cmplx_imag_penalty = torch.mean(torch.relu(-clamped_params[:, cmplx_imag_indices])) * 10.0
[0133] #Combined loss
[0134] total_loss = param_diff + poles_real_penalty + poles_cmplx_real_penalty + cmplx_imag_penalty
[0135] return total_loss, loss_components_dict
[0136] class VFParamNet(nn.Module):
[0137] Setting up a code framework for a neural network architecture that is integrated with a physical constraint framework
[0138] """Deep neural network model for predicting VF parameters"""
[0139] def __init__( self , input_size , output_size , hidden_layers =[512, 256,128]):
[0140] super(VFParamNet, self).__init__()
[0141] # Build the network layer
[0142] layers = []
[0143] prev_size = input_size
[0144] for hidden_size in hidden_layers:
[0145] layers.append(nn.Linear(prev_size, hidden_size))
[0146] layers.append(nn.ReLU())
[0147] layers.append(nn.BatchNorm1d(hidden_size))
[0148] prev_size = hidden_size
[0149] # Output layer - produces parameters that conform to physical constraints
[0150] layers.append(nn.Linear(prev_size, output_size))
[0151] self.model = nn.Sequential(*layers)
[0152] def forward( self , x ):
[0153] # Forward propagation - output will apply physical constraints in the loss function
[0154] return self.model(x)
[0155] Computer device embodiment:
[0156] The computer device of this embodiment includes a processor and a memory. The memory stores a computer program. When the processor executes the computer program, the above-mentioned embodiment of the permission configuration management method applied to BI analysis software is implemented.
[0157] A computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that a computer device may include more or fewer components, or a combination of certain components, or different components. For example, a computer device may also include input and output devices, network access devices, a bus, and the like.
[0158] For example, a processor can be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microcontroller or any conventional processor. The processor is the control center of a computer device, connecting the various parts of the entire computer device using various interfaces and lines.
[0159] The memory can be used to store computer programs and / or modules. The controller implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. For example, the memory may mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created based on the use of the mobile phone (such as audio data, text data, etc.). In addition, the memory can include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0160] Computer readable storage medium embodiment:
[0161] If the modules integrated into the computer device of the above embodiment are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the process of the embodiment of the method for determining scattering parameters based on deep learning can also be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a controller, it can implement the steps of the embodiment of the method for determining scattering parameters based on deep learning. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The storage medium can include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.
[0162] Computer program product embodiment:
[0163] The computer program product of this embodiment includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of the embodiment of the method for determining scattering parameters based on deep learning.
[0164] Finally, it should be emphasized that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various changes and modifications. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for determining scattering parameters based on deep learning, characterized in that: The following steps are involved: Acquiring scattering parameters to be processed, wherein the scattering parameters to be processed are obtained by measuring the device to be tested and a test fixture connected to the device to be tested as a whole; Inputting the scattering parameters to be processed into a pre-trained parameter optimization model; wherein the parameter optimization model is trained by deep learning under a physical constraint framework based on the measured scattering parameters and the de-embedded scattering parameters obtained by de-embedding and screening the measured scattering parameters; Obtaining an equivalent model output by the parameter optimization model and corresponding to the scattering parameter to be processed; Obtaining a first target scattering parameter corresponding to the scattering parameter to be processed according to the equivalent model; The process of training to obtain the parameter optimization model includes setting a loss function according to the vector fitting model, wherein the loss function is expressed as follows: the total loss is equal to the sum of the parameter difference term, the real pole penalty term in the pole stability penalty term, the complex pole real part penalty term in the pole stability penalty, and the pole imaginary part constraint term; The calculation process of the parameter difference term includes: obtaining corresponding initial physical parameters according to the de-embedded scattering parameters obtained by the screening, predicting the predicted physical parameters corresponding to the measured scattering parameters through the parameter optimization model, performing frequency response calculations on an initial vector fitting model corresponding to the initial physical parameters and a predicted vector fitting model corresponding to the predicted physical parameters respectively, determining an error according to the difference between the scattering parameters obtained by the initial vector fitting model and the scattering parameters obtained by the predicted vector fitting model at the same frequency point, averaging all errors to determine a weighted error, wherein, for frequencies greater than a preset frequency and S 11 >S 21 The region with the highest weight is given to the region with the highest weight relative to other regions; After obtaining the scattering parameter to be processed, it is determined whether the scattering parameter to be processed is a scattering parameter in a frequency region greater than a preset frequency. If so, the scattering parameter to be processed is input into the parameter optimization model to obtain the equivalent model, and a first target scattering parameter corresponding to the scattering parameter to be processed is obtained based on the equivalent model; if not, a second target scattering parameter corresponding to the scattering parameter to be processed is obtained through a 2xthru de-embedding method.
2. The method for determining scattering parameters based on deep learning according to claim 1, wherein: The physical constraint framework is the vector fitting model, which is expressed as: H(s) = D + Σ(Ri / (s-pi)) + C, where pi is the pole, Ri is the corresponding residue, C is the proportionality coefficient, D is the constant term, and s is a complex variable in the complex frequency domain.
3. The method for determining scattering parameters based on deep learning according to claim 2, wherein: The parameters in the vector fitting model are expressed as a one-dimensional vector, which includes the following types of physical parameters: real poles, real parts of complex poles, imaginary parts of complex poles, real pole residues, real parts of complex pole residues, imaginary parts of complex pole residues, C matrix parameters, and D matrix parameters.
4. The method for determining scattering parameters based on deep learning according to claim 1, wherein: The physical constraint framework is an equivalent circuit model in the Foster or Cauer form.
5. A computer device comprising a processor and a memory, characterized in that: The memory stores a computer program, which, when executed by the processor, implements the method for determining scattering parameters based on deep learning according to any one of claims 1 to 4.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for determining scattering parameters based on deep learning according to any one of claims 1 to 4 is implemented.
7. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the method for determining scattering parameters based on deep learning according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
System and method for correcting passivity of scattering parameter equivalent circuit
CN102486810A
Radio frequency device parameter optimization method based on deep learning
CN108959728A