Dual-mode communication system performance test method based on single-chip microcomputer
Through the performance testing method of dual-mode communication system based on microcontroller, the problems of single evaluation indicators and unreal testing environment in the existing technology are solved, and a comprehensive and accurate evaluation of the performance of dual-mode communication system is achieved, providing a basis for system optimization.
Patent Information
- Application Number
- CN202411760060.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-02-28
Smart Images

Figure CN119544127A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of communication technology and single-chip microcomputer application, and in particular to a dual-mode communication system performance testing method based on a single-chip microcomputer. Background Art
[0002] The distribution area has a complex environment and a wide range of services. Various communication technologies have different adaptability in terms of performance and cost considerations. Therefore, applying dual-mode to smart grids and new energy is a way to adapt to technological development. Dual-mode communication technology has two communication modes: power line and wireless. It can flexibly and complementary solve device connection problems, and can use adaptive algorithms to switch modes, which can adapt to various business indicators in a targeted manner.
[0003] With the rapid development of Internet of Things technology, dual-mode communication systems have gradually become a research hotspot because of their ability to flexibly switch between different communication modes to cope with complex environments. However, in practical applications, key performance indicators such as the transmission capacity, switching level, and delay characteristics of dual-mode communication systems directly affect the stability and reliability of the system. In a complex and changing communication environment, how to ensure the stability, reliability, and efficiency of the system has become a difficult problem that needs to be solved urgently. Traditional evaluation methods often have problems such as single evaluation indicators and unrealistic test environments, which lead to deviations between evaluation results and actual applications. How to effectively evaluate the performance of such systems has become a problem that needs to be solved urgently.
[0004] Related technology development:
[0005] Dual-mode communication technology: Dual-mode communication technology can support two or more communication modes, and has the characteristics of strong flexibility and wide adaptability. At present, dual-mode communication technology has been widely used in smart phones, smart homes, industrial control and other fields. With the continuous development of Internet of Things technology, dual-mode communication technology will continue to play an important role and promote the intelligent process in various fields.
[0006] Power line communication technology: At present, most of the 670,000 km long transmission lines with voltage levels above 35KV have opened power line carrier channels, forming a huge power line carrier communication network. This network is mainly used by power supply departments at the prefecture, city or lower levels to form dispatching communications, telecontrol and integrated automation channels for terminal substations and large users. At present, it is divided into high-voltage power line carrier communication technology, medium-voltage power line carrier communication technology, and low-voltage power line carrier communication technology according to voltage levels.
[0007] Bluetooth technology: Based on short-range wireless connection, it establishes a short-range radio technology with a special connection for the communication environment of fixed and mobile devices. It is necessary to establish a common open standard for radio air interface and its control software to further integrate communication and computers. While there is no cable or the data is transmitted at a rate of 1Mb / s through cables, it can also be easily connected to the Internet. This is a specification that can realize wireless transmission of voice and data. It is a new wireless connection technology with low cost, low power consumption and certain security.
[0008] Wi-Fi wireless LAN: It can realize wireless access of MOPS. The main advantage of this technology is that it can perfectly solve the wireless access of users and user terminals in wireless LAN and campus network. Its coverage range can reach about 100m, and the transmission speed is relatively fast. Relatively speaking, the cost is relatively low, which greatly saves the cost of network wiring and is more convenient for manufacturers to participate. Although its data security is slightly inferior to Bluetooth technology, its bandwidth and radio wave coverage area have very obvious advantages over Bluetooth. However, its better bandwidth is also at the cost of very high power consumption. Therefore, most wireless networks need to have higher power reserves, which also limits the widespread use of wireless networks in industrial sites to a certain extent.
[0009] ZigBee: ZigBee is an emerging low-rate, short-range wireless networking communication technology. It is mainly used for short-range wireless connections and is a technical proposal between wireless tag technology and Bluetooth. ZigBee technology has its own wireless standard. It mainly relies on the coordination between thousands of tiny sensors to achieve the purpose of communication. With the help of radio waves, these sensors use a relay-like method to transmit data from the same sensor to another sensor. In this process, the energy required is extremely small, so the efficiency of this communication is relatively high.
[0010] Relay transmission technology: Relay transmission technology is a technology that uses relay nodes to extend the communication distance and enhance the signal strength. In the field of wireless communications, relay transmission technology has been widely used, such as mobile communication base stations, satellite communications, etc. In the field of the Internet of Things, relay transmission technology is also used to solve communication problems in sensor networks and improve the reliability and stability of data transmission.
[0011] In the Chinese patent application entitled "An Adaptive Selection Method for Data Transmission Communication Based on Dual-Mode Communication" with publication number CN202311873204.1 and publication date April 5, 2024, an adaptive selection method, device and storage medium for data transmission channels based on dual-mode communication are provided to achieve smooth switching between broadband power line carrier communication and wireless communication, while being compatible with single-mode communication schemes to improve the reliability and stability of the communication system. By real-time monitoring of the channel quality parameters of the data transmission channels between nodes in the dual-mode network in the current communication mode, the channel quality of the data transmission channels between the nodes is evaluated according to the parameters; if the channel quality parameters of any of the data transmission channels meet the preset threshold conditions, the data transmission channel switching is triggered, and the data transmission channel of the best communication mode is selected for switching according to the evaluated channel quality and channel quality parameters, so as to achieve smooth switching between broadband power line carrier communication and wireless communication. However, the patent only focuses on what threshold will trigger the switching of the communication mode, and does not explain the success rate of the switching and the impact on the reliability and stability of the entire system after the switching.
[0012] The Chinese patent application entitled "A configuration method for dual-mode communication fusion and a dual-mode communication fusion system" with publication number CN116633389A and publication date August 22, 2023 discloses a configuration method for dual-mode communication fusion and a dual-mode communication fusion system, the dual-mode communication fusion system comprising: a communication frequency band detection module, a frequency band configuration module, a dual-mode communication module, a data encryption module, a transmission speed detection module, a stability test module, a configuration parameter storage module, and a security assessment module. The present invention selects the dual-mode network communication channel with the best communication quality in each communication direction through the dual-mode communication module to transmit data, thereby improving the success rate and communication quality of network communication; at the same time, the file dual-mode communication data and the document dual-mode communication data in the dual-mode communication data to be sent are divided into two different paths for sending through the data encryption module, which effectively ensures the security of the dual-mode communication data to be sent on the one hand, and effectively improves the transmission efficiency of the dual-mode communication data compared to the sending of the overall dual-mode communication data on the other hand.
[0013] In a Chinese patent application entitled "A simulation test system for HPLC and micro-power wireless dual-mode communication" with publication number CN202022555837.6 and publication date July 16, 2021, a simulation test system for HPLC and micro-power wireless dual-mode communication is provided, including a first unit, a second unit and a third unit, wherein the first unit, the second unit and the third unit are respectively connected to a host computer. The first unit is used for performance testing of HPLC and wireless dual-mode communication, the second unit is used for power and protocol consistency testing, and the third unit is used to support a large number of dual-mode module networking tests, field situation simulation tests, some dual-mode module function tests that need to be performed in a networking state, and meter reading tests. The present application provides a simulation test system for HPLC and micro-power wireless dual-mode communication. By constructing a real-time hardware-in-the-loop test platform, the problem of being unable to simulate and reproduce the dual-mode communication field application environment in a laboratory environment is solved, thereby achieving maximum simulation of various complex communication environments under laboratory conditions, and laying a solid foundation for the large-scale promotion and application of broadband dual-mode.
[0014] In the paper "Dual-mode single-standby terminal communication control method based on semi-Markov chain" (Xiang Min, Zhou Xingwang, Jiang Binglin, et al. Dual-mode single-standby terminal communication control method based on semi-Markov chain [J / OL]. Journal of Scientific Instrument, 1-12 [2024-10-09]. https: / / doi.org / 10.19650 / j.cnki.cjsi.J2412528.), a terminal communication control method based on semi-Markov chain is proposed to improve the comprehensive performance of the terminal in response to the requirements of low power consumption of narrowband Internet of Things (NB-IoT) and low-power Bluetooth (BLE) dual-mode single-standby terminals, BLE connection delay and low response delay of NB-IoT downlink services. It introduces the dual-mode switching process based on eDRX and PSM (two low-power technologies for narrowband IoT); the terminal power consumption and delay calculation model based on semi-Markov chain (introducing the data traffic model, the semi-Markov chain model of terminal communication state transition, the power saving rate and the average downlink delay of narrowband IoT, etc.), and constructs two business scenarios to simulate and verify the performance of the proposed method for the delay and energy consumption effects. However, the paper only focuses on reducing delay and power, and does not explore when is the best switching node, and lacks simulation of this part.
[0015] In the paper "Simulation Test Scheme Based on HPLC and Micropower Wireless Dual-Mode Communication", a system test scheme for dual-mode communication technology is proposed, covering basic performance testing, point-to-point communication performance testing, protocol consistency interoperability testing, process and interchangeability testing, and specific comprehensive networking function testing. It introduces the test platform system scheme (functional requirements, performance requirements), hardware implementation, software design (embedded software, virtual table program and implementation), performance testing (basic carrier communication performance, wireless communication performance, power consumption and protocol consistency), interaction process and interchangeability, and networking function. This paper is only a simple description of performance testing and does not provide a specific scheme.
[0016] The technical problems existing in the prior art mainly include:
[0017] (1) Existing technologies mostly focus on the dual-mode switching process, that is, at what level the mode switching occurs, but there is little research on the impact of the switching action on the entire system. There is a lack of systematic evaluation in terms of the switching success rate, stability, and the delay compared with single-mode communication transmission, and it may not be possible to achieve the optimal transmission process.
[0018] (2) Existing technologies mostly test the basic performance of the communication transmission process separately, or study a few performances, lack integrity, only test part of the performance, and cannot fully understand the overall situation of the system, which has limitations.
[0019] (3) Although the existing technology takes comprehensive considerations into account when conducting simulation tests on the communication process, it is relatively simple and lacks specificity. There is no simulation to evaluate the overall performance of the system when achieving optimal switching.
[0020] In view of the above-mentioned deficiencies in the prior art, the present invention is proposed. Summary of the invention
[0021] In view of the deficiencies of the prior art, the purpose of the present invention is to provide a dual-mode communication system performance test method based on a single-chip microcomputer, which can support the performance evaluation of multiple communication modes and meet the needs of different application scenarios through a scientific and comprehensive evaluation method. In terms of evaluation, multiple indicators are set, channel switching is considered, and a comprehensive evaluation of system performance is achieved; in practice, by simulating the real communication environment, the results are run using software first, and then the transmission process of dual-mode communication is simulated in the laboratory to improve the accuracy and reliability of the evaluation results. Accurately reflect the stability, reliability, and efficiency of the dual-mode communication system, and provide a basis for further optimization and improvement of the system.
[0022] In order to achieve the above object, the present invention adopts the following technical solutions:
[0023] A dual-mode communication system performance test method based on a single-chip microcomputer comprises the following steps:
[0024] Step S1, test system construction;
[0025] The test system includes single-chip microcomputer module A, single-chip microcomputer module B, dual-mode module A and dual-mode module B and a channel measurement and control module, among which:
[0026] The single-chip module A is connected to each pin of the dual-mode module A to realize the control of the dual-mode module by the single-chip module. The dual-mode module A and the dual-mode module B complete the connection of the physical interface and complete the wireless communication through the protocol. The dual-mode module B is connected to each pin of the single-chip module B, and a channel measurement and control module is added between the dual-mode module B and the dual-mode module A for switching.
[0027] Step S2, test setup
[0028] After connecting all modules, on the side of single-chip module A, control dual-mode module A to send a data sequence, and dual-mode module A independently and completely transmits a data sequence through power line and wireless. After dual-mode module B receives the signal sequence, it transmits it to single-chip module B through the serial port. Then, on the side of single-chip module B, control dual-mode module B to send another data sequence, and independently and completely transmit the data sequence through power line and wireless. After dual-mode module A receives the signal sequence, it transmits it to single-chip module A through the serial port.
[0029] The test settings for system performance include but are not limited to: S20, bandwidth utilization Q test; S21, bit error rate (BER) test; S22, static delay tj test; S23, dynamic delay td test; S24, switching time tq test; S25, switching success rate H test; S26, balance test;
[0030] Step S3, setting evaluation criteria;
[0031] For step S20, bandwidth utilization Q;
[0032] Before evaluation, confirm the total bandwidth B; calculate the data transmission rate by sending a file of known size, whose data sequence length is W, and record its transmission time t, and then calculate the bandwidth utilization Q;
[0033] V represents the data transmission rate. The larger V is, the higher the bandwidth utilization rate is, and the better the transmission performance of the communication mode calculated is; otherwise, the transmission performance is worse.
[0034] S21, bit error rate (BER). The smaller the BER, the lower the bit error rate, the smaller the number of transmitted bit errors, and the better the calculated transmission performance of the communication mode; otherwise, the worse the transmission performance;
[0035] S22, static delay tj; the smaller the static delay value, the faster the system transmission rate, the better the system transmission performance, and the better the performance of the evaluated communication mode; otherwise, the worse the performance;
[0036] S23, dynamic delay td; the smaller the dynamic delay value is, the faster the transmission rate of the system is in an unstable state, the better the system transmission performance is, and the better the performance of the communication mode being evaluated is; otherwise, the performance is worse;
[0037] S24, switching time tq; the shorter the switching time, the faster the transmission rate of the system, and the better the switching performance of the evaluated communication mode; otherwise, the worse the switching performance.
[0038] S25, switching success rate H; the higher the switching success rate, the better the switching performance of the system and the higher the switching stability; conversely, the worse the switching performance and the more unstable it is;
[0039] S26, balance test; the smaller the total transmission time value, the faster the system transmission rate;
[0040] Other indicators are evaluated according to the above evaluation criteria of S20-S26 to obtain performance comparison data for channel independent transmission and channel joint transmission.
[0041] Step S4, performing comparison by setting a data table;
[0042] Step S5, analyzing the evaluation result in step S4.
[0043] The preferred technical solution provided by the present invention is:
[0044] In the step S1, the single-chip microcomputer A controls the dual-mode module A through the serial port connection; the transmission process from the dual-mode module A to the dual-mode module B adopts the wireless communication method or the power line communication method; the dual-mode module B transmits and receives data to the single-chip microcomputer module B through the serial port; it means that the single-chip microcomputer module B controls the dual-mode module B through the serial port connection; the transmission process from the dual-mode module A to the dual-mode module B realizes the data transmission from the single-chip microcomputer module A to the single-chip microcomputer module B.
[0045] The preferred technical solution provided by the present invention is:
[0046] In the step S2,
[0047] S20, the bandwidth utilization Q test is specifically:
[0048] Send a file of known size. When dual-mode module A starts to send, it starts timing the power line and wireless separately. The microcontroller monitors the size of the file transmitted in each part, calculates the transmission rate separately, and then calculates the bandwidth utilization separately.
[0049] V = W / t;
[0050] Q = (V / B) × 100%;
[0051] Where: V represents the data transmission rate, W represents the length of the data sequence, t represents the transmission time, Q represents the bandwidth utilization, and B represents the total bandwidth;
[0052] S21, the bit error rate (BER) test is specifically:
[0053] Determine the total number of code elements you want to transmit. After the dual-mode module A completes the transmission to the dual-mode module B, monitor the code elements transmitted by each part through the single-chip microcomputer to determine the number of bit errors in the transmission. Substitute the above values into the bit error rate formula to calculate the bit error rate of data transmission within the specified time.
[0054] The bit error rate formula is: BER = N / M;
[0055] Where: BER stands for bit error rate, N stands for the number of bit errors transmitted, and T stands for the total number of bits in transmission;
[0056] S22, the static delay tj test is specifically as follows:
[0057] In a stable state, for the transmission point to the receiving end, the timing starts when the MCU A port sends data and ends when the MCU B receives the data, and the time difference of this part is calculated;
[0058] Take multiple measurements and calculate the average value, which is the static delay tj1;
[0059] Using the same calculation method, the static transmission delay from MCU B to MCU A is recorded as tj2;
[0060] S23, the dynamic delay td test is specifically as follows:
[0061] When the system is in an unstable state, the timing is performed from the single-chip microcomputer module A to the single-chip microcomputer module B, the time difference is calculated, and multiple measurements are performed to calculate the average time difference, which is the dynamic delay td1; in the same calculation method, the transmission dynamic delay from the single-chip microcomputer B to the single-chip microcomputer A is recorded as td2;
[0062] S24, the switching time tq test is specifically as follows:
[0063] Through the different parameters obtained in the transmission process from dual-mode module A to dual-mode module B, namely, bandwidth utilization, bit error rate, static delay tj1 and dynamic delay td1, the two transmission processes of power line and wireless are evaluated, and a better transmission channel is selected by comparison.
[0064] The specific test method is:
[0065] Assuming that the better channel is a wireless channel, in the control model of the dual-mode module based on the single-chip microcomputer, the dotted line is the wireless channel; in the transmission process from the dual-mode module B to the dual-mode module A, the wireless channel is used to disconnect the power line channel. After a period of time, the power line channel between the two nodes is reconnected. At this time, the timing starts and ends when the single-chip microcomputer A can receive the code element transmitted by the power line channel. The time difference is calculated; multiple measurements are taken and the average value is calculated, which is the switching time tq;
[0066] If the better channel is the power line, repeat the above method;
[0067] S25, switching success rate H test, i.e. switching stability test;
[0068] Specifically:
[0069] Assuming that the better channel is a wireless channel, in the control model of the dual-mode module based on the single-chip microcomputer, the dotted line is the wireless channel;
[0070] During the transmission from dual-mode module B to dual-mode module A, the wireless channel is used to disconnect the power line channel. After a period of time, the power line channel between the two nodes is reconnected. If the microcontroller A can receive the code transmitted by the power line channel, the number of successful switching is increased by 1.
[0071] Switch multiple times, record the total number of switches and the number of successful switches, and substitute them into the formula to calculate the successful switching process;
[0072] Use the formula: H = m / n
[0073] Where: H represents the switching success rate, m represents the number of successful switching, and n represents the total number of switching;
[0074] If the better channel is the power line, repeat the above steps;
[0075] Under different network environments, signal strengths and load conditions, perform mode switching multiple times, observe and record the number of successful system switching m and the total number of switching n. Substituting the two values into the formula, the switching success rate can be obtained.
[0076] S25, balance test, i.e. fairness test;
[0077] The specific steps are:
[0078] When calculating the transmission rate from MCU A to MCU B, cut off one of the transmission channels and keep only one transmission mode. Calculate the transmission rate when the two channels transmit independently and compare it with the transmission rate when the two channels work simultaneously.
[0079] In this way, other parameters are also compared and evaluated to achieve a balance test for the system;
[0080] In this process, a timing module is added to record the transmission time when two channels work simultaneously, and one of the transmission channels is cut off, leaving only one transmission mode, recording the transmission time, and comparing the transmission time of the two modes as a reference indicator for comparative evaluation;
[0081] In different network environments, when the two channels cannot be converted between dual-mode switching modes, the indicators of the two channels are calculated independently, that is, when only one transmission mode is used, the test calculations of V, Q, BER, tj1, tj2, td1, td2 are performed, and the total transmission time T of the entire system is recorded.
[0082] The further preferred technical solution provided by the present invention is:
[0083] In step S4, the specific setting of the data table includes:
[0084] When using power line or wireless transmission alone, the data table set in Table 1 is used
[0085] Table 1:
[0086] wireless V Q BER tj1 td1 tj2 td2 T 1 2 3 average value Power lines V Q BER tj1 td1 tj2 td2 T 1 2 3 average value
[0087] Where: V represents the data transmission rate, Q represents the bandwidth utilization, BER represents the bit error rate, tj1 is the static delay from dual-mode module A to dual-mode module B, td1 is the dynamic delay from dual-mode module A to dual-mode module B, tj2 is the static delay from dual-mode module B to dual-mode module A, td2 is the dynamic delay from dual-mode module B to dual-mode module A, and T is the total transmission time;
[0088] When transmitting from dual-mode module A to dual-mode module B, the data table set in Table 2 is used
[0089] Table 2:
[0090]
[0091]
[0092] Where: V represents the data transmission rate, Q represents the bandwidth utilization, BER represents the bit error rate, tj1 represents the static delay from dual-mode module A to dual-mode module B, and td1 represents the dynamic delay from dual-mode module A to dual-mode module B;
[0093] Without adding the switching function, the overall dual-mode transmission system is set as follows:
[0094] Table 3:
[0095] wireless V Q BER tj1 td1 tj2 td2 T 1 2 3 average value Power Lines V Q BER tj1 td1 tj2 td2 T 1 2 3 average value
[0096] Add a switching function. If the transmission mode to be switched is the power line, the data table 4 from the dual-mode module B to the dual-mode module A is as follows:
[0097] Table 4:
[0098]
[0099] Where: V represents the data transmission rate, Q represents the bandwidth utilization rate, BER represents the bit error rate, tj2 represents the static delay from dual-mode module B to dual-mode module A, td2 represents the dynamic delay from dual-mode module B to dual-mode module A, T represents the total transmission time, tq represents the switching time, H represents the switching success rate, and the average value corresponding to H is used to fill in the switching success rate;
[0100] If the transmission mode to be switched is wireless, the data table 5 from the dual-mode module B to the dual-mode module A is as follows:
[0101] Table 5:
[0102]
[0103] Where: V represents the data transmission rate, Q represents the bandwidth utilization, BER represents the bit error rate, tj2 represents the static delay from dual-mode module B to dual-mode module A, td2 represents the dynamic delay from dual-mode module B to dual-mode module A, T represents the total transmission time, tq represents the switching time, H represents the switching success rate, and the average value corresponding to H represents the switching success rate.
[0104] Furthermore,
[0105] In the step S5,
[0106] If the system tests the single-mode communication mode, the comparison and evaluation data of the two modes can be obtained according to the data in Table 1 when the single-mode transmission is used;
[0107] If the system tests the dual-mode communication mode, without considering the switching mode, the comparison and evaluation data of the two modes can be obtained according to the data in Table 2 and Table 3 when the dual-mode transmission is not switched;
[0108] If the system tests the dual-mode communication mode, considering the switching mode, the data in Table 2 can be used to give the data when the power line and wireless transmission modes are independently and completely transmitted from the single-chip module A to the single-chip module B. By comparing, a better transmission mode can be obtained;
[0109] Then, according to the obtained optimal transmission mode, Table 4 or Table 5 is selected to obtain the comparison and evaluation data of the two modes when dual-mode transmission is considered to be switched.
[0110] The preferred technical solution provided by the present invention is: the bit error rate test is replaced by a packet loss rate test.
[0111] The preferred technical solution provided by the present invention is: the channel measurement and control module is replaced by a signal shielding device.
[0112] The present invention also provides an electronic device, comprising: a memory, a processor, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements a dual-mode communication system performance test method based on a single-chip microcomputer.
[0113] The present invention also provides a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, a dual-mode communication system performance test method based on a single-chip microcomputer is implemented.
[0114] Beneficial effects:
[0115] 1. The existing technologies mostly test the basic performance of the communication transmission process separately, lack of integrity, and more consideration for the single-mode system. The above scheme can realize the overall evaluation of the communication transmission process, and design the system, taking both the single-mode system and the dual-mode system into consideration, so as to have a comprehensive understanding of the overall situation of the system.
[0116] 2. The system sets up a complete test process, gives detailed test steps, and also introduces in detail how to test. A data table is designed. After the test is completed, the best evaluation of channel performance can be given based on the test data.
[0117] 3. Existing systems pay little attention to switching. This system takes into account the impact of the switching process on dual-mode transmission. The evaluation indicators include switching time measurement, switching success rate, and balance test compared with single-mode communication transmission. Through evaluation, the optimal transmission process can be obtained, broadband resources can be saved, and transmission efficiency can be improved.
[0118] 4. In view of the fact that the existing system control channel method tends to be single, this system solution can realize flexible control of the channel, provide more possibilities in control, and realize flexible transformation of power line and wireless communication.
[0119] Terminology explanation:
[0120] Single-chip microcomputer technology: As an integrated circuit chip, single-chip microcomputer has the characteristics of small size, low power consumption, and powerful functions, and is widely used in embedded systems. With the continuous advancement of technology, the performance of single-chip microcomputers has been continuously improved, including higher processing speed, larger storage capacity, and more peripheral interfaces. At the same time, single-chip microcomputers are also developing in the direction of low power consumption, high integration, and intelligence to meet the needs of different application scenarios.
[0121] Redundant transmission: In some cases, in order to improve the reliability of data transmission, the data sequence will be completely copied to the power line and wireless channels for transmission. The receiving end will receive the data from the two channels and compare and verify them to ensure the integrity and accuracy of the data. If the data of one channel is erroneous or lost, it can be restored by relying on the data of the other channel.
[0122] Delay: The time it takes for a signal to propagate from the point of transmission to the point of reception. In digital circuits, delay usually refers to the time it takes for a signal to propagate through a logic gate or circuit component.
[0123] Total number of transmitted codes: This refers to the total number of code elements that the system attempts to transmit within a specified time. Code elements can be bits, bytes, or other data units, depending on the system design and communication protocol.
[0124] The number of bit errors in transmission: This refers to the number of symbols that cannot be correctly recognized by the receiving end within a specified time due to noise, interference, synchronization errors, etc. These bit errors may be single-bit errors or errors in the entire symbol, depending on the system's error correction capabilities and the provisions of the communication protocol. BRIEF DESCRIPTION OF THE DRAWINGS
[0125] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the brain wave-based train emergency braking control method and system. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0126] Figure 1 It is a schematic diagram of the system architecture of the present invention;
[0127] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0128] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0129] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless defined as herein.
[0130] To facilitate understanding of the embodiments of the present invention, a specific embodiment is used as an example to further explain the present invention, and this embodiment does not constitute a limitation on the embodiments of the present invention.
[0131] The present invention provides a dual-mode communication system performance testing method based on a single-chip microcomputer, comprising the following steps:
[0132] Step S1, test system construction;
[0133] like Figure 1 The system architecture diagram shown in the figure shows that the test system includes a single-chip microcomputer module A, a single-chip microcomputer module B, a dual-mode module A and a dual-mode module B, and a channel measurement and control module.
[0134] The single-chip module A is connected to each pin of the dual-mode module A to realize the control of the dual-mode module by the single-chip module. The dual-mode module A and the dual-mode module B complete the connection of the physical interface and complete the wireless communication through the protocol. The dual-mode module B is connected to each pin of the single-chip module B, and a channel measurement and control module is added between the dual-mode module B and the dual-mode module A for switching.
[0135] The functions of each module are as follows:
[0136] Microcontroller module: Serial communication function: It has a variety of serial communication interfaces and can connect various external devices. Here, power lines and wireless devices can be connected through the serial port to realize data reception and communication, and realize data transmission with other devices; Storage function: It can be used to store large amounts of generated data and process the data; Input and output function: The microcontroller has input and output modules. The input module is used to input external signals or data into the microcontroller, and the output module is responsible for outputting the microcontroller's control instructions or calculation results to external devices.
[0137] Dual-mode module: realizes two different transmission modes, power line and wireless, and can be seamlessly integrated with other processors. Here, it can achieve seamless integration with the microcontroller, which can better ensure data transmission.
[0138] Channel measurement and control module: It can monitor the channel and fully grasp the channel status. Here, it is mainly used to test and evaluate the disconnection method. After a period of transmission in one transmission method, such as power line or wireless, try to reconnect in another way. The channel test module can monitor the channel status at this time, so as to better calculate the switching time, switching success rate, etc.
[0139] Figure 1 In the figure, the solid line represents the power line, the dashed line represents wireless, the dotted line represents the power line or wireless, and the double dashed line-dot represents the information transmission process. When there is transmission from dual-mode module A to dual-mode module B, in order to ensure that both the power line and the wireless can transmit data completely, a redundant transmission method is adopted.
[0140] Label ① indicates that the single-chip microcomputer A controls the dual-mode module A through the serial port connection;
[0141] Reference numeral ② indicates that the transmission process from dual-mode module A to dual-mode module B adopts wireless communication;
[0142] Reference numeral ③ indicates that the transmission process from dual-mode module A to dual-mode module B adopts power line communication;
[0143] Label ④ indicates that the dual-mode module B transmits and receives data to the single-chip microcomputer module B through the serial port;
[0144] Label ⑤ indicates that the single-chip microcomputer module B controls the dual-mode module B through the serial port connection;
[0145] Reference numeral ⑥ indicates that the transmission process from dual-mode module A to dual-mode module B realizes the data transmission from single-chip module A to single-chip module B;
[0146] Reference numeral ⑦ indicates that the transmission process from the dual-mode module A to the dual-mode module B adopts one of the power line and wireless modes, and it is assumed here that the wireless mode is adopted;
[0147] Reference numeral ⑧ indicates that the transmission mode used in ⑦ is assumed to be wireless transmission, and the power line transmission mode from the dual-mode module B to A is re-established through the channel measurement and control module;
[0148] Reference numeral ⑨ indicates that wireless transmission is carried out as usual;
[0149] Reference numeral ⑩ indicates that the dual-mode module A returns the received data to the single-chip microcomputer module A via the serial port;
[0150] Label It indicates that the transmission process from dual-mode module B to dual-mode module A realizes the data transmission from single-chip module B to single-chip module A;
[0151] Among them, at mark ⑦, if the wireless method is adopted, it is necessary to disconnect the power line communication and unplug the power line. If the power line method is adopted, a wireless signal jammer is needed here to shield the wireless signal.
[0152] Step S2, test setup
[0153] After connecting all modules, on the side of single-chip module A, control dual-mode module A to send a data sequence, and dual-mode module A independently and completely transmits a data sequence through power line and wireless. After dual-mode module B receives the signal sequence, it transmits it to single-chip module B through the serial port. Then, on the side of single-chip module B, control dual-mode module B to send another data sequence, and independently and completely transmit the data sequence through power line and wireless. After dual-mode module A receives the signal sequence, it transmits it to single-chip module A through the serial port.
[0154] The test settings for system performance include but are not limited to:
[0155] S20, bandwidth utilization Q test; S21, bit error rate (BER) test; S22, static delay tj test; S23, dynamic delay td test; S24, switching time tq test; S25, switching success rate H test; S26, balance test;
[0156] S20, the bandwidth utilization Q test is specifically:
[0157] Send a file of known size. When dual-mode module A starts to send, it starts timing the power line and wireless separately. The microcontroller monitors the size of the file transmitted in each part, calculates the transmission rate separately, and then calculates the bandwidth utilization separately.
[0158] V = W / t;
[0159] Q = (V / B) × 100%;
[0160] Where: V represents the data transmission rate, W represents the length of the data sequence, t represents the transmission time, Q represents the bandwidth utilization, and B represents the total bandwidth;
[0161] S21, the bit error rate (BER) test is specifically:
[0162] Determine the total number of code elements you want to transmit. After the dual-mode module A completes the transmission to the dual-mode module B, monitor the code elements transmitted by each part through the single-chip microcomputer to determine the number of bit errors in the transmission. Substitute the above values into the bit error rate formula to calculate the bit error rate of data transmission within the specified time.
[0163] The bit error rate formula is: BER = N / M;
[0164] Where: BER stands for bit error rate, N stands for the number of bit errors transmitted, and T stands for the total number of bits in transmission;
[0165] S22, the static delay tj test is specifically as follows:
[0166] In a stable state, for the transmission point to the receiving end, the timing starts when the MCU A port sends data and ends when the MCU B receives the data, and the time difference of this part is calculated;
[0167] Take multiple measurements and calculate the average value, which is the static delay tj1;
[0168] Using the same calculation method, the static transmission delay from MCU B to MCU A is recorded as tj2;
[0169] S23, the dynamic delay td test is specifically as follows:
[0170] When the system is in an unstable state, the timing is performed from the single-chip microcomputer module A to the single-chip microcomputer module B, the time difference is calculated, and multiple measurements are performed to calculate the average time difference, which is the dynamic delay td1; in the same calculation method, the transmission dynamic delay from the single-chip microcomputer B to the single-chip microcomputer A is recorded as td2;
[0171] S24, the switching time tq test is specifically as follows:
[0172] Through the different parameters obtained in the transmission process from dual-mode module A to dual-mode module B, namely bandwidth utilization, bit error rate, tj1 and dynamic delay td1, the two transmission processes of power line and wireless are evaluated, and a better transmission channel is selected by comparison.
[0173] The specific test method is:
[0174] Assuming that the better channel is a wireless channel, in the control model of the dual-mode module based on the single-chip microcomputer, the dotted line is the wireless channel; in the transmission process from the dual-mode module B to the dual-mode module A, the wireless channel is used to disconnect the power line channel. After a period of time, the power line channel between the two nodes is reconnected. At this time, the timing starts and ends when the single-chip microcomputer A can receive the code element transmitted by the power line channel. The time difference is calculated; multiple measurements are taken and the average value is calculated, which is the switching time tq;
[0175] If the better channel is the power line, repeat the above method;
[0176] S25, switching success rate H test, i.e. switching stability test;
[0177] Specifically:
[0178] Assuming that the better channel is a wireless channel, in the control model of the dual-mode module based on the single-chip microcomputer, the dotted line is the wireless channel;
[0179] During the transmission from dual-mode module B to dual-mode module A, the wireless channel is used to disconnect the power line channel. After a period of time, the power line channel between the two nodes is reconnected. If the microcontroller A can receive the code transmitted by the power line channel, the number of successful switching is increased by 1.
[0180] Switch multiple times, record the total number of switches and the number of successful switches, and substitute them into the formula to calculate the successful switching process;
[0181] Use the formula: H = m / n
[0182] Where: H represents the switching success rate, m represents the number of successful switching, and n represents the total number of switching;
[0183] If the better channel is the power line, repeat the above steps;
[0184] Under different network environments, signal strengths and load conditions, perform mode switching multiple times, observe and record the number of successful system switching m and the total number of switching n. Substituting the two values into the formula, the switching success rate can be obtained.
[0185] S25, balance test, i.e. fairness test;
[0186] The specific steps are:
[0187] When calculating the transmission rate from MCU A to MCU B, cut off one of the transmission channels and keep only one transmission mode. Calculate the transmission rate when the two channels transmit independently and compare it with the transmission rate when the two channels work simultaneously.
[0188] In this way, other parameters are also compared and evaluated to achieve a balance test for the system;
[0189] In this process, a timing module is added to record the transmission time when two channels work simultaneously, and one of the transmission channels is cut off, leaving only one transmission mode, recording the transmission time, and comparing the transmission time of the two modes as a reference indicator for comparative evaluation;
[0190] In different network environments, when the two channels cannot be converted between dual-mode switching modes, the indicators of the two channels are calculated independently, that is, when only one transmission mode is used, the test calculations of V, Q, BER, tj1, tj2, td1, td2 are performed, and the total transmission time T of the entire system is recorded.
[0191] Step S3, setting evaluation criteria;
[0192] For step S20, bandwidth utilization Q;
[0193] Before evaluation, confirm the total bandwidth B; calculate the data transmission rate by sending a file of known size, whose data sequence length is W, and record its transmission time t, and then calculate the bandwidth utilization Q;
[0194] V represents the data transmission rate. The larger V is, the higher the bandwidth utilization rate is, and the better the transmission performance of the communication mode calculated is; otherwise, the transmission performance is worse.
[0195] S21, bit error rate (BER). The smaller the BER, the lower the bit error rate, the smaller the number of transmitted bit errors, and the better the calculated transmission performance of the communication mode; otherwise, the worse the transmission performance;
[0196] S22, static delay tj; the smaller the static delay value, the faster the system transmission rate, the better the system transmission performance, and the better the performance of the evaluated communication mode; otherwise, the worse the performance;
[0197] S23, dynamic delay td; the smaller the dynamic delay value is, the faster the transmission rate of the system is in an unstable state, the better the system transmission performance is, and the better the performance of the communication mode being evaluated is; otherwise, the performance is worse;
[0198] S24, switching time tq; the shorter the switching time, the faster the transmission rate of the system, and the better the switching performance of the evaluated communication mode; otherwise, the worse the switching performance.
[0199] S25, switching success rate H; the higher the switching success rate, the better the switching performance of the system and the higher the switching stability; conversely, the worse the switching performance and the more unstable it is;
[0200] S26, balance test; the smaller the total transmission time value, the faster the system transmission rate;
[0201] Other indicators are evaluated according to the above evaluation criteria of S20-S26 to obtain performance comparison data for channel independent transmission and channel joint transmission.
[0202] Step S4, performing comparison by setting a data table;
[0203] In step S4, the specific setting of the data table includes:
[0204] When using power line or wireless transmission alone, the data table set in Table 1 is used
[0205] Table 1:
[0206]
[0207]
[0208] Where: V represents the data transmission rate, Q represents the bandwidth utilization, BER represents the bit error rate, tj1 is the static delay from dual-mode module A to dual-mode module B, td1 is the dynamic delay from dual-mode module A to dual-mode module B, tj2 is the static delay from dual-mode module B to dual-mode module A, td2 is the dynamic delay from dual-mode module B to dual-mode module A, and T is the total transmission time;
[0209] When transmitting from dual-mode module A to dual-mode module B, the data table set in Table 2 is used
[0210] Table 2:
[0211] wireless V Q BER tj1 td1 1 2 3 average value Power Lines V Q BER tj1 td1 1 2 3 average value
[0212] Where: V represents the data transmission rate, Q represents the bandwidth utilization, BER represents the bit error rate, tj1 represents the static delay from dual-mode module A to dual-mode module B, and td1 represents the dynamic delay from dual-mode module A to dual-mode module B;
[0213] Without adding the switching function, the overall dual-mode transmission system is set as follows:
[0214] Table 3:
[0215] wireless V Q BER tj1 td1 tj2 td2 T 1 2 3 average value Power Lines V Q BER tj1 td1 tj2 td2 T 1 2 3 average value
[0216] Add a switching function. If the transmission mode to be switched is the power line, the data table 4 from the dual-mode module B to the dual-mode module A is as follows:
[0217] Table 4:
[0218]
[0219] Where: V represents the data transmission rate, Q represents the bandwidth utilization rate, BER represents the bit error rate, tj2 represents the static delay from dual-mode module B to dual-mode module A, td2 represents the dynamic delay from dual-mode module B to dual-mode module A, T represents the total transmission time, tq represents the switching time, H represents the switching success rate, and the average value corresponding to H is used to fill in the switching success rate;
[0220] If the transmission mode to be switched is wireless, the data table 5 from the dual-mode module B to the dual-mode module A is as follows:
[0221] Table 5:
[0222]
[0223] Where: V represents the data transmission rate, Q represents the bandwidth utilization, BER represents the bit error rate, tj2 represents the static delay from dual-mode module B to dual-mode module A, td2 represents the dynamic delay from dual-mode module B to dual-mode module A, T represents the total transmission time, tq represents the switching time, H represents the switching success rate, and the average value corresponding to H represents the switching success rate.
[0224] Step S5, analyzing the evaluation result in step S4.
[0225] If the system tests the single-mode communication mode, the comparison and evaluation data of the two modes can be obtained according to the data in Table 1 when the single-mode transmission is used;
[0226] If the system tests the dual-mode communication mode, without considering the switching mode, the comparison and evaluation data of the two modes can be obtained according to the data in Table 2 and Table 3 when the dual-mode transmission is not switched;
[0227] If the system tests the dual-mode communication mode, considering the switching mode, the data in Table 2 can be used to give the data when the power line and wireless transmission modes are independently and completely transmitted from the single-chip module A to the single-chip module B. By comparing, a better transmission mode can be obtained;
[0228] Then, according to the obtained optimal transmission mode, Table 4 or Table 5 is selected to obtain the comparison and evaluation data of the two modes when dual-mode transmission is considered to be switched.
[0229] In the above steps, the bit error rate test is replaced by a packet loss rate test, and the channel measurement and control module is replaced by a signal shielding device.
[0230] The present invention also provides an electronic device, comprising: a memory, a processor, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements a dual-mode communication system performance test method based on a single-chip microcomputer.
[0231] The present invention also provides a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, a dual-mode communication system performance test method based on a single-chip microcomputer is implemented.
[0232] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0233] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0234] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for an electronic device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0235] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A dual-mode communication system performance test method based on a single-chip microcomputer, characterized in that: The following steps are involved: Step S1, test system construction; The test system includes single-chip microcomputer module A, single-chip microcomputer module B, dual-mode module A and dual-mode module B and a channel measurement and control module, among which: The single-chip module A is connected to each pin of the dual-mode module A to realize the control of the dual-mode module by the single-chip module. The dual-mode module A and the dual-mode module B complete the connection of the physical interface and complete the wireless communication through the protocol. The dual-mode module B is connected to each pin of the single-chip module B, and a channel measurement and control module is added between the dual-mode module B and the dual-mode module A for switching. Step S2, test setup After connecting all modules, on the side of single-chip module A, control dual-mode module A to send a data sequence, and dual-mode module A independently and completely transmits a data sequence through power line and wireless. After dual-mode module B receives the signal sequence, it transmits it to single-chip module B through the serial port. Then, on the side of single-chip module B, control dual-mode module B to send another data sequence, and independently and completely transmit the data sequence through power line and wireless. After dual-mode module A receives the signal sequence, it transmits it to single-chip module A through the serial port. The test settings for system performance include but are not limited to: S20, bandwidth utilization Q test; S21, bit error rate (BER) test; S22, static delay tj test; S23, dynamic delay td test; S24, switching time tq test; S25, switching success rate H test; S26, balance test; Step S3, setting evaluation criteria; For step S20, bandwidth utilization Q; Before evaluation, confirm the total bandwidth B; calculate the data transmission rate by sending a file of known size, whose data sequence length is W, and record its transmission time t, and then calculate the bandwidth utilization Q; V represents the data transmission rate. The larger V is, the higher the bandwidth utilization rate is, and the better the transmission performance of the communication mode calculated is; otherwise, the transmission performance is worse. S21, bit error rate (BER). The smaller the BER, the lower the bit error rate, the smaller the number of transmitted bit errors, and the better the calculated transmission performance of the communication mode; otherwise, the worse the transmission performance; S22, static delay tj; the smaller the static delay value, the faster the system transmission rate, the better the system transmission performance, and the better the performance of the evaluated communication mode; otherwise, the worse the performance; S23, dynamic delay td; the smaller the dynamic delay value is, the faster the transmission rate of the system is in an unstable state, the better the system transmission performance is, and the better the performance of the communication mode being evaluated is; otherwise, the performance is worse; S24, switching time tq; the shorter the switching time, the faster the transmission rate of the system, and the better the switching performance of the evaluated communication mode; otherwise, the worse the switching performance. S25, switching success rate H; the higher the switching success rate, the better the switching performance of the system and the higher the switching stability; conversely, the worse the switching performance and the more unstable it is; S26, balance test; the smaller the total transmission time value, the faster the system transmission rate; Other indicators are evaluated according to the above evaluation criteria of S20-S26 to obtain performance comparison data for channel independent transmission and channel joint transmission. Step S4, performing comparison by setting a data table; Step S5, analyzing the evaluation result in step S4.
2. According to claim 1, a dual-mode communication system performance test method based on a single-chip microcomputer is characterized in that: In the step S1, the single-chip microcomputer A controls the dual-mode module A through the serial port connection; the transmission process from the dual-mode module A to the dual-mode module B adopts the wireless communication method or the power line communication method; the dual-mode module B transmits and receives data to the single-chip microcomputer module B through the serial port; it means that the single-chip microcomputer module B controls the dual-mode module B through the serial port connection; the transmission process from the dual-mode module A to the dual-mode module B realizes the data transmission from the single-chip microcomputer module A to the single-chip microcomputer module B.
3. According to the single chip microcomputer-based dual-mode communication system performance testing method of claim 1, it is characterized in that: In the step S2, S20, the bandwidth utilization Q test is specifically: Send a file of known size. When dual-mode module A starts to send, it starts timing the power line and wireless separately. The microcontroller monitors the size of the file transmitted in each part, calculates the transmission rate separately, and then calculates the bandwidth utilization separately. V = W / t; Q = (V / B) × 100%; Where: V represents the data transmission rate, W represents the length of the data sequence, t represents the transmission time, Q represents the bandwidth utilization, and B represents the total bandwidth; S21, the bit error rate (BER) test is specifically: Determine the total number of code elements you want to transmit. After the dual-mode module A completes the transmission to the dual-mode module B, monitor the code elements transmitted by each part through the single-chip microcomputer to determine the number of bit errors in the transmission. Substitute the above values into the bit error rate formula to calculate the bit error rate of data transmission within the specified time. The bit error rate formula is: BER = N / M; Where: BER stands for bit error rate, N stands for the number of bit errors transmitted, and T stands for the total number of bits in transmission; S22, the static delay tj test is specifically as follows: In a stable state, for the transmission point to the receiving end, the timing starts when the MCU A port sends data and ends when the MCU B receives the data, and the time difference of this part is calculated; Measure multiple times and calculate the average value, which is the static delay tj1; Using the same calculation method, the static transmission delay from MCU B to MCU A is recorded as tj2; S23, the dynamic delay td test is specifically as follows: When the system is in an unstable state, the timing is performed from the single-chip microcomputer module A to the single-chip microcomputer module B, the time difference is calculated, and multiple measurements are performed to calculate the average time difference, which is the dynamic delay td1; in the same calculation method, the transmission dynamic delay from the single-chip microcomputer B to the single-chip microcomputer A is recorded as td2; S24, the switching time tq test is specifically as follows: Through the different parameters obtained in the transmission process from dual-mode module A to dual-mode module B, namely, bandwidth utilization, bit error rate, static delay tj1 and dynamic delay td1, the two transmission processes of power line and wireless are evaluated, and a better transmission channel is selected by comparison. The specific test method is: Assuming that the better channel is a wireless channel, in the control model of the dual-mode module based on the single-chip microcomputer, the dotted line is the wireless channel; in the transmission process from the dual-mode module B to the dual-mode module A, the wireless channel is used to disconnect the power line channel. After a period of time, the power line channel between the two nodes is reconnected. At this time, the timing starts and ends when the single-chip microcomputer A can receive the code element transmitted by the power line channel. The time difference is calculated; multiple measurements are taken and the average value is calculated, which is the switching time tq; If the better channel is the power line, repeat the above method; S25, switching success rate H test, i.e. switching stability test; Specifically: Assuming that the better channel is a wireless channel, in the control model of the dual-mode module based on the single-chip microcomputer, the dotted line is the wireless channel; During the transmission from dual-mode module B to dual-mode module A, the wireless channel is used to disconnect the power line channel. After a period of time, the power line channel between the two nodes is reconnected. If the microcontroller A can receive the code transmitted by the power line channel, the number of successful switching is increased by 1. Switch multiple times, record the total number of switches and the number of successful switches, and substitute them into the formula to calculate the successful switching process; Use the formula: H = m / n Where: H represents the switching success rate, m represents the number of successful switching, and n represents the total number of switching; If the better channel is the power line, repeat the above steps; Under different network environments, signal strengths and load conditions, perform mode switching multiple times, observe and record the number of successful system switching m and the total number of switching n. Substituting the two values into the formula, the switching success rate can be obtained. S25, balance test, i.e. fairness test; The specific steps are: When calculating the transmission rate from MCU A to MCU B, cut off one of the transmission channels and keep only one transmission mode. Calculate the transmission rate when the two channels transmit independently and compare it with the transmission rate when the two channels work simultaneously. In this way, other parameters are also compared and evaluated to achieve a balance test for the system; In this process, a timing module is added to record the transmission time when two channels work simultaneously, and one of the transmission channels is cut off, leaving only one transmission mode, recording the transmission time, and comparing the transmission time of the two modes as a reference indicator for comparative evaluation; In different network environments, when the two channels cannot be converted between dual-mode switching modes, the indicators of the two channels are calculated independently, that is, when only one transmission mode is used, the test calculations of V, Q, BER, tj1, tj2, td1, td2 are performed, and the total transmission time T of the entire system is recorded.
4. The method for testing the performance of a dual-mode communication system based on a single-chip microcomputer according to claim 1, characterized in that: In step S4, the specific setting of the data table includes: When using power line or wireless transmission alone, the data table set in Table 1 is used Table 1: Where: V represents the data transmission rate, Q represents the bandwidth utilization, BER represents the bit error rate, tj1 is the static delay from dual-mode module A to dual-mode module B, td1 is the dynamic delay from dual-mode module A to dual-mode module B, tj2 is the static delay from dual-mode module B to dual-mode module A, td2 is the dynamic delay from dual-mode module B to dual-mode module A, and T is the total transmission time; When transmitting from dual-mode module A to dual-mode module B, the data table set in Table 2 is used Table 2: Where: V represents the data transmission rate, Q represents the bandwidth utilization, BER represents the bit error rate, tj1 represents the static delay from dual-mode module A to dual-mode module B, and td1 represents the dynamic delay from dual-mode module A to dual-mode module B; Without adding the switching function, the overall dual-mode transmission system is set as follows: Table 3: Add a switching function. If the transmission mode to be switched is the power line, the data table 4 from the dual-mode module B to the dual-mode module A is as follows: Table 4: Where: V represents the data transmission rate, Q represents the bandwidth utilization rate, BER represents the bit error rate, tj2 represents the static delay from dual-mode module B to dual-mode module A, td2 represents the dynamic delay from dual-mode module B to dual-mode module A, T represents the total transmission time, tq represents the switching time, H represents the switching success rate, and the average value corresponding to H is used to fill in the switching success rate; If the transmission mode to be switched is wireless, the data table 5 from the dual-mode module B to the dual-mode module A is as follows: Table 5: Where: V represents the data transmission rate, Q represents the bandwidth utilization, BER represents the bit error rate, tj2 represents the static delay from dual-mode module B to dual-mode module A, td2 represents the dynamic delay from dual-mode module B to dual-mode module A, T represents the total transmission time, tq represents the switching time, H represents the switching success rate, and the average value corresponding to H represents the switching success rate.
5. A dual-mode communication system performance testing method based on a single-chip microcomputer according to claim 4, characterized in that: In the step S5, If the system tests the single-mode communication mode, the comparison and evaluation data of the two modes can be obtained according to the data in Table 1 when the single-mode transmission is used; If the system tests the dual-mode communication mode, without considering the switching mode, the comparison and evaluation data of the two modes can be obtained according to the data in Table 2 and Table 3 when the dual-mode transmission is not switched; If the system tests the dual-mode communication mode, considering the switching mode, the data in Table 2 can be used to give the data when the power line and wireless transmission modes are independently and completely transmitted from the single-chip module A to the single-chip module B. By comparing, a better transmission mode can be obtained; Then, according to the obtained optimal transmission mode, Table 4 or Table 5 is selected to obtain the comparison and evaluation data of the two modes when dual-mode transmission is considered to be switched.
6. The method for testing the performance of a dual-mode communication system based on a single-chip microcomputer according to claim 1, characterized in that: The bit error rate test is replaced by a packet loss rate test.
7. The method for testing the performance of a dual-mode communication system based on a single-chip microcomputer according to claim 1, characterized in that: The channel measurement and control module is replaced by a signal shielding device.
8. An electronic device, characterized in that: include: A memory, a processor, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the method for testing the performance of a dual-mode communication system based on a single-chip microcomputer is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and when the program is executed by the processor, the dual-mode communication system performance testing method based on a single-chip microcomputer is implemented.
Citation Information
Patent Citations
Configuration method for dual-mode communication fusion and dual-mode communication fusion system
CN116633389A
Adaptive selection method of data transmission channel based on dual-mode communication
CN117834529A
Simulation test system applied to HPLC (High Performance Liquid Chromatography) and micropower wireless dual-mode communication
CN213718231U
Cited By
Dual-mode communication method and system based on single-chip microcomputer
CN121056958A
