A communication system simulation method based on Modelica
Building a communication system simulation model using the Modelica language overcomes the limitations of existing simulation software in communication system testing, enables efficient simulation and verification of the communication system, adapts to the needs of different scenarios, and improves development efficiency and system stability.
Patent Information
- Application Number
- CN202410828397.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-06-25
Smart Images

Figure CN118827409B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of communication simulation, and in particular to a communication system simulation method based on Modelica. Background Art
[0002] With the continuous development of communication technology, communication systems are accessing more and more scenarios. The requirements of communication systems in different scenarios are different. When testing the impact of new communication methods and a wider range of scenarios on signals, existing simulation software has many limitations.
[0003] Modelica is an equation-based, multi-domain modeling language that can be used to describe the structure and behavior of physical systems, as well as traditional process control modeling. Simulation system models built with Modelica can better extend established communication simulation system models. Summary of the Invention
[0004] The purpose of the present invention is to provide a communication system simulation method based on Modelica, which aims to accurately simulate the actual communication process and verify the system performance and reliability by constructing and simulating various modules of the communication system.
[0005] The technical solution of the present invention is to provide a communication system simulation method based on Modelica, the method comprising:
[0006] S1. Determine the communication protocol used by the communication system to be simulated, determine the frame structure of the communication protocol, draw a flowchart of the encoding process of the communication protocol for the OFDM physical layer, and convert the flowchart into a basic architecture in the Modelica development environment;
[0007] S2. Fill in the corresponding models according to the functions required in the basic architecture and classify and organize them according to the general classification rules of communication systems;
[0008] S3. Connect the models according to the actual physical topology or relevant theories;
[0009] S4. Perform functional verification on the constructed simulation model to verify the reliability of the model. During the verification process, a unified interface is used as the interface for signal output to ensure the uniformity of the test model.
[0010] In any of the above technical solutions, further, the frame structure determined in step S1 includes a specific composition of a preamble symbol, a signal field, and a data field.
[0011] In any of the above technical solutions, further, the encoding process in the flowchart in step S1 includes symbol generation, leading symbol insertion, encoding, interleaving, and modulation steps.
[0012] In any of the above technical solutions, further, step S2 specifically includes:
[0013] S21, divide the OFDM module into five parts: user data generation module, preamble generation module, signal domain data generation module, data domain data generation module, and framing module;
[0014] S22. Design a user data generation module to cyclically generate a frame of user data for use by subsequent modules. The user data generation module is constructed based on the principle of CRC checksum. The CRC checksum module is used in conjunction with the user data generation module to ensure data accuracy.
[0015] S23. Construct a DATA field data generation module to generate data in the DATA field of the PPDU frame structure, including the SERVICE, PSDU, Tail, and Pad parts. Design a user bit stream generation module to convert the input user data into the format of the data field specified by the PLCP and form a corresponding bit stream, changing the statistical characteristics of the original digital signal through scrambling.
[0016] S24. Design a convolutional encoder and use a convolutional algorithm to convolutionally encode the bit stream;
[0017] S25. Design a packet interleaver to select an appropriate modulation scheme based on the size of the bit stream; calculate the corresponding interleaving depth by multiplying the number of data subcarriers by the number of bits in each symbol;
[0018] S26, constellation mapping, mapping the bits generated by the interleaver to the complex plane according to certain rules to form complex modulation symbols;
[0019] S27, using IFFT to convert the frequency domain signal into a time domain signal;
[0020] S28. Construct a signal domain data generation module. Since the signal domain data generation module uses similar basic modules as the DATA domain data generation module, the basic modules in the DATA domain data generation module are used for construction. The encoding, interleaving, and modulation processes similar to those in the DATA domain are completed according to the data structure of the signal domain.
[0021] S29. Construct a framing module to frame the preamble, signal domain data, and data domain data to form a complete frame structure.
[0022] In any of the above technical solutions, further, step S3 specifically includes:
[0023] S31. Based on functional requirements, build a unified and extensible interface library based on the protocol, including input and output interfaces and internal connection interfaces;
[0024] S32. Encapsulate all involved functional modules at different levels according to functional requirements, and use the interface constructed in step S31 as the external connection port of each part;
[0025] Taking the 802.11a protocol as an example, it is mainly divided into training symbols, signal domain, data domain scrambling and descrambling, convolutional encoder and Viterbi decoding, interleaving, subcarrier modulation and demodulation;
[0026] S33. According to the actual signal transmission process, the encapsulated subsystem models are connected according to the actual system connection or the flowchart in step S1. After the connection, ensure that the signal is correctly transmitted between the modules to maintain the consistency and integrity of the data;
[0027] S4. Perform functional verification on the constructed simulation model according to its mathematical principles to verify the reliability of the model. During the verification process, a unified interface is used as the interface for signal output to ensure the uniformity of the test model.
[0028] The beneficial effects of the present invention are:
[0029] The technical solution of the present invention can accurately simulate the various functional modules of the communication system by utilizing the powerful object-oriented modeling and simulation capabilities of Modelica, ensuring that the simulation results are highly consistent with the actual situation.
[0030] In the preferred implementation of the present invention, a unified interface library and hierarchical encapsulation functional modules are designed so that the model can be efficiently reused and expanded to meet the needs of different communication protocols and modulation methods, greatly reducing development time and costs; by constructing and testing different channel models and input signals, the performance and reliability of the entire communication system in various practical application scenarios can be effectively verified, ensuring the stability of the system in actual use.
[0031] The present invention provides detailed steps and clear module division, enabling developers to quickly build and verify communication systems with different protocols and modulation modes, reducing development difficulty and improving development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The advantages of the above and additional aspects of the present invention will become apparent and readily understood from the following description of the embodiments with reference to the accompanying drawings, in which:
[0033] Figure 1 is a flow chart of a communication system simulation method based on Modelica according to an embodiment of the present invention;
[0034] Figure 2 is a system block diagram of an 802.11a communication protocol according to a communication system simulation method based on Modelica according to an embodiment of the present invention;
[0035] Figure 3 The present invention is a flowchart of OFDM physical layer coding of the 802.11a communication protocol according to a communication system simulation method based on Modelica in accordance with an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features therein can be combined with each other without conflict.
[0037] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.
[0038] like Figure 1 As shown, this embodiment provides a communication system simulation method based on Modelica, including:
[0039] S1. Determine the communication protocol used by the communication system to be simulated, determine the frame structure of the communication protocol, draw a flowchart of the encoding process of the communication protocol for the OFDM physical layer, and convert the flowchart into a basic architecture in the Modelica development environment.
[0040] The determined frame structure includes the specific composition of the preamble symbol, the signal field and the data field.
[0041] like Figure 2 The following is the system block diagram of 802.11a protocol. Figure 3 The coding process flow chart of the OFDM physical layer shown in the flowchart includes steps such as symbol generation, preamble symbol insertion, coding, interleaving, and modulation.
[0042] S2. Fill in the corresponding model according to the functions required in the basic architecture, and classify and organize it according to the general classification rules of the communication system.
[0043] Step S2 includes:
[0044] S21. Divide the OFDM module into five parts: user data generation module, preamble generation module, signal domain data generation module, data domain data generation module, and framing module.
[0045] S22. Design a user data generation module to cyclically generate a frame of user data for use by subsequent modules.
[0046] Specifically, the user data generation module is constructed based on the principle of CRC verification, and the CRC verification module is used in conjunction with the user data generation module to ensure data accuracy.
[0047] S23. Construct a DATA field data generation module to generate data in the DATA field of the PPDU frame structure, including the four parts of SERVICE, PSDU, Tail and Pad; design a user bit stream generation module to convert the input user data according to the format of the data field specified by PLCP and form a corresponding bit stream, changing the statistical characteristics of the original digital signal through scrambling.
[0048] S24. Design a convolutional encoder and use the convolution algorithm to convolutionally encode the bit stream.
[0049] S25. Design a block interleaver to select the appropriate modulation scheme based on the size of the bit stream (e.g., interleaving depths of 48, 96, 192, and 288 bits for BPSK, QPSK, 16QAM, and 64QAM, respectively). After convolutional encoding and interleaving, the serial bit stream is grouped into groups of 1, 2, 4, or 6 bits. The bit stream is mapped into complex numbers using a specific pattern, forming BPSK, QPSK, 16QAM, or 64QAM modulation. The corresponding interleaving depth is calculated by multiplying the number of data subcarriers by the number of bits in each symbol.
[0050] S26, constellation mapping, maps the bits formed by the interleaver to the complex plane according to a certain rule (generally using Gray code) to form complex modulation symbols.
[0051] S27. Use IFFT to convert the frequency domain signal into a time domain signal.
[0052] S28. Construct a signal domain data generation module. Since the basic modules used in the signal domain data generation module are similar to those used in the DATA domain data generation module, the basic modules in the DATA domain data generation module are used for construction, and the encoding, interleaving, and modulation processes similar to those in the DATA domain are completed according to the data structure of the signal domain.
[0053] S29. Construct a framing module to frame the preamble, signal domain data, and data domain data to form a complete frame structure.
[0054] S3. Connect the models according to actual physical topology or relevant theories.
[0055] Step S3 includes:
[0056] S31. According to functional requirements, build a unified and extensible interface library based on the protocol, including input and output interfaces, internal connection interfaces, etc.
[0057] S32. Based on functional requirements, all involved functional modules are encapsulated at different levels, and the external connection ports of each part use the interface constructed in step S31.
[0058] Taking the 802.11a protocol as an example, it is mainly divided into training symbols, signal domain, data domain scrambling and descrambling, convolutional encoder and Viterbi decoding, interleaving, subcarrier modulation and demodulation, etc.
[0059] S33. According to the actual signal transmission process, the encapsulated subsystem model is connected according to the connection of the actual system or the flowchart in step S1. After the connection, ensure that the signal is correctly transmitted between the modules to maintain the consistency and integrity of the data.
[0060] S4. Perform functional verification on the constructed simulation model according to its mathematical principles to verify the reliability of the model. During the verification process, a unified interface is used as the interface for signal output to ensure the uniformity of the test model.
[0061] Step S4 specifically includes:
[0062] S41. Construct a signal that meets the test conditions, or use a suitable continuous or discrete signal already in the model library as the message signal to be transmitted.
[0063] S42: Construct a channel model that meets the actual situation, or select an existing channel model as a test channel.
[0064] S43. Use the test signal as the input signal, insert the channel model between the transmitter and the receiver, and test the signal transmission conditions under multiple different channels at the same time; during the simulation system test, observe the received signal waveform after the entire signal passes through the simulation system, and compare it with the originally transmitted message signal.
[0065] S44. For the new model built to meet the needs of this simulation, perform functional verification based on its mathematical principles to verify the reliability of the model. After ensuring that the various component models of the system meet the requirements, test the overall performance of the system.
[0066] In summary, the present invention proposes a communication system simulation method based on Modelica, which includes:
[0067] S1. Determine the communication protocol used by the communication system to be simulated, determine the frame structure of the communication protocol, draw a flowchart of the encoding process of the communication protocol for the OFDM physical layer, and convert the flowchart into a basic architecture in the Modelica development environment.
[0068] S2. Fill in the corresponding model according to the functions required in the basic architecture, and classify and organize it according to the general classification rules of the communication system.
[0069] S3. Connect the models according to actual physical topology or relevant theories.
[0070] S4. Perform functional verification on the constructed simulation model to verify the reliability of the model. During the verification process, a unified interface is used as the interface for signal output to ensure the uniformity of the test model.
[0071] In the present invention, terms such as "installed," "connected," "connected," and "fixed" should be understood broadly. For example, "connected" may refer to a fixed connection, a detachable connection, or an integral connection; and "connected" may refer to a direct connection or an indirect connection via an intermediary. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0072] The shapes of the various components in the drawings are schematic, and certain differences from their actual shapes are not excluded. The drawings are only used to illustrate the principles of the present invention and are not intended to limit the present invention.
[0073] Although the present invention has been disclosed in detail with reference to the accompanying drawings, it should be understood that these descriptions are merely illustrative and are not intended to limit the application of the present invention. The scope of the present invention is defined by the appended claims and includes various modifications, variations, and equivalents made to the invention without departing from the scope and spirit of the present invention.
Claims
1. A communication system simulation method based on Modelica, characterized in that: The method includes: S1. Determine the communication protocol used by the communication system to be simulated, determine the frame structure of the communication protocol, draw a flowchart of the encoding process of the communication protocol for the OFDM physical layer, and convert the flowchart into a basic architecture in the Modelica development environment; S2. Fill in the corresponding models according to the functions required in the basic architecture and classify and organize them according to the general classification rules of communication systems; S3. Connect the models according to the actual physical topology or relevant theories; S4. Perform functional verification on the constructed simulation model to verify the reliability of the model. During the verification process, a unified interface is used as the interface for signal output to ensure the uniformity of the test model.
2. The communication system simulation method based on Modelica according to claim 1, characterized in that: The frame structure determined in step S1 includes the specific composition of the leading symbol, the signal field and the data field.
3. The communication system simulation method based on Modelica according to claim 1, characterized in that: The encoding process in the flowchart in step S1 includes symbol generation, leading symbol insertion, encoding, interleaving, and modulation steps.
4. The communication system simulation method based on Modelica according to claim 1, characterized in that: The step S2 specifically includes: S21, divide the OFDM module into five parts: user data generation module, preamble generation module, signal domain data generation module, data domain data generation module, and framing module; S22. Design a user data generation module to cyclically generate a frame of user data for use by subsequent modules. The user data generation module is constructed based on the principle of CRC checksum. The CRC checksum module is used in conjunction with the user data generation module to ensure data accuracy. S23. Construct a DATA field data generation module to generate data in the DATA field of the PPDU frame structure, including the SERVICE, PSDU, Tail, and Pad parts. Design a user bit stream generation module to convert the input user data into the format of the data field specified by the PLCP and form a corresponding bit stream, changing the statistical characteristics of the original digital signal through scrambling. S24. Design a convolutional encoder and use a convolutional algorithm to convolutionally encode the bit stream; S25. Design a packet interleaver to select an appropriate modulation scheme based on the size of the bit stream; calculate the corresponding interleaving depth by multiplying the number of data subcarriers by the number of bits in each symbol; S26, constellation mapping, mapping the bits generated by the interleaver to the complex plane according to certain rules to form complex modulation symbols; S27, using IFFT to convert the frequency domain signal into a time domain signal; S28. Construct a signal domain data generation module. Since the signal domain data generation module uses similar basic modules as the DATA domain data generation module, the basic modules in the DATA domain data generation module are used for construction. The encoding, interleaving, and modulation processes similar to those in the DATA domain are completed according to the data structure of the signal domain. S29. Construct a framing module to frame the preamble, signal domain data, and data domain data to form a complete frame structure.
5. The communication system simulation method based on Modelica according to claim 1, characterized in that: The step S3 specifically includes: S31. Based on functional requirements, build a unified and extensible interface library based on the protocol, including input and output interfaces and internal connection interfaces; S32. Encapsulate all involved functional modules at different levels according to functional requirements, and use the interface constructed in step S31 as the external connection port of each part; Taking the 802.11a protocol as an example, it is mainly divided into training symbols, signal domain, data domain scrambling and descrambling, convolutional encoder and Viterbi decoding, interleaving, subcarrier modulation and demodulation; S33. According to the actual signal transmission process, the encapsulated subsystem models are connected according to the actual system connection or the flowchart in step S1. After the connection, ensure that the signal is correctly transmitted between the modules to maintain the consistency and integrity of the data; S4. Perform functional verification on the constructed simulation model according to its mathematical principles to verify the reliability of the model. During the verification process, a unified interface is used as the interface for signal output to ensure the uniformity of the test model.
Citation Information
Patent Citations
Platform and method of virtual simulation communication system
CN102097018A
All phase OFDM system design based on FPGA
CN103338178A