Power line channel modeling method, system, equipment and medium
By combining transmission line theory with enhanced conditional generative adversarial networks, the problem of insufficient adaptability of power line channel modeling methods to complex network configurations and load changes is solved. This enables in-depth consideration of the physical characteristics of the channel, improving modeling accuracy and generalization ability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUIZHOU POWER GRID CO LTD
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-15
AI Technical Summary
Existing power line channel modeling methods are not adaptable to complex network configurations and load changes, lack in-depth consideration of channel physical characteristics, and have insufficient modeling accuracy and generalization ability.
By combining transmission line theory with enhanced conditional generative adversarial networks (GANs), standardized conditional features and normalized channel features are generated by collecting power line structure parameters and measured channel transfer functions. The residual data is then trained using the enhanced conditional GAN, and the theoretical transfer function is weighted and fused with the residual data to generate the final simulated channel transfer function.
Accurately capture the complex characteristics of power line channels, improve modeling accuracy and adaptability, and provide a reliable basis for channel modeling.
Smart Images

Figure CN122052946A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power line channel modeling, and in particular to a power line channel modeling method, system, device and medium. Background Technology
[0002] With the rapid development of information technology, power line communication technology has received widespread attention due to its advantages such as no need for additional wiring, cost savings, and the ability to utilize existing power networks. However, power line channels have complex characteristics, including frequency-selective fading, noise interference (such as impulse noise and Gaussian noise), and time-varying characteristics. These characteristics make it difficult for traditional channel modeling methods to accurately describe their behavior.
[0003] Existing power line channel modeling methods are mainly divided into two categories: top-down and bottom-up, which derive channel models based on measurement results and theoretical derivations, respectively. Top-down methods have lower computational burden and are easier to implement, but are susceptible to measurement errors due to their reliance on measurement data. Bottom-up methods, which derive model parameters theoretically, have greater applicability and flexibility, but suffer from higher computational complexity. Furthermore, existing methods have significant limitations in handling complex network configurations and load variations, making it difficult to accurately predict channel transmission characteristics. Currently, although deep learning methods such as Generative Adversarial Networks (GANs) have shown potential in generating high-quality data and capturing complex characteristics in channel modeling, there is a lack of research combining deep learning with traditional transmission line theory to accurately model power line channels. Therefore, existing technologies suffer from the following problems: insufficient adaptability to complex network configurations and load variations; lack of in-depth consideration of channel physical characteristics; and the need to improve the accuracy and generalization ability of the models. Therefore, there is an urgent need for a method that can accurately model the complex characteristics of power line channels to improve the performance and reliability of power line communication systems. Summary of the Invention
[0004] Therefore, the technical problem to be solved by the present invention is to solve the technical problems of poor adaptability of existing power line channel modeling methods to complex scenarios, insufficient integration of physical characteristics, and low modeling accuracy and generalization ability caused by the separation of deep learning and traditional theory.
[0005] The above-mentioned technical problems are solved by the following technical solution: This invention proposes a power line channel modeling method, which includes, The structural parameters of the power line and the corresponding measured channel transmission function are collected, and the structural parameters and measured channel transmission function are preprocessed to obtain standardized conditional features and normalized and smooth channel features. Based on transmission line theory, the theoretical transmission function of the electric power line is generated according to the structural parameters. An enhanced conditional generative adversarial network is constructed. The standardized conditional features are input into the enhanced conditional generative adversarial network as conditional information. The enhanced conditional generative adversarial network is trained using the normalized channel features so that it outputs residual data corresponding to the conditional features. The theoretical transfer function and the residual data are weighted and fused, and the fusion result is smoothed to obtain the final simulated channel transfer function for power line channel modeling.
[0006] In a preferred embodiment of the power line channel modeling method of the present invention: the preprocessing of the measured channel transfer function includes: The real and imaginary parts of the measured channel transfer function are separated, and the real and imaginary parts are smoothed respectively. Then the smoothed real and imaginary parts are merged to form a normalized and smooth channel feature.
[0007] In a preferred embodiment of the power line channel modeling method of the present invention:
[0008] In a preferred embodiment of the power line channel modeling method of the present invention: generating the theoretical transfer function of the power line based on the structural parameters includes: When a power line has a branch structure, the branch structure is equivalent to the corresponding input impedance, and the input impedance is connected in parallel with the load impedance at the branch node to update the load condition of the main line at that node. Based on the updated load condition, the equivalent input impedance of the main line is calculated segment by segment from the receiving end to the transmitting end. Finally, the theoretical transfer function is generated according to the voltage and current relationship between the transmitting end and the receiving end.
[0009] In a preferred embodiment of the power line channel modeling method of the present invention: the residual data represents the difference between the measured channel transmission function and the theoretical transmission function.
[0010] In a preferred embodiment of the power line channel modeling method of the present invention: the weighted fusion of the theoretical transfer function and the residual data includes: The theoretical transfer function is added to the product of the preset physical weights and the residual data, wherein the preset physical weights are used to balance the contributions of the theoretical transfer function and the residual data in the fusion.
[0011] In a preferred embodiment of the power line channel modeling method of the present invention: the normalized channel features are used to train the enhanced conditional generative adversarial network, including: Using the normalized channel characteristics as a reference, the residual data output by the enhanced conditional generative adversarial network can compensate for the deviation between the theoretical transfer function and the normalized channel characteristics.
[0012] In a preferred embodiment of the power line channel modeling method of the present invention: the standardized conditional features include mainline length, number of branches, branch length, and load size.
[0013] The present invention also provides a power line channel modeling system.
[0014] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a power line signal modeling system, comprising: The data acquisition module is used to collect the structural parameters of the power line and the corresponding measured channel transmission function; The preprocessing module is used to preprocess the structural parameters and the measured channel transmission function to obtain standardized conditional features and normalized and smooth channel features. The theoretical transfer function generation module generates the theoretical transfer function of the electric power line based on the structural parameters. The residual data generation module is used to receive the standardized conditional features as conditional information, train based on the normalized channel features, and output residual data corresponding to the conditional features. The fusion output module is used to weight and fuse the theoretical transfer function with the residual data, and to smooth the fusion result to obtain the final simulated channel transfer function for power line channel modeling.
[0015] The present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the power line channel modeling method.
[0016] The present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the power line channel modeling method described above.
[0017] The beneficial effects of this invention are as follows: by constructing an enhanced conditional generative adversarial network and combining it with transmission line theory, the final simulated channel transmission function is generated. This not only solves the problem of the lack of rationality in traditional data-driven models, but also overcomes the defects of pure theoretical models, such as complex calculations and poor adaptability. It can accurately capture the complex characteristics of power line channels, such as frequency-selective fading and time-varying characteristics, and provides a reliable basis for channel modeling. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings of the embodiments of the present invention will be briefly described below. Obviously, the drawings described below only relate to some embodiments of the present invention and are not intended to limit the present invention. Wherein: Figure 1 A flowchart illustrating a power line channel modeling method according to an embodiment of the present invention; Figure 2 A flowchart of a data preprocessing section provided in one embodiment of the present invention; Figure 3 Loss curves of the generator and discriminator provided in one embodiment of the present invention; Figure 4 This is a comparison diagram of the simulated channel transmission characteristics and the real data virtual and real parts provided in an embodiment of the present invention. Detailed Implementation
[0019] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0020] The terminology used in this invention is that which is currently widely used in the art in consideration of the function of the invention; however, these terms may vary according to the intent of those skilled in the art, precedent, or new technology in the art. Furthermore, specific terms may be chosen by the applicant, and in such cases, their detailed meanings will be described in the detailed description of the invention. Therefore, the terms used in this specification should not be construed as simple names, but rather based on their meanings and the overall description of the invention.
[0021] Example 1~ Figure 2 , refer to Figures 1-2 This is one embodiment of the present invention, which provides a power line channel modeling method, including the following steps Z1~Z4: Z1: Collect the structural parameters of the power line and the corresponding measured channel transmission function, and preprocess the structural parameters and measured channel transmission function to obtain standardized conditional features and normalized and smooth channel features; among them, the standardized conditional features include main line length, number of branches, branch length and load size.
[0022] It should be further explained that the preprocessing of the measured channel transfer function includes: The real and imaginary parts of the measured channel transfer function are separated, and the real and imaginary parts are smoothed separately. The smoothed real and imaginary parts are then combined to form a normalized and smooth channel feature.
[0023] In practice, the key parameter data of the power line channel are first obtained through actual measurement, including the main line length, number of branches, branch length, load size, and the corresponding real and imaginary part characteristic parameters of the channel's transfer function. The specific implementation steps are as follows Z11~Z12: Z11: First, data loading is performed, and all the collected measured data is organized and stored as an Excel file. Subsequently, the data loading module reads the file and extracts conditional features (main line length, number of branches, branch length, load size) and channel features (real part and imaginary part of the transmission function). Z12: Perform feature preprocessing, including the following steps Z121~Z124: Z121: Standardize the conditional features to eliminate the impact of differences in dimensions on model training. StandardScaler is preferred to standardize conditional features such as main line length, number of branches, branch length, and load size to eliminate the interference of differences in dimensions on model training. Z122: Scale the transfer function data to the range of [-1, 1] to match the value range of the generator output layer in the generative adversarial network. Preferably, the real and imaginary parts of the transfer function data are scaled to the range of [-1, 1] using MinMaxScaler to match the value range of the Tanh function in the ECGAN generator output layer. Z123: To address potential noise interference in the collected data, the real part (first 1000 dimensions) and imaginary part (last 1000 dimensions) of the transfer function are separated using a transfer function smoothing function. Moving average filtering (or zero-phase low-pass filtering) is used to smooth the two parts separately, removing high-frequency noise before merging them into complete transfer function data. This setting can effectively remove high-frequency noise and improve data quality. Z124: The preprocessed conditional features are concatenated with the channel features to form a complete training dataset.
[0024] Z2: Based on transmission line theory, the theoretical transmission function of the electric power line is generated according to the structural parameters.
[0025] The generation of the theoretical transfer function for the electric field lines based on structural parameters includes: When a power line has a branch structure, the branch structure is equivalent to the corresponding input impedance, and the input impedance is connected in parallel with the load impedance at the branch node to update the load condition of the main line at that node. Based on the updated load condition, the equivalent input impedance of the main line is calculated segment by segment from the receiver to the transmitter. Finally, the theoretical transfer function is generated based on the voltage and current relationship between the transmitter and receiver.
[0026] In practice, by constructing a physical model of the power line channel based on transmission line theory, core parameters such as characteristic impedance (Z0) and propagation constant (γ) can be calculated, thus providing physical constraints for subsequent hybrid models. The specific implementation steps are as follows: Z21~Z23: Z21: First, initialize the parameters and set the physical parameters of the power lines. For example, the wire diameter is 2.0 mm, the insulation layer thickness is 1.5 mm, and the conductivity is 5.8 × 10⁻⁶. 7 S / m, etc., and introduce a minimum constant (10 −8 Avoid division by zero or infinity anomalies in numerical calculations; Z22: Next, perform characteristic parameter calculations. For different frequency points, obtain the unit length resistance R (considering skin effect correction), inductance L, conductance G, and capacitance C, and calculate the characteristic impedance and propagation constant using the following formulas. Perform numerical cropping and outlier replacement on the calculation results to ensure the rationality of the physical parameters. Where j represents the imaginary unit and ω represents the angular frequency; Z23: Finally, the theoretical transfer function is generated. Combining the power line structure parameters (main line length, load size) with the above characteristic parameters, the theoretical transfer function is calculated using the following formula as a reference. Among them, Z L Z0 represents the load impedance, e-ᵞˡ represents the characteristic impedance, and e-ᵞˡ represents the propagation factor.
[0027] Z3: Construct an enhanced conditional generative adversarial network, input standardized conditional features as conditional information into the enhanced conditional generative adversarial network, and train the enhanced conditional generative adversarial network using normalized channel features so that its output is residual data corresponding to the conditional features. The residual data represents the difference between the measured channel transfer function and the theoretical transfer function. Furthermore, the normalized channel features are used to train the enhanced conditional generative adversarial network, including: By using the normalized channel characteristics as a reference, the residual data output by the enhanced conditional generative adversarial network can compensate for the deviation between the theoretical transfer function and the normalized channel characteristics.
[0028] Specifically, the Enhanced Conditional Generative Adversarial Network (ECGAN) consists of two main components: a generator and a discriminator. The loss function that combines Wasserstein distance with gradient penalty can be preferred to improve the model training stability and the quality of generated samples. Wasserstein distance is an indicator that measures the difference between two probability distributions and is used to reflect the true difference between the distributions. It is used as the core indicator for performance evaluation in generative models.
[0029] The generator takes a concatenated vector of random noise (100-dimensional) and conditional features (4-dimensional) as input and outputs a simulated transfer function (2000-dimensional) that matches the dimensions of the real channel features. The network structure consists of stacked fully connected layers, with hidden layers of 1024, 2048, and 4096 dimensions set sequentially. Each layer is followed by a one-dimensional batch normalization, activation function, and regularization layer, and finally outputs through a hyperbolic tangent function layer. The input layer concatenates random noise and conditional features, enabling the generator to generate matching channel samples based on the power line structure parameters.
[0030] The discriminator takes a concatenated vector of channel features (2000-dimensional) and conditional features (4-dimensional) as input and outputs the result of judging the authenticity of the sample. The network structure consists of stacked fully connected layers, with hidden layers of 2048, 1024, and 512 dimensions set sequentially. Each layer is followed by an activation function and a regularization layer, and finally, a linear layer is used to output the discriminant value. The discriminator receives real data and generated data, and judges them together with the conditional feature vector. It judges the authenticity of the input data through a multi-layer network structure and outputs the probability of being true. The Wasserstein distance is used to replace the traditional cross-entropy loss, and a gradient penalty term (λgp=10) is introduced to constrain the Lipschitz continuity of the discriminator and avoid model training collapse. The Lipschitz continuity is used to accurately estimate the distribution distance and avoid training divergence.
[0031] Furthermore, the training strategy for constructing the Enhanced Conditional Generative Adversarial Network (ECGAN) is as follows: the discriminator and generator are trained alternately, with the generator being updated once after every three updates to the discriminator; the generator loss function combines Wasserstein loss and L1 loss (with a weight coefficient of 3), which can both ensure the "deceptiveness" of the generated samples and force them to have numerical similarity with the real samples; the gradient penalty calculates the gradient norm by interpolating the real samples and the generated samples, which can ensure the Lipschitz constraint of the discriminator gradient.
[0032] Z4: The theoretical transfer function and residual data are weighted and fused, and the fusion result is smoothed to obtain the final simulated channel transfer function for power line channel modeling.
[0033] It should be further explained that the weighted fusion of the theoretical transfer function and the residual data includes: The theoretical transfer function is added to the product of the preset physical weights and the residual data, where the preset physical weights are used to balance the contributions of the theoretical transfer function and the residual data in the fusion. In practice, the specific implementation steps are as follows: Z41~Z12: Z41: First, preprocess the ECGAN input, and normalize it according to the following power line physical conditions: in, The conditional inputs representing the ECGAN generator, Represents the original conditional physical vector. This represents the mean of each dimension of the original physical conditions. Represents the standard deviation of each dimension of the original physical conditions; Z42: The preprocessed training set is then divided into a training set (80%) and a test set (20%). The training generalization is improved by randomly shuffling the data order. During training, the loss values of the discriminator and generator are output every 10 rounds to monitor the training status. To match the generator range, the transfer function is normalized using the following formula: in, Represents the normalized true transfer function. Represents the original real transfer function. The minimum value of all dimensions of the original transfer function. This represents the maximum value across all dimensions of the original transfer function.
[0034] Furthermore, in the generation stage, the conditional features are input into the ECGAN generator to obtain the final simulated channel samples. The core formula of the ECGAN generator is: in, The normalized transfer function representing the generator output. The network representing the generator, This represents the activation of the last layer of the generator. Represents a fully connected neural network; The discriminator loss function formula is: The generator loss function formula is: Among them, L D GP represents the discriminator loss value, E represents the batch data mean, and GP represents the gradient penalty term. Z43: Finally, Normalized Mean Squared Error (NMSE) is used to quantify the difference between the generated samples and the real samples. By visually comparing the real and imaginary parts of the transfer function (first 100 frequency points) of the real and generated samples, the model generation effect is intuitively verified. The visualization results are generated and saved as image files for subsequent analysis and verification.
[0035] Example 2, an embodiment of the present invention, provides a specific implementation of a power line channel physical modeling method based on transmission line theory, based on the previous embodiment, for generating the theoretical transfer function (S). 21It can handle complex topologies with branches, including the following steps A1~A4: A1: Define the basic physical parameters of the power line, including conductor diameter of 2.0e-3m, insulation thickness of 1.5e-3m, conductivity of 5.8e7S / m, and relative permittivity of 2.2, etc., and introduce 1e... -8 This ensures that the value is a very small constant, thus avoiding abnormal situations such as division by zero or infinity in subsequent calculations. A2: For each frequency point within the range of 1e6Hz - 100e6Hz, calculate the unit length resistance R (considering skin effect correction), inductance L, conductance G, and capacitance C sequentially; based on the above parameters, calculate the characteristic impedance Z0 and propagation constant γ using formulas, and perform numerical clipping and outlier replacement on the results to ensure the physical rationality of the parameters; among them, numerical clipping and outlier replacement are hierarchical and designed according to physical rationality, mainly focusing on avoiding numerical overflow, division by zero, meaningless values, and constraining parameters within the physically reliable range. The following are specific methods, thresholds, strategies, and examples: The first step is prevention, using small constants to avoid anomalies. First, avoid an angular frequency of 0. Then, use array element range trimming to limit the physical range of the unit length resistance R, setting a threshold to control the range of unit resistance R to (1e-6, 1e6). Similarly, protect the unit length conductance G and unit length capacitance C, controlling the range of unit length conductance G to (1e-12, 1e6) and the range of unit length capacitance C to (1e-12, 1e-6). The second step is to replace the outliers in the characteristic impedance Z0 and the propagation constant γ. The outlier in Z0 is replaced with 50Ω, which is the standard characteristic impedance of the RF transmission line. Replace the outlier values of γ with 0+0j. When γ=0, it indicates no decay and no phase shift. A3: Combining the power line structure parameters (main line length, number of branches, branch length) and load size, consider the impact of branches on the channel (calculate the equivalent load impedance when branches exist). When branches exist, first calculate the input impedance of each branch, then connect all branch input impedances in parallel with the load of the branch node to obtain the equivalent load impedance of the main line; if a T-type node has N branches, and a local load Z is also connected at the node. L0 Then the formula for the equivalent load impedance of the main line at this node is: It should be further explained that the input impedance of the branch is connected in parallel with the node load, reflecting the branch's shunting effect on the main line impedance. If there is no local load, ZL0 in this formula is infinite. When a power line has branches, the main line segment and branch nodes need to be split into multiple transmission line segments, and the overall transmission function is calculated by cascading ABCD matrices. For a transmission line of length L, the ABCD matrix is: It should be further explained that, if it is a multi-terminal transmission line, the transmission line is divided into segment 1, segment 2, segment 3, ..., segment n; the total ABCD transmission matrix is the product of the transmission matrices of each segment. A4: Calculate the theoretical transfer function using the transfer function formula to construct a complete scattering matrix model, providing physical constraints for subsequent hybrid models (introducing L1 loss with reference to the theoretical transfer function in the generator loss); for power line topologies with branches, the main line (port 1 → port 2) and multiple branch transmission lines and terminal loads connected in parallel to the main line nodes; the influence of each branch can be transformed into the parallel load of the corresponding node of the main line through the input impedance equivalence method, and then the equivalent impedance is recursively calculated along the main line from port 2 to port 1, finally obtaining the 2-port transfer function of the entire network; It should be further explained that for the equivalent input impedance of a single branch, each branch itself is a series structure of branch transmission line (length l_bk) + terminating load Z_Lk). Its equivalent input impedance, that is, the impedance seen from the main node, can be calculated using the transmission line input impedance formula: in, The characteristic impedance of the k-th branch transmission line (shares the same transmission line parameter calculation logic as the main line). This represents the propagation constant of the k-th branch transmission line. This represents the length of the k-th branch. The terminal load represents the k-th branch; Furthermore, the main line is divided into multiple segments by branch nodes. n branches divide the main line into n+1 segments, recursively calculated from port 2 (receiver) to port 1 (sender); the rightmost segment (last branch node → port 2): the terminal load is the load Z of port 2. L2(Usually, a matching load, such as 50Ω or the characteristic impedance of the power line, is used), calculate the input impedance Zin,seg1 of this segment; Middle segment (kth branch node → k+1th branch node): Connect the input impedance of the right segment in parallel with the equivalent input impedance Zin,k of the kth branch to obtain the equivalent load Zpar,k of this segment, and then calculate the input impedance Zin,segk of the current segment; Leftmost segment (port 1 → first branch node): Finally, obtain the total input impedance Zin,total seen from port 1, and calculate S21 by combining the transmission attenuation of the total length of the main line; S21 is defined as the ratio of the output amplitude of port 2 to the incident amplitude of port 1 when port 2 is connected to a matching load, i.e., the end-to-end transfer function H(f); For the simplified 2-port network, the complex expression of S21 is: in, This represents the characteristic impedance of the main transmission line. The propagation function represents the main transmission line. Represents the total length of the main line. This represents the matching load for port 2.
[0036] Example 3, an embodiment of the present invention, provides a method for constructing and training an enhanced conditional generative adversarial network based on the previous embodiment. By introducing physical parameters as conditions and fusing Wasserstein and L1 loss, the generator can output high-quality channel samples, including the following steps B1-B4: B1: Construct a generator with a fully connected layer as the core. The input is a concatenated vector of 100-dimensional random noise and 4-dimensional conditional features, which is then passed through 1024-dimensional, 2048-dimensional, and 4096-dimensional hidden layers in sequence. Each layer is followed by a batch normalization layer, a LeakyReLU activation function, and a Dropout regularization layer. Finally, a 2000-dimensional analog transfer function is generated through a Tanh output layer.
[0037] B2: Construct a discriminator with a fully connected structure. The input is a concatenated vector of 2000-dimensional channel features and 4-dimensional conditional features. It passes through 2048-dimensional, 1024-dimensional, and 512-dimensional hidden layers in sequence. After each layer, a LeakyReLU activation function and a Dropout regularization layer are added. Finally, the discriminant result of the sample authenticity is output through a linear layer. B3: The Adam optimizer is used to optimize the parameters of the generator and discriminator respectively, with the learning rate set to 1e-4 and the momentum parameter set to (0.5, 0.999); the loss function uses Wasserstein distance instead of traditional cross-entropy divergence and adds a gradient penalty term (λgp=10) to constrain the Lipschitz continuity of the discriminator. B4: The discriminator is trained in multiple rounds and the generator is trained in a single round. In each round of training, the discriminator is updated 3 times and the generator is updated once. The generator loss function combines Wasserstein loss and L1 loss (calculating the loss between generated samples and real measured channel samples, with a weighting coefficient of 3), taking into account both the authenticity of generated samples and numerical similarity.
[0038] Example 4, refer to Figures 3-4 This is one embodiment of the present invention. Based on the previous embodiment, a method is provided to weightedly fuse the theoretical transfer function with the residual data generated by ECGAN to obtain the final simulated channel transfer function, and the model performance is verified by comparing the normalized mean square error and the real / imaginary part curves.
[0039] The constructed transmission line theory model was integrated with the trained ECGAN model. The hybrid model parameters were initialized, with physical weights set to 0.05, a smoothing window size of 5, and physical fusion mode enabled. The preprocessed complete dataset was randomly divided into training and test sets in an 8:2 ratio to ensure data randomness and improve model generalization ability. The conditional features and channel features of the training set were converted into tensor form and input into the hybrid model. During training, the discriminator average loss and generator average loss were output every 10 epochs. The generated results are as follows: Figure 3 As shown, the training status is monitored in real time, and the overall parameters of the hybrid model are continuously optimized through alternating training. After the model training is completed, the conditional features are input to the ECGAN generator, and the generator output is used as the final simulated channel sample.
[0040] The test set is input into the hybrid model to generate corresponding simulated samples. The normalized mean square error (NMSE) of the simulated samples and the real samples is calculated to quantitatively evaluate the modeling accuracy. Outlier cleanup is performed on the real samples and model-generated samples in the test set, using the nan_to_num function to replace null and extreme values to avoid affecting the evaluation results. Three test samples are randomly selected, and comparison graphs of the real and imaginary parts of the transfer function are plotted for the real samples, samples generated by the hybrid model, and samples from the transmission line theory model, respectively, to visually demonstrate the model performance. The visualizations are saved to a specified path. The generated comparison graphs are shown below. Figure 4 As shown, sample 1 has a main line length of 25m and a load of 50Ω, sample 2 has a main line length of 20m and a load of 100Ω, and sample 3 has a main line length of 30m and a load of 20Ω. The curve trends of the samples generated by the hybrid model are highly consistent with those of the real samples, and the numerical deviation is extremely small, indicating that the generated samples are close to the real measurement results.
[0041] Example 5, an embodiment of the present invention, provides a power line channel modeling system based on the previous embodiment, comprising: The data acquisition module is used to collect the structural parameters of the power line and the corresponding measured channel transmission function; The preprocessing module is used to preprocess the structural parameters and the measured channel transfer function to obtain standardized conditional features and normalized and smooth channel features. The theoretical transfer function generation module generates the theoretical transfer function of the electric power line based on the structural parameters. The residual data generation module is used to receive standardized conditional features as conditional information, train based on normalized channel features, and output residual data corresponding to the conditional features. The fusion output module is used to weight and fuse the theoretical transfer function with the residual data, and to smooth the fusion result to obtain the final simulated channel transfer function for power line channel modeling.
[0042] This embodiment also provides an electronic device applicable to a method for processing cyclic signals for detecting a pull bar, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the method for processing cyclic signals for detecting a pull bar as proposed in the above embodiment.
[0043] This embodiment also provides a storage medium on which a computer program is stored, which, when executed by a processor, implements a power line signal modeling method as proposed in the above embodiments.
[0044] The storage medium proposed in this embodiment belongs to the same inventive concept as the method for implementing power line signal modeling proposed in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0045] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0046] Finally, it should be noted that the methods and devices described in detail above are merely embodiments, and those skilled in the art can modify these embodiments in different ways as long as they do not depart from the scope of the present invention.
Claims
1. A method for modeling power line channels, characterized in that: include, The structural parameters of the power line and the corresponding measured channel transmission function are collected, and the structural parameters and measured channel transmission function are preprocessed to obtain standardized conditional features and normalized and smooth channel features. Based on transmission line theory, the theoretical transmission function of the electric power line is generated according to the structural parameters. An enhanced conditional generative adversarial network is constructed. The standardized conditional features are input into the enhanced conditional generative adversarial network as conditional information. The enhanced conditional generative adversarial network is trained using the normalized channel features so that it outputs residual data corresponding to the conditional features. The theoretical transfer function and the residual data are weighted and fused, and the fusion result is smoothed to obtain the final simulated channel transfer function for power line channel modeling.
2. The power line channel modeling method according to claim 1, characterized in that, The preprocessing of the measured channel transmission function includes: The real and imaginary parts of the measured channel transfer function are separated, and the real and imaginary parts are smoothed respectively. Then the smoothed real and imaginary parts are merged to form a normalized and smooth channel feature.
3. The power line channel modeling method according to claim 1, characterized in that, The generation of the theoretical transfer function of the electric field line based on the structural parameters includes: When a power line has a branch structure, the branch structure is equivalent to the corresponding input impedance, and the input impedance is connected in parallel with the load impedance at the branch node to update the load condition of the main line at that node. Based on the updated load condition, the equivalent input impedance of the main line is calculated segment by segment from the receiving end to the transmitting end. Finally, the theoretical transfer function is generated according to the voltage and current relationship between the transmitting end and the receiving end.
4. The power line channel modeling method according to claim 1 or 3, characterized in that, The residual data represents the difference between the measured channel transmission function and the theoretical transmission function.
5. The power line channel modeling method according to claim 1, characterized in that, The weighted fusion of the theoretical transfer function and the residual data includes: The theoretical transfer function is added to the product of the preset physical weights and the residual data, wherein the preset physical weights are used to balance the contributions of the theoretical transfer function and the residual data in the fusion.
6. The power line channel modeling method according to claim 1 or 5, characterized in that, The normalized channel features are used to train the enhanced conditional generative adversarial network, including: Using the normalized channel characteristics as a reference, the residual data output by the enhanced conditional generative adversarial network can compensate for the deviation between the theoretical transfer function and the normalized channel characteristics.
7. The power line channel modeling method according to any one of claims 1 to 3 and 5, characterized in that, The standardized conditional features include mainline length, number of branches, branch length, and load size.
8. A power line channel modeling system, using the method as described in any one of claims 1 to 7, characterized in that, include: The data acquisition module is used to collect the structural parameters of the power line and the corresponding measured channel transmission function; The preprocessing module is used to preprocess the structural parameters and the measured channel transmission function to obtain standardized conditional features and normalized and smooth channel features. The theoretical transfer function generation module generates the theoretical transfer function of the electric power line based on the structural parameters. The residual data generation module is used to receive the standardized conditional features as conditional information, train based on the normalized channel features, and output residual data corresponding to the conditional features. The fusion output module is used to weight and fuse the theoretical transfer function with the residual data, and to smooth the fusion result to obtain the final simulated channel transfer function for power line channel modeling.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the power line channel modeling method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the power line channel modeling method according to any one of claims 1 to 7.